-
Notifications
You must be signed in to change notification settings - Fork 569
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
Allow ContextStatefulPrecompile
trait to access broader Context
#1867
Comments
ContextPrecompile
trait to access broader Context
ContextStatefulPrecompile
trait to access broader Context
I am working towards it in Evm Framework. In this PR: #1865 revm/crates/context/src/context.rs Lines 17 to 33 in c816a2c
And precompiles is a trait you implement, that when called will give you all of the context: revm/crates/handler/interface/src/precompile_provider.rs Lines 4 to 19 in c816a2c
|
This is pretty neat @rakita. Is the intention here to treat what is currently revm/crates/optimism/src/wiring.rs Lines 78 to 92 in e18d01f
What I'd like to do is give the precompiles access to owned periphery context, unrelated to the chain context. In kona we need to do this with revm/crates/optimism/src/wiring.rs Lines 55 to 63 in e18d01f
|
Overview
At the moment, the
ContextStatefulPrecompile
can only access theInnerEvmContext
. This is a bit limiting in that the external context within the broaderContext
cannot be accessed during precompile execution.The generic external context is a useful place to store owned memory such as a channel sender, etc., that is intended to have a lifetime that matches the EVM. This would help out over in kona, where we replace a few precompiles with versions that reach out to the host program via a file channel for the result of execution to speed up proving when running natively.
I'd be glad to take this on or a different suggested approach to solve the issue if upstream is open to it.
The text was updated successfully, but these errors were encountered: