Commit 306b47d8 authored by Roberto Bayardo's avatar Roberto Bayardo Committed by GitHub

Change Elipse to Ecotone in configs (#8758)

parent edec19f0
...@@ -115,9 +115,9 @@ type DeployConfig struct { ...@@ -115,9 +115,9 @@ type DeployConfig struct {
// L2GenesisDeltaTimeOffset is the number of seconds after genesis block that Delta hard fork activates. // L2GenesisDeltaTimeOffset is the number of seconds after genesis block that Delta hard fork activates.
// Set it to 0 to activate at genesis. Nil to disable Delta. // Set it to 0 to activate at genesis. Nil to disable Delta.
L2GenesisDeltaTimeOffset *hexutil.Uint64 `json:"l2GenesisDeltaTimeOffset,omitempty"` L2GenesisDeltaTimeOffset *hexutil.Uint64 `json:"l2GenesisDeltaTimeOffset,omitempty"`
// L2GenesisEclipseTimeOffset is the number of seconds after genesis block that Eclipse hard fork activates. // L2GenesisEcotoneTimeOffset is the number of seconds after genesis block that Ecotone hard fork activates.
// Set it to 0 to activate at genesis. Nil to disable Eclipse. // Set it to 0 to activate at genesis. Nil to disable Ecotone.
L2GenesisEclipseTimeOffset *hexutil.Uint64 `json:"l2GenesisEclipseTimeOffset,omitempty"` L2GenesisEcotoneTimeOffset *hexutil.Uint64 `json:"l2GenesisEcotoneTimeOffset,omitempty"`
// L2GenesisFjordTimeOffset is the number of seconds after genesis block that Fjord hard fork activates. // L2GenesisFjordTimeOffset is the number of seconds after genesis block that Fjord hard fork activates.
// Set it to 0 to activate at genesis. Nil to disable Fjord. // Set it to 0 to activate at genesis. Nil to disable Fjord.
L2GenesisFjordTimeOffset *hexutil.Uint64 `json:"l2GenesisFjordTimeOffset,omitempty"` L2GenesisFjordTimeOffset *hexutil.Uint64 `json:"l2GenesisFjordTimeOffset,omitempty"`
...@@ -489,12 +489,12 @@ func (d *DeployConfig) DeltaTime(genesisTime uint64) *uint64 { ...@@ -489,12 +489,12 @@ func (d *DeployConfig) DeltaTime(genesisTime uint64) *uint64 {
return &v return &v
} }
func (d *DeployConfig) EclipseTime(genesisTime uint64) *uint64 { func (d *DeployConfig) EcotoneTime(genesisTime uint64) *uint64 {
if d.L2GenesisEclipseTimeOffset == nil { if d.L2GenesisEcotoneTimeOffset == nil {
return nil return nil
} }
v := uint64(0) v := uint64(0)
if offset := *d.L2GenesisEclipseTimeOffset; offset > 0 { if offset := *d.L2GenesisEcotoneTimeOffset; offset > 0 {
v = genesisTime + uint64(offset) v = genesisTime + uint64(offset)
} }
return &v return &v
...@@ -561,7 +561,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Block, l2GenesisBlockHas ...@@ -561,7 +561,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Block, l2GenesisBlockHas
RegolithTime: d.RegolithTime(l1StartBlock.Time()), RegolithTime: d.RegolithTime(l1StartBlock.Time()),
CanyonTime: d.CanyonTime(l1StartBlock.Time()), CanyonTime: d.CanyonTime(l1StartBlock.Time()),
DeltaTime: d.DeltaTime(l1StartBlock.Time()), DeltaTime: d.DeltaTime(l1StartBlock.Time()),
EclipseTime: d.EclipseTime(l1StartBlock.Time()), EcotoneTime: d.EcotoneTime(l1StartBlock.Time()),
FjordTime: d.FjordTime(l1StartBlock.Time()), FjordTime: d.FjordTime(l1StartBlock.Time()),
InteropTime: d.InteropTime(l1StartBlock.Time()), InteropTime: d.InteropTime(l1StartBlock.Time()),
}, nil }, nil
......
...@@ -159,7 +159,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) * ...@@ -159,7 +159,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
RegolithTime: deployConf.RegolithTime(uint64(deployConf.L1GenesisBlockTimestamp)), RegolithTime: deployConf.RegolithTime(uint64(deployConf.L1GenesisBlockTimestamp)),
CanyonTime: deployConf.CanyonTime(uint64(deployConf.L1GenesisBlockTimestamp)), CanyonTime: deployConf.CanyonTime(uint64(deployConf.L1GenesisBlockTimestamp)),
DeltaTime: deployConf.DeltaTime(uint64(deployConf.L1GenesisBlockTimestamp)), DeltaTime: deployConf.DeltaTime(uint64(deployConf.L1GenesisBlockTimestamp)),
EclipseTime: deployConf.EclipseTime(uint64(deployConf.L1GenesisBlockTimestamp)), EcotoneTime: deployConf.EcotoneTime(uint64(deployConf.L1GenesisBlockTimestamp)),
FjordTime: deployConf.FjordTime(uint64(deployConf.L1GenesisBlockTimestamp)), FjordTime: deployConf.FjordTime(uint64(deployConf.L1GenesisBlockTimestamp)),
InteropTime: deployConf.InteropTime(uint64(deployConf.L1GenesisBlockTimestamp)), InteropTime: deployConf.InteropTime(uint64(deployConf.L1GenesisBlockTimestamp)),
} }
......
...@@ -490,7 +490,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste ...@@ -490,7 +490,7 @@ func (cfg SystemConfig) Start(t *testing.T, _opts ...SystemConfigOption) (*Syste
RegolithTime: cfg.DeployConfig.RegolithTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)), RegolithTime: cfg.DeployConfig.RegolithTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
CanyonTime: cfg.DeployConfig.CanyonTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)), CanyonTime: cfg.DeployConfig.CanyonTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
DeltaTime: cfg.DeployConfig.DeltaTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)), DeltaTime: cfg.DeployConfig.DeltaTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
EclipseTime: cfg.DeployConfig.EclipseTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)), EcotoneTime: cfg.DeployConfig.EcotoneTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
FjordTime: cfg.DeployConfig.FjordTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)), FjordTime: cfg.DeployConfig.FjordTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
InteropTime: cfg.DeployConfig.InteropTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)), InteropTime: cfg.DeployConfig.InteropTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
ProtocolVersionsAddress: cfg.L1Deployments.ProtocolVersionsProxy, ProtocolVersionsAddress: cfg.L1Deployments.ProtocolVersionsProxy,
......
...@@ -100,7 +100,7 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) { ...@@ -100,7 +100,7 @@ func LoadOPStackRollupConfig(chainID uint64) (*Config, error) {
RegolithTime: &regolithTime, RegolithTime: &regolithTime,
CanyonTime: superChain.Config.CanyonTime, CanyonTime: superChain.Config.CanyonTime,
DeltaTime: superChain.Config.DeltaTime, DeltaTime: superChain.Config.DeltaTime,
EclipseTime: superChain.Config.EclipseTime, EcotoneTime: superChain.Config.EclipseTime,
FjordTime: superChain.Config.FjordTime, FjordTime: superChain.Config.FjordTime,
BatchInboxAddress: common.Address(chConfig.BatchInboxAddr), BatchInboxAddress: common.Address(chConfig.BatchInboxAddr),
DepositContractAddress: depositContractAddress, DepositContractAddress: depositContractAddress,
......
...@@ -83,9 +83,9 @@ type Config struct { ...@@ -83,9 +83,9 @@ type Config struct {
// Active if DeltaTime != nil && L2 block timestamp >= *DeltaTime, inactive otherwise. // Active if DeltaTime != nil && L2 block timestamp >= *DeltaTime, inactive otherwise.
DeltaTime *uint64 `json:"delta_time,omitempty"` DeltaTime *uint64 `json:"delta_time,omitempty"`
// EclipseTime sets the activation time of the Eclipse network upgrade. // EcotoneTime sets the activation time of the Ecotone network upgrade.
// Active if EclipseTime != nil && L2 block timestamp >= *EclipseTime, inactive otherwise. // Active if EcotoneTime != nil && L2 block timestamp >= *EcotoneTime, inactive otherwise.
EclipseTime *uint64 `json:"eclipse_time,omitempty"` EcotoneTime *uint64 `json:"ecotone_time,omitempty"`
// FjordTime sets the activation time of the Fjord network upgrade. // FjordTime sets the activation time of the Fjord network upgrade.
// Active if FjordTime != nil && L2 block timestamp >= *FjordTime, inactive otherwise. // Active if FjordTime != nil && L2 block timestamp >= *FjordTime, inactive otherwise.
...@@ -107,6 +107,9 @@ type Config struct { ...@@ -107,6 +107,9 @@ type Config struct {
// L1 address that declares the protocol versions, optional (Beta feature) // L1 address that declares the protocol versions, optional (Beta feature)
ProtocolVersionsAddress common.Address `json:"protocol_versions_address,omitempty"` ProtocolVersionsAddress common.Address `json:"protocol_versions_address,omitempty"`
// L1 block timestamp to start reading blobs as batch data-source. Optional.
BlobsEnabledL1Timestamp *uint64 `json:"blobs_data,omitempty"`
} }
// ValidateL1Config checks L1 config variables for errors. // ValidateL1Config checks L1 config variables for errors.
...@@ -275,7 +278,7 @@ func (cfg *Config) Check() error { ...@@ -275,7 +278,7 @@ func (cfg *Config) Check() error {
} }
func (c *Config) L1Signer() types.Signer { func (c *Config) L1Signer() types.Signer {
return types.NewLondonSigner(c.L1ChainID) return types.NewCancunSigner(c.L1ChainID)
} }
// IsRegolith returns true if the Regolith hardfork is active at or past the given timestamp. // IsRegolith returns true if the Regolith hardfork is active at or past the given timestamp.
...@@ -293,9 +296,9 @@ func (c *Config) IsDelta(timestamp uint64) bool { ...@@ -293,9 +296,9 @@ func (c *Config) IsDelta(timestamp uint64) bool {
return c.DeltaTime != nil && timestamp >= *c.DeltaTime return c.DeltaTime != nil && timestamp >= *c.DeltaTime
} }
// IsEclipse returns true if the Eclipse hardfork is active at or past the given timestamp. // IsEcotone returns true if the Ecotone hardfork is active at or past the given timestamp.
func (c *Config) IsEclipse(timestamp uint64) bool { func (c *Config) IsEcotone(timestamp uint64) bool {
return c.EclipseTime != nil && timestamp >= *c.EclipseTime return c.EcotoneTime != nil && timestamp >= *c.EcotoneTime
} }
// IsFjord returns true if the Fjord hardfork is active at or past the given timestamp. // IsFjord returns true if the Fjord hardfork is active at or past the given timestamp.
...@@ -337,7 +340,7 @@ func (c *Config) Description(l2Chains map[string]string) string { ...@@ -337,7 +340,7 @@ func (c *Config) Description(l2Chains map[string]string) string {
banner += fmt.Sprintf(" - Regolith: %s\n", fmtForkTimeOrUnset(c.RegolithTime)) banner += fmt.Sprintf(" - Regolith: %s\n", fmtForkTimeOrUnset(c.RegolithTime))
banner += fmt.Sprintf(" - Canyon: %s\n", fmtForkTimeOrUnset(c.CanyonTime)) banner += fmt.Sprintf(" - Canyon: %s\n", fmtForkTimeOrUnset(c.CanyonTime))
banner += fmt.Sprintf(" - Delta: %s\n", fmtForkTimeOrUnset(c.DeltaTime)) banner += fmt.Sprintf(" - Delta: %s\n", fmtForkTimeOrUnset(c.DeltaTime))
banner += fmt.Sprintf(" - Eclipse: %s\n", fmtForkTimeOrUnset(c.EclipseTime)) banner += fmt.Sprintf(" - Ecotone: %s\n", fmtForkTimeOrUnset(c.EcotoneTime))
banner += fmt.Sprintf(" - Fjord: %s\n", fmtForkTimeOrUnset(c.FjordTime)) banner += fmt.Sprintf(" - Fjord: %s\n", fmtForkTimeOrUnset(c.FjordTime))
banner += fmt.Sprintf(" - Interop: %s\n", fmtForkTimeOrUnset(c.InteropTime)) banner += fmt.Sprintf(" - Interop: %s\n", fmtForkTimeOrUnset(c.InteropTime))
// Report the protocol version // Report the protocol version
...@@ -367,7 +370,7 @@ func (c *Config) LogDescription(log log.Logger, l2Chains map[string]string) { ...@@ -367,7 +370,7 @@ func (c *Config) LogDescription(log log.Logger, l2Chains map[string]string) {
"l1_block_number", c.Genesis.L1.Number, "regolith_time", fmtForkTimeOrUnset(c.RegolithTime), "l1_block_number", c.Genesis.L1.Number, "regolith_time", fmtForkTimeOrUnset(c.RegolithTime),
"canyon_time", fmtForkTimeOrUnset(c.CanyonTime), "canyon_time", fmtForkTimeOrUnset(c.CanyonTime),
"delta_time", fmtForkTimeOrUnset(c.DeltaTime), "delta_time", fmtForkTimeOrUnset(c.DeltaTime),
"eclipse_time", fmtForkTimeOrUnset(c.EclipseTime), "ecotone_time", fmtForkTimeOrUnset(c.EcotoneTime),
"fjord_time", fmtForkTimeOrUnset(c.FjordTime), "fjord_time", fmtForkTimeOrUnset(c.FjordTime),
"interop_time", fmtForkTimeOrUnset(c.InteropTime), "interop_time", fmtForkTimeOrUnset(c.InteropTime),
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment