8000 finalize atomic VM migration by ceyonur · Pull Request #998 · ava-labs/coreth · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

finalize atomic VM migration #998

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

Draft
wants to merge 9 commits into
base: atomic-vm-api
Choose a base branch
from
Draft

Conversation

ceyonur
8000 Copy link
Collaborator
@ceyonur ceyonur commented May 31, 2025

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:

  • Renamed variables in plugin/evm/atomic/vm/api.go and plugin/evm/atomic/vm/block_extension.go for consistency (e.g., Mempoolmempool, AtomicBackendatomicBackend). [1] [2]
  • Replaced exported error variables (ErrMissingUTXOs, ErrEmptyBlock) with unexported ones (errMissingUTXOs, errEmptyBlock) to limit their scope.

New Functionality:

  • Added a ResetMetrics function in metrics/metricstest/metrics.go to reset VM metrics during tests.
  • Introduced a new test file plugin/evm/atomic/vm/syncervm_test.go to validate atomic transaction syncing functionality.

Test Restructuring:

  • Renamed plugin/evm/gossiper_atomic_gossiping_test.go to plugin/evm/atomic/vm/gossiper_atomic_gossiping_test.go and modularized test setups for atomic gossiping.
  • Updated test logic to use new VM setup functions and renamed variables for clarity. [1] [2]

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0