fix(vm): relocate pqc precompile addresses to avoid conflicts#44
fix(vm): relocate pqc precompile addresses to avoid conflicts#44Federico2014 wants to merge 2 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
1 issue found across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
d946957 to
ea62e81
Compare
ea62e81 to
a5fda58
Compare
What does this PR do?
Relocates the five PQC precompile addresses from the
0x16–0x1arange to the0x02000016–0x0200001anamespace to avoid collisions with future Ethereum-compatible precompiles occupying the lower address space. Updates all related comments and test files accordingly.Also fixes a minor energy estimation bug in
ValidateMultiPQSig.getEnergyForData: the malformed-input fallback was returningMAX_SIZE × WORST_PQ_ENERGY(5 × 470 = 2350), which underestimates the true worst case when all slots are ECDSA (5 × 1500 = 7500). The fallback now usesMAX_SIZE × WORST_ENERGY_PER_SIGN.Why are these changes required?
The Ethereum precompile address space (
0x01–0xff) is continuously being allocated by new EIPs. Placing TRON PQC precompiles at0x16–0x1arisks future conflicts. The0x02000000namespace provides a TRON-specific range that will not clash with Ethereum assignments.This PR has been tested by:
Follow up
Extra details