Skip to content

Pass state to precompiles#34

Merged
sorpaas merged 4 commits into
rust-ethereum:masterfrom
aurora-is-near:precompiles
Jun 10, 2021
Merged

Pass state to precompiles#34
sorpaas merged 4 commits into
rust-ethereum:masterfrom
aurora-is-near:precompiles

Conversation

@mfornet
Copy link
Copy Markdown
Contributor

@mfornet mfornet commented Jun 10, 2021

Let precompiles have access to the state, and be aware whether the they were invoked in a static call or not.

We need this for Aurora since some precompiles trigger some behaviour in NEAR blockchain that needs to be tracked. The current interface of the state is used, to revert this behaviour in case the function call inside the EVM is also reverted.

Comment thread src/executor/stack/mod.rs Outdated
@sorpaas sorpaas merged commit bdfaec5 into rust-ethereum:master Jun 10, 2021
@artob artob deleted the precompiles branch June 11, 2021 00:08
@sorpaas
Copy link
Copy Markdown
Member

sorpaas commented Aug 8, 2021

I'm going to temporarily revert this PR, since it conflicts with some other requirements needed at this moment to support fully customizable precompiles.

I think the correct way to try to do what you are doing is through a custom Executor interface where you can add all additional parameters you need. Right now this requires duplicating some code, but I'll work on fixing that.

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.

2 participants