Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Get rid of precompile list in configs #5840

Merged
merged 7 commits into from
Nov 26, 2019
Merged

Conversation

gumb0
Copy link
Member

@gumb0 gumb0 commented Nov 21, 2019

Closes #5825

  1. Instead of filling ChainOperationParams::precompiled from config JSON, fill it with hard-coded list of 9 currently existing precompiles.
  2. PrecompiledContract constructor changed to take precompile name string and starting block.
  3. Price functions for linear cost precompiles created, to keep all pricers consistently in one place (instead of keeping price constants somewhere else, as before)
  4. I've decided to consider "precompile" records in configs deprecated for now, so they will not generate validation error, but be ignored.

We could also get rid of PrecompiledRegistrar at some point, I think it's a useless complication.

cc @winsvega

@codecov-io
Copy link

codecov-io commented Nov 21, 2019

Codecov Report

Merging #5840 into master will increase coverage by 0.01%.
The diff coverage is 92.68%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5840      +/-   ##
==========================================
+ Coverage   64.04%   64.06%   +0.01%     
==========================================
  Files         362      362              
  Lines       30910    30896      -14     
  Branches     3434     3430       -4     
==========================================
- Hits        19796    19793       -3     
+ Misses       9885     9874      -11     
  Partials     1229     1229

@gumb0 gumb0 force-pushed the config-without-precompiles branch 2 times, most recently from 108eda9 to 5fae074 Compare November 25, 2019 19:38
@gumb0 gumb0 removed the in progress label Nov 26, 2019
Copy link
Member

@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.

👍 For removing registrar.

@gumb0
Copy link
Member Author

gumb0 commented Nov 26, 2019

Rebased

@gumb0 gumb0 merged commit 13c6e0a into master Nov 26, 2019
@gumb0 gumb0 deleted the config-without-precompiles branch November 26, 2019 14:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get rid of precompiled contract list in chain config
3 participants