Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

evm: ensure modexp right-pads input data #3206

Merged
merged 5 commits into from
Dec 19, 2023
Merged

Conversation

jochem-brouwer
Copy link
Member

Closes #3204

I have reviewed EVM to see if there are more cases of doing "not-safe-slices" of any input. The only other candidate which could have impact which I could find are the ECMUL and ECADD precompiles. We should investigate this. (To be addressed in another PR).

Copy link

codecov bot commented Dec 18, 2023

Codecov Report

Merging #3206 (119d466) into master (c5054eb) will decrease coverage by 0.10%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 87.52% <ø> (ø)
blockchain 91.60% <ø> (ø)
client 84.58% <ø> (+0.03%) ⬆️
common 98.25% <ø> (ø)
devp2p 82.11% <ø> (ø)
ethash ∅ <ø> (∅)
evm 76.60% <0.00%> (-0.82%) ⬇️
statemanager 86.29% <ø> (ø)
trie 89.83% <ø> (ø)
tx 95.73% <ø> (ø)
util 89.14% <ø> (ø)
vm 80.83% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@holgerd77 holgerd77 force-pushed the fix-precompiles-inputs branch from c55eb46 to 05b70b0 Compare December 19, 2023 10:01
@holgerd77
Copy link
Member

Rebased this via UI

@holgerd77
Copy link
Member

Tests failing, not sure what happened (simply haven’t looked).

@jochem-brouwer
Copy link
Member Author

Hmm the modexp tests on blockchain/state are failing so that's interesting, I thought this fix would be somewhat trivial 🤔

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

LGTM. Verified that the data length gets appropriately set

@acolytec3 acolytec3 merged commit a0ef459 into master Dec 19, 2023
45 of 46 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modexp should pad shorter input with zeros
3 participants