Repository navigation
fix(indexer-common): reconcile full RAV backlogs and escrow snapshots - #1259
Merged
tmigone merged 1 commit intoOct 20, 2026
Merged
Conversation
tmigone
approved these changes
Oct 19, 2026
tmigone
left a comment
Member
There was a problem hiding this comment.
lgtm, I think there is a potential edge case for TAPv1 where a RAV that's redeemed on chain but failed the agent db update could force batch reverts for a bit, but it's a non issue since TAPv1 is pretty much deprecated anyway.
Member
|
@chriswessels the repo requires signed commits could you do that? |
chriswessels
force-pushed
the
chris/collector-reconciliation
branch
from
October 19, 2026 20:27
32b6880 to
bb6e572
Compare
Advance bounded reconciliation through pending TAP v1 and v2 RAVs with stable keyset cursors, and await redeemed-state updates. Paginate Horizon escrow balances and collected amounts at a consistent block snapshot. Reject partial queries and inconsistent metadata across escrow and transaction pages. Cover backlog traversal and snapshot pagination, and default empty test provider overrides to the public endpoint.
chriswessels
force-pushed
the
chris/collector-reconciliation
branch
from
October 19, 2026 20:29
bb6e572 to
beead28
Compare
Contributor
Author
|
@tmigone Done! Thank you |
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.
A bounded reconciliation pass currently keeps selecting the same highest-value RAVs. If those rows stay pending, lower-value rows never get reconciled. Separately, Horizon escrow reads use Graph Node's default first page, so an omitted collected-token record is treated as zero and an omitted payer has no balance.
This change:
_metato the row snapshot: previously, floating metadata could advance the block used by later pages/chunks and supply a newer timestamp for finality decisions.The scan cursor is process-local. Restart starts a new sweep; rows inserted or moved ahead of the cursor are revisited on the next sweep. Failed downstream reconciliation leaves durable rows pending for a later sweep. The redemption threshold, finality/reorg intervals, filter chunk sizes, contract validation and transaction batch sizes are unchanged. This does not make below-threshold dust eligible for redemption.
Validation: 44 focused tests pass on Node 22.23.1 with PostgreSQL 13. New cases reproduce the original failures before repair and cover multiple full batches, all composite-key ties, wrap/deletion, failed reads, numeric value movement, unrestricted eligibility, gated real database writes, complete escrow accounting and moving-head GraphQL pagination. All existing ordering/chunking assertions remain. The common package compiles; scoped ESLint, Prettier and
git diff --checkpass. The repository Node 20/22 matrix runs in CI; pre-existing provider-dependent skips do not establish live-chain coverage.Related to #1248 and complementary to #1247's partial-collection settlement repair. The Horizon
awaitrepair overlaps #1247. A merge analysis found one textual overlap at that call: when combining them, retain #1247'ssettledRavKeysargument andawait. This PR otherwise preserves main's settlement semantics; it does not replace #1247.The initial fork CI run also exposed an existing test-fixture bug: GitHub supplies an unavailable RPC secret as an empty string, but
loadTestYamlConfig()used??and preserved that invalid URL instead of its public default. The helper now treats an empty override like an absent one. Five regressions cover absent/empty/explicit/invalid/whitespace overrides; all 17 focused parser/configuration cases pass, and explicit invalid URLs still fail schema validation. This change weakens no schema validation or integration assertion and adds no skipped tests. The subsequent test workflow passed on both Node 20 and Node 22; lint/typecheck/format, CodeQL and all applicable PR image builds also passed.The passing CI matrix retains the repository's pre-existing skips: 3 suites and 43 tests in indexer-common. All 163 executed common tests, 11 Agent tests and 82 CLI tests pass on each Node version.