Todas as lições · Developer tooling · Começa aqui · Glossário
Devnet commits need the proposal windowPráticoDe uma correção
De uma correção · Verificação: certa · Verificada em 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.
Porque importa: 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.
Padrão
send(tx); const after = await readState(); assert(after...) → loop { mine(2); re-read } until the state matches or N tries are used up- Conceitos
- Testing and devnet
- Evidência
- De uma correção: de um projeto, verificada contra o commit
- Vista pela primeira vez
- 2026-11-15
- Última mudança
- 2026-11-15
- Última verificação
- 2026-11-19
- Verificação contra o commit
- certa: a lição sai do commit e continua a valer no código de hoje
Fontes (1)
- 2026-11-15 · psawyerberlin/ckb-revocable-timelock · mais deste projeto
Mais sobre 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
Manténs um projeto de onde esta lição veio? Confirma ou corrige
Citar esta lição
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.