test: integration tests for reorg tracking in RPC subscriptions and filters#99
test: integration tests for reorg tracking in RPC subscriptions and filters#99prestwich wants to merge 3 commits intojames/eng-1971from
Conversation
Fraser999
left a comment
There was a problem hiding this comment.
LGTM (one non-blocking nitpick), but claude has made a couple of points:
-
No multi-block reorg test for filters/subscriptions:
All filter and subscription reorg tests only revert a single block.test_block_tags_reorgdoes a 2-block revert, but without filters or subscriptions active. A test that reverts 2+ blocks while a log filter/subscription is active would exercise thewatermark.min()path and deeper reorg recovery. -
No test for multiple reorgs between polls:
set_reorg_watermarkusesmin()to keep the deepest watermark when multiple reorgs arrive before a single poll. This behavior is untested.
I'm not convinced either of these are actually worthwhile actioning though, so approving as is, and you can decide whether to add these cases or not.
afec144 to
282123d
Compare
|
[Claude Code] Addressed all review feedback in 8859bfe:
All 10 reorg tests pass. |
8859bfe to
c3011ad
Compare
79219a7 to
cb9d35c
Compare
c3011ad to
b84a842
Compare
…nd filters Adds 7 integration tests verifying end-to-end reorg handling across the RPC layer: block tag rewind, polling filter watermark reset, push subscription removed-log emission, filter selectivity, and a no-regression check for normal block progression. Closes ENG-1972 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review feedback: strengthen reorg integration tests with multi-block reverts and multiple-reorgs-between-polls scenarios. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
b84a842 to
e65a5e4
Compare
The ring buffer design now correctly returns removed logs on early-return paths (start > latest) instead of silently discarding them. Update test_multi_block_reorg_log_filter and test_multiple_reorgs_between_polls to expect the removed logs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
crates/node-tests/tests/reorg.rsverifying end-to-end reorg handling across the RPC layerremoved: truelog emission, filter selectivity during reorgs, and a no-regression checksimple_transact) to avoid tx pool conflicts on block rebuild after revertCloses ENG-1972
Stack
This PR includes commits from #96, #97, and #98. Review only the top commit.
BlockTags::rewind_tofor reorg tag updatesSubscriptionTaskreorg handlingget_filter_changesreorg watermarkTest plan
cargo clippy -p signet-node-tests --all-features --all-targets— cleancargo +nightly fmt— cleancargo t -p signet-node-tests --test reorg— 7/7 passcargo t -p signet-node-tests— full suite passes, no regressions🤖 Generated with Claude Code