Skip to content

Conversation

JonathanOppenheimer
Copy link
Member

Why this should be merged

There are packages in subnet-evm and coreth that share a lot of functionality / are mirrored. These packages should be uplifted to AvalancheGo to prevent the duplicative maintenance of two sets of the same code. This is part of that effort. This would close #4129 .

How this works

This code represents the 'merged' difference of coreth/warp and subnet-evm/warp. The two packages diverged significantly, and deference was given to additions.

Key merges:

  • Used snowtest.Context() when snowctx is needed (defer to coreth)
  • warp/messages only exists in subnet-evm, but some of this code was already duplicated to vms/platformvm/warp/message so I brought validator_uptime.go there, and changed the import pathing for files that needed things from it
  • warptest/noop_validator_reader.go only exists in subnet-evm, and we’re taking the code with it
  • Brought type ValidatorReader and type Validator into noop_validator_reader.go, picking them out of the subnet-evm/plugin/evm/validator package
    • There are now 6 different Validator types, of varying similarity declared across AvalancheGo, from Stephen 5 years to Draco 3 months ago. This doesn’t seem clean to me.
  • When the ValidatorReader is needed, imported it from warptest
  • Deferred to verifier_stats.go from subnet-evm
  • Deferred to verifier_backend.go from subnet-evm
  • Deferred to backend_test.go from subnet-evm
  • Used libevm RPC
  • Used the executor.WarpQuorumDenominator (both 100) rather than the warp precompile contract when the variable is needed.

Linting changes can be viewed standalone in [hash]

How this was tested

This is currently 'dead' code; after a new AvalancheGo release is dropped, we can use the code in the evm repositories.

Need to be documented in RELEASES.md?

No

@JonathanOppenheimer JonathanOppenheimer changed the title Initial merge uplift: Add combined warp package from evm repositories Aug 5, 2025
@joshua-kim joshua-kim moved this to Ready 🚦 in avalanchego Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready 🚦
Development

Successfully merging this pull request may close these issues.

Uplift warp package
1 participant