fix(provider): scope pipeline consistency guard to blocks above hist_tip#181
fix(provider): scope pipeline consistency guard to blocks above hist_tip#181chee-chyuan wants to merge 5 commits into
Conversation
The HistoryStateInconsistent guard fired whenever any gap existed between execution and history index checkpoints, rejecting all InPlainState reads regardless of the requested block number. This broke eth_replayBlockTransactions for historical blocks well below the inconsistent range during pipeline sync. Only blocks where block_number > hist_tip are actually unsafe to read from plain state — for those, the history index is incomplete and may have missed writes in the gap. Blocks at or below hist_tip are fully covered by the index, so InPlainState is correct and safe to return. Fixes bnb-chain/reth-bsc#338 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Pull Request ReviewThis PR primarily fixes historical state read behavior by scoping Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Pull Request ReviewThis PR fixes the Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Pull Request ReviewThis PR fixes the historical state consistency guard logic so that Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Pull Request ReviewThis PR fixes the historical state consistency guard logic so it only rejects Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Fixed in hickory-resolver 0.26, pending upgrade. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Pull Request ReviewThis PR fixes an over-broad historical state consistency guard in the Rust storage provider so that Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
| if let Some((exec_tip, hist_tip)) = | ||
| self.pipeline_consistency.account_inconsistency() | ||
| self.pipeline_consistency.account_inconsistency() && | ||
| self.block_number > hist_tip |
There was a problem hiding this comment.
The more typical case is when the queried block is below hist_tip. In that scenario, if the key happens to have been modified within the (hist_tip, exec_tip] window, this returns wrong data from a future block — silently, with no error raised.
Closes bnb-chain/reth-bsc#338
The
HistoryStateInconsistentguard introduced in #113 fired whenever any gap existed between the execution and history index checkpoints, rejecting allInPlainStatereads regardless of the requested block number. This causedeth_replayBlockTransactions(and other historical RPC calls) to fail for blocks well below the inconsistent range while the node was in pipeline sync.Only blocks where
block_number > hist_tipare unsafe to read from plain state — for those, the history index is incomplete and may have missed writes in the gap. Blocks at or belowhist_tipare fully covered by the index, soInPlainStateis correct and safe to return.Adds a test case reproducing the #338 scenario: gap exists (
exec_tip=300 > hist_tip=200) but requested block (16) is belowhist_tip— should succeed.