mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 22:26:42 +00:00
rename some variables
This commit is contained in:
parent
21ffa45b6f
commit
c758f7a13f
6 changed files with 268 additions and 257 deletions
|
|
@ -370,10 +370,10 @@ func (pre *Prestate) Apply(vmConfig vm.Config, chainConfig *params.ChainConfig,
|
||||||
}
|
}
|
||||||
if chainConfig.IsDelegationActive(vmContext.BlockNumber, vmContext.Time) {
|
if chainConfig.IsDelegationActive(vmContext.BlockNumber, vmContext.Time) {
|
||||||
if len(pre.Env.Withdrawals) > 0 {
|
if len(pre.Env.Withdrawals) > 0 {
|
||||||
w := pre.Env.Withdrawals[0]
|
firstWithdrawal := pre.Env.Withdrawals[0]
|
||||||
if w.Validator == gomath.MaxUint64 {
|
if firstWithdrawal.Validator == gomath.MaxUint64 {
|
||||||
amount := new(big.Int).Mul(new(big.Int).SetUint64(w.Amount), big.NewInt(params.GWei))
|
amount := new(big.Int).Mul(new(big.Int).SetUint64(firstWithdrawal.Amount), big.NewInt(params.GWei))
|
||||||
if err := core.ProcessStakingDistribution(evm, w.Address, amount); err != nil {
|
if err := core.ProcessStakingDistribution(evm, firstWithdrawal.Address, amount); err != nil {
|
||||||
log.Error("could not process staking distribution", "err", err)
|
log.Error("could not process staking distribution", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -331,10 +331,10 @@ func (b *BlockGen) collectRequests(readonly bool) (requests [][]byte) {
|
||||||
evm := vm.NewEVM(blockContext, statedb, b.cm.config, vm.Config{})
|
evm := vm.NewEVM(blockContext, statedb, b.cm.config, vm.Config{})
|
||||||
if b.cm.config.IsDelegationActive(b.header.Number, b.header.Time) {
|
if b.cm.config.IsDelegationActive(b.header.Number, b.header.Time) {
|
||||||
if len(b.withdrawals) > 0 {
|
if len(b.withdrawals) > 0 {
|
||||||
w := b.withdrawals[0]
|
firstWithdrawal := b.withdrawals[0]
|
||||||
if w.Validator == math.MaxUint64 {
|
if firstWithdrawal.Validator == math.MaxUint64 {
|
||||||
amount := new(big.Int).Mul(new(big.Int).SetUint64(w.Amount), big.NewInt(params.GWei))
|
amount := new(big.Int).Mul(new(big.Int).SetUint64(firstWithdrawal.Amount), big.NewInt(params.GWei))
|
||||||
if err := ProcessStakingDistribution(evm, w.Address, amount); err != nil {
|
if err := ProcessStakingDistribution(evm, firstWithdrawal.Address, amount); err != nil {
|
||||||
log.Error("could not process staking distribution", "err", err)
|
log.Error("could not process staking distribution", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,10 +117,10 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg
|
||||||
}
|
}
|
||||||
if p.config.IsDelegationActive(block.Number(), block.Time()) {
|
if p.config.IsDelegationActive(block.Number(), block.Time()) {
|
||||||
if len(block.Withdrawals()) > 0 {
|
if len(block.Withdrawals()) > 0 {
|
||||||
w := block.Withdrawals()[0]
|
firstWithdrawal := block.Withdrawals()[0]
|
||||||
if w.Validator == math.MaxUint64 {
|
if firstWithdrawal.Validator == math.MaxUint64 {
|
||||||
amount := new(big.Int).Mul(new(big.Int).SetUint64(w.Amount), big.NewInt(params.GWei))
|
amount := new(big.Int).Mul(new(big.Int).SetUint64(firstWithdrawal.Amount), big.NewInt(params.GWei))
|
||||||
if err := ProcessStakingDistribution(evm, w.Address, amount); err != nil {
|
if err := ProcessStakingDistribution(evm, firstWithdrawal.Address, amount); err != nil {
|
||||||
log.Error("could not process staking distribution", "err", err)
|
log.Error("could not process staking distribution", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -336,10 +336,10 @@ func (sim *simulator) processBlock(ctx context.Context, block *simBlock, header,
|
||||||
}
|
}
|
||||||
if sim.chainConfig.IsDelegationActive(header.Number, header.Time) {
|
if sim.chainConfig.IsDelegationActive(header.Number, header.Time) {
|
||||||
if block.BlockOverrides.Withdrawals != nil && len(*block.BlockOverrides.Withdrawals) > 0 {
|
if block.BlockOverrides.Withdrawals != nil && len(*block.BlockOverrides.Withdrawals) > 0 {
|
||||||
w := (*block.BlockOverrides.Withdrawals)[0]
|
firstWithdrawal := (*block.BlockOverrides.Withdrawals)[0]
|
||||||
if w.Validator == math.MaxUint64 {
|
if firstWithdrawal.Validator == math.MaxUint64 {
|
||||||
amount := new(big.Int).Mul(new(big.Int).SetUint64(w.Amount), big.NewInt(params.GWei))
|
amount := new(big.Int).Mul(new(big.Int).SetUint64(firstWithdrawal.Amount), big.NewInt(params.GWei))
|
||||||
if err := core.ProcessStakingDistribution(evm, w.Address, amount); err != nil {
|
if err := core.ProcessStakingDistribution(evm, firstWithdrawal.Address, amount); err != nil {
|
||||||
log.Error("could not process staking distribution", "err", err)
|
log.Error("could not process staking distribution", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -130,10 +130,10 @@ func (miner *Miner) generateWork(params *generateParams, witness bool) *newPaylo
|
||||||
}
|
}
|
||||||
if miner.chainConfig.IsDelegationActive(work.header.Number, work.header.Time) {
|
if miner.chainConfig.IsDelegationActive(work.header.Number, work.header.Time) {
|
||||||
if len(params.withdrawals) > 0 {
|
if len(params.withdrawals) > 0 {
|
||||||
w := params.withdrawals[0]
|
firstWithdrawal := params.withdrawals[0]
|
||||||
if w.Validator == math.MaxUint64 {
|
if firstWithdrawal.Validator == math.MaxUint64 {
|
||||||
amount := new(big.Int).Mul(new(big.Int).SetUint64(w.Amount), big.NewInt(ethparams.GWei))
|
amount := new(big.Int).Mul(new(big.Int).SetUint64(firstWithdrawal.Amount), big.NewInt(ethparams.GWei))
|
||||||
if err := core.ProcessStakingDistribution(work.evm, w.Address, amount); err != nil {
|
if err := core.ProcessStakingDistribution(work.evm, firstWithdrawal.Address, amount); err != nil {
|
||||||
log.Error("could not process staking distribution", "err", err)
|
log.Error("could not process staking distribution", "err", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
485
params/config.go
485
params/config.go
|
|
@ -41,29 +41,30 @@ var (
|
||||||
|
|
||||||
// MainnetChainConfig is the chain parameters to run a node on the main network.
|
// MainnetChainConfig is the chain parameters to run a node on the main network.
|
||||||
MainnetChainConfig = &ChainConfig{
|
MainnetChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(1),
|
ChainID: big.NewInt(1),
|
||||||
HomesteadBlock: big.NewInt(1_150_000),
|
HomesteadBlock: big.NewInt(1_150_000),
|
||||||
DAOForkBlock: big.NewInt(1_920_000),
|
DAOForkBlock: big.NewInt(1_920_000),
|
||||||
DAOForkSupport: true,
|
DAOForkSupport: true,
|
||||||
EIP150Block: big.NewInt(2_463_000),
|
EIP150Block: big.NewInt(2_463_000),
|
||||||
EIP155Block: big.NewInt(2_675_000),
|
EIP155Block: big.NewInt(2_675_000),
|
||||||
EIP158Block: big.NewInt(2_675_000),
|
EIP158Block: big.NewInt(2_675_000),
|
||||||
ByzantiumBlock: big.NewInt(4_370_000),
|
ByzantiumBlock: big.NewInt(4_370_000),
|
||||||
ConstantinopleBlock: big.NewInt(7_280_000),
|
ConstantinopleBlock: big.NewInt(7_280_000),
|
||||||
PetersburgBlock: big.NewInt(7_280_000),
|
PetersburgBlock: big.NewInt(7_280_000),
|
||||||
IstanbulBlock: big.NewInt(9_069_000),
|
IstanbulBlock: big.NewInt(9_069_000),
|
||||||
MuirGlacierBlock: big.NewInt(9_200_000),
|
MuirGlacierBlock: big.NewInt(9_200_000),
|
||||||
BerlinBlock: big.NewInt(12_244_000),
|
BerlinBlock: big.NewInt(12_244_000),
|
||||||
LondonBlock: big.NewInt(12_965_000),
|
LondonBlock: big.NewInt(12_965_000),
|
||||||
ArrowGlacierBlock: big.NewInt(13_773_000),
|
ArrowGlacierBlock: big.NewInt(13_773_000),
|
||||||
GrayGlacierBlock: big.NewInt(15_050_000),
|
GrayGlacierBlock: big.NewInt(15_050_000),
|
||||||
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
|
TerminalTotalDifficulty: MainnetTerminalTotalDifficulty, // 58_750_000_000_000_000_000_000
|
||||||
ShanghaiTime: newUint64(1681338455),
|
ShanghaiTime: newUint64(1681338455),
|
||||||
CancunTime: newUint64(1710338135),
|
CancunTime: newUint64(1710338135),
|
||||||
PragueTime: newUint64(1746612311),
|
PragueTime: newUint64(1746612311),
|
||||||
|
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: newUint64(1746612311),
|
DelegationActivationTime: newUint64(1746612311),
|
||||||
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
Prague: DefaultPragueBlobConfig,
|
Prague: DefaultPragueBlobConfig,
|
||||||
|
|
@ -71,30 +72,31 @@ var (
|
||||||
}
|
}
|
||||||
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
|
// HoleskyChainConfig contains the chain parameters to run a node on the Holesky test network.
|
||||||
HoleskyChainConfig = &ChainConfig{
|
HoleskyChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(17000),
|
ChainID: big.NewInt(17000),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: true,
|
DAOForkSupport: true,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: nil,
|
MuirGlacierBlock: nil,
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: nil,
|
ArrowGlacierBlock: nil,
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
MergeNetsplitBlock: nil,
|
MergeNetsplitBlock: nil,
|
||||||
ShanghaiTime: newUint64(1696000704),
|
ShanghaiTime: newUint64(1696000704),
|
||||||
CancunTime: newUint64(1707305664),
|
CancunTime: newUint64(1707305664),
|
||||||
PragueTime: newUint64(1740434112),
|
PragueTime: newUint64(1740434112),
|
||||||
|
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: newUint64(1740434112),
|
DelegationActivationTime: newUint64(1740434112),
|
||||||
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
Prague: DefaultPragueBlobConfig,
|
Prague: DefaultPragueBlobConfig,
|
||||||
|
|
@ -102,30 +104,31 @@ var (
|
||||||
}
|
}
|
||||||
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
|
// SepoliaChainConfig contains the chain parameters to run a node on the Sepolia test network.
|
||||||
SepoliaChainConfig = &ChainConfig{
|
SepoliaChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(11155111),
|
ChainID: big.NewInt(11155111),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: true,
|
DAOForkSupport: true,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: nil,
|
ArrowGlacierBlock: nil,
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(17_000_000_000_000_000),
|
TerminalTotalDifficulty: big.NewInt(17_000_000_000_000_000),
|
||||||
MergeNetsplitBlock: big.NewInt(1735371),
|
MergeNetsplitBlock: big.NewInt(1735371),
|
||||||
ShanghaiTime: newUint64(1677557088),
|
ShanghaiTime: newUint64(1677557088),
|
||||||
CancunTime: newUint64(1706655072),
|
CancunTime: newUint64(1706655072),
|
||||||
PragueTime: newUint64(1741159776),
|
PragueTime: newUint64(1741159776),
|
||||||
|
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: newUint64(1741159776),
|
DelegationActivationTime: newUint64(1741159776),
|
||||||
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
Prague: DefaultPragueBlobConfig,
|
Prague: DefaultPragueBlobConfig,
|
||||||
|
|
@ -133,30 +136,31 @@ var (
|
||||||
}
|
}
|
||||||
// HoodiChainConfig contains the chain parameters to run a node on the Hoodi test network.
|
// HoodiChainConfig contains the chain parameters to run a node on the Hoodi test network.
|
||||||
HoodiChainConfig = &ChainConfig{
|
HoodiChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(560048),
|
ChainID: big.NewInt(560048),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: true,
|
DAOForkSupport: true,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: nil,
|
ArrowGlacierBlock: nil,
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
MergeNetsplitBlock: big.NewInt(0),
|
MergeNetsplitBlock: big.NewInt(0),
|
||||||
ShanghaiTime: newUint64(0),
|
ShanghaiTime: newUint64(0),
|
||||||
CancunTime: newUint64(0),
|
CancunTime: newUint64(0),
|
||||||
PragueTime: newUint64(1742999832),
|
PragueTime: newUint64(1742999832),
|
||||||
|
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: newUint64(1742999832),
|
DelegationActivationTime: newUint64(1742999832),
|
||||||
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
Prague: DefaultPragueBlobConfig,
|
Prague: DefaultPragueBlobConfig,
|
||||||
|
|
@ -165,53 +169,55 @@ var (
|
||||||
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
|
// AllEthashProtocolChanges contains every protocol change (EIPs) introduced
|
||||||
// and accepted by the Ethereum core developers into the Ethash consensus.
|
// and accepted by the Ethereum core developers into the Ethash consensus.
|
||||||
AllEthashProtocolChanges = &ChainConfig{
|
AllEthashProtocolChanges = &ChainConfig{
|
||||||
ChainID: big.NewInt(1337),
|
ChainID: big.NewInt(1337),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: false,
|
DAOForkSupport: false,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: big.NewInt(0),
|
ArrowGlacierBlock: big.NewInt(0),
|
||||||
GrayGlacierBlock: big.NewInt(0),
|
GrayGlacierBlock: big.NewInt(0),
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
MergeNetsplitBlock: nil,
|
MergeNetsplitBlock: nil,
|
||||||
ShanghaiTime: nil,
|
ShanghaiTime: nil,
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
|
OsakaTime: nil,
|
||||||
|
VerkleTime: nil,
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
Clique: nil,
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: nil,
|
DelegationActivationTime: nil,
|
||||||
OsakaTime: nil,
|
|
||||||
VerkleTime: nil,
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
Clique: nil,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AllDevChainProtocolChanges = &ChainConfig{
|
AllDevChainProtocolChanges = &ChainConfig{
|
||||||
ChainID: big.NewInt(1337),
|
ChainID: big.NewInt(1337),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: big.NewInt(0),
|
ArrowGlacierBlock: big.NewInt(0),
|
||||||
GrayGlacierBlock: big.NewInt(0),
|
GrayGlacierBlock: big.NewInt(0),
|
||||||
ShanghaiTime: newUint64(0),
|
ShanghaiTime: newUint64(0),
|
||||||
CancunTime: newUint64(0),
|
CancunTime: newUint64(0),
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
PragueTime: newUint64(0),
|
PragueTime: newUint64(0),
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: newUint64(0),
|
DelegationActivationTime: newUint64(0),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
|
|
@ -222,94 +228,97 @@ var (
|
||||||
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
|
// AllCliqueProtocolChanges contains every protocol change (EIPs) introduced
|
||||||
// and accepted by the Ethereum core developers into the Clique consensus.
|
// and accepted by the Ethereum core developers into the Clique consensus.
|
||||||
AllCliqueProtocolChanges = &ChainConfig{
|
AllCliqueProtocolChanges = &ChainConfig{
|
||||||
ChainID: big.NewInt(1337),
|
ChainID: big.NewInt(1337),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: false,
|
DAOForkSupport: false,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: nil,
|
ArrowGlacierBlock: nil,
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
MergeNetsplitBlock: nil,
|
MergeNetsplitBlock: nil,
|
||||||
ShanghaiTime: nil,
|
ShanghaiTime: nil,
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
|
OsakaTime: nil,
|
||||||
|
VerkleTime: nil,
|
||||||
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
|
Ethash: nil,
|
||||||
|
Clique: &CliqueConfig{Period: 0, Epoch: 30000},
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: nil,
|
DelegationActivationTime: nil,
|
||||||
OsakaTime: nil,
|
|
||||||
VerkleTime: nil,
|
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
|
||||||
Ethash: nil,
|
|
||||||
Clique: &CliqueConfig{Period: 0, Epoch: 30000},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestChainConfig contains every protocol change (EIPs) introduced
|
// TestChainConfig contains every protocol change (EIPs) introduced
|
||||||
// and accepted by the Ethereum core developers for testing purposes.
|
// and accepted by the Ethereum core developers for testing purposes.
|
||||||
TestChainConfig = &ChainConfig{
|
TestChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(1),
|
ChainID: big.NewInt(1),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: false,
|
DAOForkSupport: false,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: big.NewInt(0),
|
ArrowGlacierBlock: big.NewInt(0),
|
||||||
GrayGlacierBlock: big.NewInt(0),
|
GrayGlacierBlock: big.NewInt(0),
|
||||||
MergeNetsplitBlock: nil,
|
MergeNetsplitBlock: nil,
|
||||||
ShanghaiTime: nil,
|
ShanghaiTime: nil,
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
|
OsakaTime: nil,
|
||||||
|
VerkleTime: nil,
|
||||||
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
Clique: nil,
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: nil,
|
DelegationActivationTime: nil,
|
||||||
OsakaTime: nil,
|
|
||||||
VerkleTime: nil,
|
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
Clique: nil,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// MergedTestChainConfig contains every protocol change (EIPs) introduced
|
// MergedTestChainConfig contains every protocol change (EIPs) introduced
|
||||||
// and accepted by the Ethereum core developers for testing purposes.
|
// and accepted by the Ethereum core developers for testing purposes.
|
||||||
MergedTestChainConfig = &ChainConfig{
|
MergedTestChainConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(1),
|
ChainID: big.NewInt(1),
|
||||||
HomesteadBlock: big.NewInt(0),
|
HomesteadBlock: big.NewInt(0),
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: false,
|
DAOForkSupport: false,
|
||||||
EIP150Block: big.NewInt(0),
|
EIP150Block: big.NewInt(0),
|
||||||
EIP155Block: big.NewInt(0),
|
EIP155Block: big.NewInt(0),
|
||||||
EIP158Block: big.NewInt(0),
|
EIP158Block: big.NewInt(0),
|
||||||
ByzantiumBlock: big.NewInt(0),
|
ByzantiumBlock: big.NewInt(0),
|
||||||
ConstantinopleBlock: big.NewInt(0),
|
ConstantinopleBlock: big.NewInt(0),
|
||||||
PetersburgBlock: big.NewInt(0),
|
PetersburgBlock: big.NewInt(0),
|
||||||
IstanbulBlock: big.NewInt(0),
|
IstanbulBlock: big.NewInt(0),
|
||||||
MuirGlacierBlock: big.NewInt(0),
|
MuirGlacierBlock: big.NewInt(0),
|
||||||
BerlinBlock: big.NewInt(0),
|
BerlinBlock: big.NewInt(0),
|
||||||
LondonBlock: big.NewInt(0),
|
LondonBlock: big.NewInt(0),
|
||||||
ArrowGlacierBlock: big.NewInt(0),
|
ArrowGlacierBlock: big.NewInt(0),
|
||||||
GrayGlacierBlock: big.NewInt(0),
|
GrayGlacierBlock: big.NewInt(0),
|
||||||
MergeNetsplitBlock: big.NewInt(0),
|
MergeNetsplitBlock: big.NewInt(0),
|
||||||
ShanghaiTime: newUint64(0),
|
ShanghaiTime: newUint64(0),
|
||||||
CancunTime: newUint64(0),
|
CancunTime: newUint64(0),
|
||||||
PragueTime: newUint64(0),
|
PragueTime: newUint64(0),
|
||||||
|
OsakaTime: nil,
|
||||||
|
VerkleTime: nil,
|
||||||
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
|
Ethash: new(EthashConfig),
|
||||||
|
Clique: nil,
|
||||||
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
DelegationActivationTime: newUint64(0),
|
DelegationActivationTime: newUint64(0),
|
||||||
OsakaTime: nil,
|
|
||||||
VerkleTime: nil,
|
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
|
||||||
Ethash: new(EthashConfig),
|
|
||||||
Clique: nil,
|
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
Prague: DefaultPragueBlobConfig,
|
Prague: DefaultPragueBlobConfig,
|
||||||
|
|
@ -319,32 +328,33 @@ var (
|
||||||
// NonActivatedConfig defines the chain configuration without activating
|
// NonActivatedConfig defines the chain configuration without activating
|
||||||
// any protocol change (EIPs).
|
// any protocol change (EIPs).
|
||||||
NonActivatedConfig = &ChainConfig{
|
NonActivatedConfig = &ChainConfig{
|
||||||
ChainID: big.NewInt(1),
|
ChainID: big.NewInt(1),
|
||||||
HomesteadBlock: nil,
|
HomesteadBlock: nil,
|
||||||
DAOForkBlock: nil,
|
DAOForkBlock: nil,
|
||||||
DAOForkSupport: false,
|
DAOForkSupport: false,
|
||||||
EIP150Block: nil,
|
EIP150Block: nil,
|
||||||
EIP155Block: nil,
|
EIP155Block: nil,
|
||||||
EIP158Block: nil,
|
EIP158Block: nil,
|
||||||
ByzantiumBlock: nil,
|
ByzantiumBlock: nil,
|
||||||
ConstantinopleBlock: nil,
|
ConstantinopleBlock: nil,
|
||||||
PetersburgBlock: nil,
|
PetersburgBlock: nil,
|
||||||
IstanbulBlock: nil,
|
IstanbulBlock: nil,
|
||||||
MuirGlacierBlock: nil,
|
MuirGlacierBlock: nil,
|
||||||
BerlinBlock: nil,
|
BerlinBlock: nil,
|
||||||
LondonBlock: nil,
|
LondonBlock: nil,
|
||||||
ArrowGlacierBlock: nil,
|
ArrowGlacierBlock: nil,
|
||||||
GrayGlacierBlock: nil,
|
GrayGlacierBlock: nil,
|
||||||
MergeNetsplitBlock: nil,
|
MergeNetsplitBlock: nil,
|
||||||
ShanghaiTime: nil,
|
ShanghaiTime: nil,
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
DelegationActivationTime: newUint64(0),
|
OsakaTime: nil,
|
||||||
OsakaTime: nil,
|
VerkleTime: nil,
|
||||||
VerkleTime: nil,
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
Ethash: new(EthashConfig),
|
||||||
Ethash: new(EthashConfig),
|
Clique: nil,
|
||||||
Clique: nil,
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
|
DelegationActivationTime: nil,
|
||||||
}
|
}
|
||||||
TestRules = TestChainConfig.Rules(new(big.Int), false, 0)
|
TestRules = TestChainConfig.Rules(new(big.Int), false, 0)
|
||||||
)
|
)
|
||||||
|
|
@ -425,8 +435,9 @@ type ChainConfig struct {
|
||||||
// the network that triggers the consensus upgrade.
|
// the network that triggers the consensus upgrade.
|
||||||
TerminalTotalDifficulty *big.Int `json:"terminalTotalDifficulty,omitempty"`
|
TerminalTotalDifficulty *big.Int `json:"terminalTotalDifficulty,omitempty"`
|
||||||
|
|
||||||
DepositContractAddress common.Address `json:"depositContractAddress,omitempty"`
|
DepositContractAddress common.Address `json:"depositContractAddress,omitempty"`
|
||||||
DelegationActivationTime *uint64 `json:"delegationActivationTime,omitempty"`
|
// DelegationActivationTime is the activation time of Delegation logic
|
||||||
|
DelegationActivationTime *uint64 `json:"DelegationActivationTime,omitempty"`
|
||||||
|
|
||||||
// EnableVerkleAtGenesis is a flag that specifies whether the network uses
|
// EnableVerkleAtGenesis is a flag that specifies whether the network uses
|
||||||
// the Verkle tree starting from the genesis block. If set to true, the
|
// the Verkle tree starting from the genesis block. If set to true, the
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue