| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
An event's `key` was spelled out; the keys a version and a key set name, and node IDs,
weren't, and whether a version is one hung on it: a key's base64 not canonical, a
comment, 32 bytes that are no Ed25519 key, a key twice in a set, a node ID in capitals
or twice. Keys are spelled as `key` is, with no comment, their 32 bytes an Ed25519
public key; node IDs as continuum spells them, `continuum:` and 64 lower-case hex
digits; and none of either twice in a list. The example version loses its keys'
comments.
|
| |
|
|
|
|
|
|
| |
The design named the blob's hash and key, and said a signature is checked as continuum
checks a user's, which takes `sha256` beside `sha512`, and any reserved field. Only the
signer can vary that field, as it is signed, but one builder asked it empty and another
didn't. It is empty, as `ssh-keygen` writes it, and the hash `sha512`, beyond what
continuum's check asks.
|
| |
|
|
|
|
| |
256 KiB hold arrays some hundred thousand deep. A JSON reader stops at a depth of its
own, or none, or falls over: two builders' nodes parted on such an event. An event
nests objects and arrays up to 32 deep, its own object the first.
|
| |
|
|
|
|
|
|
| |
Integers were asked of values alone. A proposal holding `1.5` or `1e21` is good JCS, so
to judge it a builder needed all of ECMAScript's number printing, for this alone, and
one reading integers only took it for no event. Numbers anywhere in an event are
integers from −2⁵³ to 2⁵³, and strings anywhere are whole Unicode characters: floats,
and the hardest part of JCS with them, go.
|
| |
|
|
|
|
|
|
|
|
|
| |
The sizes federation 1 allows listed a party's keys "in its version or its set" among
what makes an event none, while a proposal is taken whatever version it holds: a
proposal giving a party 17 keys was no event to one builder, and a proposal that is no
version to another, who parted at the first event with it in its history. The list now
says what of an event makes it none (its size and dependencies, a key set's keys, a node
list's nodes, a write's path, its values), and a version is none where it gives a party
more keys than a key set may hold, more nodes than a node list, or a rule a longer path
than a write's.
|
| |
|
|
|
|
|
|
|
|
| |
A vote on a version naming a checkpoint was taken only where it was above the heads. It
follows from the version event's being above them: the version event is taken only
there, and with it every vote it is written on, as everything in the history of an
event above some heads that isn't in theirs is above them. Two rules are left: the
proposal is a version only where it is above the heads, and a version event writing it
is taken only where it is above them. A vote cast beside them binds its party as any
yes does, until the move refuses it; an honest client builds only on what is above them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`true`
By default a node followed a party's `false` on any proposal. Where that party and its
followers are more than a third of the parties, one key, the one kept on a node, ended
every proposal, the one naming that key anew among them. By default a node now follows
only on a version that only moves to a checkpoint, both ways, and following on any
version, `false` among it, is its operator's choice.
The follower's `false` was also how a proposal nobody else backs stopped holding back
automatic checkpoints. Instead, a node proposing a checkpoint goes ahead beside a
proposal it wouldn't back that nobody backs but its proposer; it still waits for any it
would back, or that others back.
|
| |
|
|
|
|
|
| |
A node following a party backed a proposal that party proposed, but a proposal binds its
proposer to nothing: its followers were bound by their yes, and the party it followed
was free to back another. A node follows a `true` only, and one proposing a checkpoint
backs it, so that the nodes following its party back it too.
|
| |
|
|
|
|
|
|
| |
A party votes from one client, and may have one node vote by itself, but nothing put the
two together: a node following a party's `false` on a proposal, and its operator backing
the same proposal from a client, is a party voting twice, honestly. So such a party
votes by hand only through that node, which keeps the party's one record of its votes
and refuses a vote the record forbids.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for a while
A version that only moves the store on refuses what isn't above its heads, which its
proposer chooses: heads built on little, just after the latest version event, would
take back what was written since, a key set dropping a stolen key among it, and the
stolen key would count again; a node following a `true` on checkpoints, or a voter
checking only the version's fields, would back it unseen.
So a party's client and a node voting by itself back a checkpoint only where everything
they held for a while before it was proposed is among its heads, in their history, or
above them, and a node shows what the heads lack, as for a fork. It is the voter's rule,
by its own clock; nothing more is judged. A row for the attack table, and the property
of votes a node casts by itself, say so.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A merge, a fork at heads of several stores, named every party's keys anew, so that a
party wrote its key set again before anything a key of its set signed counted there;
and kept each side's values side by side, so that a value a party replaced on one side
came back where the other side's write had the lower ID. Letting the other side's
parties in, by a version or a fork naming them, who sign again what they keep as a
party's client signs again what a move refused, does the same with nothing new.
So a fork is at heads of one store: the fold makes its root from that store's state,
and the store from its own heads (`Store::fork`). Merges' rows go, those after them
move up, and Roads not taken says why, with merging in place.
|
| |
|
|
|
| |
store.md, federation.md and federation-tests.md said none of them was built; the store
held in memory is, with a fold made for its tests and their properties.
|
| |
|
|
|
|
|
| |
A node starting from a checkpoint its operator pins holds neither the checkpoint before
it nor the events between, so it can't check that the version naming its checkpoint
names heads after the one current at that version, at which that one is current too. It
takes that on its operator's word, and so takes the version, as every node did.
|
| |
|
|
|
|
|
|
| |
A version names checkpoint heads after the current checkpoint, and now heads at which
that checkpoint is current too: the version naming it is among them or in their history.
Without that, the version naming the current checkpoint could be after the next one's
heads: every node that moved there holds it, and one starting from that checkpoint,
which can't check heads before its own, couldn't judge it as they did.
|
| |
|
|
|
|
|
|
|
| |
An event above some heads has each of its dependencies among them or above them, not
only them all in its history. The store holds after its checkpoint only events whose
dependencies are its heads and the events after them, and so it holds every event above
them: one naming an event before them as well is refused by a node that moved, and never
taken by one starting from the checkpoint, which never held what it names. Tests show it
for an event offered after the move and one taken before it.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`federation`, a feature of its own, builds what `docs/federation.md` and
`docs/store.md` design, stage by stage; without it continuum builds and behaves as it
does. The aliases build with it, and `docs/development.md` says so.
Its first part is the store's: an event's ID, the SHA-256 of its bytes written as 64
lower-case hex digits and read back only so, and the `Fold` trait as `docs/store.md`
gives it. The trait reads a checkpoint's parts too, the heads it was built at and the
events it keeps, which a node taking a pinned checkpoint needs; the design names it.
Nothing uses either yet, but a test.
|
| |
|
|
|
|
|
|
| |
A checkpoint holds its version itself, the object, as a root without heads needs. The
current checkpoint at a history, which a version's checkpoint heads are judged against,
is the one named by the last version of that history's chain that names one, or else
the root: a question of the history alone. A node still joining is one continuum's
lifecycle has as `Joining`, until its first sync is done.
|
| |
|
|
|
|
|
|
| |
A proposal kept alive to hold back automatic checkpoints is seldom a version that only
moves to one, so followers who followed only such versions stayed silent when the party
they follow voted it `false`. By default a node now follows a `false` on any proposal,
which can only end one, and a `true` only on a version that only moves to a
checkpoint; following a `true` on any version stays its operator's choice.
|
| |
|
|
|
|
|
| |
As any member may decide a compaction, and the lower of two epochs for one is followed,
a member can grind a remake's ID until its epoch's is lower, and have every node on the
honest epoch rejoin, once a generation. No event is lost, as a node that rejoins puts
again what it held; the attack table says so.
|
| |
|
|
|
|
|
|
|
|
|
| |
An epoch's first change, and a fork's changes after it, carry no node's signature, so
the rule that a change carries one now sets them aside. Their writer, derived from the
root or from the remake, is one anyone can compute, so it writes exactly the changes
every node builds, and any other change under it is refused: nobody commits a change of
that writer and number before the one every node builds, and parts the nodes. The
genesis change writes the policy (a map, keys sorted), the swarm's ID (a string) and the
root, in that order; a fork's kept events fill its later changes in the order of their
IDs, each up to 1 MiB of events.
|
| |
|
|
|
| |
As the document judges structure alone, the store on Automerge is also checked for
honest nodes holding one document, whatever each takes from it.
|
| |
|
|
|
|
|
|
|
|
| |
With each `true` it casts, a party's client keeps the votes that made its party's
earlier proposal dead, so that once a checkpoint left them out, nothing names its party
as voting twice; and a party votes from one client, as two backing two proposals at
once is voting twice. A node proposing a checkpoint by itself waits only for proposals
that can still pass, and one that nobody but its party backs is ended by the nays of the
party a node follows and its followers. Stage 3 builds the client: signing events,
keeping its votes and the nays that freed it, and signing again what a move refused.
|
| |
|
|
|
|
|
|
|
|
| |
Nothing in a fork's root says who started it, so its version is no longer held to
naming anew the node lists of the parties that start it; its founders name theirs, so
that their nodes are members. A merge's kept events are in none of each other's
histories, so a place its party wrote on two sides counts the lower ID, whatever either
side's history held, alike for nodes that check the root and nodes that take it on their
operator's word. What the federation asks of the store says forks of one store or
several, as the store does.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A checkpoint keeps the events that count at its heads but version events, as it holds
the version itself, and a version event of it that comes later is one a node took. Its
heads are events after the current checkpoint, none in another's history, ascending, one
at least, and a proposer names heads it has held for a while. Once a checkpoint passed,
a node joins from a pinned one: from the root, keys long replaced could grow another
chain, and node lists naming only their own nodes would seal a joining node in it; a
node still joining that is shown two versions changing one takes neither. A node drops
only what it took after its checkpoint, and undoes a move only by a pin; a version named
again where it isn't above its checkpoint's heads isn't taken.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
`key` is `ssh-ed25519`, one space and the key's padded, canonical base64; `sig` the
SSHSIG blob of version 1, hashed with `sha512`, whose key is `key`, in padded,
canonical base64, checked strictly as continuum checks a user's signature. An event
whose `key` or `sig` doesn't read back to itself is none, so nobody but its signer
makes another event, under another ID, of what a party signed. Federation 1 allows
events of up to 256 KiB with up to 64 dependencies, 16 keys a party, node lists of up
to 64 nodes, paths of up to 32 segments of up to 255 bytes, and in values integers
within 2^53 and whole Unicode characters. A party's name is a user name, `@` among its
characters.
|
| |
|
|
|
|
|
|
|
|
| |
The fold makes a fork's root, from the states at heads of one store or several and
what makes the fork; a node checks a fork's root by it. The state carries what judging
needs of history, as the federation's carries the graph of its events, and the state is
the same for the set a node takes, which its own refusals may make depend on order. The
root is taken before the fold sees any event. A genesis change's writer is the first 16
bytes of the root's ID, and a fork's kept events follow its genesis change in changes
of up to 1 MiB, in the order of their IDs.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A checkpoint's heads are events after the store's checkpoint, none in another's
history, and are held by their IDs after the move, so that what builds on them is
taken; "above" says so more plainly, and that no head is above its own heads. A node
drops only events after its checkpoint, as every later event builds on what the
checkpoint keeps, and undoes a move only by a pin. Until the next remake the document
holds what a node forgot, and a node away syncs it; after it, a node that can't build
the checkpoint pins it. A node joins from a pinned checkpoint, and from the root only a
store that never moved: from the root, what came before a checkpoint can be grown anew
by what the fold refuses since.
|
| |
|
|
|
|
|
|
|
|
|
| |
A remake changes no event, so of two epochs decided for one a node follows the lower
ID, and a node on the other rejoins it: no operator has to name one. A node follows a
decision whichever node coordinated it, as a decision reaches it only through a member.
Old epochs are no longer synced: a node that lacks the base rejoins, keeping its own
checkpoint and reading what is above its heads, and a later checkpoint it can't build it
takes where its operator pins it. After a switch a node puts again only what the new
document lacks, after a random wait. An epoch's first change writes the policy too, and
the snapshot leaves out events nobody takes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
A change of a swarm holding a store is judged by what it is alone: it puts new keys
under `_continuum/events` whose bytes hash to them, writes its node's own protocol data,
carries its node's signature and is one Automerge writes. The store reads the events
the document holds and takes them as it would from anywhere, each once it holds its
dependencies, judged at its history; the rest stays in the document until the next
remake. So a fold's verdict, a node's own refusal or a checkpoint refuses no change,
nodes no longer drop and rebuild their documents at a move, and honest nodes hold one
document whatever each reads from it. Membership is no longer judged at a change's
history; a node keeps its own refusals and drops in a file of its own. Events are put
again only where continuum refuses a change on its own, as of a writer's two changes of
one number.
|
| |
|
|
|
|
|
|
|
|
|
| |
A plan, the contract the code is built to: the fold and the store tested as pure code,
events in and verdicts and states out; a model written plainly from the design, which
the store is checked against; every rule by its smallest scenarios; every attack row a
test named by its table and number, and a test that every row has one; the promises as
properties over generated histories, every order for small ones and seeded ones beyond,
cut down before they are printed; the store on Automerge checked against the store in
memory; simulations with an adversary node; fixed vectors for every encoding; fuzzing
and mutants in longer runs. All of it behind the `federation` feature, by stage.
|
| |
|
|
|
|
|
|
|
| |
A node that moved to a checkpoint after a remake's base, and switches to it, would have
refused the snapshot for the events it forgot, and stayed apart from the nodes that
switched. It keeps its own checkpoint instead, and reads none of what the snapshot holds
that its checkpoint forgot, as it reads none of it in the old document; only its own
refusals and its operator's drops keep it where it is. A snapshot's checkpoint before
its own is one it takes.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Groups that parted come together by a fork at heads of several stores, which merges
them. Its version's `changes` lists the versions current at those heads and is
numbered one past the highest; it names every party's keys and node list anew, so that
no key set or list of any side counts; and its root keeps, of each side, the values
that count there at places the merge's version gives their party. A value counts in the
merge once the key that signed it is among its party's keys there, so a key one side
dropped brings back nothing unless the party lists it again. A party's place written on
two sides leaves the lower ID until it writes again; an identifier given to different
parties goes by the merge's rules. Merging in place, both stores voting to move to one
checkpoint, is a road not taken.
|
| |
|
|
|
|
|
| |
A fork's root may be a checkpoint at heads of several stores, which merges them: it
keeps what its fold takes of each. A node holding the history up to all those heads
builds it and checks it, and one that doesn't takes it on its operator's word, as with
any fork; neither the fork nor the stores it came from take each other's events.
|
| |
|
|
|
|
|
|
|
|
| |
A party may have one of its nodes vote and propose for it, by rules its operator sets
and nowhere written in the swarm: following a party it names, backing what that party
proposed or backed and voting `false` where it did, by default on versions that only
move to a checkpoint; and proposing such a version once conditions its operator sets
are met, where nothing else is proposed. The node keeps to what a party's client keeps
to, one node a party votes by itself, and it holds a key the party's version names,
which a thief takes with it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A version may name heads for a checkpoint: what counts there written down, as those
heads, a version and the IDs of the events that count there. Once a node takes the
version, it moves to the checkpoint, forgets what came before but what it keeps, and
refuses every event not above the heads. The proposal, its votes and the version events
writing it must be above them, so that moving refuses nothing that decided it. Judging
after a checkpoint reads only what counts, which it keeps; what it loses is what counted
no more before it, and what isn't above its heads, which its party signs again.
A federation's root is its first checkpoint, and a fork's root a checkpoint at the
heads it forks at, which nodes holding that history check and others take on their
operator's word. A node checks everything back to its checkpoint, which it built itself
or its operator pinned. Checkpoints any member makes are a road not taken.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A store holds a checkpoint, the state at some heads written down (those heads, the
events before them its fold keeps, and what the fold says of the rest), and the events
after it. The fold says when a node moves to a later checkpoint: the node builds it
itself, forgets what it doesn't keep and every event whose history lacks its heads, and
refuses such events from then on, so that it holds what is relevant and nothing else. A
checkpoint a node can't build, as it was away too long or joins, it takes only where
its operator pins it.
A store's root is its first checkpoint, and a fork's root a checkpoint at the heads it
forks at, which nodes holding the history up to them check, and others take on their
operator's word. On Automerge, a remake's snapshot holds the store as it is at the
base, so what a checkpoint forgot leaves the document there.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The federation is the store's fold. What a party signs is an event: a JCS object naming
its dependencies, signed with an SSH signature by one of its party's keys, or by nobody
for a federation's root, a fork's and a version. An event names no swarm, no version
and no place in the document: its history says which store it is in and which version
it is written under.
A place is a path a rule matches, its value the latest write its party signed there
that counts: one that no other counting write there has in its history, and of several
the one with the lowest ID. Key sets and node lists are read the same way. A vote,
proposal, key set and node list is an event of its own kind, a passed proposal takes
effect by a version event, and a node takes a version only where it changes the one it
reads, as before.
A fork is a store whose root builds on the heads it forks at, carrying their history,
so that any node checks it from its events alone. What carries the store, its document
and its remakes, the federation leaves to `docs/store.md`, with the promises and attacks
about them; the attacks left are numbered anew.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A set of events that only grows, each named by the SHA-256 of its bytes and naming
those it builds on, judged at that history so that every node judges it alike, and read
together as one state. What the events are, how one is judged and what they read as is
a fold's, a trait the federation is the first to implement.
Its first home is a swarm's Automerge document: each event is bytes at
`_continuum/events/<ID>`, a change writes events and continuum's protocol data only,
and a node puts again every event it doesn't refuse of a change it refuses or drops, so
that which change carries an event changes nothing. A compaction's snapshot holds the
events at its base, and every event beyond it is put again: remakes, rejoins and a
writer's two changes of one number change no event a node holds, and the fold never sees
them.
It says what is promised, a node's own refusals and drops, forks carrying their root's
history, members by the fold, where Automerge sets limits, its attacks, and what its
tests check. Nothing of it is built; all of it is to be behind the `federation` feature.
|
| |
|
|
|
|
| |
"Why it holds" said a node takes a version only where it changes the one
the node reads, where the design has it take one it took, written again,
too.
|
| |
|
|
|
|
|
|
| |
What counts no more stayed, the text said, until a snapshot or a fork's
genesis left it out where it is or names a version before the current
one. But each holds a place's value alone: an envelope that isn't it,
behind another or a dropped key's, goes whatever version it names, and
a key added back brings back what it signed within the epoch only.
|
| |
|
|
|
|
|
|
| |
Since a party new in a version has its list named anew there, every party
has a list in every version from the one that let it in; the field said
lists were for the parties a version named one for. The example gave
makefu, its keys named anew at 7, none, and was no version. The field
says every party's, and the example gives makefu an empty list since 7.
|
| |
|
|
|
|
|
|
|
| |
A node follows no remake whose coordinator its party doesn't list, but a
node holding two decisions for its epoch followed neither, whatever they
were: a node taken off its list, by deciding a remake nobody follows,
still kept every node holding its decision from following an honest
remake of that epoch, until operators named one. A decision whose
coordinator isn't listed is none of the two.
|
| |
|
|
|
|
|
|
|
| |
A node refused the changes its operator had it drop. But any member
writes a version once it passed, and a change writing the dropped version
anew, by a lagging node by chance or a listed adversary at will, was none
of those: the node took it, as it changes the version the node reads, and
a node its operator was moving across a remake stayed. The node refuses
any change writing a version among those it dropped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bound was judged at a change's history, as any rule is, so it
counted only the writers in that history: writers started side by side,
each at a history holding none of the others, were each within it, and a
party flooding on purpose passed it as often as it liked. Counted for a
party, it let one node gone wrong use up the room of all its party's
nodes for the rest of the epoch.
It goes. A party whose nodes start writers without end runs the others
out of memory: denial of service, which breaks no promise. Its writers
name its node, and the node's entry its party; a remake leaves an
epoch's writers behind, and the others fork without the party.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Read whole after the last series of changes, the design said a few things
that no longer fit what it says elsewhere:
* the example's version 7 named lass's keys anew at 4 but gave lass no
node list, where a party new in a version has its list named anew;
* a remake reaches no node that can't build it, nor one that isn't to
follow it (not a member at the base, its coordinator unlisted);
* the clause on whose word follows a decision sat after a colon meant for
the abort;
* what a node taken off its list could commit before a base ends with the
remake only where the base holds that list;
* a remake racing a listing leaves behind the nodes listed since the base,
not "the nodes that took it";
* "Why it holds" now names the coordinator's listing;
* attack 29: a node that lacks the base syncs it where a peer keeps it;
* forks come at stage 4, so before it no swarm starts afresh by one;
* a party drops a stolen key of its set itself; only one its version
names takes a version.
|
| |
|
|
|
|
|
|
|
|
| |
A version's `since`, where it doesn't name a party's keys or list anew,
is the `since` the version it changes gives the party, not that version's
number. A version written again is one a node took, and every node takes
it however often it is written. A forked writer's nodes are apart until
operators have one side drop what it took, or a fork. And a fork's
genesis leaves out continuum's own data, earlier epochs' metadata among
it, which a second clause said again.
|
| |
|
|
|
|
|
|
|
| |
A list had a `since` only for a party a version named one for. A party
taken out and let in again within an epoch had none unless the version
named it a list, so the list it left, signed with the keys it had then,
counted again at once, while its key set, its keys named anew, didn't.
A party new in a version has its list named anew there, empty where the
version gives it no nodes.
|
| |
|
|
|
|
|
|
|
| |
The bound on writers was a node's, and a party lists the nodes it
likes, a new list one envelope: the flood the bound was for cost a party
a list now and then. The bound is a party's: the writers its nodes start
in an epoch together, by the party each node's entry names, judged at a
change's history. Its figure leaves room for the writer an honest node
starts each time it starts, rejoins or drops, until a remake.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
A node taken off its party's list is a member at a history from before:
a remake's record, proposal and decision it writes there are taken, and
every node listed at its base follows, the snapshot listing the node
again until the list that took it off is replayed. "The next remake's
base" could be its own.
A node follows a remake only where the coordinator's party lists the
coordinator, as the node reads it when it switches; and what a node
taken off its list commits from a history before ends with a remake
whose base holds that list.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Continuum lets a member ack another remake of its epoch only once the
first is aborted, and in a federated swarm only the coordinator aborts:
a coordinator gone after proposing stalled every remake of its epoch.
Read the other way, as a remake left undecided binds nobody, members
moved on, and a coordinator back late decided beside the remake they
moved to: two decisions, from honest nodes alone.
Acks bind nobody: a member may ack another remake without the first
aborted, and an honest coordinator decides only while the acks it counts
are still for its remake.
|