Documentation ¶
Index ¶
- Constants
- Variables
- func ArchiveVersion(gitCommit string) string
- func DAODrainList() []common.Address
- func VersionWithCommit(gitCommit string) string
- type AiConsensusConfig
- type ChainConfig
- func (c *ChainConfig) AitNeedForMinerAccount() *big.Int
- func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *ConfigCompatError
- func (c *ChainConfig) CheckMinerAccountAit(num *big.Int) bool
- func (c *ChainConfig) DefaultCoinbase() string
- func (c *ChainConfig) DefaultDifficaulty() *big.Int
- func (c *ChainConfig) DefaultMaxDifficaulty() *big.Int
- func (c *ChainConfig) GasTable(num *big.Int) GasTable
- func (c *ChainConfig) IsByzantium(num *big.Int) bool
- func (c *ChainConfig) IsCoinDelieverDone(num *big.Int) bool
- func (c *ChainConfig) IsConstantinople(num *big.Int) bool
- func (c *ChainConfig) IsDAOFork(num *big.Int) bool
- func (c *ChainConfig) IsEIP150(num *big.Int) bool
- func (c *ChainConfig) IsEIP155(num *big.Int) bool
- func (c *ChainConfig) IsEIP158(num *big.Int) bool
- func (c *ChainConfig) IsHomestead(num *big.Int) bool
- func (c *ChainConfig) Rules(num *big.Int) Rules
- func (c *ChainConfig) String() string
- type CliqueConfig
- type ConfigCompatError
- type EthashConfig
- type GasTable
- type Rules
Constants ¶
const ( Wei = 1 Ada = 1e3 Babbage = 1e6 Shannon = 1e9 Szabo = 1e12 Finney = 1e15 Ether = 1e18 Einstein = 1e21 Douglas = 1e42 )
These are the multipliers for ether denominations. Example: To get the wei value of an amount in 'douglas', use
new(big.Int).Mul(value, big.NewInt(params.Douglas))
const ( GasLimitBoundDivisor uint64 = 1024 // The bound divisor of the gas limit, used in update calculations. MinGasLimit uint64 = 5000 // Minimum the gas limit may ever be. GenesisGasLimit uint64 = 4712388 // Gas limit of the Genesis block. MaximumExtraDataSize uint64 = 32 // Maximum size extra data may be after Genesis. MaximumSigDataSize uint64 = 128 // Maximum size sig data may be after Genesis. ExpByteGas uint64 = 10 // Times ceil(log256(exponent)) for the EXP instruction. SloadGas uint64 = 50 // Multiplied by the number of 32-byte words that are copied (round up) for any *COPY operation and added. CallValueTransferGas uint64 = 9000 // Paid for CALL when the value transfer is non-zero. CallNewAccountGas uint64 = 25000 // Paid for CALL when the destination address didn't exist prior. TxGas uint64 = 21000 // Per transaction not creating a contract. NOTE: Not payable on data of calls between transactions. TxGasContractCreation uint64 = 53000 // Per transaction that creates a contract. NOTE: Not payable on data of calls between transactions. TxDataZeroGas uint64 = 4 // Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions. QuadCoeffDiv uint64 = 512 // Divisor for the quadratic particle of the memory cost equation. SstoreSetGas uint64 = 20000 // Once per SLOAD operation. LogDataGas uint64 = 8 // Per byte in a LOG* operation's data. CallStipend uint64 = 2300 // Free gas given at beginning of call. Sha3Gas uint64 = 30 // Once per SHA3 operation. Sha3WordGas uint64 = 6 // Once per word of the SHA3 operation's data. SstoreResetGas uint64 = 5000 // Once per SSTORE operation if the zeroness changes from zero. SstoreClearGas uint64 = 5000 // Once per SSTORE operation if the zeroness doesn't change. SstoreRefundGas uint64 = 15000 // Once per SSTORE operation if the zeroness changes to zero. JumpdestGas uint64 = 1 // Refunded gas, once per SSTORE operation if the zeroness changes to zero. EpochDuration uint64 = 30000 // Duration between proof-of-work epochs. CallGas uint64 = 40 // Once per CALL operation & message call transaction. CreateDataGas uint64 = 200 // CallCreateDepth uint64 = 1024 // Maximum depth of call/create stack. ExpGas uint64 = 10 // Once per EXP instruction LogGas uint64 = 375 // Per LOG* operation. CopyGas uint64 = 3 // StackLimit uint64 = 1024 // Maximum size of VM stack allowed. TierStepGas uint64 = 0 // Once per operation, for a selection of them. LogTopicGas uint64 = 375 // Multiplied by the * of the LOG*, per LOG transaction. e.g. LOG0 incurs 0 * c_txLogTopicGas, LOG4 incurs 4 * c_txLogTopicGas. CreateGas uint64 = 32000 // Once per CREATE operation & contract-creation transaction. Create2Gas uint64 = 32000 // Once per CREATE2 operation SuicideRefundGas uint64 = 24000 // Refunded following a suicide operation. MemoryGas uint64 = 3 // Times the address of the (highest referenced byte in memory + 1). NOTE: referencing happens on read, write and in instructions such as RETURN and CALL. TxDataNonZeroGas uint64 = 68 // Per byte of data attached to a transaction that is not equal to zero. NOTE: Not payable on data of calls between transactions. MaxCodeSize = 24576 // Maximum bytecode to permit for a contract EcrecoverGas uint64 = 3000 // Elliptic curve sender recovery gas price Sha256BaseGas uint64 = 60 // Base price for a SHA256 operation Sha256PerWordGas uint64 = 12 // Per-word price for a SHA256 operation Ripemd160BaseGas uint64 = 600 // Base price for a RIPEMD160 operation Ripemd160PerWordGas uint64 = 120 // Per-word price for a RIPEMD160 operation IdentityBaseGas uint64 = 15 // Base price for a data copy operation IdentityPerWordGas uint64 = 3 // Per-work price for a data copy operation ModExpQuadCoeffDiv uint64 = 20 // Divisor for the quadratic particle of the big int modular exponentiation Bn256AddGas uint64 = 500 // Gas needed for an elliptic curve addition Bn256ScalarMulGas uint64 = 40000 // Gas needed for an elliptic curve scalar multiplication Bn256PairingBaseGas uint64 = 100000 // Base price for an elliptic curve pairing check Bn256PairingPerPointGas uint64 = 80000 // Per-point price for an elliptic curve pairing check )
const ( VersionMajor = 1 // Major version component of the current release VersionMinor = 0 // Minor version component of the current release VersionPatch = 2 // Patch version component of the current release VersionMeta = "stable" // Version metadata to append to the version string )
const ( // BloomBitsBlocks is the number of blocks a single bloom bit section vector // contains. BloomBitsBlocks uint64 = 4096 )
Variables ¶
var ( MainnetGenesisHash = common.HexToHash("0x84ba29088566df091e2e7214ca338b4c6f7fda8a52c0454fd134b0e485da1d3a") // Mainnet genesis hash to enforce below configs on TestnetGenesisHash = common.HexToHash("0x41941023680923e0fe4d74a34bdac8141f2540e3ae90623718e47d66d1ca4a2d") // Testnet genesis hash to enforce below configs on )
var ( // MainnetChainConfig is the chain parameters to run a node on the main network. MainnetChainConfig = &ChainConfig{ ChainID: big.NewInt(18376426810067278), HomesteadBlock: big.NewInt(0), DAOForkBlock: big.NewInt(0), DAOForkSupport: false, EIP150Block: nil, EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: nil, Ethash: new(EthashConfig), AiConsensus: &AiConsensusConfig{ MaxValidatorNumber: 10, MaxPooledMinerNumber: 10, Period: 1, BlockValidNumber: 12, Epoch: 1200, VoteEpoch: 30000, EthashDifficulty: big.NewInt(10000000), ExtraData: hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000000a9bcaccef0d131b37e51c8ffcf5bb1651ecc405f6cc874e476c25c1fdc4c601829f17c8b3b06cbd773cf4f94d5062c590bceecfd0d446114e09a86b4441ae7572a2a94111403167bb4a2d4f4ed3e74cfebf670c598ca813d4888b7585db462391614b07256086cf6486057b33d9f23626076becd26034362e1762aeb5f01166b2f694f4fb19fb272377e38ab5f714bd29a48423ea8e96ef7e35df8e6876aabc0487e85216ea4365634b7ac29b70ea8baeeadc52e73f0eee87efb2d3583210ecf42a03d5bead8cb7300a58971525fb7c8ef19b3faa18c6156ec5ae4a3f705c8e6238575ba6d99ae608e93c5a4894bba336e568fca5fae3784df77b91be85ab990179936f3037f2e66315410d58d278124918f79914d9e4b497287fd48fff8f6feae623a26c49e08a871defe4f774dcdcc10dab8f45643a44070a3f0cb2e89d48aee35cec145d3ce061dc99fe2fae8aad527fefdabccb01855499673b57592322621904c51c31a84bd7be6d7e39c74c74710e25cee1931d2fed7ab0f20266f6361f6d336218a52698ab48ab21ec9b239319820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ForkBlockNumber: 328800, }, } // TestnetChainConfig contains the chain parameters to run a node on the Ropsten test network. TestnetChainConfig = &ChainConfig{ ChainID: big.NewInt(3), HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: false, EIP150Block: nil, EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: nil, Ethash: new(EthashConfig), AiConsensus: &AiConsensusConfig{ MaxValidatorNumber: 4, MaxPooledMinerNumber: 4, Period: 1, BlockValidNumber: 12, Epoch: 120, VoteEpoch: 30000, EthashDifficulty: big.NewInt(10000), ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000043fa63f6e587975e93670ace6ab5a71061c1dafa47acbcffa2cccf1ce3e8631e7620a94823605e4f34eae4b8e5d2bed9cddfd6b309f965a27759bad96c40cee6c6692307dda2ff1a33860855fc3b39f1004beb845896ae589fbee97f37e3bff49cb68a3aa6cae15f60311b0990bd3e8545d1b19431094001948e0c1c6aaa39a5cf563e09e941e9c262c87b624007a7500fbb6a7c86fd3c272c77e6cf849af65d5ce0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ForkBlockNumber: 360000, }, } // RinkebyChainConfig contains the chain parameters to run a node on the Rinkeby test network. RinkebyChainConfig = &ChainConfig{ ChainID: big.NewInt(4), HomesteadBlock: big.NewInt(1), DAOForkBlock: nil, DAOForkSupport: false, EIP150Block: nil, EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: nil, Clique: &CliqueConfig{ Period: 15, Epoch: 30000, }, } // AiConsensusChainConfig contains the chain parameters to run a node on the Ai consensus network. AiConsensusChainConfig = &ChainConfig{ ChainId: big.NewInt(4), HomesteadBlock: big.NewInt(1), DAOForkBlock: nil, DAOForkSupport: false, EIP150Block: nil, EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: nil, AiConsensus: &AiConsensusConfig{ MaxValidatorNumber: 4, MaxPooledMinerNumber: 4, Period: 1, BlockValidNumber: 12, Epoch: 120, VoteEpoch: 30000, EthashDifficulty: big.NewInt(10000), ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000043fa63f6e587975e93670ace6ab5a71061c1dafa47acbcffa2cccf1ce3e8631e7620a94823605e4f34eae4b8e5d2bed9cddfd6b309f965a27759bad96c40cee6c6692307dda2ff1a33860855fc3b39f1004beb845896ae589fbee97f37e3bff49cb68a3aa6cae15f60311b0990bd3e8545d1b19431094001948e0c1c6aaa39a5cf563e09e941e9c262c87b624007a7500fbb6a7c86fd3c272c77e6cf849af65d5ce0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), }, } // AllEthashProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the AICHAIN core developers into the Ethash consensus. // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. AllEthashProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, &AiConsensusConfig{ MaxValidatorNumber: 10, MaxPooledMinerNumber: 10, Period: 1, BlockValidNumber: 12, Epoch: 1200, VoteEpoch: 30000, EthashDifficulty: big.NewInt(10000000), ExtraData: hexutil.MustDecode("0x00000000000000000000000000000000000000000000000000000000000000000a9bcaccef0d131b37e51c8ffcf5bb1651ecc405f6cc874e476c25c1fdc4c601829f17c8b3b06cbd773cf4f94d5062c590bceecfd0d446114e09a86b4441ae7572a2a94111403167bb4a2d4f4ed3e74cfebf670c598ca813d4888b7585db462391614b07256086cf6486057b33d9f23626076becd26034362e1762aeb5f01166b2f694f4fb19fb272377e38ab5f714bd29a48423ea8e96ef7e35df8e6876aabc0487e85216ea4365634b7ac29b70ea8baeeadc52e73f0eee87efb2d3583210ecf42a03d5bead8cb7300a58971525fb7c8ef19b3faa18c6156ec5ae4a3f705c8e6238575ba6d99ae608e93c5a4894bba336e568fca5fae3784df77b91be85ab990179936f3037f2e66315410d58d278124918f79914d9e4b497287fd48fff8f6feae623a26c49e08a871defe4f774dcdcc10dab8f45643a44070a3f0cb2e89d48aee35cec145d3ce061dc99fe2fae8aad527fefdabccb01855499673b57592322621904c51c31a84bd7be6d7e39c74c74710e25cee1931d2fed7ab0f20266f6361f6d336218a52698ab48ab21ec9b239319820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ForkBlockNumber: 328800, }} // AllCliqueProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the AICHAIN core developers into the Clique consensus. // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. AllCliqueProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil} // AllAiConsensusProtocolChanges contains every protocol change (EIPs) introduced // and accepted by the AICHAIN core developers into the AiConsensus consensus. // // This configuration is intentionally not using keyed fields to force anyone // adding flags to the config to also have to set these fields. AllAiConsensusProtocolChanges = &ChainConfig{big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, nil, &AiConsensusConfig{ MaxValidatorNumber: 4, MaxPooledMinerNumber: 4, Period: 1, BlockValidNumber: 12, Epoch: 120, VoteEpoch: 30000, EthashDifficulty: big.NewInt(10000), ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000043fa63f6e587975e93670ace6ab5a71061c1dafa47acbcffa2cccf1ce3e8631e7620a94823605e4f34eae4b8e5d2bed9cddfd6b309f965a27759bad96c40cee6c6692307dda2ff1a33860855fc3b39f1004beb845896ae589fbee97f37e3bff49cb68a3aa6cae15f60311b0990bd3e8545d1b19431094001948e0c1c6aaa39a5cf563e09e941e9c262c87b624007a7500fbb6a7c86fd3c272c77e6cf849af65d5ce0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), }} //TestChainConfig TestChainConfig = &ChainConfig{big.NewInt(1), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, new(EthashConfig), nil, &AiConsensusConfig{ MaxValidatorNumber: 4, MaxPooledMinerNumber: 4, Period: 1, BlockValidNumber: 12, Epoch: 120, VoteEpoch: 30000, EthashDifficulty: big.NewInt(10000), ExtraData: hexutil.MustDecode("0x0000000000000000000000000000000000000000000000000000000000000000023fa63f6e587975e93670ace6ab5a71061c1dafa47acbcffa2cccf1ce3e8631e7620a94823605e4f304beb845896ae589fbee97f37e3bff49cb68a3aa6cae15f60311b0990bd3e8545d1b19431094001948e0c1c6aaa39a5cf563e09e941e9c262c87b624007a7500fbb6a7c86fd3c272c77e6cf849af65d5ce0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"), ForkBlockNumber: 360000, }} TestRules = TestChainConfig.Rules(new(big.Int)) )
var ( // GasTableHomestead contain the gas prices for // the homestead phase. GasTableHomestead = GasTable{ ExtcodeSize: 20, ExtcodeCopy: 20, Balance: 20, SLoad: 50, Calls: 40, Suicide: 0, ExpByte: 10, } // GasTableEIP150 contain the gas re-prices for // the EIP150 phase. GasTableEIP150 = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700, Balance: 400, SLoad: 200, Calls: 700, Suicide: 5000, ExpByte: 10, CreateBySuicide: 25000, } // GasTableEIP158 contain the gas re-prices for // the EIP155/EIP158 phase. GasTableEIP158 = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700, Balance: 400, SLoad: 200, Calls: 700, Suicide: 5000, ExpByte: 50, CreateBySuicide: 25000, } // GasTableConstantinople contain the gas re-prices for // the constantinople phase. GasTableConstantinople = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700, ExtcodeHash: 400, Balance: 400, SLoad: 200, Calls: 700, Suicide: 5000, ExpByte: 50, CreateBySuicide: 25000, } )
Variables containing gas prices for different ethereum phases.
var ( DifficultyBoundDivisor = big.NewInt(2048) // The bound divisor of the difficulty, used in the update calculations. GenesisDifficulty = big.NewInt(131072) // Difficulty of the Genesis block. MinimumDifficulty = big.NewInt(131072) // The minimum that the difficulty may ever be. DurationLimit = big.NewInt(13) // The decision boundary on the blocktime duration used to determine whether difficulty should go up or not. )
var DAOForkBlockExtra = common.FromHex("0x64616f2d686172642d666f726b")
DAOForkBlockExtra is the block header extra-data field to set for the DAO fork point and a number of consecutive blocks to allow fast/light syncers to correctly pick the side they want ("dao-hard-fork").
var DAOForkExtraRange = big.NewInt(10)
DAOForkExtraRange is the number of consecutive blocks from the DAO fork point to override the extra-data in to prevent no-fork attacks.
var DAORefundContract = common.HexToAddress("0xbf4ed7b27f1d666546e30d74d50d173d20bca754")
DAORefundContract is the address of the refund contract to send DAO balances to.
var DiscoveryV5Bootnodes = []string{
"enode://06051a5573c81934c9554ef2898eb13b33a34b94cf36b202b69fde139ca17a85051979867720d4bdae4323d4943ddf9aeeb6643633aa656e0be843659795007a@35.177.226.168:30323",
"enode://0cc5f5ffb5d9098c8b8c62325f3797f56509bff942704687b6530992ac706e2cb946b90a34f1f19548cd3c7baccbcaea354531e5983c7d1bc0dee16ce4b6440b@40.118.3.223:30324",
"enode://1c7a64d76c0334b0418c004af2f67c50e36a3be60b5e4790bdac0439d21603469a85fad36f2473c9a80eb043ae60936df905fa28f1ff614c3e5dc34f15dcd2dc@40.118.3.223:30306",
"enode://85c85d7143ae8bb96924f2b54f1b3e70d8c4d367af305325d30a61385a432f247d2c75c45c6b4a60335060d072d7f5b35dd1d4c45f76941f62a4f83b6e75daaf@40.118.3.223:30307",
}
DiscoveryV5Bootnodes are the enode URLs of the P2P bootstrap nodes for the experimental RLPx v5 topic-discovery network.
var MainnetBootnodes = []string{
"enode://b6900d502647c234161295c1c0b8bd8de2cb785a4c9b4660bb3da7d41725f6a6a4c0eafde727be0592dfcf86c22799fa3fc68ddf51aa338a349ad11988aabb88@bj.bn.aichain.me:30301",
"enode://095281c13985d1d413ff965c0b84b9a85b8026cd0bf1987072b68b511b213c34da90b080c0259b854292b232f2816704f4a941be475c748229d4ea494d6a6e1a@hz.bn.aichain.me:30301",
"enode://82c5fcf08175dbe991cce6a740756a13b0b4e7dd201484ca501e456cf5d8d7e60b2d299c01e66ab6fb6e9525d5cbe58a23b9ac1853de1d5417e4f3164b8eaaab@zjk.bn.aichain.me:30301",
"enode://772b2c31dc64b4e7801c4b3a0e52df2dce2bcb61815e6e461fc2734c59a6d49c55d903514e46ee63beec798ddbe3926323397f4c6a1febfa54749741717dbfed@sh.bn.aichain.me:30301",
"enode://ce6d2f459807f3ec4c5f21ed00376c25fdf70bb175c19e80dd43f2d79634661fec5575dba239e2a0348b7835f8042c8989bc295ff41832646bf6063f9c2cc7b8@sz.bn.aichain.me:30301",
"enode://70314a6e1a09b5de037a9ffc5e99ba9a113cd814a9493a22c45eb7c216382f6ed087b2f18f1407f4eee3083c1eb8a027d2bd3a472ecea3cdb168ed4c419221a5@hk.bn.aichain.me:30301",
"enode://e1a37da145a66532c9f57bfd3992a6ceecad0851f64555e096c25de9ed40f36d8be1f0e5284118ccca438c382afc5b4b018578a22e42152ddeb14a177b316fd5@jp.bn.aichain.me:30301",
"enode://7955115b5abafe3b4944e1bab551baa572169c8d92a7c51acf738f4ef259954430672c2c16e8639fedfa46a4a284efb0dca07cf4e34ef31a5b610897a8cab786@sg.bn.aichain.me:30301",
"enode://f86ada5998563bb32eed527cd16ea58a660ae14e2764af4d9ca593434a0ec96f43aec3b27573f657d8dd2cf774f86e5b6419479ae07da15837705b4684d39dad@us.bn.aichain.me:30301",
"enode://29a225f1ef7ed63ab3f373e29dcf544d65b3022924d53b9571db7485d80bcca84f9031165011ea933b2e4651750d3b8f8e9b275782efb16cf7afdf95122add84@ger.bn.aichain.me:30301",
"enode://077818b75daece3ec171c96f58f273df27d9835fb47b7b7e28687ee76a5db8af3569256cb93c445a0e51ab6117086396d5da2242f85badd2daedc3b83b1ce9bc@47.96.70.105:30323",
"enode://f752913f37fec36a59c94459ceb73bc70dc4729a7491406e90fe35163462b88b83a03d7174958d0d62441483ccc03be107ed70fc4306ccd618ae63b4b8905be5@39.104.101.184:30323",
"enode://32af4ffeef3018493008ba43cf3a20200ea05a1b6f453a33ef2bbcdd11efe0a8eea8976904fb4d4851888c2a91bb82ac792790fe79c6832a741d12a148df8865@47.91.22.112:30323",
"enode://1279b4272a25d7caa8295252402e483398d0aaab03ffb3a06d8ad1d348d92bb8bf700a90e462e716ed076871fedb810ff0e1dbce98957c87811625f550bd0287@47.92.38.40:30323",
"enode://2181fe015ebb5c0932728326420a4c2e8f0650d0e15884212c346a29c577fe9a5c1618f8852ab26a1267f13a42f0c8049e0d276be616c23595c2744f9d5e91af@47.98.243.21:30323",
"enode://cb97406cfd07f479c1595adf83f5f738fdd6a2a7e740255bd8ae9003f2f2f21d52236655e1d8a3c3a4900042c7a28f11655b094150c692d19551e465e29a3a5f@39.105.62.237:30323",
"enode://22ee22d9fd54e61949b8c066f1b1fc9dc568115ee8bb43360224d45525d5108446f57b54aeef5963b50beb54c1035decff2c9b3c1a5dd732328d7f63d2ea2209@101.132.185.167:30323",
"enode://472c1d4be77b502c50f601120d3b4e1efe8f8bd2fadc129cf25aa059ca71639a6a3338a978fbc18e150441984a78ea27f54e4b5e7b1c176d7e0f3bf9acc43b0e@120.79.230.10:30323",
"enode://49ac218c7f169d5192c3672bb6c139978206b210ed6f736aba05e921c271d5207902d287f3055c7f355690406ec30bf8152a58ab12a33bc86fdd42cc1efec467@123.56.13.71:30323",
"enode://7f052e88cda4183110f3d84f7316d1ae9ea550230da2d003870e7311fa66d612fb44d183a56042fc8015ab1142ca9af7a12cd3471df497b5518c0b481cdac3e5@47.75.160.56:30323",
"enode://c32a8b9c7aa465eb9e41fa579ed879dd8dd3fafe7f99aba14de6894a2c31f305336783509f3e41e60b9f4f379ee13c300192fe9500653ab866eebab309f11a9b@47.254.42.75:30323",
"enode://deb075af14dfece02fbfa7400fe72e864f332c79de42b6bacb215d9bf79ca9385fcaf11af2564590645351b0a8841ae32193d92608ac29ac8538019dadb5d019@47.74.253.244:30323",
"enode://5bdeccad956b9011549938bc632941537c01e93ba5c1bd29a4dbeb607448eeba965b4541cc7161466affb3e620115250d3435fa609644ce30e7d9a0f5722996f@47.254.132.79:30323",
}
MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the main AICHAIN network.
var RinkebyBootnodes = []string{
"enode://a24ac7c5484ef4ed0c5eb2d36620ba4e4aa13b8c84684e1b4aab0cebea2ae45cb4d375b77eab56516d34bfbd3c1a833fc51296ff084b770b94fb9028c4d25ccf@52.169.42.101:30323",
"enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30323",
"enode://b6b28890b006743680c52e64e0d16db57f28124885595fa03a562be1d2bf0f3a1da297d56b13da25fb992888fd556d4c1a27b1f39d531bde7de1921c90061cc6@159.89.28.211:30323",
}
RinkebyBootnodes are the enode URLs of the P2P bootstrap nodes running on the Rinkeby test network.
var (
TargetGasLimit = GenesisGasLimit // The artificial target
)
var TestnetBootnodes = []string{
"enode://2ab7a10ee3e571fae09bc506543821b1d0da8874f5e85782f52b59339fa202bb560fe6b412c7bc47cfbf4751aebff76f90afc83dca96c2db548ed88a5b814700@testbootnode1.aichain.me:30301",
"enode://a19ff2dba347d0726eab230b481e8e146384ecbd8b81e83e183fd1f7e5fec06f67f0bc0ebb5363fc8225d3af13009aa6d51d6cfef32597b5fbef3907613f7610@testbootnode2.aichain.me:30301",
"enode://3da69fc2e537fc7d9dd8ba00fa2a9c21e2967565864c6cfe8fa3fbfd00bcb0b835c7b73113a016f18746405168f7040f96291793006fa6fa2189ab97b7fbc512@testbootnode3.aichain.me:30301",
"enode://d149b69fb904c8b800dbd89c6a430b6038c9c28752bf728c650d6a546d1161550eb1d10e6e24f75f089584ef367234a6351b6754287cc103ecb8020978475f90@testbootnode4.aichain.me:30301",
"enode://1461c415e371ed81931de54135d71a2e74b4da0dfcef693ac302f0414e3026d12aecd3938e8b7d9eaf6a516e44849aceba9e144d2af5173e69c1268f27812e54@47.96.69.161:30323",
"enode://f95e92b50393b8a922ddd2a16e774b758af34903167f3eb56e9630f58dd2e546dc39fa2a84010dcea3dc636191e2c0da0d403b263756617b95e6c323f27cd4a6@47.96.69.66:30323",
}
TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the Ropsten test network.
var Version = func() string { return fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch) }()
Version holds the textual version string.
var VersionWithMeta = func() string { v := Version if VersionMeta != "" { v += "-" + VersionMeta } return v }()
VersionWithMeta holds the textual version string including the metadata.
Functions ¶
func ArchiveVersion ¶
ArchiveVersion holds the textual version string used for Geth archives. e.g. "1.8.11-dea1ce05" for stable releases, or
"1.8.13-unstable-21c059b6" for unstable releases
func DAODrainList ¶
DAODrainList is the list of accounts whose full balances will be moved into a refund contract at the beginning of the dao-fork block.
func VersionWithCommit ¶
Types ¶
type AiConsensusConfig ¶
type AiConsensusConfig struct { MaxValidatorNumber int `json:"max-validator-number"` // Max number of Validator allowed MaxPooledMinerNumber int `json:"max-pooledminer-number"` // Max number of Pooled miner allowed Period uint64 `json:"period"` // Number of seconds between blocks to enforce BlockValidNumber uint64 `json:"block-valid-number"` // Number of block to verify Epoch uint64 `json:"epoch"` // Epoch length to reset checkpoint VoteEpoch uint64 `json:"vote-epoch"` // Epoch length to reset votes EthashDifficulty *big.Int `json:"ethash-difficulty"` // Difficulty to ethash mine ExtraData []byte `json:"extra-data"` //Extra data for genesis ForkBlockNumber uint64 `json:"fork-blockNumber"` //Block number to start engine fork Standalone bool `json:"standalone"` //If the engine is standalone }
AiConsensusConfig is the consensus engine configs for proof-of-authority based sealing.
func (*AiConsensusConfig) String ¶
func (c *AiConsensusConfig) String() string
String implements the stringer interface, returning the consensus engine details.
type ChainConfig ¶
type ChainConfig struct { ChainID *big.Int `json:"chainId"` // chainId identifies the current chain and is used for replay protection HomesteadBlock *big.Int `json:"homesteadBlock,omitempty"` // Homestead switch block (nil = no fork, 0 = already homestead) DAOForkBlock *big.Int `json:"daoForkBlock,omitempty"` // TheDAO hard-fork switch block (nil = no fork) DAOForkSupport bool `json:"daoForkSupport,omitempty"` // Whether the nodes supports or opposes the DAO hard-fork // EIP150 implements the Gas price changes (https://github.com/AICHAIN-CORE/EIPs/issues/150) EIP150Block *big.Int `json:"eip150Block,omitempty"` // EIP150 HF block (nil = no fork) EIP150Hash common.Hash `json:"eip150Hash,omitempty"` // EIP150 HF hash (needed for header only clients as only gas pricing changed) EIP155Block *big.Int `json:"eip155Block,omitempty"` // EIP155 HF block EIP158Block *big.Int `json:"eip158Block,omitempty"` // EIP158 HF block ByzantiumBlock *big.Int `json:"byzantiumBlock,omitempty"` // Byzantium switch block (nil = no fork, 0 = already on byzantium) ConstantinopleBlock *big.Int `json:"constantinopleBlock,omitempty"` // Constantinople switch block (nil = no fork, 0 = already activated) // Various consensus engines Ethash *EthashConfig `json:"ethash,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` AiConsensus *AiConsensusConfig `json:"aiconsensus,omitempty"` }
ChainConfig is the core config which determines the blockchain settings.
ChainConfig is stored in the database on a per block basis. This means that any network, identified by its genesis block, can have its own set of configuration options.
func (*ChainConfig) AitNeedForMinerAccount ¶
func (c *ChainConfig) AitNeedForMinerAccount() *big.Int
func (*ChainConfig) CheckCompatible ¶
func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *ConfigCompatError
CheckCompatible checks whether scheduled fork transitions have been imported with a mismatching chain configuration.
func (*ChainConfig) CheckMinerAccountAit ¶
func (c *ChainConfig) CheckMinerAccountAit(num *big.Int) bool
func (*ChainConfig) DefaultCoinbase ¶
func (c *ChainConfig) DefaultCoinbase() string
func (*ChainConfig) DefaultDifficaulty ¶
func (c *ChainConfig) DefaultDifficaulty() *big.Int
func (*ChainConfig) DefaultMaxDifficaulty ¶
func (c *ChainConfig) DefaultMaxDifficaulty() *big.Int
func (*ChainConfig) GasTable ¶
func (c *ChainConfig) GasTable(num *big.Int) GasTable
GasTable returns the gas table corresponding to the current phase (homestead or homestead reprice).
The returned GasTable's fields shouldn't, under any circumstances, be changed.
func (*ChainConfig) IsByzantium ¶
func (c *ChainConfig) IsByzantium(num *big.Int) bool
func (*ChainConfig) IsCoinDelieverDone ¶
func (c *ChainConfig) IsCoinDelieverDone(num *big.Int) bool
func (*ChainConfig) IsConstantinople ¶
func (c *ChainConfig) IsConstantinople(num *big.Int) bool
func (*ChainConfig) IsDAOFork ¶
func (c *ChainConfig) IsDAOFork(num *big.Int) bool
IsDAO returns whether num is either equal to the DAO fork block or greater.
func (*ChainConfig) IsHomestead ¶
func (c *ChainConfig) IsHomestead(num *big.Int) bool
IsHomestead returns whether num is either equal to the homestead block or greater.
func (*ChainConfig) Rules ¶
func (c *ChainConfig) Rules(num *big.Int) Rules
Rules ensures c's ChainID is not nil.
func (*ChainConfig) String ¶
func (c *ChainConfig) String() string
String implements the fmt.Stringer interface.
type CliqueConfig ¶
type CliqueConfig struct { Period uint64 `json:"period"` // Number of seconds between blocks to enforce Epoch uint64 `json:"epoch"` // Epoch length to reset votes and checkpoint }
CliqueConfig is the consensus engine configs for proof-of-authority based sealing.
func (*CliqueConfig) String ¶
func (c *CliqueConfig) String() string
String implements the stringer interface, returning the consensus engine details.
type ConfigCompatError ¶
type ConfigCompatError struct { What string // block numbers of the stored and new configurations StoredConfig, NewConfig *big.Int // the block number to which the local chain must be rewound to correct the error RewindTo uint64 }
ConfigCompatError is raised if the locally-stored blockchain is initialised with a ChainConfig that would alter the past.
func (*ConfigCompatError) Error ¶
func (err *ConfigCompatError) Error() string
type EthashConfig ¶
type EthashConfig struct{}
EthashConfig is the consensus engine configs for proof-of-work based sealing.
func (*EthashConfig) String ¶
func (c *EthashConfig) String() string
String implements the stringer interface, returning the consensus engine details.
type GasTable ¶
type GasTable struct { ExtcodeSize uint64 ExtcodeCopy uint64 ExtcodeHash uint64 Balance uint64 SLoad uint64 Calls uint64 Suicide uint64 ExpByte uint64 // CreateBySuicide occurs when the // refunded account is one that does // not exist. This logic is similar // to call. May be left nil. Nil means // not charged. CreateBySuicide uint64 }
GasTable organizes gas prices for different ethereum phases.
type Rules ¶
type Rules struct { ChainID *big.Int IsHomestead, IsEIP150, IsEIP155, IsEIP158 bool IsByzantium bool }
Rules wraps ChainConfig and is merely syntatic sugar or can be used for functions that do not have or require information about the block.
Rules is a one time interface meaning that it shouldn't be used in between transition phases.