| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
A node with an empty document can't tell an epoch made up from another it
can't check: either way it takes the snapshot's checkpoint only where its
operator named or pinned it. The others move to a checkpoint and compact;
f, joining and pinning nothing, doesn't take their epoch, and g, pinning
the checkpoint, takes it and reads what they read. A made-up epoch served
by d, an honest node besides, is row 31's alone: d follows the others'
epoch wherever it reaches them.
|
| |
|
|
|
|
| |
Reaching the others, d rejoins their epoch, the lower, as any node holding
a store does, and e, reaching only d, finds their epoch there, not d's. Cut
off from them, d stays on the one it made up.
|
| |
|
|
|
|
|
| |
Of a lower one, the others try to rejoin it every so often, as in row 31,
and f, rejoining their epoch, finds them away mid-sync and gives up for
that, not for its checkpoint. Of a higher ID, they leave it alone; e,
reaching only d, still takes it, as one joining takes the newer generation.
|
| |
|
|
|
|
| |
d, serving the epoch it made up, puts again there what its store holds, as
every node holding a store does: e, judging every event, reads what d reads,
the checkpoint the others moved to among it, not the root alone.
|
| |
|
|
|
| |
It builds on tv's write, the checkpoint's head: one built on the root isn't
above the heads of the checkpoint the nodes moved to, and they refuse it.
|
| |
|
|
|
|
|
|
|
|
| |
d serves an epoch of the next generation it made up, of a lower ID than the
others', its snapshot holding the root as the document stood before the
checkpoint they moved to. A node joining with nothing that reaches only d
takes it, the root being what its operator named, and reads only what it
holds (15); one reaching only the others takes not their epoch, whose
checkpoint it neither builds nor has pinned (15); the others try d's, find
its root before their document's checkpoint, and stay on theirs (31).
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Simulations of the store's attack rows on remakes (`docs/store.md`,
Attacks): a snapshot other than its base's isn't followed (11); one
coordinator's two decisions for an epoch, shown to different nodes, end on
the lower epoch (13); a node away while the others switch rejoins and puts
again what it wrote meanwhile (16); after a compaction whose snapshot holds
a checkpoint, a node away all along follows only once its operator pins it
(24); a compaction whose base comes before a checkpoint, switched after
nodes moved to it, leaves them there, and a node starting with nothing
reads the new document to it (28); a member deciding many compactions at
once moves every node to the lowest epoch, losing no event (30).
|
| |
|
|
|
|
| |
A swarm holding a store compacts: events written beyond the base, on nodes
that switch later, are put again in the new epoch, and every node holds
every event, reads the same, and refused no change.
|
| |
|
|
|
|
|
| |
The simulations of swarms holding a store start their nodes from the root and wait,
besides each holding the store, until they synced: each took the others' handshakes and
holds their entries. So a test taking nodes apart right after starts from nodes that
know each other, as it means to.
|
| |
|
|
|
|
|
|
|
|
| |
In a swarm holding a store, a node reads a peer's messages only by the party its
handshake named. One whose handshake it hasn't taken (its reply lost, say) was cut off
at its next message, as a non-member is, while the peer, which took ours, synced on, and
neither said HELLO again. Now such a message goes unread, and the node says HELLO to the
peer, as to any whose reply it waits for (`hello_again_now`): its reply names its party.
What a peer refused as a non-member sends next is known to be a non-member's, its party
kept, so that it asks for no HELLO. A simulation loses a's replies to b for a while.
|
| |
|
|
|
|
|
|
|
| |
`federation_attack_33`: beside the fork a node holding the history makes, one whose root
leaves out tv's write, which counts at its heads. b, holding the history, builds the one
and not the other (`fork::check`). Each fork's founder starts its swarm from its root
and the events it keeps, and a node of lass joins each by its ID, taking it on its
operator's word, and reads what the root keeps: tv's write in the one, carried by the
changes founding its swarm, nothing in the other.
|
| |
|
|
|
|
|
|
|
|
|
| |
it keeps
A fork's root keeps events (`docs/store.md`, On Automerge): they follow its genesis
change in changes of the same writer, built the same way, filled in the order of their
IDs, events going into a change until their bytes there reach 1 MiB, the next event
beginning the next change (`events::founding`). A swarm holding a store starts from all
of them (`events::started`, given the events the root keeps; none for a federation's
root).
|
| |
|
|
|
|
|
|
| |
`federation_attack_59`: a for tv and b for lass, apart, each propose a checkpoint once
their stores took six events, and back it; c votes for makefu, following tv; each votes
`false` on a checkpoint beside the one it backs (`--store-nay-beside`). a and b,
together, vote `false` on each other's: the votes split. With c, tv's passes and every
node moves there; lass's is dead by the nays of tv and makefu, which their records hold.
|
| |
|
|
|
|
|
| |
`store_attack_10`: x1 and x2, tv's, start apart from one document under one writer,
and each puts an event: changes of one writer at one number. Together, the documents
part, each refusing the other's changes for good; the events reach every node, put
again from the changes refused, and every node reads the same.
|
| |
|
|
|
|
|
| |
`store_attack_19`: makefu lists five nodes, tv two, and lass one, whose operator names
tv's too (`--store-neighbour-parties`); each node keeps two neighbours by the graph
among all members. a and b keep each other, and c one of them, whatever makefu's nodes
are. The simulations' nodes started from the root may have their configuration adjusted.
|
| |
|
|
|
|
|
|
| |
`federation_attack_67`: makefu proposes a version and backs it alone. a votes for tv by
itself, proposing a checkpoint once its store took five events; b votes for lass,
following tv; each with its party's record, begun before the federation. a proposes a
checkpoint beside makefu's proposal, b backs it, a node writes it as it passed, and
every node moves there.
|
| |
|
|
|
|
|
|
| |
`federation_attack_49`: tv backs a proposal of its own with lass, and one of lass's
with makefu; b, apart, takes the other version than a and c. Together, they stay
parted, each keeping the version it took. b's operator has it drop what it took and
take the other side's (`Holding::drop_taken`, `allow`); or, where the versions named
checkpoints, starts it again from the checkpoint the others moved to, pinned. No fork.
|
| |
|
|
|
|
|
|
| |
`store_attack_24`: c is away while a and b take a version passing on tv's and lass's
votes that only moves to a checkpoint, move there, forget what came before, and take a
write after it. Back, c builds the checkpoint from the document, which holds what came
before, and reads what a and b read. What happens after a remake leaving it out comes
with the remakes.
|
| |
|
|
|
|
|
|
|
| |
`federation_attack_28`: tv, lass and makefu, a node each, apart while each is given its
own: two writes of tv's at one place, a write of lass's, and a proposal and the votes
that pass it, each on another node. Apart, each reads its own; together, they read the
same, the version that passed current, written by whichever node held it passed. The
simulations of swarms holding a store share their federation, their nodes started from
its root, and what they read of a node's store.
|
|
|
tv lists a and b, which start from the store's root; lass lists c, which joins by the
store's ID; d is of lass too, which doesn't list it. Events put on a and on c reach a,
b and c, which read them; d, which no member syncs with, gets nothing. A simulated node
started on a document expects its swarm, as `run` has it do.
|