Documentation ¶
Index ¶
- Constants
- Variables
- func DAODrainList() []common.Address
- func IsMainChain(chainId string) bool
- func VersionWithCommit(gitCommit string) string
- type ChainConfig
- func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *ConfigCompatError
- func (c *ChainConfig) GasTable(num *big.Int) GasTable
- func (c *ChainConfig) IsByzantium(num *big.Int) bool
- func (c *ChainConfig) IsConstantinople(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) IsEWASM(num *big.Int) bool
- func (c *ChainConfig) IsHomestead(num *big.Int) bool
- func (c *ChainConfig) IsIstanbul(num *big.Int) bool
- func (c *ChainConfig) IsMainChain() bool
- func (c *ChainConfig) IsPetersburg(num *big.Int) bool
- func (c *ChainConfig) Rules(num *big.Int) Rules
- func (c *ChainConfig) String() string
- type ConfigCompatError
- type GasTable
- type GeneralConfig
- type IPBFTConfig
- type Rules
Constants ¶
const ( Wei = 1 GWei = 1e9 INT = 1e18 )
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. 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. 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. SstoreSetGas uint64 = 20000 // Once per SLOAD operation. 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. NetSstoreNoopGas uint64 = 200 // Once per SSTORE operation if the value doesn't change. NetSstoreInitGas uint64 = 20000 // Once per SSTORE operation from clean zero. NetSstoreCleanGas uint64 = 5000 // Once per SSTORE operation from clean non-zero. NetSstoreDirtyGas uint64 = 200 // Once per SSTORE operation from dirty. NetSstoreClearRefund uint64 = 15000 // Once per SSTORE operation for clearing an originally existing storage slot NetSstoreResetRefund uint64 = 4800 // Once per SSTORE operation for resetting to the original non-zero value NetSstoreResetClearRefund uint64 = 19800 // Once per SSTORE operation for resetting to the original zero value SstoreSentryGasEIP2200 uint64 = 2300 // Minimum gas required to be present for an SSTORE call, not consumed SstoreNoopGasEIP2200 uint64 = 800 // Once per SSTORE operation if the value doesn't change. SstoreDirtyGasEIP2200 uint64 = 800 // Once per SSTORE operation if a dirty value is changed. SstoreInitGasEIP2200 uint64 = 20000 // Once per SSTORE operation from clean zero to non-zero SstoreInitRefundEIP2200 uint64 = 19200 // Once per SSTORE operation for resetting to the original zero value SstoreCleanGasEIP2200 uint64 = 5000 // Once per SSTORE operation from clean non-zero to something else SstoreCleanRefundEIP2200 uint64 = 4200 // Once per SSTORE operation for resetting to the original non-zero value SstoreClearRefundEIP2200 uint64 = 15000 // Once per SSTORE operation for clearing an originally existing storage slot JumpdestGas uint64 = 1 // Once per JUMPDEST operation. EpochDuration uint64 = 30000 // Duration between proof-of-work epochs. 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 SelfdestructRefundGas uint64 = 24000 // Refunded following a selfdestruct 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. TxDataNonZeroGasFrontier 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. TxDataNonZeroGasEIP2028 uint64 = 16 // Per byte of non zero data attached to a transaction after EIP 2028 (part in Istanbul) // These have been changed during the course of the chain CallGasFrontier uint64 = 40 // Once per CALL operation & message call transaction. CallGasEIP150 uint64 = 700 // Static portion of gas for CALL-derivates after EIP 150 (Tangerine) BalanceGasFrontier uint64 = 20 // The cost of a BALANCE operation BalanceGasEIP150 uint64 = 400 // The cost of a BALANCE operation after Tangerine BalanceGasEIP1884 uint64 = 700 // The cost of a BALANCE operation after EIP 1884 (part of Istanbul) ExtcodeSizeGasFrontier uint64 = 20 // Cost of EXTCODESIZE before EIP 150 (Tangerine) ExtcodeSizeGasEIP150 uint64 = 700 // Cost of EXTCODESIZE after EIP 150 (Tangerine) SloadGasFrontier uint64 = 50 SloadGasEIP150 uint64 = 200 SloadGasEIP1884 uint64 = 800 // Cost of SLOAD after EIP 1884 (part of Istanbul) ExtcodeHashGasConstantinople uint64 = 400 // Cost of EXTCODEHASH (introduced in Constantinople) ExtcodeHashGasEIP1884 uint64 = 700 // Cost of EXTCODEHASH after EIP 1884 (part in Istanbul) SelfdestructGasEIP150 uint64 = 5000 // Cost of SELFDESTRUCT post EIP 150 (Tangerine) // EXP has a dynamic portion depending on the size of the exponent ExpByteFrontier uint64 = 10 // was set to 10 in Frontier ExpByteEIP158 uint64 = 50 // was raised to 50 during Eip158 (Spurious Dragon) // Extcodecopy has a dynamic AND a static cost. This represents only the // static portion of the gas. It was changed during EIP 150 (Tangerine) ExtcodeCopyBaseFrontier uint64 = 20 ExtcodeCopyBaseEIP150 uint64 = 700 // CreateBySelfdestructGas is used when the refunded account is one that does // not exist. This logic is similar to call. // Introduced in Tangerine Whistle (Eip 150) CreateBySelfdestructGas uint64 = 25000 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 Bn256AddGasByzantium uint64 = 500 // Byzantium gas needed for an elliptic curve addition Bn256AddGasIstanbul uint64 = 150 // Gas needed for an elliptic curve addition Bn256ScalarMulGasByzantium uint64 = 40000 // Byzantium gas needed for an elliptic curve scalar multiplication Bn256ScalarMulGasIstanbul uint64 = 6000 // Gas needed for an elliptic curve scalar multiplication Bn256PairingBaseGasByzantium uint64 = 100000 // Byzantium base price for an elliptic curve pairing check Bn256PairingBaseGasIstanbul uint64 = 45000 // Base price for an elliptic curve pairing check Bn256PairingPerPointGasByzantium uint64 = 80000 // Byzantium per-point price for an elliptic curve pairing check Bn256PairingPerPointGasIstanbul uint64 = 34000 // Per-point price for an elliptic curve pairing check )
const ( VersionMajor = 4 // Major version component of the current release VersionMinor = 2 // Minor version component of the current release VersionPatch = 0 // 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("0x4d8f925f95ee819c0c6ef60d9a0becdd429d64acc1ec51a8958ab2cf5cdc2e94") // Mainnet genesis hash to enforce below configs on TestnetGenesisHash = common.HexToHash("0x19b9cc1caa3a0a00c15dcf524289fca9cada095fb5a5679f597338833637d483") // Testnet genesis hash to enforce below configs on )
var ( // MainnetChainConfig is the chain parameters to run a node on the main network. MainnetChainConfig = &ChainConfig{ IntChainId: "intchain", ChainId: big.NewInt(2047), HomesteadBlock: big.NewInt(0), EIP150Block: big.NewInt(0), EIP150Hash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), IPBFT: &IPBFTConfig{ Epoch: 30000, ProposerPolicy: 0, }, } // TestnetChainConfig contains the chain parameters to run a node on the test network. TestnetChainConfig = &ChainConfig{ IntChainId: "testnet", ChainId: big.NewInt(2048), HomesteadBlock: big.NewInt(0), EIP150Block: big.NewInt(0), EIP150Hash: common.HexToHash("0x0000000000000000000000000000000000000000000000000000000000000000"), EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), IstanbulBlock: big.NewInt(0), IPBFT: &IPBFTConfig{ Epoch: 30000, ProposerPolicy: 0, }, } TestChainConfig = &ChainConfig{"", big.NewInt(1), big.NewInt(0), big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil} 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 GenCfg = GeneralConfig{PerfTest: false}
var MainnetBootnodes = []string{
"enode://191df92ecc4ffd4df73a512ece6f66324361fe7a2efdbcc222a826692e55d4c22c0c7d0b2fefc2f3973eb23f18cd6b3dce3552f331b9848d0c15d66c65648556@43.129.172.110:8551",
"enode://a201378734ae3a7ae9884c0009fa611752fae87903696fdcd78a2bcff47a83893e8cde2d30c90d602a9c19de93138f9ac06aa9bf8951b68905779b2e8088a60f@43.128.19.174:8552",
"enode://f5783bbeecefe6d80814e8bc928403f0254a90f0e353160cda54c8f7257c10dd13d5e984763f9cd292fb7e9b300bc772b46bb08952d58645b224f8eaf3a861e6@43.129.69.192:8551",
"enode://f27ed1c0a485ab019e026a71162390b7fcf9ac16cc03fe20c3aeb0b214f643a28b79ef44e68321d002f3b51627886681ac0dd8462a145099ba69835d7b666a71@43.129.237.219:8552",
"enode://2b8b2c7584e07bec2ef156775a8c4149162dc7805617314bc795048a117af912458394e4492897d54bfcc8f672f67a2cbac08631e5001722c00dfd98df3f2ace@43.129.237.184:8551",
"enode://374f9f738071254049d13e2c50048b09b2f20fa8e25073a89a51e22040a5e2da2f57febfa56618f147cb3cd95a0e0bb0ebd7d00789d7da86b2440efc9d1d7bee@43.129.69.205:8552",
"enode://a600a79296f0487cc1ed72a46fdb50e48d075a37a28e6597b77d5e60595d55c7d02997fed58ceeb38441130829f20bed925eea060eb51d0390bb45f89a1ca45d@43.129.69.39:8552",
"enode://03784c32e5a4e0d1aced08f6090d9159e02b237c34f8a4bd60d2a9427c549b17d718f7a20b16b6a1a2b33aeecca73db37765de61b32d3d8ec4bab8e15c4df904@43.129.66.168:8553",
"enode://1bc59b88e8a8a1c3960d7f2753a12d86b17e09f15d2419ce72f9923850f0f5bd370ec3730d4c5847e4fa80267c8136ca212f2bb648cc81ff3530f53a0997723f@43.129.69.166:8553",
"enode://3e421e5d549050ceaca43e7cccb7522a1949b8cf2c598dff36da2bc164c90c8996bb49c442a6e798f7aecbd3ca63f85471c28b958ca78d955a4513ac2373e735@43.132.154.65:8553",
"enode://9260fcf0ff3996607d9e1ea7b222107ad3eaf657b1c8aa760690bf971f7e4151c6271a2c87412b31312c76b3d0fb285947d3832e6cb972db14a5be9a45cb7873@162.55.177.167:8550",
"enode://d71a17716ee2a41c270e01ab63c28863f09fddd1e1e5abbc0d5cdc623e927529b502118812a902ebc868bd76570c851ecb50620cda19333a4ca92a9c32f348c9@49.12.192.182:8550",
"enode://ef1979cc634da020a132f6c0ea53cb112f7c1eabc6d285e977bd75eb79dee89693c30686dc52575510e6b1e664427e25ea2c2d36d4630371ae1d250f8ec110db@78.47.204.74:8550",
"enode://585913f8318ccfc6359b63f2e08e01f0097c4fb84098e27b533bd5ca6d9425700238c11599e8662b41f567155cfa14705d7f8ba68f3d3a809083da1a50baeec7@54.238.212.246:8550",
"enode://827dddc71306d84509938106f650d7b8f27e329cd299a07c63fe5c9a0918b36240a0f14fb5634885c2e947a767c5371cfa931045dfa0db3e1a8a7057e6fe0ce8@54.238.212.246:8550",
"enode://6f1f82c82960ed361e7542f83bf3b1a38901c61ad45aa526ae8088703edceac969403ab18cf6a9dcf9d42852e73397ddac410944ac391e8e1708baefe7c8b671@65.108.208.164:8550",
"enode://83ec9c3d2bd349fa5ad93c88b045013edde59a717072d2f495466b97eac845fa01645e788f4aa85aeea76349cce9106dd97a85d70c7dab8bb50d131c703071a9@142.132.234.205:8550",
}
MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the INT Chain main network.
var TestnetBootnodes = []string{
"enode://a12a394da7887a8fa99cf3347cd372b08502e3dd04f6e464967b5a3cdebf7234f2dd4e5fc9720961cf03224920b8b3c4c25ae23ba5d593345ea41b1b7e575b7d@101.32.74.50:8550",
"enode://4dd8d8352900f44cc6bfd9d9c3f2d9c8d80d0b6a64b97019dc9e3ca905a4ca6474b84745e5001fc08c5b64910baeb233fcd54bda4f6f855438d7c762494977c0@129.226.59.148:8551",
"enode://964f2c8d04bcc48e971bb24870035db8cfc7218bfdb4d97849421b47d9cc207fff1b89876b4ff137156fb52a262254a570396a4c06a756d2c68a8f637eaa5031@129.226.128.55:8551",
"enode://65e60686f0c091b30a701b3c8e02db1aab75ad67e7d319c679a616cad38ce2dad5abb8829cd0d6041a9541387078eed12b88f5d0eb5168456a182ad2d0183e19@129.226.63.13:8551",
}
TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the INT Chain 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 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 IsMainChain ¶
Check provided chain id is on main chain or not
func VersionWithCommit ¶
Types ¶
type ChainConfig ¶
type ChainConfig struct { IntChainId string `json:"intChainId"` //IntChain id identifies the current chain ChainId *big.Int `json:"chainId"` // Chain id 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) // EIP150 implements the Gas price changes (https://github.com/ethereum/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) PetersburgBlock *big.Int `json:"petersburgBlock,omitempty"` // Petersburg switch block (nil = same as Constantinople) IstanbulBlock *big.Int `json:"istanbulBlock,omitempty"` // Istanbul switch block (nil = no fork, 0 = already on istanbul) // Various consensus engines IPBFT *IPBFTConfig `json:"ipbft,omitempty"` ChainLogger log.Logger `json:"-"` }
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 NewChildChainConfig ¶
func NewChildChainConfig(childChainID string) *ChainConfig
Create a new Chain Config based on the Chain ID, for child chain creation purpose
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) 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) IsConstantinople ¶
func (c *ChainConfig) IsConstantinople(num *big.Int) bool
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) IsIstanbul ¶
func (c *ChainConfig) IsIstanbul(num *big.Int) bool
IsIstanbul returns whether num is either equal to the Istanbul fork block or greater.
func (*ChainConfig) IsMainChain ¶
func (c *ChainConfig) IsMainChain() bool
Check whether is on main chain or not
func (*ChainConfig) IsPetersburg ¶
func (c *ChainConfig) IsPetersburg(num *big.Int) bool
IsPetersburg returns whether num is either - equal to or greater than the PetersburgBlock fork block, - OR is nil, and Constantinople is active
func (*ChainConfig) String ¶
func (c *ChainConfig) String() string
String implements the fmt.Stringer interface.
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 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 GeneralConfig ¶
type GeneralConfig struct { // Whether doing performance test, will remove some limitations and cause system more frigile PerfTest bool `json:"perfTest,omitempty"` }
configuations in this structure is read-only, it gives a way to put/get general settings
type IPBFTConfig ¶
type IPBFTConfig struct { Epoch uint64 `json:"epoch"` // Epoch length to reset votes and checkpoint ProposerPolicy uint64 `json:"policy"` // The policy for proposer selection }
IPBFTConfig is the consensus engine configs for Istanbul based sealing.
func (*IPBFTConfig) String ¶
func (c *IPBFTConfig) String() string
String implements the stringer interface, returning the consensus engine details.
type Rules ¶
type Rules struct { ChainId *big.Int IsHomestead, IsEIP150, IsEIP155, IsEIP158 bool IsByzantium, IsConstantinople, IsPetersburg, IsIstanbul bool }
Rules wraps ChainConfig and is merely syntactic 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.