diff --git a/op-node/rollup/derive/attributes_test.go b/op-node/rollup/derive/attributes_test.go index 64fcec556343..26b4b1f28437 100644 --- a/op-node/rollup/derive/attributes_test.go +++ b/op-node/rollup/derive/attributes_test.go @@ -195,7 +195,7 @@ func TestPreparePayloadAttributes(t *testing.T) { require.Equal(t, l1InfoTx, []byte(attrs.Transactions[0])) require.True(t, attrs.NoTxPool) }) - t.Run("new origin with deposits on post-Isthmus", func(t *testing.T) { + t.Run("new origin with deposits on post-Interop", func(t *testing.T) { rng := rand.New(rand.NewSource(1234)) l1Fetcher := &testutils.MockL1Source{} defer l1Fetcher.AssertExpectations(t) @@ -247,7 +247,7 @@ func TestPreparePayloadAttributes(t *testing.T) { require.True(t, attrs.NoTxPool) }) - t.Run("same origin without deposits on post-Isthmus", func(t *testing.T) { + t.Run("same origin without deposits on post-Interop", func(t *testing.T) { rng := rand.New(rand.NewSource(1234)) l1Fetcher := &testutils.MockL1Source{} defer l1Fetcher.AssertExpectations(t) diff --git a/op-node/rollup/derive/fuzz_parsers_test.go b/op-node/rollup/derive/fuzz_parsers_test.go index 4f76c4ac7420..3c5275e501a6 100644 --- a/op-node/rollup/derive/fuzz_parsers_test.go +++ b/op-node/rollup/derive/fuzz_parsers_test.go @@ -93,16 +93,16 @@ func FuzzL1InfoEcotoneRoundTrip(f *testing.F) { if !cmp.Equal(in, out, cmp.Comparer(testutils.BigEqual)) { t.Fatalf("The Ecotone data did not round trip correctly. in: %v. out: %v", in, out) } - enc, err = in.marshalBinaryIsthmus() + enc, err = in.marshalBinaryInterop() if err != nil { - t.Fatalf("Failed to marshal Isthmus binary: %v", err) + t.Fatalf("Failed to marshal Interop binary: %v", err) } - err = out.unmarshalBinaryIsthmus(enc) + err = out.unmarshalBinaryInterop(enc) if err != nil { - t.Fatalf("Failed to unmarshal Isthmus binary: %v", err) + t.Fatalf("Failed to unmarshal Interop binary: %v", err) } if !cmp.Equal(in, out, cmp.Comparer(testutils.BigEqual)) { - t.Fatalf("The Isthmus data did not round trip correctly. in: %v. out: %v", in, out) + t.Fatalf("The Interop data did not round trip correctly. in: %v. out: %v", in, out) } }) diff --git a/op-node/rollup/derive/l1_block_info.go b/op-node/rollup/derive/l1_block_info.go index 43ea9b29bedc..a01fe5bca6b9 100644 --- a/op-node/rollup/derive/l1_block_info.go +++ b/op-node/rollup/derive/l1_block_info.go @@ -20,7 +20,7 @@ import ( const ( L1InfoFuncBedrockSignature = "setL1BlockValues(uint64,uint64,uint256,bytes32,uint64,bytes32,uint256,uint256)" L1InfoFuncEcotoneSignature = "setL1BlockValuesEcotone()" - L1InfoFuncIsthmusSignature = "setL1BlockValuesIsthmus()" + L1InfoFuncInteropSignature = "setL1BlockValuesInterop()" DepositsCompleteSignature = "depositsComplete()" L1InfoArguments = 8 L1InfoBedrockLen = 4 + 32*L1InfoArguments @@ -28,8 +28,8 @@ const ( DepositsCompleteLen = 4 // only the selector // DepositsCompleteGas allocates 21k gas for intrinsic tx costs, and // an additional 15k to ensure that the DepositsComplete call does not run out of gas. - // GasBenchMark_L1BlockIsthmus_DepositsComplete:test_depositsComplete_benchmark() (gas: 7768) - // GasBenchMark_L1BlockIsthmus_DepositsComplete_Warm:test_depositsComplete_benchmark() (gas: 5768) + // GasBenchMark_L1BlockInterop_DepositsComplete:test_depositsComplete_benchmark() (gas: 7768) + // GasBenchMark_L1BlockInterop_DepositsComplete_Warm:test_depositsComplete_benchmark() (gas: 5768) // see `test_depositsComplete_benchmark` at: `/packages/contracts-bedrock/test/BenchmarkTest.t.sol` DepositsCompleteGas = uint64(21_000 + 15_000) ) @@ -37,7 +37,7 @@ const ( var ( L1InfoFuncBedrockBytes4 = crypto.Keccak256([]byte(L1InfoFuncBedrockSignature))[:4] L1InfoFuncEcotoneBytes4 = crypto.Keccak256([]byte(L1InfoFuncEcotoneSignature))[:4] - L1InfoFuncIsthmusBytes4 = crypto.Keccak256([]byte(L1InfoFuncIsthmusSignature))[:4] + L1InfoFuncInteropBytes4 = crypto.Keccak256([]byte(L1InfoFuncInteropSignature))[:4] DepositsCompleteBytes4 = crypto.Keccak256([]byte(DepositsCompleteSignature))[:4] L1InfoDepositerAddress = common.HexToAddress("0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001") L1BlockAddress = predeploys.L1BlockAddr @@ -155,7 +155,7 @@ func (info *L1BlockInfo) unmarshalBinaryBedrock(data []byte) error { return nil } -// Isthmus & Ecotone Binary Format +// Interop & Ecotone Binary Format // +---------+--------------------------+ // | Bytes | Field | // +---------+--------------------------+ @@ -179,16 +179,16 @@ func (info *L1BlockInfo) marshalBinaryEcotone() ([]byte, error) { return out, nil } -func (info *L1BlockInfo) marshalBinaryIsthmus() ([]byte, error) { - out, err := marshalBinaryWithSignature(info, L1InfoFuncIsthmusBytes4) +func (info *L1BlockInfo) marshalBinaryInterop() ([]byte, error) { + out, err := marshalBinaryWithSignature(info, L1InfoFuncInteropBytes4) if err != nil { - return nil, fmt.Errorf("failed to marshal Isthmus l1 block info: %w", err) + return nil, fmt.Errorf("failed to marshal Interop l1 block info: %w", err) } return out, nil } func marshalBinaryWithSignature(info *L1BlockInfo, signature []byte) ([]byte, error) { - w := bytes.NewBuffer(make([]byte, 0, L1InfoEcotoneLen)) // Ecotone and Isthmus have the same length + w := bytes.NewBuffer(make([]byte, 0, L1InfoEcotoneLen)) // Ecotone and Interop have the same length if err := solabi.WriteSignature(w, signature); err != nil { return nil, err } @@ -231,8 +231,8 @@ func (info *L1BlockInfo) unmarshalBinaryEcotone(data []byte) error { return unmarshalBinaryWithSignatureAndData(info, L1InfoFuncEcotoneBytes4, data) } -func (info *L1BlockInfo) unmarshalBinaryIsthmus(data []byte) error { - return unmarshalBinaryWithSignatureAndData(info, L1InfoFuncIsthmusBytes4, data) +func (info *L1BlockInfo) unmarshalBinaryInterop(data []byte) error { + return unmarshalBinaryWithSignatureAndData(info, L1InfoFuncInteropBytes4, data) } func unmarshalBinaryWithSignatureAndData(info *L1BlockInfo, signature []byte, data []byte) error { @@ -285,7 +285,7 @@ func isEcotoneButNotFirstBlock(rollupCfg *rollup.Config, l2Timestamp uint64) boo return rollupCfg.IsEcotone(l2Timestamp) && !rollupCfg.IsEcotoneActivationBlock(l2Timestamp) } -// isInteropButNotFirstBlock returns whether the specified block is subject to the Isthmus upgrade, +// isInteropButNotFirstBlock returns whether the specified block is subject to the Interop upgrade, // but is not the activation block itself. func isInteropButNotFirstBlock(rollupCfg *rollup.Config, l2Timestamp uint64) bool { // Since we use the pre-interop L1 tx one last time during the upgrade block, @@ -300,7 +300,7 @@ func L1BlockInfoFromBytes(rollupCfg *rollup.Config, l2BlockTime uint64, data []b var info L1BlockInfo // Important, this should be ordered from most recent to oldest if isInteropButNotFirstBlock(rollupCfg, l2BlockTime) { - return &info, info.unmarshalBinaryIsthmus(data) + return &info, info.unmarshalBinaryInterop(data) } if isEcotoneButNotFirstBlock(rollupCfg, l2BlockTime) { return &info, info.unmarshalBinaryEcotone(data) @@ -333,9 +333,9 @@ func L1InfoDeposit(rollupCfg *rollup.Config, sysCfg eth.SystemConfig, seqNumber l1BlockInfo.BlobBaseFeeScalar = scalars.BlobBaseFeeScalar l1BlockInfo.BaseFeeScalar = scalars.BaseFeeScalar if isInteropButNotFirstBlock(rollupCfg, l2Timestamp) { - out, err := l1BlockInfo.marshalBinaryIsthmus() + out, err := l1BlockInfo.marshalBinaryInterop() if err != nil { - return nil, fmt.Errorf("failed to marshal Isthmus l1 block info: %w", err) + return nil, fmt.Errorf("failed to marshal Interop l1 block info: %w", err) } data = out } else { diff --git a/op-node/rollup/derive/l1_block_info_test.go b/op-node/rollup/derive/l1_block_info_test.go index b98e8a7d4c63..3f7dd0647e6d 100644 --- a/op-node/rollup/derive/l1_block_info_test.go +++ b/op-node/rollup/derive/l1_block_info_test.go @@ -154,7 +154,7 @@ func TestParseL1InfoDepositTxData(t *testing.T) { require.Equal(t, depTx.Gas, uint64(RegolithSystemTxGas)) require.Equal(t, L1InfoEcotoneLen, len(depTx.Data)) }) - t.Run("isthmus", func(t *testing.T) { + t.Run("interop", func(t *testing.T) { rng := rand.New(rand.NewSource(1234)) info := testutils.MakeBlockInfo(nil)(rng) rollupCfg := rollup.Config{BlockTime: 2, Genesis: rollup.Genesis{L2Time: 1000}} @@ -165,25 +165,25 @@ func TestParseL1InfoDepositTxData(t *testing.T) { require.NoError(t, err) require.False(t, depTx.IsSystemTransaction) require.Equal(t, depTx.Gas, uint64(RegolithSystemTxGas)) - require.Equal(t, L1InfoEcotoneLen, len(depTx.Data), "the length is same in isthmus") - require.Equal(t, L1InfoFuncIsthmusBytes4, depTx.Data[:4], "upgrade is active, need isthmus signature") + require.Equal(t, L1InfoEcotoneLen, len(depTx.Data), "the length is same in interop") + require.Equal(t, L1InfoFuncInteropBytes4, depTx.Data[:4], "upgrade is active, need interop signature") }) - t.Run("activation-block isthmus", func(t *testing.T) { + t.Run("activation-block interop", func(t *testing.T) { rng := rand.New(rand.NewSource(1234)) info := testutils.MakeBlockInfo(nil)(rng) rollupCfg := rollup.Config{BlockTime: 2, Genesis: rollup.Genesis{L2Time: 1000}} rollupCfg.ActivateAtGenesis(rollup.Fjord) - isthmusTime := rollupCfg.Genesis.L2Time + rollupCfg.BlockTime // activate isthmus just after genesis - rollupCfg.InteropTime = &isthmusTime - depTx, err := L1InfoDeposit(&rollupCfg, randomL1Cfg(rng, info), randomSeqNr(rng), info, isthmusTime) + interopTime := rollupCfg.Genesis.L2Time + rollupCfg.BlockTime // activate interop just after genesis + rollupCfg.InteropTime = &interopTime + depTx, err := L1InfoDeposit(&rollupCfg, randomL1Cfg(rng, info), randomSeqNr(rng), info, interopTime) require.NoError(t, err) require.False(t, depTx.IsSystemTransaction) require.Equal(t, depTx.Gas, uint64(RegolithSystemTxGas)) - // Isthmus activates, but ecotone L1 info is still used at this upgrade block + // Interop activates, but ecotone L1 info is still used at this upgrade block require.Equal(t, L1InfoEcotoneLen, len(depTx.Data)) require.Equal(t, L1InfoFuncEcotoneBytes4, depTx.Data[:4]) }) - t.Run("genesis-block isthmus", func(t *testing.T) { + t.Run("genesis-block interop", func(t *testing.T) { rng := rand.New(rand.NewSource(1234)) info := testutils.MakeBlockInfo(nil)(rng) rollupCfg := rollup.Config{BlockTime: 2, Genesis: rollup.Genesis{L2Time: 1000}}