Skip to content

Commit 8405ea1

Browse files
authored
update jovian upgrade transactions (#17971)
* update jovian upgrade transactions * add GPO sanity checks to jovian activation test * lint
1 parent 2d9ada9 commit 8405ea1

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

op-e2e/actions/proofs/jovian_activation_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/ethereum-optimism/optimism/op-e2e/actions/proofs/helpers"
1010
"github.com/ethereum-optimism/optimism/op-e2e/bindings"
1111
"github.com/ethereum-optimism/optimism/op-node/rollup"
12+
"github.com/ethereum-optimism/optimism/op-service/predeploys"
1213
"github.com/ethereum-optimism/optimism/op-service/testlog"
1314
"github.com/ethereum/go-ethereum/accounts/abi/bind"
1415
"github.com/ethereum/go-ethereum/consensus/misc/eip1559"
@@ -37,12 +38,21 @@ func Test_ProgramAction_JovianActivation(gt *testing.T) {
3738
runJovianDerivationTest := func(gt *testing.T, testCfg *helpers.TestCfg[any], genesisConfigFn func(*genesis.DeployConfig), jovianAtGenesis bool, minBaseFee uint64) {
3839
t := actionsHelpers.NewDefaultTesting(gt)
3940
env := helpers.NewL2FaultProofEnv(t, testCfg, helpers.NewTestParams(), helpers.NewBatcherCfg(), genesisConfigFn)
41+
gpo, err := bindings.NewGasPriceOracleCaller(predeploys.GasPriceOracleAddr, env.Engine.EthClient())
42+
require.NoError(t, err)
4043
t.Logf("L2 Genesis Time: %d, JovianTime: %d ", env.Sequencer.RollupCfg.Genesis.L2Time, *env.Sequencer.RollupCfg.JovianTime)
4144

4245
if jovianAtGenesis {
4346
// Verify Jovian is active at genesis
4447
require.True(t, env.Sequencer.RollupCfg.IsJovian(env.Sequencer.RollupCfg.Genesis.L2Time), "Jovian should be active at genesis")
4548
} else {
49+
require.False(t, env.Sequencer.RollupCfg.IsJovian(env.Engine.L2Chain().CurrentBlock().Time), "Jovian should be not active at genesis")
50+
51+
// Check GPO status
52+
isJovian, err := gpo.IsJovian(nil)
53+
require.NoError(t, err)
54+
require.False(t, isJovian, "GPO should report that Jovian is not active")
55+
4656
// If Jovian is not activated at genesis, build some blocks up to the activation block
4757
// and verify that the extra data is Holocene
4858
for env.Engine.L2Chain().CurrentBlock().Time < *env.Sequencer.RollupCfg.JovianTime {
@@ -53,6 +63,11 @@ func Test_ProgramAction_JovianActivation(gt *testing.T) {
5363
}
5464
}
5565

66+
// Check GPO status
67+
isJovian, err := gpo.IsJovian(nil)
68+
require.NoError(t, err)
69+
require.True(t, isJovian, "GPO should report that Jovian is active")
70+
5671
// Build the activation block
5772
env.Sequencer.ActL2EmptyBlock(t)
5873
activationBlock := env.Engine.L2Chain().GetBlockByHash(env.Sequencer.L2Unsafe().Hash)

0 commit comments

Comments
 (0)