feat(bundle): filter bundles with stale host tx nonces before SimCache#235
Open
init4samwise wants to merge 1 commit intomainfrom
Open
feat(bundle): filter bundles with stale host tx nonces before SimCache#235init4samwise wants to merge 1 commit intomainfrom
init4samwise wants to merge 1 commit intomainfrom
Conversation
Adds nonce checking for host transactions in BundlePoller, similar to the existing TxPoller pattern. Bundles with stale host tx nonces are dropped before entering SimCache to prevent: - Wasted simulation cycles on bundles that will fail - ERROR log spam from nonce-too-low failures - Re-ingestion churn (~1s poll cycle) Each host transaction's nonce is compared against the sender's current nonce from the host provider. If any host tx has a stale nonce, the entire bundle is dropped with DEBUG-level logging. Closes ENG-1937
Contributor
Author
|
[Claude Code] Note: The ticket also mentions reducing the log level at signet-sdk driver.rs#L250 from ERROR to DEBUG. That change is in a different repo (signet-sdk) and would need a separate PR. This PR addresses the root cause by filtering stale bundles before they reach SimCache, which should eliminate the log spam at its source. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds nonce checking for host transactions in BundlePoller, following the existing TxPoller pattern.
Problem
BundlePoller ingests bundles without checking if host tx nonces are stale. Bundles with consumed nonces:
This creates ERROR log spam and wastes simulation cycles.
Solution
Before adding bundles to the outbound channel, spawn an async task that:
This mirrors the existing
spawn_check_noncepattern in TxPoller.Changes
spawn_check_bundle_noncesmethod to BundlePollerdecode_txhelper functionTesting
CI will run cargo check/clippy. Manual testing can verify bundles with stale nonces are filtered.
Closes ENG-1937