Skip to content

Checkpoint receive scans to subgraph head block#713

Open
garyghayrat wants to merge 1 commit intomasterfrom
codex/checkpoint-scans-to-subgraph-head
Open

Checkpoint receive scans to subgraph head block#713
garyghayrat wants to merge 1 commit intomasterfrom
codex/checkpoint-scans-to-subgraph-head

Conversation

@garyghayrat
Copy link
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
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for jolly-shaw-20fe62 ready!

Name Link
🔨 Latest commit 290bc44
🔍 Latest deploy log https://app.netlify.com/projects/jolly-shaw-20fe62/deploys/69b1ecf52444ed0008a4233f
😎 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.

@github-actions
Copy link

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

83.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.47%74.25%85.37%87%144–145, 166, 239–240, 308, 326–329, 365–366, 397, 412, 415, 422–424, 426, 433, 436–437, 462, 462, 462, 464, 464, 464, 466, 466, 466, 466–467, 467, 467–469, 484, 484, 484–485, 489, 492, 512, 530–532, 573, 628, 632, 678, 691–692, 702–703, 717, 725–726, 756–757, 832–833, 836, 839–840, 846–848, 855, 855, 855–858, 893, 895–896, 896–897
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.ts71.02%63.98%80%74.82%102, 102, 1026–1027, 1039–1040, 118–120, 122–124, 130, 152–153, 179–181, 181, 181–182, 182, 182, 203, 268, 271, 276, 280, 284, 294, 306–311, 313–320, 320, 320, 320, 320, 320, 320–321, 323, 333, 347–348, 348, 348–349, 353–354, 364, 364, 364–366, 368, 384–386, 414, 437, 440, 444, 444–445, 445, 445–446, 446, 448, 452–453, 456–457, 480, 483, 483, 483–485, 515, 517–518, 527, 527, 527–528, 530, 533, 542–543, 584, 601, 601, 601, 630, 652–654, 657, 667, 679, 679, 68, 680, 685, 687–688, 69, 699–703, 716, 718, 769–770, 770, 770–772, 772, 772, 783, 94
umbra-js/test
   testPrivateKeys.ts100%100%100%100%
   utils.ts100%100%100%100%

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.

1 participant