-
Notifications
You must be signed in to change notification settings - Fork 561
imp(evm): stateless custom precompiles #1272
Conversation
* release: v0.17.0 changelog * rm newline * update link
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1272 +/- ##
==========================================
+ Coverage 54.78% 54.80% +0.01%
==========================================
Files 107 107
Lines 9984 9988 +4
==========================================
+ Hits 5470 5474 +4
Misses 4243 4243
Partials 271 271
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall good usage of the geth library for the purpose of precompiled contracts. Fixed a couple of typos in the comments above functions. The only other suggestion I see appropriate is the creation of an additional function that will handle RunStatefulPrecompiledContract
.
Co-authored-by: Vladislav Varadinov <vladislav.varadinov@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedekunze LGTM
It would be helpful to add more context to this PR placing it into the grand scheme of the overall spec.
I based my stateful and state-using precompiles work on modifying geth to receive a custom precompile list.
I have not tested this PR yet, but I will use this as a base (instead of #1131 (comment)), for my precompiles work and see how it works. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
Wrapping the go-ethereum/core/vm
constructor into an interface that remains compatible with itself is better and does not require changes from the go-ethereum team.
Description
This PR refactors the EVM module to support custom stateless precompiled contracts by wrapping the go-ethereum EVM into an interface.
This is the first step toward supporting modular EVM implementations with stateful precompiles.
Note: the concrete implementation and tests will be added in a follow-up PR, since the EVM wrapper is not hooked into the state transition at the moment.
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)