Skip to content

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

Closed
wants to merge 8 commits into from

Conversation

RomanHodulak
Copy link
Collaborator

No description provided.

…ample

So that the `ComponentBuilder` with components from `custom-node` satisfies `NodeComponentBuilder`
…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
Copy link
Collaborator

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);
Copy link
Collaborator

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

Comment on lines +13 to +16
#[derive(Clone, Debug)]
pub(crate) struct CustomTxPriority {
chain_id: ChainId,
}
Copy link
Collaborator

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 ?

Copy link
Member

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

Comment on lines +26 to +28
pub(crate) fn from(value: OpTxEnvelope) -> CustomTransaction {
Extended::BuiltIn(value)
}
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mattsse mattsse added the A-sdk Related to reth's use as a library label May 20, 2025
@@ -1,15 +1,24 @@
use crate::chainspec::CustomChainSpec;
use alloy_consensus::{Block, Header};
use crate::{
Copy link
Member

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?

@RomanHodulak
Copy link
Collaborator Author

RomanHodulak commented May 23, 2025

@github-project-automation github-project-automation bot moved this from Backlog to Done in Reth Tracker May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sdk Related to reth's use as a library
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants