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

VM: return precompile functions based on hardfork #783

Merged
merged 2 commits into from
Jun 19, 2020

Conversation

jochem-brouwer
Copy link
Member

Closes #585

Small note: this changes the (non-exposed?) getPrecompile(address) to getPrecompile(address, common). I have edited every reference to it and included a test as well.

@codecov
Copy link

codecov bot commented Jun 17, 2020

Codecov Report

Merging #783 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #783      +/-   ##
==========================================
+ Coverage   90.48%   90.50%   +0.01%     
==========================================
  Files          46       49       +3     
  Lines        3163     3169       +6     
  Branches      482      484       +2     
==========================================
+ Hits         2862     2868       +6     
  Misses        204      204              
  Partials       97       97              
Flag Coverage Δ
#account 94.11% <ø> (ø)
#block 82.68% <ø> (-0.19%) ⬇️
#blockchain 89.22% <ø> (ø)
#common 93.78% <ø> (+0.25%) ⬆️
#ethash 85.40% <ø> (ø)
#tx 94.16% <ø> (+0.13%) ⬆️
#vm 93.11% <100.00%> (+0.01%) ⬆️
Impacted Files Coverage Δ
packages/vm/lib/evm/evm.ts 91.97% <100.00%> (ø)
packages/vm/lib/evm/precompiles/index.ts 100.00% <100.00%> (ø)
packages/block/src/header-from-rpc.ts 66.66% <0.00%> (-20.84%) ⬇️
packages/block/src/index.ts
packages/tx/src/index.ts 100.00% <0.00%> (ø)
packages/common/src/hardforks/index.ts 100.00% <0.00%> (ø)
packages/common/src/genesisStates/index.ts 100.00% <0.00%> (ø)
packages/common/src/chains/index.ts 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2b172c...89d0c8e. Read the comment docs.

Copy link
Contributor

@ryanio ryanio left a comment

Choose a reason for hiding this comment

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

nice, this looks great along with the additional tests!

@holgerd77
Copy link
Member

For reference: getPrecompile was introduced here #492

@holgerd77
Copy link
Member

Yes, this looks really nice, thanks Jochem!

Will merge here.

@holgerd77 holgerd77 merged commit fb82f40 into master Jun 19, 2020
@holgerd77 holgerd77 deleted the group-precompiles-hardfork branch June 19, 2020 11:27
@holgerd77 holgerd77 mentioned this pull request Jun 25, 2020
15 tasks
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.

Group precompiles based on HF
3 participants