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 DevNet = ChainParams{ Name: "devnet", DefaultP2PPort: "26126", NetMagic: 111999, AccountPrefixes: AccountPrefixes{ Public: "dlpub", Private: "dlprv", Multisig: "dlmul", Contract: "dlctr", }, GovernanceBudgetQuotient: 5, BaseRewardPerBlock: 26 * 1e7, IncluderRewardQuotient: 8, EpochLength: 5, EjectionBalance: 95, MaxBalanceChurnQuotient: 32, LatestBlockRootsLength: 64, MinAttestationInclusionDelay: 1, DepositAmount: 100, UnitsPerCoin: 100000000, InactivityPenaltyQuotient: 17179869184, SlotDuration: 30, MaxVotesPerBlock: 32, MaxTxsPerBlock: 5000, MaxTxsMultiPerBlock: 128, MaxDepositsPerBlock: 128, MaxExitsPerBlock: 128, MaxRANDAOSlashingsPerBlock: 20, MaxProposerSlashingsPerBlock: 2, MaxVoteSlashingsPerBlock: 10, MaxMigrationsProofsPerBlock: 5, WhistleblowerRewardQuotient: 2, GovernancePercentages: []uint8{ 30, 10, 20, 20, 20, }, MinVotingBalance: 100, CommunityOverrideQuotient: 3, VotingPeriodSlots: 20160, InitialManagers: [][20]byte{ daoTest1, daoTest2, daoTest3, daoTest4, daoTest5, }, RendevouzStrings: map[int]string{ 0: "do_not_go_gentle_into_that_good_night", }, Relayers: map[string]string{ "cronos-devnet-1": "/ip4/174.138.34.252/tcp/25000/p2p/12D3KooWDMH4ddviknJJocAJWAhGcTXXkhorkzvpdLAe2CdK8Fxd", }, }
DevNet are chain parameters used for the devnet.
View Source
var MainNet = ChainParams{ Name: "mainnet", DefaultP2PPort: "24126", NetMagic: 333999, AccountPrefixes: AccountPrefixes{ Public: "olpub", Private: "olprv", Multisig: "olmul", Contract: "olctr", }, GovernanceBudgetQuotient: 5, BaseRewardPerBlock: 26 * 1e7, IncluderRewardQuotient: 8, EpochLength: 5, EjectionBalance: 95, MaxBalanceChurnQuotient: 8, LatestBlockRootsLength: 64, MinAttestationInclusionDelay: 1, DepositAmount: 100, UnitsPerCoin: 100000000, InactivityPenaltyQuotient: 17179869184, SlotDuration: 30, MaxVotesPerBlock: 32, MaxTxsPerBlock: 5000, MaxTxsMultiPerBlock: 128, MaxDepositsPerBlock: 128, MaxExitsPerBlock: 128, MaxRANDAOSlashingsPerBlock: 20, MaxProposerSlashingsPerBlock: 2, MaxVoteSlashingsPerBlock: 10, MaxGovernanceVotesPerBlock: 128, MaxMigrationsProofsPerBlock: 5, 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: 26 * 1e7, IncluderRewardQuotient: 8, EpochLength: 5, EjectionBalance: 95, MaxBalanceChurnQuotient: 32, LatestBlockRootsLength: 64, MinAttestationInclusionDelay: 1, DepositAmount: 100, UnitsPerCoin: 100000000, InactivityPenaltyQuotient: 17179869184, SlotDuration: 30, MaxVotesPerBlock: 32, MaxTxsPerBlock: 5000, MaxTxsMultiPerBlock: 128, MaxDepositsPerBlock: 128, MaxExitsPerBlock: 128, MaxRANDAOSlashingsPerBlock: 20, MaxProposerSlashingsPerBlock: 2, MaxVoteSlashingsPerBlock: 10, MaxMigrationsProofsPerBlock: 5, WhistleblowerRewardQuotient: 2, GovernancePercentages: []uint8{ 30, 10, 20, 20, 20, }, MinVotingBalance: 100, CommunityOverrideQuotient: 3, VotingPeriodSlots: 20160, InitialManagers: [][20]byte{ daoTest1, daoTest2, daoTest3, daoTest4, daoTest5, }, RendevouzStrings: map[int]string{ 0: "do_not_go_gentle_into_that_good_night", }, Relayers: map[string]string{ "cronos-1": "/ip4/134.122.28.156/tcp/25000/p2p/12D3KooWMXYnAd4vLNZ1h4yB964o2yK5rm3dWnmRvEp5UErZjqKZ", "cronos-2": "/ip4/159.65.233.200/tcp/25000/p2p/12D3KooWQG52UmSjJWbiksovwnNEQw8oEsWL2uiFVNvQ8ij4ig3w", }, }
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 string DefaultP2PPort string GenesisHash chainhash.Hash AccountPrefixes AccountPrefixes NetMagic uint32 GovernanceBudgetQuotient uint64 EpochLength uint64 EjectionBalance uint64 MaxBalanceChurnQuotient uint64 MaxVotesPerBlock uint64 MaxTxsPerBlock uint64 MaxTxsMultiPerBlock uint64 LatestBlockRootsLength uint64 MinAttestationInclusionDelay uint64 DepositAmount uint64 BaseRewardPerBlock uint64 UnitsPerCoin uint64 InactivityPenaltyQuotient uint64 IncluderRewardQuotient uint64 SlotDuration uint64 MaxDepositsPerBlock uint64 MaxExitsPerBlock uint64 MaxRANDAOSlashingsPerBlock uint64 MaxProposerSlashingsPerBlock uint64 MaxVoteSlashingsPerBlock uint64 MaxGovernanceVotesPerBlock uint64 MaxMigrationsProofsPerBlock uint64 WhistleblowerRewardQuotient uint64 GovernancePercentages []uint8 MinVotingBalance uint64 CommunityOverrideQuotient uint64 VotingPeriodSlots uint64 InitialManagers [][20]byte RendevouzStrings map[int]string Relayers map[string]string }
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.