All lessons · Developer tooling · Start here · Glossary
Wait for the indexer to reach the block before truncating the devnet chain in reorg testsWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
In a devnet reorg test, the inclusion status a client reads from the node does not mean your own indexing service has processed that block. Before truncating the chain below block n, poll that service's indexed block number until it reaches n. Otherwise it never sees the block, never records a rollback, and the test times out on slow CI runners.
Why it matters: If the devnet chain is truncated before the off-chain indexer has processed the inclusion block, the indexer never observes the rollback, so a reorg test waiting for one hangs until it times out on slow runners.
Pattern
d.server_caught_up(n).await?;Taken from the commit, shortened.
- Concepts
- Testing and devnet, Indexer queries and cell collection
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-08
- Last changed
- 2026-10-08
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (1)
- 2026-10-08 · poshboytl/omavote · more from this project
More about Developer tooling
- ckb-vm-js 0.2.0 (npm) checks header hash instead of rejecting the field
- Derive devnet Spore and system script cell deps from a fresh OffCKB export
- Pass wasm bytes to ckb-vm-js createVerifier in Node
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Wait for the indexer to reach the block before truncating the devnet chain in reorg tests", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/wait-for-the-indexer-to-reach-the-block-before-truncating-th, CC BY 4.0, last changed 2026-10-08.