aboutsummaryrefslogtreecommitdiffstats

Checkpoints

A checkpoint writes down what counts at some heads, so that nodes forget the rest and hold what is relevant. The parties pass it as any version. The rules are the design's (federation.md, Checkpoints; store.md, Checkpoints).

What one does

A version may name heads for a checkpoint (checkpoint). A node taking it moves: it builds the checkpoint, the version current at those heads and the events that count there, forgets everything else before them and every event not above them, and refuses such events from then on. What it keeps is what judging needs: the version, every party's keys and node list, the values that count, the proposals on the current version and their votes.

What it loses: what counted no more before the heads, so a key added back or a place given back brings back nothing signed before them; votes on versions behind it, so a party that voted twice there shows only in the votes the parties' clients kept; and what isn't above the heads, which its party signs again (After a move, below).

Proposing one

A version that only moves the store on is the current one with the next number, the current version's hash as changes, and the heads as checkpoint (proposing-and-voting.md, Writing a version). The heads are events after the current checkpoint, at which the current version is current too, none in another's history, their IDs ascending: the heads a node shows (heads in GET /events) as late as you can, so that what was written before is in their history. Propose it then: the client signs the proposal on the heads its node shows then, above the ones it names, as it must be.

Like any version, it lapses the proposals on the version before: propose one where nothing that can still pass is proposed on the current version.

A node voting for its party by itself proposes checkpoints by its operator's rules: once it holds so many events beyond its checkpoint (--store-propose-events), so many versions changing more than moving to a checkpoint were written since it (--store-propose-versions, 1 unless set), or so long after its store moved there (--store-propose-every), at the heads it holds, no more than an event may name (64, which it merges first under a revision with merge events), where no proposal holds it back (voting-by-itself.md, Its rules); and it backs what it proposes.

Backing one

Back a checkpoint only where everything you held for a while before it was proposed is among its heads, in their history, or above them, proposals and votes aside, which lapse with the move: heads a proposer made up, built on little, would take back what was written since, a key set dropping a stolen key among it. A node voting by itself backs one only so, and so does a vote by hand through it (continuum-party vote … --through). A party's client voting on its own (continuum-party vote) checks no heads: check them yourself, or vote through such a node.

  • --store-follow PARTY,… has a node voting by itself follow those parties' true, by default on versions that only move to a checkpoint, and still by that rule, but not where a proposal changing more holds it back, as a node proposing one keeps to (voting-by-itself.md, Its rules).
  • --store-back-after (ten minutes unless set) has it back none before its store held its checkpoint, or ran, that long.
  • --store-nay-beside has it vote false on every other version only moving to a checkpoint, where it backs one that can still pass: of two checkpoints proposed at once, the other dies, and its backers are free.

After a move

A write signed on heads from before the move, still on its way, is refused (it isn't above the checkpoint's heads). The client signs it again, on the heads its node shows:

continuum-party --node http://tv:secret@localhost:3000 --key tv.key --record tv.record \
  again

Votes and proposals aren't signed again: their version is behind.

Nodes that weren't there

A node reads its store at every start from its document's checkpoint, or from the one its operator pins (--store-checkpoint), which it finds in its document. Until a remake leaves out what a checkpoint forgot, the document holds what came before, and a node that was away builds the checkpoint from it as any. After such a remake, a node away across it, or joining, takes the checkpoint only where its operator pins it: ask a node you trust for it (checkpoint in GET /events) (running-a-node.md, Joining).