core/vm: add hardfork precompile continuity checks#2234
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2234 +/- ##
===========================================
+ Coverage 52.33% 52.70% +0.37%
===========================================
Files 885 885
Lines 155904 156673 +769
===========================================
+ Hits 81587 82574 +987
+ Misses 69080 68831 -249
- Partials 5237 5268 +31 see 41 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
There was a problem hiding this comment.
Pull request overview
Adds Bor VM hardfork precompile continuity coverage to prevent regressions where a new VM fork accidentally changes the active precompile profile (including historical replay windows), and updates repo-local review guidance to make these checks an explicit part of hardfork-shaped reviews.
Changes:
- Introduces a precompile “profile matrix” test that snapshots active precompiles (and key implementation variants) across Prague → Madhugiri → MadhugiriPro → Lisovo → LisovoPro → Chicago.
- Adds mainnet/Amoy activation-boundary assertions at
N-1,N, andN+1for the above Bor forks. - Updates hardfork rollout guidance (
AGENTS.md,.claude/rules/hardfork-rollout.md) to require explicit review of precompile deltas and continuity expectations.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
core/vm/contracts_continuity_test.go |
Adds a fork-by-fork precompile continuity matrix + activation boundary tests to lock expected precompile availability/variants. |
AGENTS.md |
Extends standalone hardfork review guidance to require precompile continuity comparisons and referencing the new tests. |
.claude/rules/hardfork-rollout.md |
Adds a Bor-specific VM hardfork failure mode checklist emphasizing precompile continuity and boundary assertions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
@claude review once |
|
Claude finished @pratikspatil024's task in 2m 51s —— View job Code Review: Hardfork Precompile Continuity Checks
SummaryGood PR — the test design is sound and the expectations are accurate. One documentation wording issue (also flagged by Copilot) is worth fixing. Precompile Profile VerificationI manually cross-checked every test profile against the production precompile maps in
The precompile transition chain is correctly captured: Prague→Madhugiri drops P256 and adds KZG; MadhugiriPro re-adds P256; Lisovo upgrades P256 to eip7951; LisovoPro drops KZG; Chicago adds pip88 gas changes. Test DesignThe two-layer approach is well designed:
The Finding: Documentation Wording (low severity)Files: Both files say "P256 needed to be carried forward after Madhugiri" / "P256 must be carried forward after Madhugiri". This is ambiguous because the test matrix (and production code) shows P256 is absent in Madhugiri and first appears in MadhugiriPro. A reviewer reading this guidance could incorrectly expect P256 in Madhugiri. Copilot flagged the same issue. Suggested rewording for both locations:
No Issues Found
| |
|
|
@claude Addressed the documentation wording finding in |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
|
Claude finished @pratikspatil024's task in 30s —— View job Verifying Documentation Wording Fix
Verified commit |



Summary
Adds Bor VM hardfork precompile-continuity coverage and repo-local review guidance so future VM hardfork reviews explicitly compare the active precompile profile across the previous fork, the new fork, and historical replay windows for already-produced blocks.
The new tests lock expected precompile profile transitions around Prague, Madhugiri, MadhugiriPro, Lisovo, LisovoPro, and Chicago, including mainnet and Amoy activation-boundary checks. This is intended to catch Pro-style regressions where a fork accidentally drops a retained precompile, keeps a retired precompile active after the intended retirement point, or breaks replay expectations for historical blocks.
Also updates
AGENTS.mdand.claude/rules/hardfork-rollout.mdso standalone Bor reviews treat VM/precompile hardforks as hardfork-shaped and require an explicit intended precompile delta versus the previous fork.Backtesting
Backtested the approach against the historical Pro-related review windows:
A full AI review fan-out against the historical hardfork-shaped diffs also produced the expected CRITICAL/HIGH findings for missing precompile continuity coverage and incorrect active precompile profiles.
Executed tests
Rollout notes
Test and review-guidance only. No consensus behavior changes.