Divi Games

Courses / The side-chain

The Divi checkpoint (MCHK)

Every block header carries divi: {height, hash}: a block of the Divi testnet chosen by the sequencer.

The six-block gap keeps the checkpoint away from a likely reorganisation at the tip.

Why it exists

  1. Dating. Every side-chain block is tied to a point on the Divi chain.
  2. Randomness. Games can use H(divi_checkpoint.hash || txid). A player cannot know a future Divi block hash when they sign, and the sequencer cannot choose it. See ctx.public_random.

Wire form

Used across the divi.domains side-chains:

"MCHK" || 0x01 || height u32 LE || hash[32]      (41 bytes)

The first four bytes are the ASCII tag, then a version byte, a little-endian height and the 32-byte hash.

The checkpoint is a read from Divi. The next lesson is the write back to Divi.