Skip to content
This repository has been archived by the owner on Feb 17, 2025. It is now read-only.

Commit

Permalink
update tests to forkID6
Browse files Browse the repository at this point in the history
  • Loading branch information
ToniRamirezM committed Oct 18, 2023
1 parent f907d06 commit fdd112b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ci/e2e-group10/forced_batches_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
const (
toAddressHex = "0x4d5Cf5032B2a844602278b01199ED191A86c93ff"
gerFinalityBlocks = uint64(250)
forkID5 = 5
forkID6 = 6
)

var (
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e-group10/forced_batches_vector_group2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func TestForcedBatchesVectorFiles(t *testing.T) {
require.Equal(t, testCase.ExpectedOldStateRoot, actualOldStateRoot.Hex())
decodedData, err := hex.DecodeHex(testCase.BatchL2Data)
require.NoError(t, err)
_, txBytes, _, err := state.DecodeTxs(decodedData, forkID5)
_, txBytes, _, err := state.DecodeTxs(decodedData, forkID6)
forcedBatch, err := sendForcedBatchForVector(t, txBytes, opsman)
require.NoError(t, err)
actualNewStateRoot := forcedBatch.StateRoot
Expand Down
2 changes: 1 addition & 1 deletion ci/e2e-group11/forced_batches_vector_group3_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
forkID5 = 5
forkID6 = 6
)

func TestForcedBatchesVectorFiles(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions ci/e2e-group9/forced_batches_vector_group1_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
)

const (
forkID5 uint64 = 5
forkID6 uint64 = 6
)

func TestForcedBatchesVectorFiles(t *testing.T) {
Expand Down Expand Up @@ -64,7 +64,7 @@ func TestForcedBatchesVectorFiles(t *testing.T) {
log.Info("###################")
genesisActions := vectors.GenerateGenesisActions(testCase.Genesis)
require.NoError(t, opsman.SetGenesis(genesisActions))
require.NoError(t, opsman.SetForkID(forkID5))
require.NoError(t, opsman.SetForkID(forkID6))
require.NoError(t, opsman.Setup())

// Check initial root
Expand Down
4 changes: 2 additions & 2 deletions etherman/etherman_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

const (
forkID5 = 5
forkID6 = 6
)

func init() {
Expand Down Expand Up @@ -319,7 +319,7 @@ func TestSendSequences(t *testing.T) {
require.NoError(t, err)

tx1 := types.NewTransaction(uint64(0), common.Address{}, big.NewInt(10), uint64(1), big.NewInt(10), []byte{})
batchL2Data, err := state.EncodeTransactions([]types.Transaction{*tx1}, constants.EffectivePercentage, forkID5)
batchL2Data, err := state.EncodeTransactions([]types.Transaction{*tx1}, constants.EffectivePercentage, forkID6)
require.NoError(t, err)
sequence := ethmanTypes.Sequence{
GlobalExitRoot: ger,
Expand Down
8 changes: 4 additions & 4 deletions jsonrpc/endpoints_zkevm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

const (
forkID5 = 5
forkID6 = 6
)

func TestConsolidatedBlockNumber(t *testing.T) {
Expand Down Expand Up @@ -714,7 +714,7 @@ func TestGetBatchByNumber(t *testing.T) {
batchTxs = append(batchTxs, *tx)
effectivePercentages = append(effectivePercentages, state.MaxEffectivePercentage)
}
batchL2Data, err := state.EncodeTransactions(batchTxs, effectivePercentages, forkID5)
batchL2Data, err := state.EncodeTransactions(batchTxs, effectivePercentages, forkID6)
require.NoError(t, err)
tc.ExpectedResult.BatchL2Data = batchL2Data
batch := &state.Batch{
Expand Down Expand Up @@ -833,7 +833,7 @@ func TestGetBatchByNumber(t *testing.T) {
batchTxs = append(batchTxs, *tx)
effectivePercentages = append(effectivePercentages, state.MaxEffectivePercentage)
}
batchL2Data, err := state.EncodeTransactions(batchTxs, effectivePercentages, forkID5)
batchL2Data, err := state.EncodeTransactions(batchTxs, effectivePercentages, forkID6)
require.NoError(t, err)

batch := &state.Batch{
Expand Down Expand Up @@ -982,7 +982,7 @@ func TestGetBatchByNumber(t *testing.T) {
batchTxs = append(batchTxs, *tx)
effectivePercentages = append(effectivePercentages, state.MaxEffectivePercentage)
}
batchL2Data, err := state.EncodeTransactions(batchTxs, effectivePercentages, forkID5)
batchL2Data, err := state.EncodeTransactions(batchTxs, effectivePercentages, forkID6)
require.NoError(t, err)
var fb uint64 = 1
batch := &state.Batch{
Expand Down
4 changes: 2 additions & 2 deletions pool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
)

const (
forkID5 = 5
forkID6 = 6
senderPrivateKey = "0x28b2b0318721be8c8339199172cd7cc8f5e273800a35616ec893083a4b32c02e"
senderAddress = "0x617b3a3528F9cDd6630fd3301B9c8911F7Bf063D"
)
Expand Down Expand Up @@ -271,7 +271,7 @@ func Test_AddPreEIP155Tx(t *testing.T) {
batchL2Data := "0xe580843b9aca00830186a0941275fbb540c8efc58b812ba83b0d0b8b9917ae98808464fbb77c6b39bdc5f8e458aba689f2a1ff8c543a94e4817bda40f3fe34080c4ab26c1e3c2fc2cda93bc32f0a79940501fd505dcf48d94abfde932ebf1417f502cb0d9de81bff"
b, err := hex.DecodeHex(batchL2Data)
require.NoError(t, err)
txs, _, _, err := state.DecodeTxs(b, forkID5)
txs, _, _, err := state.DecodeTxs(b, forkID6)
require.NoError(t, err)

tx := txs[0]
Expand Down

0 comments on commit fdd112b

Please sign in to comment.