Skip to content

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Aug 6, 2025

🗒️ Description

Fixes the ModExpInput.from_bytes parser to pad inputs when necessary, but also retain the unpadded input which later becomes the actual input to the precompile in the test.

Previous behavior

The ModExpInput.from_bytes parser would not pad and in fact modify the lengths passed to the pre-compile.

New behavior

The ModExpInput.from_bytes parser now pads the input before processing and calculating the gas but also retains the original input to then pass it unpadded to the pre-compile.

Affected tests

Only guido-4-even, but the gas calculation remained unaffected, the only change was the expected output.

🔗 Related Issues or PRs

N/A.

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx --with=tox-uv tox -e lint,typecheck,spellcheck,markdownlint
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

@marioevz marioevz added type:bug Something isn't working scope:tests Scope: Changes EL client test cases in `./tests` labels Aug 6, 2025
@marioevz marioevz requested a review from spencer-tb August 6, 2025 23:32
Copy link
Contributor

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I think we should create a PR to the EIPs repo including the test vector change alongside the psuedocode updates for 2565/7883.

@marioevz marioevz merged commit 87771b0 into main Aug 7, 2025
16 checks passed
@marioevz marioevz deleted the fix-mod-exp-input-parser branch August 7, 2025 20:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:tests Scope: Changes EL client test cases in `./tests` type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants