Skip to content

feat(firehose): add chain-agnostic tx, block, receipt, and multi-frame hooks - #118

Draft
panos-xyz wants to merge 1 commit into
streamingfast:release/reth-2.xfrom
panos-xyz:morph/v2.11.0-firehose
Draft

panos-xyz wants to merge 1 commit into
streamingfast:release/reth-2.xfrom
panos-xyz:morph/v2.11.0-firehose

Conversation

@panos-xyz

Copy link
Copy Markdown

Summary

Adds lightweight, chain-agnostic extension hooks to reth-firehose and reth-engine-tree (on Reth v2.11.0 / evm2) required by Morph L2 (streamingfast/morph-reth) and other evm2-based embedders:

  • SignatureFields (crates/firehose/src/mapper.rs): default firehose_tx_type and populate_tx_event hooks so chains sharing raw type bytes (0x7e / 0x7f) or carrying custom transaction input protos can map them cleanly.
  • BlockData adjustment (block_tracer.rs, init.rs, executor.rs, payload_validator.rs): default adjust_block_data on FirehoseLiveHooks and ChainHooks + emit_genesis_block_on_empty_chain_with_adjust, propagating chain-specific header fields across genesis, live Engine API import, and staged sync.
  • PostTxExtras per-tx hooks (executor.rs): default gas_accounting_for_tx, emit_post_tx_extras_for_tx, and capture_receipt_extras receiving &evm2::TxResult<E::EvmTypes> and TxType on both serial and detached parallel execution paths.
  • Multi-frame inspector support (executor.rs, inspector.rs):
    • Default PreTxAdjust::install_inspector so chains whose E::set_inspector wraps RPC filters (e.g. FeeFrameFilter) can install their Firehose inspector directly on the inner EVM.
    • Clamp & slice journal()[self.journal_processed_up_to..len] in FirehoseInspector::process_pre_execution and refresh capture_root_exit across multi-frame transactions.
    • Add set_call_depth_offset and mark_root_frame_entered helpers for synthetic wrapper-root traces.

Dependency

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant