aboutsummaryrefslogtreecommitdiffstats
path: root/src/federation/model.rs
Commit message (Collapse)AuthorAgeFilesLines
* federation: merge events, the first revisiontv18 hours1-12/+28
| | | | | | | | | | | | | | | | | | What builds on many heads merges them, but only an event a party writes: in a quiet federation, heads beside each other stay so, and past 64 no event is above them all. Revision 1 (`merge-events`) adds merge events: `{"merge": true}`, signed with a node's own key, the `key` its Ed25519 key, for the party whose node list names it. One counts for nothing, and only gathers what it builds on into the history of what builds on it. Under the base revision, signed by a node its party doesn't list, or by a party's key, it is refused; the model alike. Generated federations begin at either revision, and their nodes merge. A node voting by itself backs no version changing the revision, on any version neither: its party's operators vote on that one, once their nodes run a continuum that knows it. `federation.md` lists the revisions, says what a merge event is, and row 71 is tested (`federation_attack_71`).
* fold: of a party's lists, those written under the latest version firsttv20 hours1-4/+11
| | | | | | | | | | | | | | | | | | A key a version names, stolen, could write its party's node list at a history from before the version that named the party's keys anew: written under the version before, it counted, as naming keys anew leaves a list's `since` alone, and beside the list the party wrote under the new version the lower ID won. The thief signed a few, kept the lowest, and did so again after every list the party wrote. Of a party's key sets, and of its node lists, those written under the latest version now come first, then what no other has in its history, then the lowest ID; the model alike. A list the party writes under the version that replaced the key stays, as `federation.md` says. Key sets were safe already, by their `since`; one rule serves both. This changes what counts where two of a party's lists, written under different versions, are beside each other: nodes read them alike only once all run it. Row 69 is tested (`federation_attack_69`).
* model: stops at a version it doesn't readtv26 hours1-4/+32
| | | | | | | | | | | | | The model stops where `federation.md` says a node does: at a version event whose proposal passed at its history, isn't a version as this continuum reads it, and changes the version the model reads, it takes and refuses nothing more (`Verdict::Stopped`); beside that version, such an event is refused, as the node refuses it of its own. The property checking the store against the model runs on histories where parties propose such versions too (a field this continuum doesn't know): written in order, events come after what they build on, so both must stop at the same event, having taken the same before it, the adversary's two versions changing one among them. A check that some history stopped keeps the property from passing vacuously.
* federation: the model, a second reading of the federationtv3 days1-0/+530
The model (`docs/federation-tests.md`, The harness) reads the federation as `docs/federation.md` says, as plainly as it can: every event judged at its history read anew from the root, the version current there the highest-numbered written one, keys, key sets, node lists, votes, passing and dead, version events and the heads a version may name each worked out from that history alone; a node's own, the first of two versions changing one; and what counts read from everything taken. It keeps nothing but which events it took, and makes no checkpoint: slow and short, it is what the fold is checked against. A test takes it through a version passing, offered last event first.