finalize atomic VM migration #998
Draft
+5,007
−4,789
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.
Why this should be merged
This finalized the atomic VM refactor by fully wrapping the innerVM (plugin/evm/vm) inside atomic/vm and removing the last dependency points from plugin/evm/vm < atomic/vm, thus truly seperating two structs.
This PR also includes a heavy refactor to testing of those two VM pkgs.
This PR depends on: ava-labs/avalanchego#3900
How this works
Codebase Refactoring:
plugin/evm/atomic/vm/api.go
andplugin/evm/atomic/vm/block_extension.go
for consistency (e.g.,Mempool
→mempool
,AtomicBackend
→atomicBackend
). [1] [2]ErrMissingUTXOs
,ErrEmptyBlock
) with unexported ones (errMissingUTXOs
,errEmptyBlock
) to limit their scope.New Functionality:
ResetMetrics
function inmetrics/metricstest/metrics.go
to reset VM metrics during tests.plugin/evm/atomic/vm/syncervm_test.go
to validate atomic transaction syncing functionality.Test Restructuring:
plugin/evm/gossiper_atomic_gossiping_test.go
toplugin/evm/atomic/vm/gossiper_atomic_gossiping_test.go
and modularized test setups for atomic gossiping.These changes collectively enhance the maintainability, readability, and functionality of the codebase.
How this was tested
UTs + E2E
Need to be documented?
No
Need to update RELEASES.md?
Yes