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

Precompiles: gas analysis and execution via stub #524

Merged
merged 5 commits into from
Dec 15, 2022

Conversation

chfast
Copy link
Member

@chfast chfast commented Nov 6, 2022

No description provided.

@chfast chfast force-pushed the state_precompiles_stub branch 2 times, most recently from 8a39517 to 2a5e48c Compare November 6, 2022 20:42
@codecov
Copy link

codecov bot commented Nov 6, 2022

Codecov Report

Merging #524 (3fce7ed) into master (b14fad9) will decrease coverage by 0.70%.
The diff coverage is 72.66%.

❗ Current head 3fce7ed differs from pull request most recent head 0f43598. Consider uploading reports for the commit 0f43598 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #524      +/-   ##
==========================================
- Coverage   98.08%   97.37%   -0.71%     
==========================================
  Files          60       61       +1     
  Lines        5837     5825      -12     
==========================================
- Hits         5725     5672      -53     
- Misses        112      153      +41     
Flag Coverage Δ
blockchaintests 78.15% <ø> (+1.21%) ⬆️
statetests 73.38% <81.45%> (+1.32%) ⬆️
unittests 89.54% <0.00%> (-2.40%) ⬇️

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

Impacted Files Coverage Δ
test/state/precompiles.hpp 0.00% <0.00%> (ø)
test/state/precompiles_cache.cpp 50.00% <50.00%> (ø)
test/state/precompiles.cpp 84.21% <87.35%> (+17.54%) ⬆️
lib/evmone/advanced_analysis.hpp 97.05% <0.00%> (-2.95%) ⬇️
test/unittests/instructions_test.cpp 85.29% <0.00%> (-2.21%) ⬇️
test/unittests/evm_fixture.cpp 88.88% <0.00%> (-2.03%) ⬇️
lib/evmone/instructions.hpp 99.78% <0.00%> (-0.22%) ⬇️
test/unittests/evm_fixture.hpp 100.00% <0.00%> (ø)
lib/evmone/advanced_instructions.cpp 100.00% <0.00%> (ø)
... and 2 more

test/state/precompiles.cpp Outdated Show resolved Hide resolved
test/state/precompiles.cpp Outdated Show resolved Hide resolved
test/state/precompiles.cpp Outdated Show resolved Hide resolved
test/state/precompiles.cpp Outdated Show resolved Hide resolved
test/state/precompiles.cpp Outdated Show resolved Hide resolved
test/state/precompiles_cache.cpp Outdated Show resolved Hide resolved
test/state/precompiles_cache.cpp Outdated Show resolved Hide resolved
test/state/precompiles_cache.cpp Outdated Show resolved Hide resolved
@chfast chfast requested a review from rodiazet November 30, 2022 10:52
test/state/precompiles.cpp Show resolved Hide resolved
test/state/precompiles.cpp Show resolved Hide resolved
test/state/precompiles_cache.cpp Outdated Show resolved Hide resolved
test/state/precompiles_cache.cpp Outdated Show resolved Hide resolved
@chfast chfast force-pushed the state_precompiles_stub branch from 022dc89 to e38045f Compare December 11, 2022 21:38
Copy link
Member Author

@chfast chfast left a comment

Choose a reason for hiding this comment

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

I used keccak hash for inputs and performance is similar.

@chfast chfast force-pushed the state_precompiles_stub branch from 242db76 to 3fce7ed Compare December 13, 2022 11:31
@chfast chfast force-pushed the state_precompiles_stub branch from 3fce7ed to 0f43598 Compare December 13, 2022 15:47
@chfast chfast merged commit 6b79a34 into master Dec 15, 2022
@chfast chfast deleted the state_precompiles_stub branch December 15, 2022 10:59
@axic axic mentioned this pull request Jan 4, 2023
sha256 = 0x02,
ripemd160 = 0x03,
identity = 0x04,
expmod = 0x05,
Copy link
Member

Choose a reason for hiding this comment

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

Why expmod and not modexp? Yellowpaper? I know clients disagree on the naming.

Copy link
Member Author

Choose a reason for hiding this comment

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

IDK, maybe because addmod and mulmod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants