Hardcode block type to be Ethereum

This commit is contained in:
Antonio Antonino 2025-04-10 09:40:15 +02:00
parent 92e85310bc
commit da4d7c12e2
No known key found for this signature in database
GPG Key ID: 70CC1DF6BCF7E76D
2 changed files with 10 additions and 10 deletions

View File

@ -1,14 +1,13 @@
use reth_ethereum::Block;
// TODO: The logic to batch multiple of these blocks (or the transactions within them) and send them to DA and generate proofs is still missing. It will have to be added at the offsite.
// This type does not support any recovery mechanism, so if the node is stopped, the state DB should be cleaned before starting again. The folder is specified by the `--datadir` option in the binary.
#[derive(Default)]
pub struct Aggregator<Block> {
pub struct Aggregator {
unprocessed_blocks: Vec<Block>,
}
impl<Block> Aggregator<Block>
where
Block: reth_ethereum::primitives::Block,
{
impl Aggregator {
pub fn process_blocks(&mut self, new_blocks: impl Iterator<Item = Block>) {
self.unprocessed_blocks.extend(new_blocks);
}

View File

@ -10,13 +10,14 @@ use reth_ethereum::{
};
use reth_tracing::tracing::info;
pub type Block<Node> =
<<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives as NodePrimitives>::Block;
async fn aggregate_block_txs<Node: FullNodeComponents>(
mut ctx: ExExContext<Node>,
mut aggregator: Aggregator<Block<Node>>,
) -> eyre::Result<()> {
mut aggregator: Aggregator,
) -> eyre::Result<()>
where
<<Node as FullNodeTypes>::Types as NodeTypes>::Primitives:
NodePrimitives<Block = reth_ethereum::Block>,
{
while let Some(notification) = ctx.notifications.try_next().await? {
let ExExNotification::ChainCommitted { new } = &notification else {
continue;