Repository navigation
feat(shared): the account list's signers - #4009
Conversation
… an entry it is shown shared/account-list-signers.ts keeps, from an entry's adds, power and ends alone, who may sign the account's signed list; tells what a member of a given level does with one entry that holds; and takes one answer of the log entry by entry: loose entries, the footing, going back, and another history under the footing. Nothing calls it yet. Its test reads the vectors of the next commit. Co-authored-by: sisyphus-dev-ai <[email protected]>
49 JSON files, one for each case the test names: 38 in signers/ and 11 in unreadable/. Each fixes the entries a member holds, what it is shown, and what it ends with. Co-authored-by: sisyphus-dev-ai <[email protected]>
…once each It read each twice before it awaited: once for its size, once to copy it. An entry whose parts read otherwise the second time was refused, and a signature of another length then stopped it with signature_invalid where its form was at fault. Each is now taken once, judged and copied. Co-authored-by: sisyphus-dev-ai <[email protected]>
…fore a signature is awaited shownEntries kept the caller's member and answer and read them again after each signature it awaited. A list id changed meanwhile came back in the state, though the entries had been checked against the first one, and an entry signed for the other id was then taken; a footing, a row, the answer's entries or its head changed meanwhile changed what the member did. It now copies the member's entries, state and rows and the answer's entries and head before it awaits, as entryHolds does for an entry and the entry before it, and builds what comes back from those copies. replayEntries reads its list id and its proof once. Co-authored-by: sisyphus-dev-ai <[email protected]>
shownEntries kept a row of the caller's as it was when the row was frozen. A frozen object may still carry a field as an accessor, and such a field was read after a signature was awaited: a row whose power read bound when the answer arrived and full once the signature was checked let its signer add a key, where the entry is passed over. Each row is now copied by its four fields into a new frozen row before the first await, and only the copies are read. Co-authored-by: sisyphus-dev-ai <[email protected]>
…y a spread
A spread takes an object's own enumerable fields alone, and a place, a
row or a state may carry its fields as getters that are inherited, or
its own and not enumerable. shownEntries copied the answer's head, the
state and its footing with a spread. A head of that kind was copied as
{} and held for no place, so a member that is shown another entry 0
under its footing went on where it must stop, stuck; a state or a
footing of that kind was refused with an error. judgeEntry spread the
state and the row of a key it ends: the state it gave had no level and
no list, and the ended row lost its power. A row that a state's rows
hold as a property of their own that is not enumerable was a row for
signerPower and none for an answer, for judgeEntry's new rows and for
readSignersState.
The head, the state, the footing and each row are now read by the fields
their types name into new frozen objects, before the first await. A
state's rows are listed by every name they are held under, as rowOf
reads them, and a list of texts is copied through the list. No object
spread of a state, a row, a place or a held entry is left. A state that
comes back has its six members alone.
Co-authored-by: sisyphus-dev-ai <[email protected]>
…anded in is read once signingPlace looked at the place of the head it was shown and never at its hash. A member whose footing is entry 0 and that was shown another entry 0 was given a place on its own entry: it could sign on a history that the log does not show. A head at or under the footing must now be the member's own entry at that place, or the member places nothing; an answer stops on the same head as stuck. readSignersState read the footing's seq and hash several times, so a footing that read 0 while it was checked and 999 when it was copied came back as 999. They are read once. So are the held entry's hash in firstSignersState, the member's entries in listHead, and in judge the state's members and each row the entry names. Co-authored-by: sisyphus-dev-ai <[email protected]>
Several functions read a field of a caller's object more than once. judgeEntry looked up the key an entry adds for the reuse check and again to write its row, so a key that read otherwise in between had its row replaced where the entry is passed over. It read the rows a second time for the state it gives, so a signer could come back ended by an entry that ended nobody. One reader for each type (a place, a row, a state and its rows, a list of texts, a member, an answer, a held entry) now reads each field once, by its name, into plain frozen data. Every exported function takes what it is handed through them when it is called, and reads those copies alone. A proof is handed the copies, and what it answers is read once. Every state the module gives is frozen, with its footing and its rows. The rows that an answer or a replay writes are one copy, made when an entry first writes a row and frozen when the answer or the replay ends. One test hands every exported function, and entryHolds and firstState, objects behind a Proxy whose fields read otherwise at each reading after the first, and from the moment a signature is being checked. Each gives what it gives for plain frozen data of what they first read. The comment of shownEntries said that a caller asks after the member's head or its footing. It now says how an answer that is read in parts goes on: from the place where the part before ended, which the caller knows and no result names. Co-authored-by: sisyphus-dev-ai <[email protected]>
A held entry was copied with its objects and shared its bytes. A proof could write over the bytes of the entry it was handed, when it was asked or later, and the entries that came back then held those bytes and not the ones whose signature was checked. plainHeld now copies each list of bytes, and a proof is handed a copy of its own. readSignersState took a saved row whose by cannot be the signer of the entry that made its key a signer: null at level 1, or a key that was bound, came in later or was ended before. A member read from such a state decided otherwise than the member that saved it. The reader now holds by to that rule. For the rule to hold of every state the module gives, a proof is asked only above level 1: level 1 defines no kind that lets a key in. replayEntries and firstSignersState took a level that readSignersState refuses, so a member they made could not be read again. A level is a whole number from 1 for all of them now, and for a state that is handed in: any other is the caller's mistake, a RangeError. The last test of the file reads again, from its saved form, every state that the tests were given by a function that makes one. Co-authored-by: sisyphus-dev-ai <[email protected]>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
…hind A key that a proof let in could come back after an ends ended it: an adds of it was lawful, where an adds of a key that an adds had made is passed over as key_reused. It came back with the power the adds named and could add and end keys. An adds of a key that was ended is now key_reused, whoever made it a signer. A new vector shows it: adds-for-ended-proof-key. A member that is behind still asked the proof and let the key in, though it lets nobody new in then. No proof is asked while it is behind. judgeEntry took an entry of another list and moved the footing onto it. That is the caller's mistake: a RangeError. The comment of readSignersState now says where a saved state must come from: the member's own store. Co-authored-by: sisyphus-dev-ai <[email protected]>
A member that is behind does not know every signer: a kind it cannot read may have let a key in on a proof. When a signer then ended that key, the member passed the entry over as already_out and kept nothing of it, so a later adds made the key a signer for it, with full power, where the member that heard the proof passes that adds over as key_reused. The key that such an entry adds had the same fault: added again later, it took the later power. While it is behind, a member now holds out each key without a row that is named by an entry it passes over as already_out, the key it ends and the key it adds: no adds gives it a row after that. The keys are kept in the state, as `out`, each with the place of that entry; a state that holds none has no such member. readSignersState reads them again and holds them to what the module's own states hold. This is caution, not knowledge. What a signer that the member does not know did, it cannot know: after an update it replays every entry it kept by its new level, and that replay says who may sign. One vector's expected state changes with it: the member of adds-and-ends-one-key-level-1 is behind when it passes such an entry over, so its state now holds that key out. A new test takes every vector at every level from 1 to the highest it names and compares what the members take. Co-authored-by: sisyphus-dev-ai <[email protected]>
A member that heard a proof could let a key in while a member of a lower level was not behind: where no signer had signed an entry of that level before the key's entry, or where that entry carried v 1. The lower member then held no row for the key and was not behind, so it kept nothing when a signer ended the key, and a later adds made the ended key a signer for it. A proof is now asked only for an entry of a level above 1 that the list already needs: one whose v is above 1 and at most what the list needs before it. A signer of power full has then signed an entry of that level, so a member that cannot read the key's entry is behind before the key appears, and holds out what it cannot place. No vector changes. Five tests asked a proof for an entry of v 1; each now has a signer's entry of level 2 before it and asks for an entry of v 2. The comment of the keys a member holds out names the cost of that caution: a key that never was a signer, ended all the same while the member was behind, is held out too until the member replays. Co-authored-by: sisyphus-dev-ai <[email protected]>
A member that is behind went on with what it knew. It could not hear a proof, so a key that a later kind let in had no row for it, and what that key did, or what a signer did to it, the member could not place: it took an adds of a key that had ended itself, kept a signer that the other members had ended, and so held other signers than they did. Holding out the keys of an entry it could not place did not mend that: it kept such a member from a key that the others then added. Behind, a member now goes on only while it holds what a member that reads everything holds. One entry alone can part the two: an entry for which a proof may be asked, of a level above 1 that the list already needs, with no adds and no ends, by a key that has no row. There a member that is behind stops, and takes no entry until it replays after an update: needs_replay, in a replay and in an answer, and `stops` from judgeEntry. Until then it has passed over what every member passes over, and its rows and its footing are theirs. The keys it held out are gone from the state. A proof is handed a copy of the state of its own, frozen, with rows of its own: what it keeps or writes changes nothing that the member holds. Two vectors change. The member of loose-same-then-list is one of level 2 now: a member of level 1 stops before it could hold those entries. The member of adds-and-ends-one-key-level-1 holds the first two of its entries and is shown the others: it stops at the key's first entry. Co-authored-by: sisyphus-dev-ai <[email protected]>
The stop was returned and not held. A later answer could show another entry in the place where a member that is behind had stopped; it took that entry, its footing moved on, and it placed an entry to sign there, on another continuation than a member that reads everything holds. The stop is a member of the state now: needs_replay, the place of the entry. It is saved and read again with the state. While it is set, an answer ends with needs_replay again whatever it shows, judgeEntry gives `stops`, and signingPlace places nothing. A replay of the member's own entries starts anew and sets it only where the member stops again. The expected state of adds-and-ends-one-key-level-1 gains the stop. Co-authored-by: sisyphus-dev-ai <[email protected]>
A replay of a member's own entries started anew. Those entries end before the place where the member stopped, so it came back not stopped: an app that replays at every start could place an entry to sign at that place again, and take another entry there. replayEntries is handed the place that the member's saved state holds, as needs_replay, and keeps it in the state it gives unless the replay takes the entry at that place. A level that cannot judge that entry stops there again; a replay of the member's own entries alone leaves it stopped, by any level. To go on, a member replays its own entries together with the log's from that place on, by a level that can judge them. A saved state may so be stopped and behind no more. Co-authored-by: sisyphus-dev-ai <[email protected]>
The stop that a member keeps held only a place. A replay that took any entry in that place cleared it: another entry that the log held there by then, or a loose entry of the member's own, by the same level. The member could then sign again without having read the entry it stopped at. And a replay that was told nothing of a stop gave a member that was not stopped. The stop is the entry's place and its hash now, in the state and in its saved form. replayEntries must be told it: the option stop is required, a place and a hash, or null for a member that had not stopped. A replay clears the stop only by taking that very entry. The stop stays where the replay ends, or itself stops, before that place. Another entry in that place is another history: the replay stops there with chain_broken, stuck, which a replay's result now says, and the stop stays. To go on, a member replays its own entries together with the entry it stopped at, whose text its caller keeps. A member that stops in an answer drops its own loose entries from that place on, as it does for any entry that holds there, so its copy ends before the entry it stopped at. A generated test found that. It makes 250 histories from the vectors' keys, the same in every run, and holds each level below the one that reads everything beside it: as a replay, as answers, and after loose entries that the log has since replaced. It replaces the random test whose keys were new in every run. The expected state of adds-and-ends-one-key-level-1 holds the stop in its new form. Co-authored-by: sisyphus-dev-ai <[email protected]>
A replay by a lower level than the one that stopped, told that stop, may be unable to place an entry before it. It cut the member's copy there and said it had stopped at that earlier entry, while the state kept the stop it was told. The entries between the two were gone from the copy, so no later replay with the entry that the app had kept could take the member on, by any level. Such a replay keeps the given entries up to the stop now, each holding on the one before it, without judging them: took holds what the level judged, and stopped names the stop it was told, so the entry in that place is always the one the caller keeps. The generated test gains that step: a stopped member is replayed by every lower level, and then by the level that reads everything with the entry it stopped at. Its lists now come to need level 2, and half of them level 3, with entries of the proof's kind after each rise, so that a lower level meets one before the stop. It makes 150 histories. Co-authored-by: sisyphus-dev-ai <[email protected]>
A replay by a lower level than the one that stopped, told the stop, kept the member's copy but gave a state of the entries that level could judge, an earlier place. In that state a key that the member's own copy had ended was a signer again, and signerPower said so, also after the state was saved and read again. Such a replay makes no member now: where its level cannot place an entry before the stop it was told, member is null, stopped names that stop, and the caller keeps the member it has saved. So a replay that is told a stop never gives a state of fewer entries than the member has judged. While a member is stopped its readers say so: signerPower answers null for every key and isBehind is true, also after a replay by a level that reads everything else. A replay's result names the stop of a member that it gives and that is stopped still, and says stuck. judgeEntry refuses an entry at or under the state's footing, as it refuses one of another list. The comment of replayEntries says what a stop that is not the member's own yields. One vector is new, unreadable/replay-by-a-lower-level, with a replay step that the test and the format of the vectors now know. The generated test draws a third of its histories freely, ends and adds again half the keys that a proof lets in, names its seed in every failure, and holds after every step that no member answers a power for a key that its copy has ended. Co-authored-by: sisyphus-dev-ai <[email protected]>
A replay was told only the member's stop. A replay by a level below the one that made the member, told no stop for a member that was not stopped, ended at the first entry that level could not place and gave the member of that shorter history: its footing moved back, and a key that a proof had let in was gone. Saved, it let another history in under the place where the member had stood. replayEntries takes the member's saved state now, required: the state its store holds, or null for a first replay of a member that has none. The replay never gives a shorter history than the saved member's, at any level, stopped or not. It reaches the saved footing, taking the very entry there, and for a stopped member the place before its stop; where it would end before that it makes no member, and the caller keeps the one it has saved. Another entry at the saved footing is another history: no member either. Entries that end before the saved member's history, or a saved state that does not read, are the caller's mistake. The generated test replays every member that is not stopped by every lower level, told its saved state: no member, or the same history. Co-authored-by: sisyphus-dev-ai <[email protected]>
readSignersState read a saved state the same at every level. A build of a lower level than the one that wrote it got that state back as it was, and could act on it with its own proofs: judge entries by rules of a level it does not read, answer for its signers, and sign. readSignersState takes the build's level now, required. A state that a higher level wrote is read back stopped at its footing: needs_replay is the footing's place and hash, unless the state is stopped already, and then it keeps its stop. So the build takes nothing, judges nothing, places nothing to sign and answers for no key through it, until a replay told that state takes the entry at its footing: by the build's level where it can reach it, or by the level that wrote it. A replay reads the saved state it is told at its own level. The generated test saves every member that is not stopped and reads it back by every lower build: stopped at its footing, with the same rows; replayed by that level, no member or the same history; replayed by its own level, the member it was. Co-authored-by: sisyphus-dev-ai <[email protected]>
Four guards of a replay told the saved state, and of the reader of a saved state, were reached by no test: each could go and the whole file still passed. Each has a test now, and with that guard taken out of a copy of the module, that test goes red: - a replay that begins with another entry 0 than the saved member's makes no member (list_mismatch); - one in which an entry under the saved footing does not hold makes no member: those are not the member's entries; - one that brings another entry at the saved footing, one that holds, makes no member (chain_broken): another history under it; - a stop at the footing that names another hash does not read. The comments of listHead and ListStop said that a stopped member's copy ends before the entry it stopped at. A stop at the footing, which an older build reads in a newer build's state, lies inside the copy: they say so now. The state type says in one line that a state from the store comes only through readSignersState. Co-authored-by: sisyphus-dev-ai <[email protected]>
|
@coderabbitai review |
Action performed
|
Merge passMerged head
Piece 2 of 4 of the relay series: the account list's signers (who may sign the list, with what power, and how a member replays the list's entries to reach that set). Three heads were reviewed; both reviews are clear at Confirmed by runs: a member that is behind stops, and while stopped no exported reader gives a signing power, a signing place or a judgement, including after a downgrade and after a save and reload at a lower or higher level. A generator of 3,072 histories (up to 60 entries, two members, saves and reloads at random levels between every step, a stop at every position; about 1.07 million checks) found no member holding a different signer set from an up-to-date member while neither stopped nor stuck. Piece 1's merged tests pass unchanged and the wire format is the same. Replaying 10,000 entries takes about 1.9 s. Low notes for the next piece:
|
Change
Adds the signers of an account's signed list as a library that nothing calls yet: who may sign an entry, what a
member does with each entry and each answer of the log it is shown, and what a member does that is behind. This
is the second of the four pull requests agreed in #3996; the first, the entry format, was #3997.
Refs #3996
What is in it
shared/account-list-signers.ts(882 lines, 9 exported functions) and its test,shared/account-list-signers.test.ts(210 tests).shared/account-list-vectors/signers/and 12 inunreadable/. The test also reads the 62 envelope vectors of the first piece, which are unchanged.entryHoldsinshared/account-list-entry.tstakes the body and the signatureof the entry it is shown once each. It read each twice before it awaited, so an entry whose parts read
otherwise the second time was refused with the wrong code. One new test there (128 in that file).
docs/account-list.mdis unchanged. It specifies one entry and says that who may sign is checked on top ofit; the signers' rules are stated in the comments of the module. The page's section on those rules and on the
format of these vectors comes with the third piece, the approval exchange.
and the state, and keeps to its own pace when an answer makes a member ask again (
asks_after).Who may sign
adds,powerandendsalone the module keeps who may sign. Entry 0's signer is the firstsigner; after it, a key is a signer only when a signer of power
fulladded it. A key that entry 0 or anaddsmade a signer is never made one again, and a key that was ended is never added again, whoever made it asigner.
KeyProof, the caller'sfunction). Level 1 defines no such kind. A proof may be asked only for an entry of a level above 1 that the
list already needs, that carries no
addsand noends, and whose signer has no row. It is handed frozencopies of its own, of the entry and of the state, so nothing it keeps or does reaches the member.
What a member does with an entry, and with an answer
rules. It passes it over, and nothing in it applies, when its signer is no signer or one of its fields is not
lawful:
signer_unknown,signer_not_allowed,key_reusedoralready_out. It cannot read it when itsvis above the member's level:
addsandendsstill apply. Otherwise it reads it.judgeEntryjudges oneentry past the state's footing: an entry of another list, or one at or under the footing, is the caller's
mistake, a RangeError.
shownEntriestakes one answer of the log, entry by entry. An entry whose signer is no signer is loose, andthe footing is the last entry a member holds that is not loose. Shown another entry that holds in the place of
a loose one, a member drops its own entries from that place on and takes what it is shown. Shown another
history at or under its footing, it stops and says
stuck.signingPlaceplaces a member's next entry onlyon its footing, and only when the head it is shown is its own entry there.
replayEntriesreads a member's own copy from entry 0, by a level, told the member's saved state, and nevergoes back.
readSignersState(value, level)reads a saved state again, at the level of the build that readsit.
Being behind, and the stop
fullsigned an entry above its level. Behind, it goes on onlywhile it holds what a member that reads everything holds: the same rows and the same footing. One entry alone
can part the two: an entry for which a proof may be asked, which a member that is behind cannot hear. There it
stops:
needs_replayin an answer and in a replay,stopsfromjudgeEntry. Until then it has passed overexactly what every member passes over.
needs_replay, the place and the hash of the entry the member stopped at(
{seq, hash}), saved and read again with the state. While it is set the member takes no entry, judges noneand places none to sign, whatever it is shown, and its readers answer for nobody:
signerPoweris null forevery key, and
isBehindis true. Its copy ends before that entry: where it stopped in the place of looseentries of its own, those are dropped, as for any entry that holds there. Only a stop at the footing lies
inside the copy: an older build reads a newer build's state stopped at its footing, and a replay of the copy
clears it, by the level that wrote it or by one that reaches the footing.
replayEntrieshas a required option,saved: the member's saved state, ornullfor a first replay of amember that has none. A call that does not say it does not compile, and is refused when it runs. The replay
never gives a shorter history than the saved member's, at any level, stopped or not: it reaches the saved
footing, taking the very entry there, and for a stopped member the place before its stop. It clears the saved
stop only by taking that very entry, the one with that hash in that place, by a level that can judge it; in
every other case the stop stays in the state the replay gives.
ends there with
chain_broken, and the stop stays. Another entry at the saved footing is another history too,and makes no member. A replay's result says whether the member it gives is stopped:
stoppednames themember's stop, also one that it did not come to, and
stuckis true.under the saved footing, or before the saved stop. It makes no member then:
memberis null,stoppednamesthe saved stop, and the caller keeps the member it has saved. So no replay gives a state of fewer judged
entries than the saved member's, whether that member was stopped or not.
readSignersStatetakes the build's level,required, and reads a state that a higher level wrote stopped at its footing (
needs_replayis the footing'splace and hash), unless it is stopped already, which keeps its stop. So that build takes nothing, judges
nothing, places nothing to sign and answers for no key through it, until a replay told that state takes the
entry at its footing: by the build's level where it can reach it, which gives a state of that level, or by the
level that wrote it. A replay reads the saved state it is told at its own level.
What a caller must do
Nothing calls the module yet, so these are requirements on the next pieces.
readSignersState(value, level), at the build's level, and hand it toevery replay:
{ saved: state }, or{ saved: null }for a first replay of a member that has none. Both arerequired.
nullis the caller's own word that there is no saved state: a member whose saved state is lost,or does not read, must not be replayed as a first one.
stopped.seqwhen the member firststops. Its hash is
needs_replay.hash, which tells it from any other entry shown in that place later. To goon after an update, the member replays its own entries together with that entry, by its new level, and then
asks the log as it always does. The log may replace that entry if it was loose, so without the kept text the
member cannot go on. A stop at the footing needs no kept text: that entry is in the copy.
readSignersStatechecks its form and that it agrees with itself; it does not prove that some history leads to it. A caller
that loads a state from anywhere else must replay the entries.
signerPower, notstate.signers, before trusting a key. While the member is stopped it answers nullfor every key.
What the functions are handed, they take once
place, a row, a state and its rows, a list of texts, a member, an answer, a held entry, a replay's stop) reads
each field once, by the name its type gives it, into plain frozen data of the module's own, and from then on
the function reads that copy alone. So what a caller's object says at a second reading, or once a signature is
being awaited, decides nothing. Nothing is taken by a spread, which takes an object's own enumerable fields
alone.
needs_replaywhen the member stopped, and no other. A level is a whole number from 1, for the functions that make a state
and for
readSignersStatealike, so no member is made that cannot be read again.shownEntriessays so. A part that shows only entries the member holds changes nothing and asks nothing, so acaller that asked only after the member's head or its footing would be shown that part again each time.
Default behaviour is unchanged
Nothing in
server/,src/orapp/imports either module, and no othershared/file does: the signersmodule imports the entry module, and the two test files import them. Nothing in those folders imports files by a
glob. The module has no top-level effect and reads no environment.
OVIS_PREVIEWis read in one place,server/preview.ts, and nothing there or behind it reaches the library. So a release behaves as main does, withOVIS_PREVIEWunset or set: there is no caller to switch on. Neither the built client (dist/) nor a bundle ofserver/main.tsholds any of the module's strings (see Validation). The rest of the change is tests andvectors.
Known limits
asked it stops, also when that proof lets nobody in. So one entry of that shape, by any key, holds every
member that is behind where it is, and a member that cannot be updated stays there.
entry and the log has replaced it, the member is stuck for good: another entry in that place is another
history.
signerPoweris null for every key, also for the keys thatwere signers when it stopped. So nothing can be trusted through a stopped member until a replay has taken the
entry it stopped at.
nullas the saved state is the caller's word. The module cannot tell a member that has none from one whosesaved state was lost: told
null, a replay forgets a stop, and a level below the one that made the member maygive the member of a shorter history.
For the reviewer
and its test are best read whole, at the tip. In order: the module and its test; the vectors; the change to
entryHolds; five that settle how the functions take what they are handed; one for a proof's bytes and forwhat a saved state may hold; one for an ended key and an entry of another list; one for the level at which a
proof is asked; and ten for a member that is behind. Of those ten, the first held keys out; the second
replaced that by the stop; the third keeps the stop in the state; the fourth keeps it through a replay; the
fifth makes it the entry's place and hash and has every replay told it; the sixth kept the copy through a
replay by a lower level; the seventh makes such a replay give no member, and has the readers of a stopped
member answer for nobody; the eighth has every replay take the saved state, and never give a shorter history
than it; the ninth has
readSignersStatetake the build's level, and read a state of a higher level stopped;the tenth gives a test to each of four guards that no test reached, and says where a stop at the footing lies.
The vectors are 14,261 lines of JSON that nobody reads by eye: the second reading below checks them by script.
shownEntries: whether an answer of the log can move the footing onto an entry that no signersigned, make a member drop an entry that a signer signed, or keep it asking. Then at
judgewith the caller'sKeyProof, at the loop ofreplayEntrieswith its stop, and atreadSignersState.a member which reads everything passes over, and holds the same rows and the same footing; and once it has
stopped, it places no entry to sign and takes none until a replay takes the entry it stopped at.
before anything depends on it. For this piece the question is less one of cryptography than of a log kept by a
service that may lie.
Validation
On a branch cut from main
46e93483, Linux x64, Bun 1.4.2 (Node 24 here, where CI has Node 22), withOVIS_PREVIEWunset.bun run check fast, on another machine of the project's, from this exact tree: every step ok (workflowsyntax, generated types and themes, typecheck, build) but unit tests, 18,323 pass, 3 fail, 44 skip in 985
files. The three are
scripts/self-hosted-runner.test.ts, "job-started hook, isolated", which fail the sameway on main on that machine: its own environment, not this branch, which touches only
shared/.bun test ./shared/account-list-signers.test.ts ./shared/account-list-entry.test.ts: 338 pass, 0 fail (210and 128).
bun run typecheck: clean.levels. As far as a member goes it has passed over what a member of a higher level has, and holds the same
rows and the same footing; in 10 runs it stops short, each time for a replay.
every run but for their signatures; a failure names the seed and the case. Two thirds rise in steps: the list
comes to need level 2, and in half of them level 3, with entries of the levels it needs by then. A third are
drawn freely: any level from 1 to 3 in any order, by any key. Entries add and end keys, do again what the
entry before did, or are of the kind whose proof may let a key in; half the keys that a proof lets in are then
ended and added again. Each history is taken by every level below the one that reads everything: as a replay,
as answers a few entries at a time, and after loose entries that the log has since replaced.
entries, and neither may answer a power for a key that those entries ended: so the test holds a rule, not only
two levels against each other. Every member that is not stopped is saved and read back by every lower build:
stopped at its footing, with the same rows, answering for nobody; that level's replay of it, told the state it
read, makes no member (81 of 278) or the same history, never a shorter one; and a replay by the member's own
level, told that state, gives the member back. For each of the 148 members that stopped, 53 of them at a loose
entry that the log has since replaced, it runs: the saved state read again, also by every lower build, where
it keeps its stop; answers that show the entry it stopped at, another entry, and the rest of the log; a replay
at start by the same level and by a higher one; a replay by every lower level (80 of them, 26 of which make no
member); and the way to go on, with the entry it stopped at and with another entry in that place.
project's: no failure. There, 4,653 times a member that was not stopped was saved and read back by a lower
build, and each time it was stopped at its footing; that level's replay of it made no member 1,386 times, and
never a shorter history. With one mistake put back at a time it fails: an ended key that a proof had let in
added again;
signerPoweranswering while the member is stopped; a replay by a lower level making a member ofa stopped one; a replay not saying that the member it gives is stopped; a replay by a lower level giving a
shorter history of a member that is not stopped; a lower build reading a saved state of a higher level as it
was, not stopped.
its own kept them, which the sixteenth commit mends; and, with its downgrade step, a replay by a lower level
that cut the member's copy, in 7 of its 150 histories on the module of the sixteenth commit. Each of those
shapes has a fixed test of its own as well.
entryHolds). In the order of thecommits: an entry whose body or signature reads otherwise the second time; a list id changed while a signature
was checked; a frozen row whose power read otherwise once the signature was checked; a head that carried its
fields as getters of its prototype; a member whose footing is entry 0, shown another entry 0, and given a
place to sign; a proof that wrote over the bytes it was handed; a saved row whose
bybreaks its rule, and amember made for level 0; a key that a proof had let in, ended and added again; a proof asked while behind; an
entry of another list; three histories in which a member that is behind came to hold other signers than one
that reads everything; a stop that was returned and not held; a replay that came back not stopped; a replay
that took another entry in the stopped place, or was told nothing of a stop; a replay by a lower level that
cut the member's copy; a state from such a replay in which a key that the member's copy had ended was a signer
again; a replay by a lower level that gave a shorter history of a member that was not stopped; and a saved
state of a higher level that a lower build read back as it was, not stopped.
entryHoldsandfirstState, objects behind a Proxy whose fieldsread otherwise at each reading after the first, and from the moment a signature is being checked: 20 calls,
each giving what it gives for plain frozen data of what was first read. It also checks that each call tells
the two sets of values apart. That test and three others wrap
crypto.subtle.verifyto change what the callerholds while a signature is checked; each restores the runtime in a
finally. Four tests hand in objects whosefields a spread does not find. The last test of the file reads again, from its saved form, every state that
the tests are given by a function that makes one.
library, its own P-256 arithmetic checked first against RFC 6979 A.2.5. It reads one entry by the rules of
docs/account-list.md. No page states the signers' rules, so it takes those from the sentences of themodule's comments and of its tests' names, written again as rules. It gave the expected result for 51 of 51
vectors: what the member did with each entry, its state, for the 20 that show an answer of the log its head,
where it stopped and whether it is stuck (7 go on, 3 stop, 9 are stuck, 1 asks again), and for the one with a
replay step what that replay gives. It recomputed 243 of 243 entry hashes, found
fieldsequal to the body'sfields for all 243, and found each of the 156 keys the vectors name to be one of their own test keys, whose
private half gives its public point. Twelve altered copies of the folders (an expected code, a character of an
entry,
stuck, a footing, a head, a stop's code, a proof's power, the place that ended a key, a level, thehash of a stop, the stop that a replay names, a member where a replay makes none) were each reported as a
mismatch. The same reader read every vector at every level, 78 runs: in each it came to what the library comes
to.
git rev-parsegives2861ca0c3f73555a0bade8311ad722674ed454e8forHEAD:shared/account-list-vectors/signers,8093514e68579f4120548e3a9a9ef5acf10304e6forunreadable, andc92dbc064fbb7eab607cf749177f3382be12f343forenvelope, which is main's.account-list-signersoutside its own test, and none ofaccount-list-entryoutsidethe two tests and the signers module.
signer_unknown,signer_not_allowed,key_reused,already_out,passed_over,cannot_read,needs_replay,ovis-list/1andentry_malformedare in no file of the builtdist/and not in a bundle ofserver/main.ts(bun build --target=bun), whileovis-account/1, whichshipped code uses, is in both.
bun run check full(nothing the integration and browser suites run imports this change), andnothing on Windows or macOS.