Skip to content

Refactor: create blockchain struct that contains a vm. #2018

@mpaulucci

Description

@mpaulucci

Depends on: #1949

We should create a blockchain struct singleton, that contains a vm struct.

This could be initialized as: let blockchain = Blockchain::new(EVM::REVM), or directly passing the vm object.

Then, when we execute a block, we call blockchain.add_block(), which calls vm.execute_block().

Acceptance criteria:

  • should also remove get_evm_backend_or_default() that accesses the global vm object, we should remove code related to the global object.

Metadata

Metadata

Assignees

Labels

L1Ethereum clientlevmLambda EVM implementationtech debtRefactors, cleanups, etc

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions