Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancun eth tests #1135

Merged
merged 42 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
e46143d
Fix incorrectly created BlockContext and ChainConfig for Cancun forks…
cabrador Jul 18, 2024
21e3c46
Pass correctly chain cfg.
cabrador Jul 18, 2024
78f4a3f
Add todos.
cabrador Jul 23, 2024
ee2b9bb
Merge remote-tracking branch 'origin/develop' into petr/cancun-eth-tests
cabrador Jul 24, 2024
c50eb8f
Read state tests from multiple directories.
cabrador Jul 24, 2024
2febc2c
Update todos
cabrador Jul 30, 2024
113f6cd
Merge branch 'develop' into petr/cancun-eth-tests
cabrador Aug 29, 2024
19e585e
Fix after merge.
cabrador Aug 29, 2024
eb8b3a2
Add test description to logging
cabrador Aug 29, 2024
6e85626
Move calc of blob fee to correct place
cabrador Aug 29, 2024
5918786
Add random
cabrador Aug 30, 2024
d9479e6
Check for error
cabrador Aug 30, 2024
ab5e2a0
Remove getter for block environment; Create special Processor; Add er…
cabrador Aug 30, 2024
394ca5d
Correct blobGasFee
cabrador Aug 30, 2024
03eb5a5
Correct blobHashesJson
cabrador Aug 30, 2024
7ee533b
Add continue on failure option into error checker
cabrador Sep 2, 2024
87b4214
Fix tests
cabrador Sep 2, 2024
1e71340
Merge remote-tracking branch 'origin/develop' into petr/cancun-eth-tests
cabrador Sep 3, 2024
0a51250
Use core package instead of evmcore
cabrador Sep 3, 2024
5248979
Add todo
cabrador Sep 3, 2024
0b04803
Disable blob tests
cabrador Sep 3, 2024
d17d32c
Add max num errors flag
cabrador Sep 3, 2024
431f6f2
Merge branch 'develop' into petr/cancun-eth-tests
cabrador Sep 6, 2024
e606ca0
Bring back evmcore; Fix tests
cabrador Sep 6, 2024
83d9c45
Address reviewers feedback.
cabrador Sep 9, 2024
7cf9f32
Add more info into eth state validator errors
cabrador Sep 9, 2024
384460d
Remove genesis from env. Add caching chain configs.
cabrador Sep 9, 2024
a713ec1
Handle transaction error correctly.
cabrador Sep 9, 2024
93ba0af
Fix test
cabrador Sep 10, 2024
a192ca5
Fix tests
cabrador Sep 10, 2024
fc1501a
Merge branch 'develop' into petr/cancun-eth-tests
cabrador Sep 10, 2024
a1b0aaa
Fix after merge
cabrador Sep 10, 2024
e9fe3a4
Merge branch 'develop' into petr/cancun-eth-tests
cabrador Sep 17, 2024
86df8f8
Fix after merge
cabrador Sep 17, 2024
39c28e6
Add chainconfig to testTxCtx
cabrador Sep 18, 2024
5e7e4ed
Merge branch 'develop' into petr/cancun-eth-tests
cabrador Sep 19, 2024
4b2d14c
Remove chainConfig from txContext.
cabrador Sep 20, 2024
a45eff2
Merge remote-tracking branch 'origin/petr/cancun-eth-tests' into petr…
cabrador Sep 20, 2024
e345a83
Fix formatting.
cabrador Sep 20, 2024
70deec1
Fix tests
cabrador Sep 20, 2024
d97dd60
Address reviewers comments.
cabrador Sep 23, 2024
e070815
Merge branch 'develop' into petr/cancun-eth-tests
cabrador Sep 23, 2024
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
16 changes: 8 additions & 8 deletions cmd/aida-rpc/rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestRpc_AllDbEventsAreIssuedInOrder_Sequential(t *testing.T) {
archiveThree := state.NewMockNonCommittableStateDB(ctrl)
archiveFour := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
// Simulate the execution of four requests in three blocks.
provider.EXPECT().
Run(2, 5, gomock.Any()).
Expand Down Expand Up @@ -99,7 +99,7 @@ func TestRpc_AllDbEventsAreIssuedInOrder_Parallel(t *testing.T) {
archiveTwo := state.NewMockNonCommittableStateDB(ctrl)
archiveThree := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
cfg.Workers = 2
// Simulate the execution of four requests in three blocks.
provider.EXPECT().
Expand Down Expand Up @@ -154,7 +154,7 @@ func TestRpc_AllTransactionsAreProcessedInOrder_Sequential(t *testing.T) {
ext := executor.NewMockExtension[*rpc.RequestAndResults](ctrl)
processor := executor.NewMockProcessor[*rpc.RequestAndResults](ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
// Simulate the execution of four requests in three blocks.
provider.EXPECT().
Run(2, 5, gomock.Any()).
Expand Down Expand Up @@ -231,7 +231,7 @@ func TestRpc_AllTransactionsAreProcessed_Parallel(t *testing.T) {
ext := executor.NewMockExtension[*rpc.RequestAndResults](ctrl)
processor := executor.NewMockProcessor[*rpc.RequestAndResults](ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
cfg.Workers = 2
// Simulate the execution of four requests in three blocks.
provider.EXPECT().
Expand Down Expand Up @@ -304,7 +304,7 @@ func TestRpc_ValidationDoesNotFailOnValidTransaction_Sequential(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
var err error
reqBlockTwo.Response.Result, err = json.Marshal("0x1")
if err != nil {
Expand Down Expand Up @@ -338,7 +338,7 @@ func TestRpc_ValidationDoesNotFailOnValidTransaction_Parallel(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
cfg.Workers = 2
var err error
reqBlockTwo.Response.Result, err = json.Marshal("0x1")
Expand Down Expand Up @@ -373,7 +373,7 @@ func TestRpc_ValidationFailsOnValidTransaction_Sequential(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
var err error
reqBlockTwo.Response.Result, err = json.Marshal("0x1")
if err != nil {
Expand Down Expand Up @@ -411,7 +411,7 @@ func TestRpc_ValidationFailsOnValidTransaction_Parallel(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
cfg.Workers = 2
var err error
reqBlockTwo.Response.Result, err = json.Marshal("0x1")
Expand Down
6 changes: 5 additions & 1 deletion cmd/aida-rpc/run_rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ type rpcProcessor struct {
}

func (p rpcProcessor) Process(state executor.State[*rpc.RequestAndResults], ctx *executor.Context) error {
ctx.ExecutionResult = rpc.Execute(uint64(state.Block), state.Data, ctx.Archive, p.cfg)
var err error
ctx.ExecutionResult, err = rpc.Execute(uint64(state.Block), state.Data, ctx.Archive, p.cfg)
if err != nil {
return err
}
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/aida-sdb/record_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestSdbRecord_AllDbEventsAreIssuedInOrder(t *testing.T) {
ext := executor.NewMockExtension[txcontext.TxContext](ctrl)
path := t.TempDir() + "test_trace"

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 10, 11, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 10, 11, false, "")
cfg.TraceFile = path
cfg.SyncPeriodLength = 1
provider.EXPECT().
Expand Down
16 changes: 8 additions & 8 deletions cmd/aida-vm-adb/run_vm_adb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestVmAdb_AllDbEventsAreIssuedInOrder_Sequential(t *testing.T) {
archiveBlockTwo := state.NewMockNonCommittableStateDB(ctrl)
archiveBlockThree := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
cfg.ContinueOnFailure = true
// Simulate the execution of three transactions in two blocks.
provider.EXPECT().
Expand Down Expand Up @@ -128,7 +128,7 @@ func TestVmAdb_AllDbEventsAreIssuedInOrder_Parallel(t *testing.T) {
archiveBlockTwo := state.NewMockNonCommittableStateDB(ctrl)
archiveBlockThree := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
cfg.ContinueOnFailure = true
cfg.Workers = 2
// Simulate the execution of three transactions in two blocks.
Expand Down Expand Up @@ -221,7 +221,7 @@ func TestVmAdb_AllTransactionsAreProcessedInOrder_Sequential(t *testing.T) {
ext := executor.NewMockExtension[txcontext.TxContext](ctrl)
processor := executor.NewMockProcessor[txcontext.TxContext](ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
// Simulate the execution of three transactions in two blocks.
provider.EXPECT().
Run(2, 5, gomock.Any()).
Expand Down Expand Up @@ -302,7 +302,7 @@ func TestVmAdb_AllTransactionsAreProcessed_Parallel(t *testing.T) {
ext := executor.NewMockExtension[txcontext.TxContext](ctrl)
processor := executor.NewMockProcessor[txcontext.TxContext](ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
cfg.Workers = 2
// Simulate the execution of three transactions in two blocks.
provider.EXPECT().
Expand Down Expand Up @@ -383,7 +383,7 @@ func TestVmAdb_ValidationDoesNotFailOnValidTransaction_Sequential(t *testing.T)
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
provider.EXPECT().
Run(2, 5, gomock.Any()).
DoAndReturn(func(_ int, _ int, consumer executor.Consumer[txcontext.TxContext]) error {
Expand Down Expand Up @@ -433,7 +433,7 @@ func TestVmAdb_ValidationDoesNotFailOnValidTransaction_Parallel(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
cfg.Workers = 2
provider.EXPECT().
Run(2, 5, gomock.Any()).
Expand Down Expand Up @@ -483,7 +483,7 @@ func TestVmAdb_ValidationFailsOnInvalidTransaction_Sequential(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
provider.EXPECT().
Run(2, 5, gomock.Any()).
DoAndReturn(func(_ int, _ int, consumer executor.Consumer[txcontext.TxContext]) error {
Expand Down Expand Up @@ -524,7 +524,7 @@ func TestVmAdb_ValidationFailsOnInvalidTransaction_Parallel(t *testing.T) {
db := state.NewMockStateDB(ctrl)
archive := state.NewMockNonCommittableStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
cfg.Workers = 2
provider.EXPECT().
Run(2, 5, gomock.Any()).
Expand Down
4 changes: 3 additions & 1 deletion cmd/aida-vm-sdb/run_eth.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ var RunEthTestsCmd = cli.Command{
&utils.ValidateStateHashesFlag,
&log.LogLevelFlag,
&utils.ErrorLoggingFlag,
&utils.MaxNumErrorsFlag,

// Ethereum execution tests
&utils.EthTestTypeFlag,
Expand All @@ -88,8 +89,9 @@ func RunEthereumTest(ctx *cli.Context) error {

cfg.StateValidationMode = utils.SubsetCheck
cfg.ValidateTxState = true
cfg.ChainID = utils.EthTestsChainID

processor, err := executor.MakeLiveDbTxProcessor(cfg)
processor, err := executor.MakeEthTestProcessor(cfg)
if err != nil {
return err
}
Expand Down
17 changes: 10 additions & 7 deletions cmd/aida-vm-sdb/run_eth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@ func TestVmSdb_Eth_AllDbEventsAreIssuedInOrder(t *testing.T) {
provider := executor.NewMockProvider[txcontext.TxContext](ctrl)
db := state.NewMockStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, false, "Cancun")
cfg.ContinueOnFailure = true

data := ethtest.CreateTestTransaction(t)

provider.EXPECT().
Expand Down Expand Up @@ -79,7 +80,7 @@ func TestVmSdb_Eth_AllDbEventsAreIssuedInOrder(t *testing.T) {
db.EXPECT().EndBlock(),
)

processor, err := executor.MakeLiveDbTxProcessor(cfg)
processor, err := executor.MakeEthTestProcessor(cfg)
if err != nil {
t.Fatalf("failed to create processor: %v", err)
}
Expand All @@ -101,7 +102,7 @@ func TestVmSdb_Eth_AllTransactionsAreProcessedInOrder(t *testing.T) {
ext := executor.NewMockExtension[txcontext.TxContext](ctrl)
processor := executor.NewMockProcessor[txcontext.TxContext](ctrl)

cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, false, "Cancun")
data := ethtest.CreateTestTransaction(t)

// Simulate the execution of three transactions in two blocks.
Expand Down Expand Up @@ -173,7 +174,7 @@ func TestVmSdb_Eth_ValidationDoesNotFailOnValidTransaction(t *testing.T) {
provider := executor.NewMockProvider[txcontext.TxContext](ctrl)
db := state.NewMockStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, true, "Cancun")
data := ethtest.CreateTestTransaction(t)

provider.EXPECT().
Expand Down Expand Up @@ -208,10 +209,12 @@ func TestVmSdb_Eth_ValidationDoesNotFailOnValidTransaction(t *testing.T) {
db.EXPECT().SubBalance(gomock.Any(), gomock.Any(), tracing.BalanceDecreaseGasBuy),
db.EXPECT().RevertToSnapshot(15),
db.EXPECT().GetLogs(common.HexToHash(fmt.Sprintf("0x%016d%016d", 2, 1)), uint64(2), common.HexToHash(fmt.Sprintf("0x%016d", 2))),
db.EXPECT().EndTransaction(),
db.EXPECT().EndBlock(),
// EndTransaction is not called because execution fails
)

processor, err := executor.MakeLiveDbTxProcessor(cfg)
processor, err := executor.MakeEthTestProcessor(cfg)
if err != nil {
t.Fatalf("failed to create processor: %v", err)
}
Expand All @@ -231,7 +234,7 @@ func TestVmSdb_Eth_ValidationDoesFailOnInvalidTransaction(t *testing.T) {
provider := executor.NewMockProvider[txcontext.TxContext](ctrl)
db := state.NewMockStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.EthTestsChainID, 2, 4, true, "Cancun")
data := ethtest.CreateTestTransaction(t)

provider.EXPECT().
Expand Down Expand Up @@ -261,7 +264,7 @@ func TestVmSdb_Eth_ValidationDoesFailOnInvalidTransaction(t *testing.T) {
db.EXPECT().BeginBlock(uint64(2))
db.EXPECT().BeginTransaction(uint32(1))

processor, err := executor.MakeLiveDbTxProcessor(cfg)
processor, err := executor.MakeEthTestProcessor(cfg)
if err != nil {
t.Fatalf("failed to create processor: %v", err)
}
Expand Down
8 changes: 4 additions & 4 deletions cmd/aida-vm-sdb/run_substate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestVmSdb_Substate_AllDbEventsAreIssuedInOrder(t *testing.T) {
provider := executor.NewMockProvider[txcontext.TxContext](ctrl)
db := state.NewMockStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
cfg.ContinueOnFailure = true
// Simulate the execution of three transactions in two blocks.
provider.EXPECT().
Expand Down Expand Up @@ -129,7 +129,7 @@ func TestVmSdb_Substate_AllTransactionsAreProcessedInOrder(t *testing.T) {
ext := executor.NewMockExtension[txcontext.TxContext](ctrl)
processor := executor.NewMockProcessor[txcontext.TxContext](ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
// Simulate the execution of three transactions in two blocks.
provider.EXPECT().
Run(2, 5, gomock.Any()).
Expand Down Expand Up @@ -208,7 +208,7 @@ func TestVmSdb_Substate_ValidationDoesNotFailOnValidTransaction(t *testing.T) {
provider := executor.NewMockProvider[txcontext.TxContext](ctrl)
db := state.NewMockStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
provider.EXPECT().
Run(2, 5, gomock.Any()).
DoAndReturn(func(_ int, _ int, consumer executor.Consumer[txcontext.TxContext]) error {
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestVmSdb_Substate_ValidationFailsOnInvalidTransaction(t *testing.T) {
provider := executor.NewMockProvider[txcontext.TxContext](ctrl)
db := state.NewMockStateDB(ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true, "")
provider.EXPECT().
Run(2, 5, gomock.Any()).
DoAndReturn(func(_ int, _ int, consumer executor.Consumer[txcontext.TxContext]) error {
Expand Down
20 changes: 14 additions & 6 deletions cmd/aida-vm-sdb/run_tx_generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,18 @@ func TestVmSdb_TxGenerator_AllTransactionsAreProcessedInOrder(t *testing.T) {
ext := executor.NewMockExtension[txcontext.TxContext](ctrl)
processor := executor.NewMockProcessor[txcontext.TxContext](ctrl)

cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, true)
cfg := utils.NewTestConfig(t, utils.MainnetChainID, 2, 4, false, "")
// Simulate the execution of four transactions in three blocks.
provider.EXPECT().
Run(2, 4, gomock.Any()).
DoAndReturn(func(_ int, _ int, consumer executor.Consumer[txcontext.TxContext]) error {
// Block 2
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 2, Transaction: 1, Data: newTestTxCtx(2)})
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 2, Transaction: 2, Data: newTestTxCtx(2)})
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 2, Transaction: 1, Data: newTestTxCtx(t, 2)})
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 2, Transaction: 2, Data: newTestTxCtx(t, 2)})
// Block 3
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 3, Transaction: 1, Data: newTestTxCtx(3)})
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 3, Transaction: 1, Data: newTestTxCtx(t, 3)})
// Block 4
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 4, Transaction: 1, Data: newTestTxCtx(4)})
consumer(executor.TransactionInfo[txcontext.TxContext]{Block: 4, Transaction: 1, Data: newTestTxCtx(t, 4)})
return nil
})

Expand Down Expand Up @@ -108,7 +108,7 @@ func TestVmSdb_TxGenerator_AllTransactionsAreProcessedInOrder(t *testing.T) {
}
}

func newTestTxCtx(blkNumber uint64) txcontext.TxContext {
func newTestTxCtx(t *testing.T, blkNumber uint64) txcontext.TxContext {
return txgenerator.NewTxContext(
testTxBlkEnv{blkNumber},
&core.Message{
Expand All @@ -132,6 +132,10 @@ type testTxBlkEnv struct {
blkNumber uint64
}

func (env testTxBlkEnv) GetRandom() *common.Hash {
wsodsong marked this conversation as resolved.
Show resolved Hide resolved
return nil
}

func (env testTxBlkEnv) GetCoinbase() common.Address {
return common.HexToAddress("0x1")
}
Expand Down Expand Up @@ -167,3 +171,7 @@ func (env testTxBlkEnv) GetBaseFee() *big.Int {
func (env testTxBlkEnv) GetBlobBaseFee() *big.Int {
return big.NewInt(0)
}

func (env testTxBlkEnv) GetFork() string {
return ""
}
Loading
Loading