Skip to content
Merged
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,26 @@ This changelog covers Firehose-specific changes only. For upstream reth changes,

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## Unreleased

### Added

- `RootJournalReasons`, set per transaction with `FirehoseInspectorApi::set_root_journal_reasons`,
for transactions whose fees and protocol writes are journal writes made outside their calls
(Base's account abstraction transactions, type `0x79`). For such a transaction the inspector
records the state written before the root call (balances, nonces, code, storage and logs) inside
the root call, gives the balance changes read outside the calls below the root call the
configured reasons, and synthesizes no gas purchase, refund or fee reward of its own.
- The mapper accepts type `0x79` transactions (`firehose-tracer` 5.7.0
`TxType::AccountAbstraction`). The chain's `PreTxAdjust` fills their
`account_abstraction_trx_input`.

### Changed

- `PreTxAdjust::adjust_tx_event` receives the transaction environment about to execute. The EVM
context does not hold it yet when the hook runs, so a chain could not read transaction fields the
envelope-derived event does not carry.

## base-v2.5.2.8-fh3.1

### Added
Expand Down
27 changes: 13 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,7 @@ vergen-git2 = "10.0.1"
ipnet = "2.11"

## Firehose Additions
firehose-tracer = "5.5.0"
firehose-tracer = { git = "https://github.com/streamingfast/evm-firehose-tracer-rs.git", branch = "feature/aa-transaction-type" }
reth-firehose = { path = "crates/firehose" }
reth-firehose-tests = { path = "crates/firehose-tests" }

Expand Down
11 changes: 7 additions & 4 deletions crates/firehose/src/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ where
E: reth_evm::Evm,
E::Inspector: FirehoseInspectorApi,
{
/// Mutate `tx_event` in place. `sender` is the recovered signer; `evm` exposes pre-tx state
/// for DB reads. Implementations should leave the event untouched for tx types they do not
/// care about.
/// Mutate `tx_event` in place. `tx_env` is the transaction about to execute, before the EVM
/// context holds it; `sender` is the recovered signer; `evm` exposes pre-tx state for DB
/// reads. Implementations should leave the event untouched for tx types they do not care
/// about.
fn adjust_tx_event(
&self,
evm: &mut E,
tx_env: &E::Tx,
tx_event: &mut firehose_tracer::types::TxEvent,
sender: Address,
);
Expand All @@ -138,6 +140,7 @@ where
fn adjust_tx_event(
&self,
_evm: &mut E,
_tx_env: &E::Tx,
_tx_event: &mut firehose_tracer::types::TxEvent,
_sender: Address,
) {
Expand Down Expand Up @@ -379,7 +382,7 @@ where
// Chain-specific pre-tx patching of the event (e.g. OP Stack deposit nonce override).
// Runs after the envelope-derived mapper and before `on_tx_start` so the tracer sees the
// final, chain-consistent event.
self.adjust.adjust_tx_event(self.inner.evm_mut(), &mut tx_event, sender);
self.adjust.adjust_tx_event(self.inner.evm_mut(), &tx_env, &mut tx_event, sender);

self.inner.evm_mut().inspector_mut().tracer_mut().on_tx_start(tx_event, None);

Expand Down
Loading
Loading