Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MainnetRules = Rules{ IsHomestead: true, IsEIP150: true, IsEIP155: true, IsEIP158: true, IsByzantium: true, IsConstantinople: true, IsPetersburg: true, IsIstanbul: true, IsBerlin: true, IsLondon: true, } CliqueRules = Rules{ IsHomestead: true, IsEIP150: true, IsEIP155: true, IsEIP158: true, IsByzantium: true, IsConstantinople: true, IsPetersburg: true, IsIstanbul: true, IsBerlin: true, IsLondon: false, } DevRules = CliqueRules )
Functions ¶
func HeadHeaderHash ¶
HeadHeaderHash retrieves the hash of the current canonical head header.
Types ¶
type Config ¶
type Config struct { MuirGlacierBlock *big.Int `json:"muirGlacierBlock,omitempty"` // EIP-2384 (bomb delay) switch block (nil = no fork, 0 = already activated) EIP155Block *big.Int `json:"eip155Block,omitempty"` // EIP155 HF block 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) ByzantiumBlock *big.Int `json:"byzantiumBlock,omitempty"` // Byzantium switch block (nil = no fork, 0 = already on byzantium) // 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) ChainID *big.Int `json:"chainId"` // chainId identifies the current chain and is used for replay protection EIP158Block *big.Int `json:"eip158Block,omitempty"` // EIP158 HF block ArrowGlacierBlock *big.Int `json:"arrowGlacierBlock,omitempty"` // EIP-4345 (bomb delay) switch block (nil = no fork, 0 = already activated) 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) LondonBlock *big.Int `json:"londonBlock,omitempty"` // London switch block (nil = no fork, 0 = already on london) BerlinBlock *big.Int `json:"berlinBlock,omitempty"` // Berlin switch block (nil = no fork, 0 = already on berlin) ChainName string DAOForkSupport bool `json:"daoForkSupport,omitempty"` // Whether the nodes supports or opposes the DAO hard-fork }
Config is the core config which determines the blockchain settings.
Config 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.
type Rules ¶
type Rules struct {
IsHomestead, IsEIP150, IsEIP155, IsEIP158 bool
IsByzantium, IsConstantinople, IsPetersburg, IsIstanbul bool
IsBerlin, IsLondon bool
}
Rules wraps Config 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.
Click to show internal directories.
Click to hide internal directories.