Skip to content

Conversation

@chfast
Copy link
Member

@chfast chfast commented Aug 15, 2025

Fix the incorrect application of EIP-7823 for the modexp exponent length. The issue is caused by the pre-EIP-7823 edge case handling of 0 multiplication complexity when both base and mod have 0 length.

@chfast chfast added the bug Something isn't working label Aug 15, 2025
@chfast chfast requested a review from yperbasis August 15, 2025 08:14
@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 87.15%. Comparing base (6926c76) to head (eff73d7).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
test/state/precompiles.cpp 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1294      +/-   ##
==========================================
- Coverage   87.15%   87.15%   -0.01%     
==========================================
  Files         167      167              
  Lines       24729    24736       +7     
  Branches     4064     4065       +1     
==========================================
+ Hits        21552    21558       +6     
  Misses        538      538              
- Partials     2639     2640       +1     
Flag Coverage Δ
eest-develop 17.57% <0.00%> (-0.01%) ⬇️
eest-develop-gmp 15.60% <0.00%> (-0.01%) ⬇️
eest-fusaka 12.22% <50.00%> (+<0.01%) ⬆️
eest-legacy 11.11% <0.00%> (-0.01%) ⬇️
eest-legacy-silkpre 17.60% <60.00%> (+<0.01%) ⬆️
eest-static 18.63% <60.00%> (+<0.01%) ⬆️
evmone-unittests 83.76% <80.00%> (+<0.01%) ⬆️

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

Components Coverage Δ
core 93.29% <85.71%> (-0.02%) ⬇️
tooling 88.35% <ø> (ø)
tests 84.13% <100.00%> (+<0.01%) ⬆️
Files with missing lines Coverage Δ
test/unittests/precompiles_expmod_test.cpp 95.95% <100.00%> (+0.07%) ⬆️
test/state/precompiles.cpp 94.61% <85.71%> (-0.18%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Fix the incorrect application of EIP-7823 for the modexp exponent
length. The issue is caused by the pre-EIP-7823 edge case handling
of 0 multiplication complexity when both base and mod have 0 length.
@chfast chfast force-pushed the modexp_gas_eip7823_fix branch from bde0caf to eff73d7 Compare August 15, 2025 08:38
@chfast chfast merged commit cd9b1a2 into master Aug 15, 2025
24 checks passed
@chfast chfast deleted the modexp_gas_eip7823_fix branch August 15, 2025 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants