You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stamp-revision: bound the lookups outside certifyTransaction by --timeout #18
Follow-up from the review of #16, where the conflict lookups inside certifyTransaction were brought under --timeout (2654c60).
stamp-revision makes three more proof lookups outside certifyTransaction. Each gets only the Ctrl-C signal, so a gateway that stalls on one keeps the command running past --timeout until fetch's own defaults give up:
Lookup
Where
When
Is this genesis already certified?
createOrRecoverLineage (src/lib/LineageClient.ts)
Before submitting a new lineage
Has a recovered genesis's lineage moved on?
findSuccessor (src/lib/LineageClient.ts), called from assertNotSuperseded
After recovering a genesis, before writing it
Was a journaled revision certified?
recoverRevision (src/lib/LineageClient.ts), called from recoverKept
At the start of an append for each kept journal, and again after ALREADY_CERTIFIED
--timeout is documented as the wait for the inclusion proof, so this isn't a contract violation, but a user who sets it would reasonably expect the whole command to be bounded.
Possible approach:
Give each of these lookups a deadline from --timeout, combined with the Ctrl-C signal, the way certifyTransaction does. Either one deadline per lookup, or one budget for the whole command; the latter is simpler to explain but changes what --timeout means.
Keep the outcome of a cut-off lookup the same as today's failure of that lookup:
createOrRecoverLineage: a timeout (SleepError, exit 3); nothing was submitted.
findSuccessor: the existing warning ("Could not check whether the lineage has later revisions"), and the genesis is written.
recoverRevision at start: a timeout, with every journal kept. After ALREADY_CERTIFIED, the journal is kept and the run still reports ALREADY_CERTIFIED, as the tolerant branch does now.
Tests can reuse tests/support/StallingClient.ts, whose lookups hang until their signal aborts.
Update the --timeout help text and the README to say what it bounds.
Activity