aboutsummaryrefslogtreecommitdiffstats
path: root/src/simtest/holding.rs
Commit message (Collapse)AuthorAgeFilesLines
* simtest: row 15 with joiners handed an epoch they can't checktv4 hours1-40/+57
| | | | | | | | | | 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.
* simtest: d, serving a higher made-up epoch, is apart from the otherstv4 hours1-2/+9
| | | | | | 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.
* simtest: row 15's made-up epoch is of a higher ID than the others'tv4 hours1-9/+13
| | | | | | | 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.
* simtest: in row 15, the joiner reads as the node serving it doestv4 hours1-6/+9
| | | | | | 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.
* simtest: row 31's later write builds on what is above the checkpointtv4 hours1-2/+2
| | | | | 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.
* simtest: made-up epochs handed to a node holding a store (rows 15, 31)tv10 hours1-0/+176
| | | | | | | | | | 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).
* simtest: the remake rows of a swarm holding a storetv10 hours1-5/+396
| | | | | | | | | | | | | 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).
* simtest: events written beyond a compaction's base go again (row 12)tv11 hours1-0/+92
| | | | | | 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.
* simtest: nodes started from a store's root synced before a test takes them aparttv14 hours1-1/+3
| | | | | | | 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.
* peer: a member's message before its handshake was taken asks for onetv14 hours1-1/+43
| | | | | | | | | | 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.
* simtest: a fork whose root doesn't read as its heads do, found by who holds themtv15 hours1-1/+101
| | | | | | | | | `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.
* document: the changes founding a fork's swarm, built from its root and what ↵tv15 hours1-2/+2
| | | | | | | | | | | 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).
* simtest: two checkpoints proposed at once, the one not backed dying by the naystv15 hours1-1/+134
| | | | | | | | `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.
* simtest: a writer forked, its events reaching both sidestv15 hours1-0/+59
| | | | | | | `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.
* simtest: a group naming many nodes is not every node's neighbourstv15 hours1-1/+51
| | | | | | | `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.
* simtest: a proposal kept alive by its proposer alone holds back no checkpointtv15 hours1-1/+79
| | | | | | | | `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.
* simtest: keys voting twice part honest nodes; their operators bring them backtv15 hours1-0/+110
| | | | | | | | `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.
* simtest: a node away while the others moved to a checkpointtv15 hours1-0/+88
| | | | | | | | `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.
* simtest: different events to different peers, read alike once togethertv15 hours1-37/+205
| | | | | | | | | `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.
* simtest: a swarm holding a store, its members and a node its party doesn't listtv16 hours1-0/+94
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.