Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bedrock-devnet/devnet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
log = logging.getLogger()

# Global constants
FORKS = ["delta", "ecotone", "fjord", "granite"]
FORKS = ["delta", "ecotone", "fjord", "granite", "holocene"]

# Global environment variables
DEVNET_NO_BUILD = os.getenv('DEVNET_NO_BUILD') == "true"
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,9 @@ require (
rsc.io/tmplfunc v0.0.3 // indirect
)

replace github.com/ethereum/go-ethereum v1.14.11 => github.com/ethereum-optimism/op-geth v1.101408.1-0.20241002211323-d5a96613c22b
replace github.com/ethereum/go-ethereum v1.14.11 => github.com/roberto-bayardo/op-geth v0.0.0-20241016185857-c8968885b574

// replace github.com/ethereum/go-ethereum => ../op-geth
//replace github.com/ethereum/go-ethereum => ../op-geth

// replace github.com/ethereum-optimism/superchain-registry/superchain => ../superchain-registry/superchain

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,6 @@ github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/u
github.com/elastic/gosigar v0.14.3/go.mod h1:iXRIGg2tLnu7LBdpqzyQfGDEidKCfWcCMS0WKyPWoMs=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3 h1:RWHKLhCrQThMfch+QJ1Z8veEq5ZO3DfIhZ7xgRP9WTc=
github.com/ethereum-optimism/go-ethereum-hdwallet v0.1.3/go.mod h1:QziizLAiF0KqyLdNJYD7O5cpDlaFMNZzlxYNcWsJUxs=
github.com/ethereum-optimism/op-geth v1.101408.1-0.20241002211323-d5a96613c22b h1:9C6WytqAcqWKXQTMw2Da/S/aIJJmMvT+2MUpFnMdGrg=
github.com/ethereum-optimism/op-geth v1.101408.1-0.20241002211323-d5a96613c22b/go.mod h1:7S4pp8KHBmEmKkRjL1BPOc6jY9hW+64YeMUjR3RVLw4=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240910145426-b3905c89e8ac h1:hCIrLuOPV3FJfMDvXeOhCC3uQNvFoMIIlkT2mN2cfeg=
github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20240910145426-b3905c89e8ac/go.mod h1:XaVXL9jg8BcyOeugECgIUGa9Y3DjYJj71RHmb5qon6M=
github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA=
Expand Down Expand Up @@ -695,6 +693,8 @@ github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtD
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis=
github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
github.com/roberto-bayardo/op-geth v0.0.0-20241016185857-c8968885b574 h1:94usp9ABfyLyfeCZHevtRfzc5bGIRBcGNL+tLuByJG4=
github.com/roberto-bayardo/op-geth v0.0.0-20241016185857-c8968885b574/go.mod h1:7S4pp8KHBmEmKkRjL1BPOc6jY9hW+64YeMUjR3RVLw4=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
Expand Down
1 change: 1 addition & 0 deletions op-chain-ops/deployer/state/deploy_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func DefaultDeployConfig(chainIntent *ChainIntent) genesis.DeployConfig {
L2GenesisEcotoneTimeOffset: u64UtilPtr(0),
L2GenesisFjordTimeOffset: u64UtilPtr(0),
L2GenesisGraniteTimeOffset: u64UtilPtr(0),
L2GenesisHoloceneTimeOffset: u64UtilPtr(0),
UseInterop: false,
},
L2CoreDeployConfig: genesis.L2CoreDeployConfig{
Expand Down
9 changes: 9 additions & 0 deletions op-chain-ops/genesis/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ type UpgradeScheduleDeployConfig struct {
// L2GenesisGraniteTimeOffset is the number of seconds after genesis block that Granite hard fork activates.
// Set it to 0 to activate at genesis. Nil to disable Granite.
L2GenesisGraniteTimeOffset *hexutil.Uint64 `json:"l2GenesisGraniteTimeOffset,omitempty"`
// L2GenesisHoloceneTimeOffset is the number of seconds after genesis block that the Holocene hard fork activates.
// Set it to 0 to activate at genesis. Nil to disable Holocene.
L2GenesisHoloceneTimeOffset *hexutil.Uint64 `json:"l2GenesisHoloceneTimeOffset,omitempty"`
// L2GenesisInteropTimeOffset is the number of seconds after genesis block that the Interop hard fork activates.
// Set it to 0 to activate at genesis. Nil to disable Interop.
L2GenesisInteropTimeOffset *hexutil.Uint64 `json:"l2GenesisInteropTimeOffset,omitempty"`
Expand Down Expand Up @@ -390,6 +393,10 @@ func (d *UpgradeScheduleDeployConfig) GraniteTime(genesisTime uint64) *uint64 {
return offsetToUpgradeTime(d.L2GenesisGraniteTimeOffset, genesisTime)
}

func (d *UpgradeScheduleDeployConfig) HoloceneTime(genesisTime uint64) *uint64 {
return offsetToUpgradeTime(d.L2GenesisHoloceneTimeOffset, genesisTime)
}

func (d *UpgradeScheduleDeployConfig) InteropTime(genesisTime uint64) *uint64 {
return offsetToUpgradeTime(d.L2GenesisInteropTimeOffset, genesisTime)
}
Expand Down Expand Up @@ -422,6 +429,7 @@ func (d *UpgradeScheduleDeployConfig) forks() []Fork {
{L2GenesisTimeOffset: d.L2GenesisEcotoneTimeOffset, Name: string(L2AllocsEcotone)},
{L2GenesisTimeOffset: d.L2GenesisFjordTimeOffset, Name: string(L2AllocsFjord)},
{L2GenesisTimeOffset: d.L2GenesisGraniteTimeOffset, Name: string(L2AllocsGranite)},
{L2GenesisTimeOffset: d.L2GenesisHoloceneTimeOffset, Name: string(L2AllocsHolocene)},
}
}

Expand Down Expand Up @@ -931,6 +939,7 @@ func (d *DeployConfig) RollupConfig(l1StartBlock *types.Header, l2GenesisBlockHa
EcotoneTime: d.EcotoneTime(l1StartTime),
FjordTime: d.FjordTime(l1StartTime),
GraniteTime: d.GraniteTime(l1StartTime),
HoloceneTime: d.HoloceneTime(l1StartTime),
InteropTime: d.InteropTime(l1StartTime),
ProtocolVersionsAddress: d.ProtocolVersionsProxy,
AltDAConfig: altDA,
Expand Down
9 changes: 7 additions & 2 deletions op-chain-ops/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-service/predeploys"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
Expand All @@ -21,6 +22,9 @@ const defaultGasLimit = 30_000_000
// BedrockTransitionBlockExtraData represents the default extra data for the bedrock transition block.
var BedrockTransitionBlockExtraData = []byte("BEDROCK")

// HoloceneExtraData represents the default extra data for Holocene-genesis chains.
var HoloceneExtraData = eip1559.EncodeHoloceneExtraData(250, 6)

// NewL2Genesis will create a new L2 genesis
func NewL2Genesis(config *DeployConfig, l1StartHeader *types.Header) (*core.Genesis, error) {
if config.L2ChainID == 0 {
Expand Down Expand Up @@ -70,6 +74,7 @@ func NewL2Genesis(config *DeployConfig, l1StartHeader *types.Header) (*core.Gene
EcotoneTime: config.EcotoneTime(l1StartTime),
FjordTime: config.FjordTime(l1StartTime),
GraniteTime: config.GraniteTime(l1StartTime),
HoloceneTime: config.HoloceneTime(l1StartTime),
InteropTime: config.InteropTime(l1StartTime),
Optimism: &params.OptimismConfig{
EIP1559Denominator: eip1559Denom,
Expand All @@ -93,8 +98,8 @@ func NewL2Genesis(config *DeployConfig, l1StartHeader *types.Header) (*core.Gene

extraData := config.L2GenesisBlockExtraData
if extraData == nil {
// L2GenesisBlockExtraData is optional, so use a default value when nil
extraData = BedrockTransitionBlockExtraData
// L2GenesisBlockExtraData is optional, so use a Holocene-compatible value when nil.
extraData = HoloceneExtraData
}
// Ensure that the extradata is valid
if size := len(extraData); size > 32 {
Expand Down
9 changes: 5 additions & 4 deletions op-chain-ops/genesis/layer_two.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ type L2AllocsMode string
type L2AllocsModeMap map[L2AllocsMode]*foundry.ForgeAllocs

const (
L2AllocsDelta L2AllocsMode = "delta"
L2AllocsEcotone L2AllocsMode = "ecotone"
L2AllocsFjord L2AllocsMode = "fjord"
L2AllocsGranite L2AllocsMode = "granite"
L2AllocsDelta L2AllocsMode = "delta"
L2AllocsEcotone L2AllocsMode = "ecotone"
L2AllocsFjord L2AllocsMode = "fjord"
L2AllocsGranite L2AllocsMode = "granite"
L2AllocsHolocene L2AllocsMode = "holocene"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion op-chain-ops/interopgen/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func CreateL2(logger log.Logger, fa *foundry.ArtifactsFS, srcFS *foundry.SourceM
}
l2Host := script.NewHost(logger.New("role", "l2", "chain", l2Cfg.L2ChainID), fa, srcFS, l2Context)
l2Host.SetEnvVar("OUTPUT_MODE", "none") // we don't use the cheatcode, but capture the state outside of EVM execution
l2Host.SetEnvVar("FORK", "granite") // latest fork
l2Host.SetEnvVar("FORK", "holocene") // latest fork
return l2Host
}

Expand Down
1 change: 1 addition & 0 deletions op-chain-ops/interopgen/recipe.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ func InteropL2DevConfig(l1ChainID, l2ChainID uint64, addrs devkeys.Addresses) (*
L2GenesisEcotoneTimeOffset: new(hexutil.Uint64),
L2GenesisFjordTimeOffset: new(hexutil.Uint64),
L2GenesisGraniteTimeOffset: new(hexutil.Uint64),
L2GenesisHoloceneTimeOffset: new(hexutil.Uint64),
L2GenesisInteropTimeOffset: new(hexutil.Uint64),
L1CancunTimeOffset: new(hexutil.Uint64),
UseInterop: true,
Expand Down
1 change: 1 addition & 0 deletions op-chain-ops/script/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ func NewHost(
EcotoneTime: nil,
FjordTime: nil,
GraniteTime: nil,
HoloceneTime: nil,
InteropTime: nil,
Optimism: nil,
}
Expand Down
1 change: 1 addition & 0 deletions op-e2e/actions/derivation/system_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ func GPOParamsChange(gt *testing.T, deltaTimeOffset *hexutil.Uint64) {
dp.DeployConfig.L2GenesisEcotoneTimeOffset = nil
dp.DeployConfig.L2GenesisFjordTimeOffset = nil
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil
dp.DeployConfig.L2GenesisHoloceneTimeOffset = nil

sd := e2eutils.Setup(t, dp, actionsHelpers.DefaultAlloc)
log := testlog.Logger(t, log.LevelDebug)
Expand Down
8 changes: 8 additions & 0 deletions op-e2e/actions/helpers/l2_sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,11 @@ func (s *L2Sequencer) ActBuildL2ToGranite(t Testing) {
s.ActL2EndBlock(t)
}
}

func (s *L2Sequencer) ActBuildL2ToHolocene(t Testing) {
require.NotNil(t, s.RollupCfg.HoloceneTime, "cannot activate HoloceneTime when it is not scheduled")
for s.L2Unsafe().Time < *s.RollupCfg.HoloceneTime {
s.ActL2StartBlock(t)
s.ActL2EndBlock(t)
}
}
1 change: 1 addition & 0 deletions op-e2e/actions/helpers/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ func runCrossLayerUserTest(gt *testing.T, test hardforkScheduledTest) {
dp.DeployConfig.L2GenesisDeltaTimeOffset = test.deltaTime
dp.DeployConfig.L2GenesisEcotoneTimeOffset = test.ecotoneTime
dp.DeployConfig.L2GenesisFjordTimeOffset = test.fjordTime
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil

if test.canyonTime != nil {
require.Zero(t, uint64(*test.canyonTime)%uint64(dp.DeployConfig.L2BlockTime), "canyon fork must be aligned")
Expand Down
2 changes: 2 additions & 0 deletions op-e2e/actions/proofs/helpers/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func NewL2FaultProofEnv[c any](t helpers.Testing, testCfg *TestCfg[c], tp *e2eut
dp.DeployConfig.L2GenesisFjordTimeOffset = &genesisBlock
case Granite:
dp.DeployConfig.L2GenesisGraniteTimeOffset = &genesisBlock
case Holocene:
dp.DeployConfig.L2GenesisHoloceneTimeOffset = &genesisBlock
}
})
sd := e2eutils.Setup(t, dp, helpers.DefaultAlloc)
Expand Down
3 changes: 2 additions & 1 deletion op-e2e/actions/proofs/helpers/matrix.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ var (
Fjord = &Hardfork{Name: "Fjord", Precedence: 4}
Ecotone = &Hardfork{Name: "Ecotone", Precedence: 5}
Granite = &Hardfork{Name: "Granite", Precedence: 6}
Holocene = &Hardfork{Name: "Holocene", Precedence: 7}
)
var Hardforks = ForkMatrix{Regolith, Canyon, Delta, Fjord, Ecotone, Granite}
var Hardforks = ForkMatrix{Regolith, Canyon, Delta, Fjord, Ecotone, Granite, Holocene}

var LatestForkOnly = ForkMatrix{Hardforks[len(Hardforks)-1]}

Expand Down
1 change: 1 addition & 0 deletions op-e2e/actions/upgrades/dencun_fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func TestDencunL2ForkAfterGenesis(gt *testing.T) {
dp.DeployConfig.L2GenesisEcotoneTimeOffset = &offset
dp.DeployConfig.L2GenesisFjordTimeOffset = nil
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil
dp.DeployConfig.L2GenesisHoloceneTimeOffset = nil
// New forks have to be added here, after changing the default deploy config!

sd := e2eutils.Setup(t, dp, helpers.DefaultAlloc)
Expand Down
1 change: 1 addition & 0 deletions op-e2e/actions/upgrades/ecotone_fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ func TestEcotoneNetworkUpgradeTransactions(gt *testing.T) {
dp.DeployConfig.L2GenesisEcotoneTimeOffset = &ecotoneOffset
dp.DeployConfig.L2GenesisFjordTimeOffset = nil
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil
dp.DeployConfig.L2GenesisHoloceneTimeOffset = nil
// New forks have to be added here...
require.NoError(t, dp.DeployConfig.Check(log), "must have valid config")

Expand Down
1 change: 1 addition & 0 deletions op-e2e/actions/upgrades/fjord_fork_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestFjordNetworkUpgradeTransactions(gt *testing.T) {
dp.DeployConfig.L2GenesisDeltaTimeOffset = &genesisBlock
dp.DeployConfig.L2GenesisEcotoneTimeOffset = &genesisBlock
dp.DeployConfig.L2GenesisFjordTimeOffset = &fjordOffset
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil
require.NoError(t, dp.DeployConfig.Check(log), "must have valid config")

sd := e2eutils.Setup(t, dp, helpers.DefaultAlloc)
Expand Down
1 change: 1 addition & 0 deletions op-e2e/actions/upgrades/helpers/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
// ApplyDeltaTimeOffset adjusts fork configuration to not conflict with the delta overrides
func ApplyDeltaTimeOffset(dp *e2eutils.DeployParams, deltaTimeOffset *hexutil.Uint64) {
dp.DeployConfig.L2GenesisDeltaTimeOffset = deltaTimeOffset
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil
// configure Ecotone to not be before Delta accidentally
if dp.DeployConfig.L2GenesisEcotoneTimeOffset != nil {
if deltaTimeOffset == nil {
Expand Down
1 change: 1 addition & 0 deletions op-e2e/actions/upgrades/span_batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ func TestHardforkMiddleOfSpanBatch(gt *testing.T) {
dp.DeployConfig.L2GenesisEcotoneTimeOffset = nil
dp.DeployConfig.L2GenesisFjordTimeOffset = nil
dp.DeployConfig.L2GenesisGraniteTimeOffset = nil
dp.DeployConfig.L2GenesisHoloceneTimeOffset = nil

sd := e2eutils.Setup(t, dp, actionsHelpers.DefaultAlloc)
log := testlog.Logger(t, log.LevelError)
Expand Down
1 change: 1 addition & 0 deletions op-e2e/config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func initAllocType(root string, allocType AllocType) {
}
l2Alloc[mode] = allocs
}
mustL2Allocs(genesis.L2AllocsHolocene)
mustL2Allocs(genesis.L2AllocsGranite)
mustL2Allocs(genesis.L2AllocsFjord)
mustL2Allocs(genesis.L2AllocsEcotone)
Expand Down
7 changes: 6 additions & 1 deletion op-e2e/e2eutils/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ func Setup(t require.TestingT, deployParams *DeployParams, alloc *AllocParams) *
EcotoneTime: deployConf.EcotoneTime(uint64(deployConf.L1GenesisBlockTimestamp)),
FjordTime: deployConf.FjordTime(uint64(deployConf.L1GenesisBlockTimestamp)),
GraniteTime: deployConf.GraniteTime(uint64(deployConf.L1GenesisBlockTimestamp)),
HoloceneTime: deployConf.HoloceneTime(uint64(deployConf.L1GenesisBlockTimestamp)),
InteropTime: deployConf.InteropTime(uint64(deployConf.L1GenesisBlockTimestamp)),
AltDAConfig: pcfg,
}
Expand Down Expand Up @@ -222,7 +223,8 @@ func SystemConfigFromDeployConfig(deployConfig *genesis.DeployConfig) eth.System
}

func ApplyDeployConfigForks(deployConfig *genesis.DeployConfig) {
isGranite := os.Getenv("OP_E2E_USE_GRANITE") == "true"
isHolocene := os.Getenv("OP_E2E_USE_HOLOCENE") == "true"
isGranite := isHolocene || os.Getenv("OP_E2E_USE_GRANITE") == "true"
isFjord := isGranite || os.Getenv("OP_E2E_USE_FJORD") == "true"
isEcotone := isFjord || os.Getenv("OP_E2E_USE_ECOTONE") == "true"
isDelta := isEcotone || os.Getenv("OP_E2E_USE_DELTA") == "true"
Expand All @@ -238,6 +240,9 @@ func ApplyDeployConfigForks(deployConfig *genesis.DeployConfig) {
if isGranite {
deployConfig.L2GenesisGraniteTimeOffset = new(hexutil.Uint64)
}
if isHolocene {
deployConfig.L2GenesisHoloceneTimeOffset = new(hexutil.Uint64)
}
// Canyon and lower is activated by default
deployConfig.L2GenesisCanyonTimeOffset = new(hexutil.Uint64)
deployConfig.L2GenesisRegolithTimeOffset = new(hexutil.Uint64)
Expand Down
7 changes: 6 additions & 1 deletion op-e2e/opgeth/op_geth.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ func NewOpGeth(t testing.TB, ctx context.Context, cfg *e2esys.SystemConfig) (*Op

var allocsMode genesis.L2AllocsMode
allocsMode = genesis.L2AllocsDelta
if graniteTime := cfg.DeployConfig.GraniteTime(l1Block.Time()); graniteTime != nil && *graniteTime <= 0 {
if holoceneTime := cfg.DeployConfig.HoloceneTime(l1Block.Time()); holoceneTime != nil && *holoceneTime <= 0 {
allocsMode = genesis.L2AllocsHolocene
} else if graniteTime := cfg.DeployConfig.GraniteTime(l1Block.Time()); graniteTime != nil && *graniteTime <= 0 {
allocsMode = genesis.L2AllocsGranite
} else if fjordTime := cfg.DeployConfig.FjordTime(l1Block.Time()); fjordTime != nil && *fjordTime <= 0 {
allocsMode = genesis.L2AllocsFjord
Expand Down Expand Up @@ -244,5 +246,8 @@ func (d *OpGeth) CreatePayloadAttributes(txs ...*types.Transaction) (*eth.Payloa
Withdrawals: withdrawals,
ParentBeaconBlockRoot: parentBeaconBlockRoot,
}
if d.L2ChainConfig.IsHolocene(uint64(timestamp)) {
attrs.EIP1559Params = eth.Bytes8FromUint64(d.SystemConfig.EIP1559Params)
}
return &attrs, nil
}
8 changes: 8 additions & 0 deletions op-e2e/system/e2esys/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ func RegolithSystemConfig(t *testing.T, regolithTimeOffset *hexutil.Uint64, opts
cfg.DeployConfig.L2GenesisEcotoneTimeOffset = nil
cfg.DeployConfig.L2GenesisFjordTimeOffset = nil
cfg.DeployConfig.L2GenesisGraniteTimeOffset = nil
cfg.DeployConfig.L2GenesisHoloceneTimeOffset = nil
// ADD NEW FORKS HERE!
return cfg
}
Expand Down Expand Up @@ -229,6 +230,12 @@ func GraniteSystemConfig(t *testing.T, graniteTimeOffset *hexutil.Uint64, opts .
return cfg
}

func HoloceneSystemConfig(t *testing.T, holoceneTimeOffset *hexutil.Uint64, opts ...SystemConfigOpt) SystemConfig {
cfg := GraniteSystemConfig(t, &genesisTime, opts...)
cfg.DeployConfig.L2GenesisHoloceneTimeOffset = holoceneTimeOffset
return cfg
}

func writeDefaultJWT(t testing.TB) string {
// Sadly the geth node config cannot load JWT secret from memory, it has to be a file
jwtPath := path.Join(t.TempDir(), "jwt_secret")
Expand Down Expand Up @@ -606,6 +613,7 @@ func (cfg SystemConfig) Start(t *testing.T, startOpts ...StartOption) (*System,
EcotoneTime: cfg.DeployConfig.EcotoneTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
FjordTime: cfg.DeployConfig.FjordTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
GraniteTime: cfg.DeployConfig.GraniteTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
HoloceneTime: cfg.DeployConfig.HoloceneTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
InteropTime: cfg.DeployConfig.InteropTime(uint64(cfg.DeployConfig.L1GenesisBlockTimestamp)),
ProtocolVersionsAddress: cfg.L1Deployments.ProtocolVersionsProxy,
AltDAConfig: rollupAltDAConfig,
Expand Down
1 change: 1 addition & 0 deletions op-e2e/system/proofs/system_fpp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func applySpanBatchActivation(active bool, dp *genesis.DeployConfig) {
dp.L2GenesisDeltaTimeOffset = nil
dp.L2GenesisEcotoneTimeOffset = nil
dp.L2GenesisFjordTimeOffset = nil
dp.L2GenesisGraniteTimeOffset = nil
}
}

Expand Down
Loading