Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( VersionNumber = (mayor * 100000) + (minor * 1000) + (patch * 10) Version = fmt.Sprintf("%d.%d.%d", mayor, minor, patch) )
View Source
var MainNet = ChainParams{ Name: "mainnet", DefaultP2PPort: "24126", NetMagic: 333999, AccountPrefixes: AccountPrefixes{ Public: "olpub", Private: "olprv", Multisig: "olmul", Contract: "olctr", }, GovernanceBudgetQuotient: 5, BaseRewardPerBlock: 18 * 1e7, IncluderRewardQuotient: 8, EpochLength: 5, EjectionBalance: 95, MaxBalanceChurnQuotient: 8, LatestBlockRootsLength: 64, MinAttestationInclusionDelay: 1, DepositAmount: 100, UnitsPerCoin: 100000000, InactivityPenaltyQuotient: 17179869184, SlotDuration: 30, WhistleblowerRewardQuotient: 2, GovernancePercentages: []uint8{ 30, 10, 20, 20, 20, }, MinVotingBalance: 100, CommunityOverrideQuotient: 3, VotingPeriodSlots: 20160, InitialManagers: [][20]byte{ {}, {}, {}, {}, {}, }, RendevouzStrings: map[int]string{ 0: "do_not_go_gentle_into_that_good_night", }, }
MainNet are chain parameters used for the main network.
View Source
var TestNet = ChainParams{ Name: "testnet", DefaultP2PPort: "25126", NetMagic: 222999, AccountPrefixes: AccountPrefixes{ Public: "tlpub", Private: "tlprv", Multisig: "tlmul", Contract: "tlctr", }, GovernanceBudgetQuotient: 5, BaseRewardPerBlock: 18 * 1e7, ProofsMerkleRoot: merkleRootHashTestNet, IncluderRewardQuotient: 8, EpochLength: 5, EjectionBalance: 95, MaxBalanceChurnQuotient: 32, LatestBlockRootsLength: 64, MinAttestationInclusionDelay: 1, DepositAmount: 100, UnitsPerCoin: 100000000, InactivityPenaltyQuotient: 17179869184, SlotDuration: 30, WhistleblowerRewardQuotient: 2, GovernancePercentages: []uint8{ 30, 10, 20, 20, 20, }, MinVotingBalance: 100, CommunityOverrideQuotient: 3, VotingPeriodSlots: 20160, InitialManagers: [][20]byte{ {}, {}, {}, {}, {}, }, RendevouzStrings: map[int]string{ 0: "do_not_go_gentle_into_that_good_night", }, Relayers: map[string]string{ "cronos-1-ipv4": "/ip4/128.199.244.76/tcp/25000/p2p/12D3KooWDvTjRxiQ4ysMd4GUv4EKbhtXix33QU4ANNFsMtah7AH1", "cronos-2-ipv4": "/ip4/128.199.244.102/tcp/25000/p2p/12D3KooWDAVSoS442h7fSFkoGRD6BJUXnijtcnoq7oyRoT9cVu9v", }, }
TestNet are chain parameters used for the testnet.
Functions ¶
func ProtocolID ¶
Types ¶
type AccountPrefixes ¶
AccountPrefixes are prefixes used for account bech32 encoding.
type ChainParams ¶
type ChainParams struct {
// Name is the common name of the network
Name string
// DefaultP2PPort is the default P2P port on which outbound/inbound connections are handled
DefaultP2PPort string
// GenesisHash is the hash of the genesis block
GenesisHash chainhash.Hash
// AccountPrefixes are the prefixes for bech32 accounts generator.
AccountPrefixes AccountPrefixes
// NetMagic is a number to serve as an ID for Olympus specific messages
NetMagic uint32
// UnitsPerCoin is the amount of decimals used for coins.
UnitsPerCoin uint64
// RendevouzStrings are strings versioned for the DHT Peer relayer
RendevouzStrings map[int]string
// Relayers are the initial seeds to find peers.
Relayers map[string]string
// ProofsMerkleRoot is the merkle root to verify migration CoinProofs
ProofsMerkleRoot chainhash.Hash
// EpochLength the amount of slots on an epoch.
EpochLength uint64
// SlotDuration is the amount of seconds for a slot.
SlotDuration uint64
MaxBalanceChurnQuotient uint64
LatestBlockRootsLength uint64
MinAttestationInclusionDelay uint64
BaseRewardPerBlock uint64
// EjectionBalance the minimum validator balance to be exited from the network.
EjectionBalance uint64
// DepositAmount is the amount of coins that should be locked for a deposit.
DepositAmount uint64
InactivityPenaltyQuotient uint64
IncluderRewardQuotient uint64
WhistleblowerRewardQuotient uint64
GovernanceBudgetQuotient uint64
GovernancePercentages []uint8
InitialManagers [][20]byte
VotingPeriodSlots uint64
MinVotingBalance uint64
CommunityOverrideQuotient uint64
}
ChainParams are parameters that are unique for the chain.
func (*ChainParams) GetRendevouzString ¶
func (p *ChainParams) GetRendevouzString() string
GetRendevouzString is a function to return a rendevouz string for a certain version range to make sure peers find each other depending on their version.
Click to show internal directories.
Click to hide internal directories.