-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: extract rpc<>revm specifc code #1818
Conversation
|
||
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)] | ||
#[allow(missing_docs)] | ||
pub enum RevmError { |
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 should rly be using the executor error enum instead of writing its own:
reth/crates/interfaces/src/db.rs
Line 3 in d774d91
pub enum Error { |
And the functions like create_txn_env
are handled by the executor interface - if it is not good enough, it should be adjusted. Ideally the RPC would use an ExecutorFactory
like the rest of the code
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.
Ideally the RPC would use an ExecutorFactory like the rest of the code
RPC does not write to Disk and needs to configure the env directly depending on the RPC call.
The EvmEnvProvider trait is used by RPC to get block and cfg of the env and create_txn_env
configures the txenv based on the request.
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.
After some discussion, we want the rpc types to be a completely independent crate so that it can be easily reused throughout the ecosystem and does not come with any additional feature, therefore the issue in question is no longer relevant and needs to be re-evaluated.
Very sorry for wasting your time on this...
|
||
#[derive(Debug, thiserror::Error, Clone, PartialEq, Eq)] | ||
#[allow(missing_docs)] | ||
pub enum RevmError { |
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.
Ideally the RPC would use an ExecutorFactory like the rest of the code
RPC does not write to Disk and needs to configure the env directly depending on the RPC call.
The EvmEnvProvider trait is used by RPC to get block and cfg of the env and create_txn_env
configures the txenv based on the request.
Closes #1689