Skip to content

Conversation

@rezbera
Copy link
Contributor

@rezbera rezbera commented Dec 4, 2025

TODOs

  • change package structure so its independent of OP
  • Test with a different node impl (bera-reth)
  • Remove todo!s in custom node

closes #20014

progr

simplify

Update cache.rs

Update cache.rs

simplify trait

simplify

Update sequence.rs

simplifies

Update lib.rs

Update service.rs

Simplify

simplify
fixes

mods

generic

Update decoding.rs

rpc fixes

temp remove consensus
fix custom node

tidy

Update lib.rs

Update worker.rs

Update worker.rs
Update op_impl.rs
@rezbera rezbera force-pushed the rezbera/modular-flashblocks branch from 536bebf to 64b9548 Compare December 4, 2025 19:14
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this looks very promising already

Comment on lines +39 to +40
where
F: serde::de::DeserializeOwned,
Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm, I think only the new fn needs this bound?

Copy link
Collaborator

Choose a reason for hiding this comment

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

all of this makes sense

Comment on lines +59 to +64
/// The base payload type containing block environment configuration.
type Base: FlashblockPayloadBase;
/// The diff type containing state changes.
type Diff: FlashblockDiff;
/// The signed transaction type for this chain.
type SignedTx: reth_primitives_traits::SignedTransaction;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I see, this assumes a general structure flashblocks have, which I think is okay

Comment on lines +56 to +64
/// Extension trait for OP-specific RPC types that includes flashblock configuration.
pub trait OpRpcTypes: RpcTypes {
/// The flashblock payload type for this chain.
type Flashblock: FlashblockPayload;
}

impl OpRpcTypes for Optimism {
type Flashblock = OpFlashblockPayload;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

defining this on the rpctypes also makes sense to me

flashblocks_sequence.subscribe(),
)?;
ctx.components.task_executor().spawn(Box::pin(flashblock_client.run()));
todo!("Modularize FlashBlockConsensusClient?")
Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah maybe a general purpose implementation would be great, but unsure if feasible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

Make Flashblocks Generic over Payload

2 participants