Scan all batch offer roots during fallback resolution#106
Draft
KeeganEad wants to merge 1 commit into
Draft
Conversation
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.
Finding
clawpatch finding
fnd_sig-feat-service-b01553a6a4-ceb2_2205db459a: batch offer token-resolution fallback only scanned the latest 10,000 blocks forBatchOfferCreatedevents. Long-lived active offers created before that window could not be accepted or revoked bycontract/tokenIdwhen rare-api direct proof lookup needed root candidates.Assessment
Confirmed real bug. The fallback is correctness-critical after rare-api direct lookup returns a resolution error, and an active offer can remain fillable past the fixed lookback window. The fix keeps the public SDK API unchanged and preserves the existing 10,000-block query size as an internal pagination chunk.
Fix
Validation
npx vitest run test/unit/sdk/batch-offer.test.ts --config vitest.config.tsnpm run typechecknpm run lintclawpatch revalidate --finding fnd_sig-feat-service-b01553a6a4-ceb2_2205db459a --plain-> fixed