Skip to content

Checkpoint receive scans to subgraph head block - #713

Merged
apbendi merged 6 commits into
masterfrom
codex/checkpoint-scans-to-subgraph-head
Sep 8, 2026
Merged

apbendi merged 6 commits into
masterfrom
codex/checkpoint-scans-to-subgraph-head

Conversation

@garyghayrat

Copy link
Copy Markdown
Member

Summary

This changes the Receive page checkpointing logic so subgraph-backed scans advance to the subgraph head block instead of the RPC latest block.

Why

On Base and other subgraph-dependent chains, the previous logic stored the provider latest block after a scan. If the subgraph lagged behind the RPC head, a newly indexed announcement could be skipped permanently because future scans would start after the missed block.

What changed

  • fetch the subgraph head block from _meta
  • support both Ponder _meta.status and legacy _meta.block.number shapes
  • use that head block as the next cached lastFetchedBlock
  • fall back conservatively to the prior scan checkpoint if the head-block lookup fails

@netlify

netlify Bot commented Mar 11, 2026

Copy link
Copy Markdown

Deploy Preview for jolly-shaw-20fe62 ready!

Name Link
🔨 Latest commit e4d6002
🔍 Latest deploy log https://app.netlify.com/projects/jolly-shaw-20fe62/deploys/6aa06b753291ce00088bc59b
😎 Deploy Preview https://deploy-preview-713--jolly-shaw-20fe62.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@marcomariscal marcomariscal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I verified these response shapes are real by testing both the Ponder _meta.status endpoint and the legacy _meta.block.number subgraph endpoints.

@garyghayrat
garyghayrat force-pushed the codex/checkpoint-scans-to-subgraph-head branch from 290bc44 to d248499 Compare May 11, 2026 15:03

@apbendi apbendi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

garyghayrat and others added 6 commits September 8, 2026 16:08
Skip checkpoint updates if the indexed head is unavailable. Previously, the fallback
could save the RPC head on a first scan, causing later scans to skip announcements
indexed after that scan.
Prevent bounded scans from saving a checkpoint beyond the scanned range, which could
cause later scans to skip announcements.
@apbendi
apbendi force-pushed the codex/checkpoint-scans-to-subgraph-head branch from 1635884 to e4d6002 Compare September 8, 2026 20:09
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

Coverage after merging codex/checkpoint-scans-to-subgraph-head into master will be

85.87%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
contracts-periphery/src
   UmbraBatchSend.sol100%100%100%100%
   UniswapWithdrawHook.sol100%100%100%100%
umbra-js/src
   ethers.ts86.27%100%75%100%
   types.ts50%100%0%100%
umbra-js/src/classes
   KeyPair.ts98.54%97.62%100%98.75%248, 250
   RandomNumber.ts100%100%100%100%
   StealthKeyRegistry.ts100%100%100%100%
   TxHistoryProvider.ts81.48%65%80%93.10%12, 17, 20, 23, 29, 43, 48, 54, 8
   Umbra.ts82.65%72.22%90.91%87.89%167–168, 189, 262–263, 331, 349–352, 388–389, 420, 435, 438, 445–447, 449, 456, 459, 464, 464, 466, 466, 466, 466, 466–467, 469–470, 500, 500, 500, 502, 502, 502, 504, 504, 504, 504–505, 505, 505–507, 523–524, 589–591, 62, 62, 632, 687, 691, 737, 750–751, 761–762, 776, 784–785, 815–816, 891–892, 895, 898–899, 905–907, 914, 914, 914–917, 952, 954–955, 955–956
umbra-js/src/utils
   cns.ts50%33.33%50%55%33–36, 40, 40, 40, 40, 40–41, 44–46
   constants.ts100%100%100%100%
   ens.ts36.11%25%33.33%40%25–27, 35, 56–57, 57, 57–58, 63–64, 66, 70, 70, 70, 70, 70–71, 75–77
   sharedSecret.ts83.05%72.73%100%87.88%24, 27–28, 42–43, 47–48, 62, 62–63
   utils.ts76.59%69.92%81.08%81.02%111–112, 1234–1235, 1247–1248, 137, 145, 145, 161–163, 165–167, 173, 195–196, 222–224, 224, 224–225, 225, 225, 246, 311, 314, 319, 323, 327, 337, 349–354, 356–363, 363, 363, 363, 363, 363, 363–364, 366, 376, 407–409, 415, 425–426, 433–434, 441, 451, 451–452, 452–453, 458, 488–489, 498–499, 519–521, 534–535, 561–563, 572, 645, 652, 652–653, 653, 653–654, 654, 656, 660, 723, 725–726, 735, 735, 735–736, 738, 741, 750–751, 792, 809, 809, 809, 838, 860–862, 865, 875, 887, 887–888, 893, 895–896, 907–911, 924, 926, 977–978, 978, 978–980, 980, 980, 991
umbra-js/test
   testPrivateKeys.ts100%100%100%100%
   utils.ts100%100%100%100%

@apbendi
apbendi merged commit 9ca2430 into master Sep 8, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants