CKB Pulse

All lessons · Developer tooling · Start here · Glossary

Devnet commits need the proposal windowWorkingFrom one fix

From one fix · Check: right · Checked 2026-11-19

On a devnet a transaction is not committed as soon as you send it: it must be proposed in one block and committed in a later one inside the proposal window, so a fixed small number of mined blocks can still leave the old cell state. Before asserting, mine a couple of blocks at a time in a bounded loop and re-read the cell state until it equals the expected value or the retry limit is reached.

Why it matters: Without the bounded mine and re-read loop, the assertion can read the cell state before the Renew transaction is committed and fail with the old deadline, even though the transaction is valid.

Pattern

send(tx); const after = await readState(); assert(after...) → loop { mine(2); re-read } until the state matches or N tries are used up
Concepts
Testing and devnet
Evidence
From one fix: from one project, checked against its commit
First seen
2026-11-15
Last changed
2026-11-15
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)

More about Developer tooling

All 35 in this topic

Do you maintain a project this lesson came from? Confirm or correct it

Cite this lesson
LusoCryptoLabs, "Devnet commits need the proposal window", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/devnet-commits-need-the-proposal-window, CC BY 4.0, last changed 2026-11-15.

Drawn from public commits and checked against the commit each one came from and the project's code today. Read the source before you rely on one. Text under CC BY 4.0: credit LusoCryptoLabs, CKB lessons, with a link to the lesson. Want a lesson changed or removed? Open an issue.