fix(indexer): decode checkpoints carrying the Validity expiration (WALM-668) - #972
harrymove-ctrl wants to merge 2 commits into
Conversation
…LM-668)
testnet-v1.79.0 added `TransactionExpiration::Validity` as variant index 3. The
indexer was pinned to testnet-v1.75.1, whose `TransactionExpiration` has three
variants, so once testnet began producing `Validity` transactions every
checkpoint carrying one failed to convert:
transaction.bcs: invalid value: integer 3, expected variant index 0 <= i < 3
The indexer decodes whole checkpoints rather than individual events, so this is
a hard stop and not a skipped field: `accounts_v1` retried the same checkpoint
indefinitely and its watermark backlog grew to 48,527 pending commits on
staging, leaving GET /api/accounts/{owner}/exists answering false for accounts
that exist on-chain.
Move both Sui pins to testnet-v1.80.0 (ceaaff1c), the current testnet release.
The remote store layout is unchanged between the two revisions (same
`{checkpoint}.binpb.zst` objects, same zstd + protobuf decode), so this needs no
ingestion or deployment configuration change and the saved watermark stays
valid.
Cover it two ways: `tests/affected_checkpoint.rs` decodes testnet checkpoint
384534623 — the one named in the incident, committed as a fixture in the exact
form the remote store serves — through the real `StoreIngestionClient`, and
`tests/checkpoint_decoding.rs` pins `Validity` to variant index 3 while holding
the earlier variants at their own indices, which already-indexed history
depends on.
Local indexer test run (review follow-up)GitHub CI for this PR only runs Breaking-change read (MemWal surface)Not a product/API breaking change for SDK / apps / relayer API. Diff is scoped to What does change (ops / indexer only):
Recommendation: safe to merge from a MemWal public-API POV after one more human +ops checklist. Do not ask Console/Dio to retest until this is merged, indexer redeployed, and backlog drained. |
Retest (full
|
…ayer Pin sui-sdk-types/rpc/transaction-builder/crypto to 0.4.0 (TransactionExpiration gains Validity at variant 3). security_delete_auth BCS-decodes full Transactions; 0.3.1 stopped at ValidDuring and would reject Validity-bearing tx bytes. Add a focused BCS regression test covering that decode path.
Follow-ups statusLanded on the PR branch (
Needs Harry once (workflow scope): local commit gh auth refresh -h github.com -s workflow
cd /workspace/MemWal # or your checkout of this branch
git push origin harryphan/walm-668-indexer-checkpoint-decodingAfter that push, Actions will |
Closes the code half of WALM-668. The two relayer fixes that ticket also tracks are already merged (#921) and already on
staging(#922); this is the indexer fix, which had no PR.What broke
Staging's
accounts_v1pipeline could not decode testnet checkpoints:TransactionExpirationgained a fourth variant,Validity, in testnet-v1.79.0. The indexer was pinned to testnet-v1.75.1, which knows three (None,Epoch,ValidDuring), so variant index 3 is out of range for it.The indexer decodes whole checkpoints, not individual events, so an unknown transaction field stops the checkpoint rather than being skipped — the pipeline retried the same checkpoint forever. By 12:23 UTC on 2026-09-21 that had built up 48,527 pending commit watermarks, and
GET /api/accounts/{owner}/exists— which reads the indexer'saccountstable — answeredfalsefor accounts that exist on-chain, blocking Dio on Console identity linking.The fix
Move both Sui pins from
623521008f(testnet-v1.75.1) toceaaff1cc8(testnet-v1.80.0), the current testnet release.Nothing else has to move with it:
{checkpoint}.binpb.zstobjects, same zstd → protobuf → types decode path — soINDEXER_REMOTE_STORE_URLand the ingestion flags stay as they are.src/needed no changes:Processor, the postgresHandler, andIndexerClusterare source-compatible across the bump.Cargo.lockis regenerated; the resolved graph still lands on diesel 2.3 / diesel-async 0.9, matching the comment inCargo.toml.Tests
tests/affected_checkpoint.rsdecodes testnet checkpoint 384534623 — the sample checkpoint named in the incident, committed as a 9.6 KB fixture in the exact form the remote store serves it — through the realStoreIngestionClient, offline. It also asserts the fixture still carries aValiditytransaction, so the test can't quietly stop reproducing the failure.tests/checkpoint_decoding.rspinsValidityto variant index 3 and holdsNone/Epoch/ValidDuringat 0/1/2.On the old pin the first test fails at
TryFromProtoErrorand the second does not compile —Validitydoes not exist there.Still to do on WALM-668 (deploy-side, not in this PR)
accountsand checkpoint state, don't skip gaps.GET /api/accounts/{owner}/existsreturnstruefor0x35167fa0….rememberAndWaitreachesdonewith ablob_idand that recall returns it, now that the relayer's ValidDuring and exhausted-retry fixes are onstaging.Review follow-ups folded into this PR
cc61f695) — bumpedservices/serverSui cratessui-sdk-types/sui-rpc/sui-transaction-builder/sui-cryptofrom 0.3.x →=0.4.0soTransactionExpiration::Validity(BCS variant 3) decodes. Risk path:security_delete_authBCS-decodes fullTransactions. Added unit testsecurity_delete_auth_bcs_decodes_validity_expiration_transaction(passes locally).cargo checkclean.0327b0f6, not yet on remote) — addsindexer-checksjob to.github/workflows/test.yml(libpq-dev+cargo check/cargo testinservices/indexer). Push blocked: OAuth token forharrymove-ctrllacks GitHubworkflowscope. Harry needs:harrymove-ctrl <harry.phan@commandoss.com>on this branch locally / on the agent box).