move atomic backend and consensus callbacks #1011
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces: #986
Why this should be merged
Moves atomic backend, repository and fx interface to atomic vm
How this works
This pull request primarily focuses on refactoring and improving the extensibility of the EVM plugin by introducing new interfaces and simplifying existing code. Key changes include the removal of redundant methods, updates to references for atomic VM components, and enhancements to configuration and testing logic.
Refactoring and Code Simplification:
AtomicBackend()
method from theVM
implementation and replaced direct calls to it with references toatomicVM.AtomicBackend
. This change simplifies the code and aligns it with the updated structure. (plugin/evm/atomic/vm/block_extension.go
: [1] [2] [3] [4]plugin/evm/vm_extensible.go
and added new methods to exposeVersionDB
andChainConfig
. (plugin/evm/vm_extensible.go
: [1] [2]Updates to Testing Logic:
atomicVM
references instead of direct VM components, ensuring consistency with the refactored code. (plugin/evm/export_tx_test.go
: [1] [2] [3];plugin/evm/tx_test.go
: [4];plugin/evm/vm_test.go
: [5] [6]Enhancements to Configuration:
ExtensibleVM
interface, includingChainConfig
,ReadLastAccepted
, andVersionDB
, to improve extensibility and provide better access to VM configurations. (plugin/evm/extension/config.go
: [1] [2]File Renaming:
plugin/evm/bonus_blocks.go
toplugin/evm/atomic/vm/bonus_blocks.go
to better reflect its purpose and location within the atomic VM structure. (plugin/evm/atomic/vm/bonus_blocks.go
: plugin/evm/atomic/vm/bonus_blocks.goL3-R3)How this was tested
Existing tests
Need to be documented?
No
Need to update RELEASES.md?
No