CKB Pulse

All lessons · Developer tooling · Start here · Glossary

Reset devnets instead of skewing the chain clockWorkingFrom one fix

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

Pushing devnet timestamps ahead leaves the chain clock skewed for every later run, which stalls services that compare the tip with wall time. Reset the devnet for each scenario. At the start, assert that |tip timestamp − now| is small, for example under 600 s.

Why it matters: Without a reset and the precondition, a rerun on the same devnet starts with the chain clock hours or days ahead, so the runners idle and the scenario fails with timeouts instead of a clear message.

Pattern

start-up step that advances median time +1h and mines blocks on a long-lived devnet -> reset the devnet and add a precondition asserting chain-clock skew < 600 s
Concepts
Testing and devnet, Since and time locks
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
partly right: a true core, with a part that is loose or too wide

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, "Reset devnets instead of skewing the chain clock", CKB lessons, https://pulse.lusocryptolabs.com/learned/tooling/reset-devnets-instead-of-skewing-the-chain-clock, 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.