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) IsMainChain() bool
- func (c *ChainConfig) Rules(num *big.Int) Rules
- func (c *ChainConfig) String() string
- type ConfigCompatError
- type GasTable
- type GeneralConfig
- type NeatConConfig
- type Rules
Constants ¶
View Source
const ( Wei = 1 GWei = 1e9 Finney = 1e15 NEAT = 1e18 )
View Source
const ( GasLimitBoundDivisor uint64 = 1024 MinGasLimit uint64 = 5000 GenesisGasLimit uint64 = 4712388 MaximumExtraDataSize uint64 = 32 ExpByteGas uint64 = 10 SloadGas uint64 = 50 CallValueTransferGas uint64 = 9000 CallNewAccountGas uint64 = 25000 TxGas uint64 = 21000 TxGasContractCreation uint64 = 53000 TxDataZeroGas uint64 = 4 QuadCoeffDiv uint64 = 512 LogDataGas uint64 = 8 CallStipend uint64 = 2300 Sha3Gas uint64 = 30 Sha3WordGas uint64 = 6 SstoreSetGas uint64 = 20000 SstoreResetGas uint64 = 5000 SstoreClearGas uint64 = 5000 SstoreRefundGas uint64 = 15000 NetSstoreNoopGas uint64 = 200 NetSstoreInitGas uint64 = 20000 NetSstoreCleanGas uint64 = 5000 NetSstoreDirtyGas uint64 = 200 NetSstoreClearRefund uint64 = 15000 NetSstoreResetRefund uint64 = 4800 NetSstoreResetClearRefund uint64 = 19800 SstoreSentryGasEIP2200 uint64 = 2300 SstoreNoopGasEIP2200 uint64 = 800 SstoreDirtyGasEIP2200 uint64 = 800 SstoreInitGasEIP2200 uint64 = 20000 SstoreInitRefundEIP2200 uint64 = 19200 SstoreCleanGasEIP2200 uint64 = 5000 SstoreCleanRefundEIP2200 uint64 = 4200 SstoreClearRefundEIP2200 uint64 = 15000 JumpdestGas uint64 = 1 EpochDuration uint64 = 30000 CreateDataGas uint64 = 200 CallCreateDepth uint64 = 1024 ExpGas uint64 = 10 LogGas uint64 = 375 CopyGas uint64 = 3 StackLimit uint64 = 1024 TierStepGas uint64 = 0 LogTopicGas uint64 = 375 CreateGas uint64 = 32000 Create2Gas uint64 = 32000 SelfdestructRefundGas uint64 = 24000 SuicideRefundGas uint64 = 24000 MemoryGas uint64 = 3 TxDataNonZeroGasFrontier uint64 = 68 TxDataNonZeroGasEIP2028 uint64 = 16 CallGasFrontier uint64 = 40 CallGasEIP150 uint64 = 700 BalanceGasFrontier uint64 = 20 BalanceGasEIP150 uint64 = 400 BalanceGasEIP1884 uint64 = 700 ExtcodeSizeGasFrontier uint64 = 20 ExtcodeSizeGasEIP150 uint64 = 700 SloadGasFrontier uint64 = 50 SloadGasEIP150 uint64 = 200 SloadGasEIP1884 uint64 = 800 ExtcodeHashGasConstantinople uint64 = 400 ExtcodeHashGasEIP1884 uint64 = 700 SelfdestructGasEIP150 uint64 = 5000 ExpByteFrontier uint64 = 10 ExpByteEIP158 uint64 = 50 ExtcodeCopyBaseFrontier uint64 = 20 ExtcodeCopyBaseEIP150 uint64 = 700 CreateBySelfdestructGas uint64 = 25000 MaxCodeSize = 24576 EcrecoverGas uint64 = 3000 Sha256BaseGas uint64 = 60 Sha256PerWordGas uint64 = 12 Ripemd160BaseGas uint64 = 600 Ripemd160PerWordGas uint64 = 120 IdentityBaseGas uint64 = 15 IdentityPerWordGas uint64 = 3 ModExpQuadCoeffDiv uint64 = 20 Bn256AddGas uint64 = 500 Bn256ScalarMulGas uint64 = 40000 Bn256PairingBaseGas uint64 = 100000 Bn256PairingPerPointGas uint64 = 80000 Bn256AddGasByzantium uint64 = 500 Bn256AddGasIstanbul uint64 = 150 Bn256ScalarMulGasByzantium uint64 = 40000 Bn256ScalarMulGasIstanbul uint64 = 6000 Bn256PairingBaseGasByzantium uint64 = 100000 Bn256PairingBaseGasIstanbul uint64 = 45000 Bn256PairingPerPointGasByzantium uint64 = 80000 Bn256PairingPerPointGasIstanbul uint64 = 34000 )
View Source
const ( VersionMajor = 1 VersionMinor = 7 VersionPatch = 0 VersionMeta = "unstable" )
View Source
const (
BloomBitsBlocks uint64 = 4096
)
Variables ¶
View Source
var ( MainnetGenesisHash = common.HexToHash("0x1611b12e55c2c903d9083538e535d8a2150ecb80e50bf56dbf938263d0909607") TestnetGenesisHash = common.HexToHash("0x4acbb93c3033234cc2c659ccfd2b4f7e835743296e874f23778cb06aa9836060") )
View Source
var ( MainnetChainConfig = &ChainConfig{ NeatChainId: "neatio", ChainId: big.NewInt(1), 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: nil, NeatCon: &NeatConConfig{ Epoch: 30000, ProposerPolicy: 0, }, } TestnetChainConfig = &ChainConfig{ NeatChainId: "testnet", ChainId: big.NewInt(2), 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: nil, NeatCon: &NeatConConfig{ 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), nil, nil, nil} TestRules = TestChainConfig.Rules(new(big.Int)) )
View Source
var ( GasTableHomestead = GasTable{ ExtcodeSize: 20, ExtcodeCopy: 20, Balance: 20, SLoad: 50, Calls: 40, Suicide: 0, ExpByte: 10, } GasTableEIP150 = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700, Balance: 400, SLoad: 200, Calls: 700, Suicide: 5000, ExpByte: 10, CreateBySuicide: 25000, } GasTableEIP158 = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700, Balance: 400, SLoad: 200, Calls: 700, Suicide: 5000, ExpByte: 50, CreateBySuicide: 25000, } GasTableConstantinople = GasTable{ ExtcodeSize: 700, ExtcodeCopy: 700, ExtcodeHash: 400, Balance: 400, SLoad: 200, Calls: 700, Suicide: 5000, ExpByte: 50, CreateBySuicide: 25000, } )
View Source
var ( DifficultyBoundDivisor = big.NewInt(2048) GenesisDifficulty = big.NewInt(131072) MinimumDifficulty = big.NewInt(131072) DurationLimit = big.NewInt(13) )
View Source
var DAOForkBlockExtra = common.FromHex("0x64616f2d686172642d666f726b")
View Source
var DAOForkExtraRange = big.NewInt(10)
View Source
var DAORefundContract = common.HexToAddress("0xbf4ed7b27f1d666546e30d74d50d173d20bca754")
View Source
var GenCfg = GeneralConfig{PerfTest: false}
View Source
var MainnetBootnodes = []string{
"enode://9b1908913619ab593d64e681a9c79547c469eb39f8520a6fa175ff07284c672102865d6da69fd39b115c7990a82e41988122ba15154fb7f953c553e25caf2462@135.181.195.79:9910",
"enode://b2fa58caff7d793da4401a7cc2ea5d94fc2082af2204602cc264e0da9e371c2373e32caab3d20827f307476ebe3da52fbe1336e83abd502ea0a1f5ee77776a7b@88.198.217.71:9910",
}
View Source
var TestnetBootnodes = []string{
"enode://c97602ae458d92d2be28d58f6ed82ffd11245edbce8d1e78171135ca598eac2bf1853423971ac2bec0856e590a0f041211343a3906dc62031deeaa85b8d05e1a@185.220.101.129/testnet",
"enode://eb0e6f3cd8f53cf36e82a6ff061cbd7fe31bd76b41bb4681bb4d11601ca3e7f913f69cf25d31861111e816f73f20ac6b44a39f2722c244a14dd805f36a6ee9f3@199.249.230.114:9911/testnet",
}
View Source
var Version = func() string { return fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch) }()
View Source
var VersionWithMeta = func() string { v := Version if VersionMeta != "" { v += "-" + VersionMeta } return v }()
Functions ¶
func DAODrainList ¶
func IsMainChain ¶
func VersionWithCommit ¶
Types ¶
type ChainConfig ¶
type ChainConfig struct { NeatChainId string `json:"neatChainId"` ChainId *big.Int `json:"chainId"` HomesteadBlock *big.Int `json:"homesteadBlock,omitempty"` EIP150Block *big.Int `json:"eip150Block,omitempty"` EIP150Hash common.Hash `json:"eip150Hash,omitempty"` EIP155Block *big.Int `json:"eip155Block,omitempty"` EIP158Block *big.Int `json:"eip158Block,omitempty"` ByzantiumBlock *big.Int `json:"byzantiumBlock,omitempty"` ConstantinopleBlock *big.Int `json:"constantinopleBlock,omitempty"` NeatCon *NeatConConfig `json:"neatcon,omitempty"` ChainLogger log.Logger `json:"-"` }
func NewSideChainConfig ¶
func NewSideChainConfig(sideChainID string) *ChainConfig
func (*ChainConfig) CheckCompatible ¶
func (c *ChainConfig) CheckCompatible(newcfg *ChainConfig, height uint64) *ConfigCompatError
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
func (*ChainConfig) IsMainChain ¶
func (c *ChainConfig) IsMainChain() bool
func (*ChainConfig) String ¶
func (c *ChainConfig) String() string
type ConfigCompatError ¶
func (*ConfigCompatError) Error ¶
func (err *ConfigCompatError) Error() string
type GeneralConfig ¶
type GeneralConfig struct {
PerfTest bool `json:"perfTest,omitempty"`
}
type NeatConConfig ¶ added in v1.5.1
func (*NeatConConfig) String ¶ added in v1.5.1
func (c *NeatConConfig) String() string
Click to show internal directories.
Click to hide internal directories.