diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d880bdb..970dbf70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,15 @@ This changelog covers Firehose-specific changes only. For upstream changes, see The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## Unreleased + +### Fixed + +- Honor `FIREHOSE_DISABLED` when installing the Firehose execution extension, as + well as when initializing the tracer. Previously a plain archive RPC startup + could briefly serve requests and then exit because the extension accessed the + uninitialized tracer. The normal Firehose-enabled path is unchanged. + ## dev-049d306-fh3.1-3 ### Fixed diff --git a/src/main.rs b/src/main.rs index 20242196..92f69f79 100644 --- a/src/main.rs +++ b/src/main.rs @@ -629,7 +629,9 @@ fn main() -> eyre::Result<()> { tracing::info!("Succeed to register eth_config (EIP-7910) API"); Ok(()) }) - .install_exex("firehose", |ctx| async move { + // The ExEx requires the tracer's global state. A plain RPC node + // with FIREHOSE_DISABLED must skip both initialization and ExEx. + .install_exex_if(!firehose_disabled, "firehose", |ctx| async move { // Box::pin works around a rustc higher-ranked lifetime limitation when // proving the (deeply generic) run_exex future Send inside this closure. Ok(Box::pin(reth_firehose::run_exex(ctx))