fix: restore pointEvaluation precompile (0x0a) in pre-Lisovo precompile sets#138
Open
Johnaverse wants to merge 1 commit into0xPolygon:release/3.2from
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Restore the pointEvaluation precompile at address 0x0a in the pre-Lisovo Polygon PoS precompile sets to fix a consensus-breaking gas computation regression introduced by the LisovoPro changes.
Problem
Erigon v3.4.0 fails to validate Polygon PoS mainnet block 80,089,885 with a gas mismatch:
The computed gas is lower than the block header by 47,595 gas.
Root Cause
The pointEvaluation precompile at address 0x0a was removed from the pre-Lisovo precompile maps during the LisovoPro changes.
Affected sets:
Before Lisovo, calls to 0x0a must be treated as a precompile call. Removing it changes both:
As a result, calls to 0x0a are treated as ordinary calls to an empty account instead of the pointEvaluation precompile.
Fix
Restore pointEvaluation at address 0x0a in the affected pre-Lisovo precompile sets in contracts.go.
Also update regression coverage in contracts_test.go to assert that pointEvaluation remains available through Lisovo and is still absent in LisovoPro.
Why This Fix Is Narrow
This change only restores backward-compatible behavior for pre-Lisovo blocks.
It does not change the current LisovoPro behavior. Whether LisovoPro should also expose pointEvaluation remains a separate consensus decision.
Impact
This fixes sync and block re-execution for Polygon PoS on pre-Lisovo blocks in cases where transactions call address 0x0a.
Without this fix, nodes may fail validation at block 80,089,885 and potentially at other pre-Lisovo blocks with the same pattern.
Testing