mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 10:20:44 +00:00
parent
1ef0ffb98c
commit
0d1cf34ec6
7 changed files with 53 additions and 6 deletions
|
|
@ -215,6 +215,8 @@ func activePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
||||||
switch {
|
switch {
|
||||||
case rules.IsUBT:
|
case rules.IsUBT:
|
||||||
return PrecompiledContractsVerkle
|
return PrecompiledContractsVerkle
|
||||||
|
case rules.IsBogota:
|
||||||
|
return PrecompiledContractsOsaka
|
||||||
case rules.IsOsaka:
|
case rules.IsOsaka:
|
||||||
return PrecompiledContractsOsaka
|
return PrecompiledContractsOsaka
|
||||||
case rules.IsPrague:
|
case rules.IsPrague:
|
||||||
|
|
@ -240,6 +242,8 @@ func ActivePrecompiledContracts(rules params.Rules) PrecompiledContracts {
|
||||||
// ActivePrecompiles returns the precompile addresses enabled with the current configuration.
|
// ActivePrecompiles returns the precompile addresses enabled with the current configuration.
|
||||||
func ActivePrecompiles(rules params.Rules) []common.Address {
|
func ActivePrecompiles(rules params.Rules) []common.Address {
|
||||||
switch {
|
switch {
|
||||||
|
case rules.IsBogota:
|
||||||
|
return PrecompiledAddressesOsaka
|
||||||
case rules.IsOsaka:
|
case rules.IsOsaka:
|
||||||
return PrecompiledAddressesOsaka
|
return PrecompiledAddressesOsaka
|
||||||
case rules.IsPrague:
|
case rules.IsPrague:
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,8 @@ func NewEVM(blockCtx BlockContext, statedb StateDB, chainConfig *params.ChainCon
|
||||||
evm.precompiles = activePrecompiledContracts(evm.chainRules)
|
evm.precompiles = activePrecompiledContracts(evm.chainRules)
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
case evm.chainRules.IsBogota:
|
||||||
|
evm.table = &bogotaInstructionSet
|
||||||
case evm.chainRules.IsAmsterdam:
|
case evm.chainRules.IsAmsterdam:
|
||||||
evm.table = &amsterdamInstructionSet
|
evm.table = &amsterdamInstructionSet
|
||||||
case evm.chainRules.IsOsaka:
|
case evm.chainRules.IsOsaka:
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ var (
|
||||||
pragueInstructionSet = newPragueInstructionSet()
|
pragueInstructionSet = newPragueInstructionSet()
|
||||||
osakaInstructionSet = newOsakaInstructionSet()
|
osakaInstructionSet = newOsakaInstructionSet()
|
||||||
amsterdamInstructionSet = newAmsterdamInstructionSet()
|
amsterdamInstructionSet = newAmsterdamInstructionSet()
|
||||||
|
bogotaInstructionSet = newBogotaInstructionSet()
|
||||||
)
|
)
|
||||||
|
|
||||||
// JumpTable contains the EVM opcodes supported at a given fork.
|
// JumpTable contains the EVM opcodes supported at a given fork.
|
||||||
|
|
@ -91,6 +92,11 @@ func validate(jt JumpTable) JumpTable {
|
||||||
return jt
|
return jt
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func newBogotaInstructionSet() JumpTable {
|
||||||
|
instructionSet := newOsakaInstructionSet()
|
||||||
|
return validate(instructionSet)
|
||||||
|
}
|
||||||
|
|
||||||
func newVerkleInstructionSet() JumpTable {
|
func newVerkleInstructionSet() JumpTable {
|
||||||
instructionSet := newShanghaiInstructionSet()
|
instructionSet := newShanghaiInstructionSet()
|
||||||
enable4762(&instructionSet)
|
enable4762(&instructionSet)
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ func LookupInstructionSet(rules params.Rules) (JumpTable, error) {
|
||||||
switch {
|
switch {
|
||||||
case rules.IsUBT:
|
case rules.IsUBT:
|
||||||
return newCancunInstructionSet(), errors.New("verkle-fork not defined yet")
|
return newCancunInstructionSet(), errors.New("verkle-fork not defined yet")
|
||||||
|
case rules.IsBogota:
|
||||||
|
return newBogotaInstructionSet(), nil
|
||||||
case rules.IsAmsterdam:
|
case rules.IsAmsterdam:
|
||||||
return newAmsterdamInstructionSet(), nil
|
return newAmsterdamInstructionSet(), nil
|
||||||
case rules.IsOsaka:
|
case rules.IsOsaka:
|
||||||
|
|
|
||||||
|
|
@ -74,7 +74,7 @@ func (api *ConsensusAPI) ForkchoiceUpdatedWithWitnessV3(ctx context.Context, upd
|
||||||
return engine.STATUS_INVALID, attributesErr("missing withdrawals")
|
return engine.STATUS_INVALID, attributesErr("missing withdrawals")
|
||||||
case params.BeaconRoot == nil:
|
case params.BeaconRoot == nil:
|
||||||
return engine.STATUS_INVALID, attributesErr("missing beacon root")
|
return engine.STATUS_INVALID, attributesErr("missing beacon root")
|
||||||
case !api.checkFork(params.Timestamp, forks.Cancun, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5):
|
case !api.checkFork(params.Timestamp, forks.Cancun, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota):
|
||||||
return engine.STATUS_INVALID, unsupportedForkErr("fcuV3 must only be called for cancun/prague/osaka payloads")
|
return engine.STATUS_INVALID, unsupportedForkErr("fcuV3 must only be called for cancun/prague/osaka payloads")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +152,7 @@ func (api *ConsensusAPI) NewPayloadWithWitnessV4(ctx context.Context, params eng
|
||||||
return invalidStatus, paramsErr("nil beaconRoot post-cancun")
|
return invalidStatus, paramsErr("nil beaconRoot post-cancun")
|
||||||
case executionRequests == nil:
|
case executionRequests == nil:
|
||||||
return invalidStatus, paramsErr("nil executionRequests post-prague")
|
return invalidStatus, paramsErr("nil executionRequests post-prague")
|
||||||
case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5):
|
case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota):
|
||||||
return invalidStatus, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads")
|
return invalidStatus, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads")
|
||||||
}
|
}
|
||||||
requests := convertRequests(executionRequests)
|
requests := convertRequests(executionRequests)
|
||||||
|
|
@ -259,7 +259,7 @@ func (api *ConsensusAPI) ExecuteStatelessPayloadV4(params engine.ExecutableData,
|
||||||
return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil beaconRoot post-cancun")
|
return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil beaconRoot post-cancun")
|
||||||
case executionRequests == nil:
|
case executionRequests == nil:
|
||||||
return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil executionRequests post-prague")
|
return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, paramsErr("nil executionRequests post-prague")
|
||||||
case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5):
|
case !api.checkFork(params.Timestamp, forks.Prague, forks.Osaka, forks.BPO1, forks.BPO2, forks.BPO3, forks.BPO4, forks.BPO5, forks.Bogota):
|
||||||
return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads")
|
return engine.StatelessPayloadStatusV1{Status: engine.INVALID}, unsupportedForkErr("newPayloadV4 must only be called for prague/osaka payloads")
|
||||||
}
|
}
|
||||||
requests := convertRequests(executionRequests)
|
requests := convertRequests(executionRequests)
|
||||||
|
|
|
||||||
|
|
@ -64,6 +64,7 @@ var (
|
||||||
OsakaTime: newUint64(1764798551),
|
OsakaTime: newUint64(1764798551),
|
||||||
BPO1Time: newUint64(1765290071),
|
BPO1Time: newUint64(1765290071),
|
||||||
BPO2Time: newUint64(1767747671),
|
BPO2Time: newUint64(1767747671),
|
||||||
|
BogotaTime: nil,
|
||||||
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
|
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cbb839cbe05303d7705fa"),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
|
|
@ -99,6 +100,7 @@ var (
|
||||||
OsakaTime: newUint64(1759308480),
|
OsakaTime: newUint64(1759308480),
|
||||||
BPO1Time: newUint64(1759800000),
|
BPO1Time: newUint64(1759800000),
|
||||||
BPO2Time: newUint64(1760389824),
|
BPO2Time: newUint64(1760389824),
|
||||||
|
BogotaTime: nil,
|
||||||
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
DepositContractAddress: common.HexToAddress("0x4242424242424242424242424242424242424242"),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
|
|
@ -134,6 +136,7 @@ var (
|
||||||
OsakaTime: newUint64(1760427360),
|
OsakaTime: newUint64(1760427360),
|
||||||
BPO1Time: newUint64(1761017184),
|
BPO1Time: newUint64(1761017184),
|
||||||
BPO2Time: newUint64(1761607008),
|
BPO2Time: newUint64(1761607008),
|
||||||
|
BogotaTime: nil,
|
||||||
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
|
DepositContractAddress: common.HexToAddress("0x7f02c3e3c98b133055b8b348b2ac625669ed295d"),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
|
|
@ -169,6 +172,7 @@ var (
|
||||||
OsakaTime: newUint64(1761677592),
|
OsakaTime: newUint64(1761677592),
|
||||||
BPO1Time: newUint64(1762365720),
|
BPO1Time: newUint64(1762365720),
|
||||||
BPO2Time: newUint64(1762955544),
|
BPO2Time: newUint64(1762955544),
|
||||||
|
BogotaTime: nil,
|
||||||
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
|
DepositContractAddress: common.HexToAddress("0x00000000219ab540356cBB839Cbe05303d7705Fa"),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
|
|
@ -203,6 +207,7 @@ var (
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
OsakaTime: nil,
|
OsakaTime: nil,
|
||||||
|
BogotaTime: nil,
|
||||||
UBTTime: nil,
|
UBTTime: nil,
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
Clique: nil,
|
Clique: nil,
|
||||||
|
|
@ -228,6 +233,7 @@ var (
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
PragueTime: newUint64(0),
|
PragueTime: newUint64(0),
|
||||||
OsakaTime: newUint64(0),
|
OsakaTime: newUint64(0),
|
||||||
|
BogotaTime: newUint64(0),
|
||||||
BlobScheduleConfig: &BlobScheduleConfig{
|
BlobScheduleConfig: &BlobScheduleConfig{
|
||||||
Cancun: DefaultCancunBlobConfig,
|
Cancun: DefaultCancunBlobConfig,
|
||||||
Prague: DefaultPragueBlobConfig,
|
Prague: DefaultPragueBlobConfig,
|
||||||
|
|
@ -258,6 +264,7 @@ var (
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
OsakaTime: nil,
|
OsakaTime: nil,
|
||||||
|
BogotaTime: nil,
|
||||||
UBTTime: nil,
|
UBTTime: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
Ethash: nil,
|
Ethash: nil,
|
||||||
|
|
@ -288,6 +295,7 @@ var (
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
OsakaTime: nil,
|
OsakaTime: nil,
|
||||||
|
BogotaTime: nil,
|
||||||
UBTTime: nil,
|
UBTTime: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
|
|
@ -318,6 +326,7 @@ var (
|
||||||
CancunTime: newUint64(0),
|
CancunTime: newUint64(0),
|
||||||
PragueTime: newUint64(0),
|
PragueTime: newUint64(0),
|
||||||
OsakaTime: newUint64(0),
|
OsakaTime: newUint64(0),
|
||||||
|
BogotaTime: nil,
|
||||||
UBTTime: nil,
|
UBTTime: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(0),
|
TerminalTotalDifficulty: big.NewInt(0),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
|
|
@ -352,6 +361,7 @@ var (
|
||||||
CancunTime: nil,
|
CancunTime: nil,
|
||||||
PragueTime: nil,
|
PragueTime: nil,
|
||||||
OsakaTime: nil,
|
OsakaTime: nil,
|
||||||
|
BogotaTime: nil,
|
||||||
UBTTime: nil,
|
UBTTime: nil,
|
||||||
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
TerminalTotalDifficulty: big.NewInt(math.MaxInt64),
|
||||||
Ethash: new(EthashConfig),
|
Ethash: new(EthashConfig),
|
||||||
|
|
@ -453,6 +463,7 @@ type ChainConfig struct {
|
||||||
BPO4Time *uint64 `json:"bpo4Time,omitempty"` // BPO4 switch time (nil = no fork, 0 = already on bpo4)
|
BPO4Time *uint64 `json:"bpo4Time,omitempty"` // BPO4 switch time (nil = no fork, 0 = already on bpo4)
|
||||||
BPO5Time *uint64 `json:"bpo5Time,omitempty"` // BPO5 switch time (nil = no fork, 0 = already on bpo5)
|
BPO5Time *uint64 `json:"bpo5Time,omitempty"` // BPO5 switch time (nil = no fork, 0 = already on bpo5)
|
||||||
AmsterdamTime *uint64 `json:"amsterdamTime,omitempty"` // Amsterdam switch time (nil = no fork, 0 = already on amsterdam)
|
AmsterdamTime *uint64 `json:"amsterdamTime,omitempty"` // Amsterdam switch time (nil = no fork, 0 = already on amsterdam)
|
||||||
|
BogotaTime *uint64 `json:"bogotaTime,omitempty"` // Bogota switch time (nil = no fork, 0 = already on bogota)
|
||||||
UBTTime *uint64 `json:"ubtTime,omitempty"` // UBT switch time (nil = no fork, 0 = already on UBT)
|
UBTTime *uint64 `json:"ubtTime,omitempty"` // UBT switch time (nil = no fork, 0 = already on UBT)
|
||||||
|
|
||||||
// TerminalTotalDifficulty is the amount of total difficulty reached by
|
// TerminalTotalDifficulty is the amount of total difficulty reached by
|
||||||
|
|
@ -582,6 +593,9 @@ func (c *ChainConfig) String() string {
|
||||||
if c.AmsterdamTime != nil {
|
if c.AmsterdamTime != nil {
|
||||||
result += fmt.Sprintf(", AmsterdamTime: %v", *c.AmsterdamTime)
|
result += fmt.Sprintf(", AmsterdamTime: %v", *c.AmsterdamTime)
|
||||||
}
|
}
|
||||||
|
if c.BogotaTime != nil {
|
||||||
|
result += fmt.Sprintf(", BogotaTime: %v", *c.BogotaTime)
|
||||||
|
}
|
||||||
if c.UBTTime != nil {
|
if c.UBTTime != nil {
|
||||||
result += fmt.Sprintf(", UBTTime: %v", *c.UBTTime)
|
result += fmt.Sprintf(", UBTTime: %v", *c.UBTTime)
|
||||||
}
|
}
|
||||||
|
|
@ -677,6 +691,9 @@ func (c *ChainConfig) Description() string {
|
||||||
if c.AmsterdamTime != nil {
|
if c.AmsterdamTime != nil {
|
||||||
banner += fmt.Sprintf(" - Amsterdam: @%-10v\n", *c.AmsterdamTime)
|
banner += fmt.Sprintf(" - Amsterdam: @%-10v\n", *c.AmsterdamTime)
|
||||||
}
|
}
|
||||||
|
if c.BogotaTime != nil {
|
||||||
|
banner += fmt.Sprintf(" - Bogota: @%-10v\n", *c.BogotaTime)
|
||||||
|
}
|
||||||
if c.UBTTime != nil {
|
if c.UBTTime != nil {
|
||||||
banner += fmt.Sprintf(" - UBT: @%-10v\n", *c.UBTTime)
|
banner += fmt.Sprintf(" - UBT: @%-10v\n", *c.UBTTime)
|
||||||
}
|
}
|
||||||
|
|
@ -854,6 +871,11 @@ func (c *ChainConfig) IsAmsterdam(num *big.Int, time uint64) bool {
|
||||||
return c.IsLondon(num) && isTimestampForked(c.AmsterdamTime, time)
|
return c.IsLondon(num) && isTimestampForked(c.AmsterdamTime, time)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IsBogota returns whether time is either equal to the Bogota fork time or greater.
|
||||||
|
func (c *ChainConfig) IsBogota(num *big.Int, time uint64) bool {
|
||||||
|
return c.IsLondon(num) && isTimestampForked(c.BogotaTime, time)
|
||||||
|
}
|
||||||
|
|
||||||
// IsUBT returns whether time is either equal to the Verkle fork time or greater.
|
// IsUBT returns whether time is either equal to the Verkle fork time or greater.
|
||||||
func (c *ChainConfig) IsUBT(num *big.Int, time uint64) bool {
|
func (c *ChainConfig) IsUBT(num *big.Int, time uint64) bool {
|
||||||
return c.IsLondon(num) && isTimestampForked(c.UBTTime, time)
|
return c.IsLondon(num) && isTimestampForked(c.UBTTime, time)
|
||||||
|
|
@ -940,6 +962,7 @@ func (c *ChainConfig) CheckConfigForkOrder() error {
|
||||||
{name: "bpo4", timestamp: c.BPO4Time, optional: true},
|
{name: "bpo4", timestamp: c.BPO4Time, optional: true},
|
||||||
{name: "bpo5", timestamp: c.BPO5Time, optional: true},
|
{name: "bpo5", timestamp: c.BPO5Time, optional: true},
|
||||||
{name: "amsterdam", timestamp: c.AmsterdamTime, optional: true},
|
{name: "amsterdam", timestamp: c.AmsterdamTime, optional: true},
|
||||||
|
{name: "bogota", timestamp: c.BogotaTime, optional: true},
|
||||||
} {
|
} {
|
||||||
if lastFork.name != "" {
|
if lastFork.name != "" {
|
||||||
switch {
|
switch {
|
||||||
|
|
@ -1111,6 +1134,9 @@ func (c *ChainConfig) checkCompatible(newcfg *ChainConfig, headNumber *big.Int,
|
||||||
if isForkTimestampIncompatible(c.AmsterdamTime, newcfg.AmsterdamTime, headTimestamp) {
|
if isForkTimestampIncompatible(c.AmsterdamTime, newcfg.AmsterdamTime, headTimestamp) {
|
||||||
return newTimestampCompatError("Amsterdam fork timestamp", c.AmsterdamTime, newcfg.AmsterdamTime)
|
return newTimestampCompatError("Amsterdam fork timestamp", c.AmsterdamTime, newcfg.AmsterdamTime)
|
||||||
}
|
}
|
||||||
|
if isForkTimestampIncompatible(c.BogotaTime, newcfg.BogotaTime, headTimestamp) {
|
||||||
|
return newTimestampCompatError("Bogota fork timestamp", c.BogotaTime, newcfg.BogotaTime)
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1130,6 +1156,8 @@ func (c *ChainConfig) LatestFork(time uint64) forks.Fork {
|
||||||
london := c.LondonBlock
|
london := c.LondonBlock
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
case c.IsBogota(london, time):
|
||||||
|
return forks.Bogota
|
||||||
case c.IsAmsterdam(london, time):
|
case c.IsAmsterdam(london, time):
|
||||||
return forks.Amsterdam
|
return forks.Amsterdam
|
||||||
case c.IsBPO5(london, time):
|
case c.IsBPO5(london, time):
|
||||||
|
|
@ -1213,6 +1241,10 @@ func (c *ChainConfig) ActiveSystemContracts(time uint64) map[string]common.Addre
|
||||||
// the fork isn't defined or isn't a time-based fork.
|
// the fork isn't defined or isn't a time-based fork.
|
||||||
func (c *ChainConfig) Timestamp(fork forks.Fork) *uint64 {
|
func (c *ChainConfig) Timestamp(fork forks.Fork) *uint64 {
|
||||||
switch {
|
switch {
|
||||||
|
case fork == forks.Bogota:
|
||||||
|
return c.BogotaTime
|
||||||
|
case fork == forks.Amsterdam:
|
||||||
|
return c.AmsterdamTime
|
||||||
case fork == forks.BPO5:
|
case fork == forks.BPO5:
|
||||||
return c.BPO5Time
|
return c.BPO5Time
|
||||||
case fork == forks.BPO4:
|
case fork == forks.BPO4:
|
||||||
|
|
@ -1231,8 +1263,6 @@ func (c *ChainConfig) Timestamp(fork forks.Fork) *uint64 {
|
||||||
return c.CancunTime
|
return c.CancunTime
|
||||||
case fork == forks.Shanghai:
|
case fork == forks.Shanghai:
|
||||||
return c.ShanghaiTime
|
return c.ShanghaiTime
|
||||||
case fork == forks.Amsterdam:
|
|
||||||
return c.AmsterdamTime
|
|
||||||
default:
|
default:
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
@ -1378,7 +1408,7 @@ type Rules struct {
|
||||||
IsByzantium, IsConstantinople, IsPetersburg, IsIstanbul bool
|
IsByzantium, IsConstantinople, IsPetersburg, IsIstanbul bool
|
||||||
IsBerlin, IsLondon bool
|
IsBerlin, IsLondon bool
|
||||||
IsMerge, IsShanghai, IsCancun, IsPrague, IsOsaka bool
|
IsMerge, IsShanghai, IsCancun, IsPrague, IsOsaka bool
|
||||||
IsAmsterdam, IsUBT bool
|
IsAmsterdam, IsBogota, IsUBT bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rules ensures c's ChainID is not nil.
|
// Rules ensures c's ChainID is not nil.
|
||||||
|
|
@ -1404,6 +1434,7 @@ func (c *ChainConfig) Rules(num *big.Int, isMerge bool, timestamp uint64) Rules
|
||||||
IsPrague: isMerge && c.IsPrague(num, timestamp),
|
IsPrague: isMerge && c.IsPrague(num, timestamp),
|
||||||
IsOsaka: isMerge && c.IsOsaka(num, timestamp),
|
IsOsaka: isMerge && c.IsOsaka(num, timestamp),
|
||||||
IsAmsterdam: isMerge && c.IsAmsterdam(num, timestamp),
|
IsAmsterdam: isMerge && c.IsAmsterdam(num, timestamp),
|
||||||
|
IsBogota: isMerge && c.IsBogota(num, timestamp),
|
||||||
IsUBT: isUBT,
|
IsUBT: isUBT,
|
||||||
IsEIP4762: isUBT,
|
IsEIP4762: isUBT,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,7 @@ const (
|
||||||
BPO4
|
BPO4
|
||||||
BPO5
|
BPO5
|
||||||
Amsterdam
|
Amsterdam
|
||||||
|
Bogota
|
||||||
)
|
)
|
||||||
|
|
||||||
// String implements fmt.Stringer.
|
// String implements fmt.Stringer.
|
||||||
|
|
@ -84,4 +85,5 @@ var forkToString = map[Fork]string{
|
||||||
BPO4: "BPO4",
|
BPO4: "BPO4",
|
||||||
BPO5: "BPO5",
|
BPO5: "BPO5",
|
||||||
Amsterdam: "Amsterdam",
|
Amsterdam: "Amsterdam",
|
||||||
|
Bogota: "Bogota",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue