| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
`GET /events/counts` gives each proposal on the current version the parties voting
`true` and `false` (`yes`, `no`), whether it passed and whether it is dead (`passed`,
`dead`), as the node reads its votes (`State::tally`, which the fold judges by too), so
that reading where a vote stands takes no fetch of every vote. A party's client still
decides its votes by the votes it checks itself.
|
| |
|
|
|
|
|
|
|
| |
Once a proposal passed on the current version, as the node's store reads, the node
writes it by a version event (`State::version_event`): on the `true` votes of the first
parties by name that pass it, each party's of the lowest ID, so that nodes holding
those votes write the same bytes, one event. It offers the event to its store first and
puts it only where it is taken: of two passing at once, it writes the one it takes, and
refuses the other as its own (`Holding::passed`, run by the store's worker).
|
| |
|
|
|
|
|
| |
A party's client votes by the record it keeps, and keeps the votes that made its party's
earlier proposal dead; it reads them from a node, and checks them itself, as each is
signed. `GET /events/counts` names the proposals on the current version, by their hash,
each with the events proposing it and the votes on it, by ID (`State::ballots`).
|
| |
|
|
|
|
|
|
|
|
| |
A node's store takes events from elsewhere than its document too: one put at its API is
offered to it first (`Holding::offer`), to say what became of it. Its operator has it
drop events it took after its checkpoint, with everything built on them
(`Holding::drop_taken`), and takes them back (`Holding::allow`), the document's events
then offered again (`docs/store.md`, A node's own). After each, what the node keeps of
its own is written to its file where it changed, and the members are as the store reads
now.
|
| |
|
|
|
|
| |
A swarm holding a store names its fold in its policy, `{"version": 2, "store":
"<fold>"}`: the fold's name is a constant of the fold, `federation` for the federation and
`test` for the fold made for the store's tests.
|
|
|
`Federation` is the store's fold for `docs/federation.md`. The state judging reads is
the state of an event's history, which the store builds from the checkpoint and that
history alone; so the version current there is the state's, the highest-numbered one
written, and a history holding two versions of one number is refused.
* A signed event's party is a party of the version current at its history. A write is
signed by a key among its party's (those of its key set that counts, else those its
version names) where a rule gives its party the place; a key set, node list,
proposal or vote by a key its version names.
* A vote is on the version current at its history, for a proposal proposed on it; a
`true` only where every other proposal its party backs on that version is dead.
Passing and dead go by the parties voting each way, a party with both counting for
both.
* A version event writes a proposal on the version current at its history, passed
there, which is a version changing that one; one naming a checkpoint names heads
after the current checkpoint at which it is current too, none in another's history,
the version event above them. A node keeps a version event only where it changes the
version it reads, or writes one it took.
* What counts is read by the current version: of each party's writes at a place it may
write, signed by a key among its party's, and of its key sets and node lists written
under a version at least their `since`, the latest, then the lowest ID. A checkpoint
keeps what counts at its heads and the proposals and votes on the version current
there; a fork's root what counts at its heads by its version; the members are the
nodes each party's node list names.
Tests take a federation through writes, a key set, a proposal passing, one yes at a
time, two versions changing one, a checkpoint and a node starting from it, and a fork.
Events are read with their signature checked once, where they are judged.
|