Skip to content

Commit b43db29

Browse files
committed
add prague time offset
1 parent 9e2b0a8 commit b43db29

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

op-chain-ops/genesis/config.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ type UpgradeScheduleDeployConfig struct {
332332
// L2GenesisDeltaTimeOffset is the number of seconds after genesis block that Delta hard fork activates.
333333
// Set it to 0 to activate at genesis. Nil to disable Delta.
334334
L2GenesisDeltaTimeOffset *hexutil.Uint64 `json:"l2GenesisDeltaTimeOffset,omitempty"`
335+
335336
// L2GenesisEcotoneTimeOffset is the number of seconds after genesis block that Ecotone hard fork activates.
336337
// Set it to 0 to activate at genesis. Nil to disable Ecotone.
337338
L2GenesisEcotoneTimeOffset *hexutil.Uint64 `json:"l2GenesisEcotoneTimeOffset,omitempty"`
@@ -345,6 +346,10 @@ type UpgradeScheduleDeployConfig struct {
345346
// Set it to 0 to activate at genesis. Nil to disable Interop.
346347
L2GenesisInteropTimeOffset *hexutil.Uint64 `json:"l2GenesisInteropTimeOffset,omitempty"`
347348

349+
// L2GenesisPragueTimeOffset is the number of seconds after genesis block that Ecotone hard fork activates.
350+
// Set it to 0 to activate at genesis. Nil to disable Ecotone.
351+
L2GenesisPragueTimeOffset *hexutil.Uint64 `json:"l2GenesisPragueTimeOffset,omitempty"`
352+
348353
// When Cancun activates. Relative to L1 genesis.
349354
L1CancunTimeOffset *hexutil.Uint64 `json:"l1CancunTimeOffset,omitempty"`
350355

@@ -381,6 +386,10 @@ func (d *UpgradeScheduleDeployConfig) EcotoneTime(genesisTime uint64) *uint64 {
381386
return offsetToUpgradeTime(d.L2GenesisEcotoneTimeOffset, genesisTime)
382387
}
383388

389+
func (d *UpgradeScheduleDeployConfig) PragueTime(genesisTime uint64) *uint64 {
390+
return offsetToUpgradeTime(d.L2GenesisPragueTimeOffset, genesisTime)
391+
}
392+
384393
func (d *UpgradeScheduleDeployConfig) FjordTime(genesisTime uint64) *uint64 {
385394
return offsetToUpgradeTime(d.L2GenesisFjordTimeOffset, genesisTime)
386395
}
@@ -901,6 +910,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Block, l2GenesisBlockHas
901910
DeltaTime: d.DeltaTime(l1StartBlock.Time()),
902911
EcotoneTime: d.EcotoneTime(l1StartBlock.Time()),
903912
FjordTime: d.FjordTime(l1StartBlock.Time()),
913+
PragueTime: d.PragueTime(l1StartBlock.Time()),
904914
GraniteTime: d.GraniteTime(l1StartBlock.Time()),
905915
InteropTime: d.InteropTime(l1StartBlock.Time()),
906916
AltDAConfig: altDA,

op-chain-ops/genesis/genesis.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ func NewL2Genesis(config *DeployConfig, block *types.Block) (*core.Genesis, erro
6767
CancunTime: config.EcotoneTime(block.Time()),
6868
EcotoneTime: config.EcotoneTime(block.Time()),
6969
FjordTime: config.FjordTime(block.Time()),
70+
PragueTime: config.PragueTime(block.Time()),
7071
GraniteTime: config.GraniteTime(block.Time()),
7172
InteropTime: config.InteropTime(block.Time()),
7273
Optimism: &params.OptimismConfig{

op-node/rollup/types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ type Config struct {
116116
// Active if GraniteTime != nil && L2 block timestamp >= *GraniteTime, inactive otherwise.
117117
GraniteTime *uint64 `json:"granite_time,omitempty"`
118118

119+
// PragueTime sets the activation time of the Prague network upgrade.
120+
// Active if PragueTime != nil && L2 block timestamp >= *Prague, inactive otherwise.
121+
PragueTime *uint64 `json:"prague_time,omitempty"`
122+
119123
// HoloceneTime sets the activation time of the Holocene network upgrade.
120124
// Active if HoloceneTime != nil && L2 block timestamp >= *HoloceneTime, inactive otherwise.
121125
HoloceneTime *uint64 `json:"holocene_time,omitempty"`

0 commit comments

Comments
 (0)