-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: relax a generic trait #12
Conversation
pub struct EthEvm<DB: Database, I, PRECOMPILE = EthPrecompiles<EthEvmContext<DB>>>( | ||
RevmEvm<EthEvmContext<DB>, I, EthInstructions<EthInterpreter, EthEvmContext<DB>>, PRECOMPILE>, | ||
); |
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.
is there no mainnet evm anymore?
isn't this intended as a wrapper around the plain L1 evm?
imo this shouldn't require this much setup
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.
ah I think this is so that this specific EthEvm
type can be reused
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.
this will likely be a common use case so worth thinking how we can simplify this setup out of the box
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.
ah I think this is so that this specific EthEvm type can be reused
Yes, so we can change precompiles as in reth precompile example.
As the default value for Precompiles is EthPrecompile it will be the same as the previous Mainnet type.
We could use Box<dyn Precompiles>
that would remove generic from it.
e1a1733
to
faacdf8
Compare
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, I don't mind it here for now
Ideally we should be able to implement evm trait directly on revm Evm and not need to add such generics to reth/op-reth implementations just for reuse in examples
Precompile generic used for
EthEvm
, by default it will beEthPrecompiles