Documentation ¶
Index ¶
- Constants
- Variables
- func ArchiveVersion(gitCommit string) string
- func DAODrainList() []common.Address
- func VersionWithCommit(gitCommit, gitDate 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) 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) IsPohang(num *big.Int) bool
- func (c *ChainConfig) NetworkType() uint64
- func (c *ChainConfig) Rules(num *big.Int) Rules
- func (c *ChainConfig) String() string
- type CliqueConfig
- type ConfigCompatError
- type DbftConfig
- type DebConfig
- type GasTable
- type Rules
Constants ¶
const ( MinerGasCeil = 8e10 MinerGasFloor = 8e18 DefaultGasFee = 5240000000000 )
const ( Wei = 1 GWei = 1e9 Ether = 1e18 Daon = 1e18 )
These are the multipliers for ether denominations. Example: To get the wei value of an amount in 'gwei', use
new(big.Int).Mul(value, big.NewInt(params.GWei))
const ( // BloomBitsBlocks is the number of blocks a single bloom bit section vector // contains on the server side. BloomBitsBlocks uint64 = 4096 // BloomBitsBlocksClient is the number of blocks a single bloom bit section vector // contains on the light client side BloomBitsBlocksClient uint64 = 32768 // BloomConfirms is the number of confirmation blocks before a bloom section is // considered probably final and its rotated bits are calculated. BloomConfirms = 256 // CHTFrequencyClient is the block frequency for creating CHTs on the client side. CHTFrequencyClient = 32768 // CHTFrequencyServer is the block frequency for creating CHTs on the server side. // Eventually this can be merged back with the client version, but that requires a // full database upgrade, so that should be left for a suitable moment. CHTFrequencyServer = 4096 // BloomTrieFrequency is the block frequency for creating BloomTrie on both // server/client sides. BloomTrieFrequency = 32768 // HelperTrieConfirmations is the number of confirmations before a client is expected // to have the given HelperTrie available. HelperTrieConfirmations = 2048 // HelperTrieProcessConfirmations is the number of confirmations before a HelperTrie // is generated HelperTrieProcessConfirmations = 256 // FullImmutabilityThreshold is the number of blocks after which a chain segment is // considered immutable (i.e. soft finality). It is used by the downloader as a // hard limit against deep ancestors, by the blockchain against deep reorgs, by // the freezer as the cutoff threshold and by clique as the snapshot trust limit. FullImmutabilityThreshold = 90000 )
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. MaxGasLimit uint64 = 0x7fffffffffffffff // Maximum the gas limit (2^63-1). GenesisGasLimit uint64 = 126e5 // Gas limit of the Genesis block. // add : for anduschain MinimumGenesisGasPrice uint64 = 9523809523809 // Minimum Gas Price of the Genesis block. --> for deb struct, start 0.2 Daon per Tx ( sample transfer ) DefaultFairnodeFee int64 = 30 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. 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 Bls12381G1AddGas uint64 = 600 // Price for BLS12-381 elliptic curve G1 point addition Bls12381G1MulGas uint64 = 12000 // Price for BLS12-381 elliptic curve G1 point scalar multiplication Bls12381G2AddGas uint64 = 4500 // Price for BLS12-381 elliptic curve G2 point addition Bls12381G2MulGas uint64 = 55000 // Price for BLS12-381 elliptic curve G2 point scalar multiplication Bls12381PairingBaseGas uint64 = 115000 // Base gas price for BLS12-381 elliptic curve pairing check Bls12381PairingPerPairGas uint64 = 23000 // Per-point pair gas price for BLS12-381 elliptic curve pairing check Bls12381MapG1Gas uint64 = 5500 // Gas price for BLS12-381 mapping field element to G1 operation Bls12381MapG2Gas uint64 = 110000 // Gas price for BLS12-381 mapping field element to G2 operation )
const ( VersionMajor = 0 // Major version component of the current release VersionMinor = 8 // Minor version component of the current release VersionPatch = 2 // Patch version component of the current release VersionMeta = "anduschain" // Version metadata to append to the version string )
Variables ¶
var ( MainnetGenesisHash = common.HexToHash("0x36f0e7a4f08e35a5ce5a624792e3253c21cbe103b037e276fe376bfb0ebc3f81") TestnetGenesisHash = common.HexToHash("0x2e673ece7dd30d2b04ede22c800f816c0c9ef2fe43433337565fa4e4c8405d67") MainNetPubKey = "034911d106851a0d857cb6aeaf39a06ce3d7a13f73195c8a58874156bb28d2ad0e" // from fairnode-mainnet TestNetPubKey = "02c5ec32bf37887175010ff7f8d89723fa7fe584408f4e39c51d9f26f685d50b79" // from fairnode-testnet TestPubKey = "028fb2276965f6a47de9cb36407eb2c9e158e2d4d93e5661e19b7d7b61209e1f87" // file in Projcet fiarkey.json, [ only using for testing ] )
Genesis hashes to enforce below configs on.
var ( MAIN_NETWORK = big.NewInt(14288640) TEST_NETWORK = big.NewInt(14288641) DEB_NETWORK = big.NewInt(14288642) )
var ( MainnetChainConfig = &ChainConfig{ ChainID: MAIN_NETWORK, HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, EIP150Block: big.NewInt(0), EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PohangBlock: big.NewInt(2000000), Deb: &DebConfig{FairPubKey: MainNetPubKey, GasLimit: GenesisGasLimit, GasPrice: MinimumGenesisGasPrice, FnFeeRate: big.NewInt(DefaultFairnodeFee)}, } // TestnetChainConfig contains the chain parameters to run a node on the Anduschain test network. TestnetChainConfig = &ChainConfig{ ChainID: TEST_NETWORK, HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, EIP150Block: big.NewInt(0), EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PohangBlock: big.NewInt(0), Deb: &DebConfig{FairPubKey: TestNetPubKey, GasLimit: GenesisGasLimit, GasPrice: MinimumGenesisGasPrice, FnFeeRate: big.NewInt(DefaultFairnodeFee)}, } DebChainConfig = &ChainConfig{ ChainID: DEB_NETWORK, HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, EIP150Block: nil, EIP150Hash: common.Hash{}, EIP155Block: big.NewInt(0), EIP158Block: big.NewInt(0), ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PohangBlock: big.NewInt(0), Deb: &DebConfig{ FairPubKey: TestPubKey, GasLimit: GenesisGasLimit, GasPrice: MinimumGenesisGasPrice, FnFeeRate: big.NewInt(DefaultFairnodeFee), }, } TestChainConfig = &ChainConfig{ GeneralId, big.NewInt(0), nil, true, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), TestDebConfig, nil, nil} TestDebChainConfig = &ChainConfig{ DvlpNetId, big.NewInt(0), nil, true, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), TestDebConfig, nil, nil} AllDebProtocolChanges = &ChainConfig{ DvlpNetId, big.NewInt(0), nil, true, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), TestDebConfig, nil, nil} TestCliqueChainConfig = &ChainConfig{ GeneralId, big.NewInt(0), nil, true, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil} AllCliqueProtocolChanges = &ChainConfig{ big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, &CliqueConfig{Period: 0, Epoch: 30000}, nil} TestDbftChainConfig = &ChainConfig{ GeneralId, big.NewInt(0), nil, true, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &DbftConfig{Period: 0, Epoch: 30000}} AllDbftProtocolChanges = &ChainConfig{ big.NewInt(1337), big.NewInt(0), nil, false, big.NewInt(0), common.Hash{}, big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), big.NewInt(0), nil, nil, &DbftConfig{Period: 0, Epoch: 30000}} )
var ( JtxAddress = common.HexToAddress(jtsAddrStr) TestOtprn = "" /* 272-byte string literal not displayed */ TestFairnodeKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291") TestFairnodeAddr = crypto.PubkeyToAddress(TestFairnodeKey.PublicKey) TestDebConfig = &DebConfig{ FairPubKey: common.Bytes2Hex(crypto.CompressPubkey(&TestFairnodeKey.PublicKey)), GasLimit: MaxGasLimit, GasPrice: DefaultGasFee, FnFeeRate: big.NewInt(100), } TestCliqueConfig = &CliqueConfig{ Period: 1, Epoch: 50, } MainNetId = big.NewInt(14288640) TestNetId = big.NewInt(14288641) DvlpNetId = big.NewInt(14288642) GeneralId = big.NewInt(3357) SideId = big.NewInt(3358) )
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 Bls12381MultiExpDiscountTable = [128]uint64{} /* 128 elements not displayed */
Gas discount table for BLS12-381 G1 and G2 multi exponentiation operations
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{}
DiscoveryV5Bootnodes are the enode URLs of the P2P bootstrap nodes for the experimental RLPx v5 topic-discovery network.
var MainnetBootnodes = []string{
"enode://b3db50144fefa4f06b0b897d735d1233fcb33bf0f3b60d3c1cdda6cd70aeac15908e7a9882d9ab7e090473d1d36cd75dcd34d68869825ec18c92cefa6ec20fc4@211.34.230.1:50501",
"enode://f465600130c8d4d06fe41dbedb6d9d72aa213afb7d0e182232258eb108016f312f8786aaba9acd6aa3d6923308178b527e8a96139b0224e0cf3fe5227837210d@211.34.230.2:50501",
}
MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the main Ethereum network.
var TestnetBootnodes = []string{
"enode://585232819253c97da804baefe8b0b015cd797dc784cd8b48888ff2e69f0e39815bdcdf81ea04e7823b663df7b49e075d5558fc3a0dfeea021c5147bb6540cd4c@bootnode.testnet.anduschain.io:50501",
}
AndusChainTestNode
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 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/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) PohangBlock *big.Int `json:"pohangBlock,omitempty"` // Pohang switch block (nil = no fork, 0 = already activated) // Various consensus engines Deb *DebConfig `json:"deb,omitempty"` Clique *CliqueConfig `json:"clique,omitempty"` Dbft *DbftConfig `json:"dbft,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) 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
IsByzantium returns whether num is either equal to the Byzantium fork block or greater.
func (*ChainConfig) IsConstantinople ¶
func (c *ChainConfig) IsConstantinople(num *big.Int) bool
IsConstantinople returns whether num is either equal to the Constantinople fork block or greater.
func (*ChainConfig) IsDAOFork ¶
func (c *ChainConfig) IsDAOFork(num *big.Int) bool
IsDAOFork returns whether num is either equal to the DAO fork block or greater.
func (*ChainConfig) IsEIP150 ¶
func (c *ChainConfig) IsEIP150(num *big.Int) bool
IsEIP150 returns whether num is either equal to the EIP150 fork block or greater.
func (*ChainConfig) IsEIP155 ¶
func (c *ChainConfig) IsEIP155(num *big.Int) bool
IsEIP155 returns whether num is either equal to the EIP155 fork block or greater.
func (*ChainConfig) IsEIP158 ¶
func (c *ChainConfig) IsEIP158(num *big.Int) bool
IsEIP158 returns whether num is either equal to the EIP158 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) IsPohang ¶ added in v0.8.1
func (c *ChainConfig) IsPohang(num *big.Int) bool
IsPohang returns whether num is either equal to the Pohang fork block or greater.
func (*ChainConfig) NetworkType ¶ added in v0.6.12
func (c *ChainConfig) NetworkType() uint64
return newtork type
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 DbftConfig ¶ added in v0.8.1
type DbftConfig struct { Period uint64 `json:"period"` // Number of seconds between blocks to enforce Epoch uint64 `json:"epoch"` // Epoch length to reset votes and checkpoint }
DbftConfig is the consensus engine configs for proof-of-authority based sealing.
func (*DbftConfig) String ¶ added in v0.8.1
func (c *DbftConfig) String() string
String implements the stringer interface, returning the consensus engine details.
type DebConfig ¶
type DebConfig struct { FairPubKey string `json:"fairPubKey"` GasLimit uint64 `json:"gasLimit"` GasPrice uint64 `json:"gasPrice"` FnFeeRate *big.Int `json:"fairFee"` }
func (*DebConfig) GetFnFeeRate ¶ added in v0.7.6
func (*DebConfig) SetFairPubKey ¶ added in v0.8.1
func (*DebConfig) SetFnFeeRate ¶ added in v0.7.6
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, IsConstantinople bool IsPohang 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.