-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(examples): Implement missing node components in custom-node example #16343
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
Conversation
…ample So that the `ComponentBuilder` with components from `custom-node` satisfies `NodeComponentBuilder`
…custom_node` example
…ll the trait impls Extract inner header for `BlockAssembler` expecting Optimism block header
…tion<CustomTxEnv>` Even when `CustomTxEnv` implements `FromRecoveredTx` and `FromEncodedTx`, the `OpTransaction<CustomTxEnv>` does not.
@@ -19,11 +19,126 @@ reth-rpc-api.workspace = true | |||
reth-rpc-engine-api.workspace = true | |||
reth-ethereum = { workspace = true, features = ["node-api", "network", "evm", "pool"] } | |||
|
|||
reth-basic-payload-builder.workspace = true |
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.
since we intend this to be a blueprint, we should cleanup deps here, let's try to pull in as much as possible from reth-ethereum
L20 and add missing re-exports
so ideally none of these imports are necessary
use std::sync::Arc; | ||
|
||
pub struct CustomTxEnv(TxEnv); |
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.
I think we could possible even reuse the existing texenv entire for the payment tx type, but let's do the full example like this
#[derive(Clone, Debug)] | ||
pub(crate) struct CustomTxPriority { | ||
chain_id: ChainId, | ||
} |
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.
do we even need this @klkvr ?
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.
yeah I think we can reuse the OpPayloadTransactions
here for now
pub(crate) fn from(value: OpTxEnvelope) -> CustomTransaction { | ||
Extended::BuiltIn(value) | ||
} |
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.
we could just make this From impls in the reth-primitives-traits?
because the expectation is that these are always used as the BuiltIn
variants?
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.
902e932
to
bc159b7
Compare
…or `CustomTxEnv` of `Other` variant
@@ -1,15 +1,24 @@ | |||
use crate::chainspec::CustomChainSpec; | |||
use alloy_consensus::{Block, Header}; | |||
use crate::{ |
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.
we're defining 2 custom txenvs here — CustomTxEnv
and CustomEvmTransaction
, do we need both?
No description provided.