!5340itz/xrp-sequence-resync-determinism → develop257d81097a

XRP signer reads the validated sequence and confirms delivery before 'sent'

AI-generatedEverything on this page was written by an AI agent from the diff: the summaries, the narration, the diagrams, the flags and the glossary. It can be wrong or incomplete, so check it against the code before you rely on it.

11commits
7files
1.1klines changed
426lines to read
0consensus changes
1tx in flight / vault

Where the diff is

3-minute explainer

What changed

Divergent caches

SeqInc let nodes sign different sequences for one outbound

node A 102node B 100✗ no party

Chain read every sign

signingMetadata: positive pin first, else validated-ledger account_info

pin > 0?validated ledgersign

Serial drain

One outbound per vault in flight; pins never moved

pipelinedserial

Sent means delivered

tef* accepts confirmed by own hash; validated tec* re-signs

tesSUCCESS: senttec*: resignnot found: retry

Vault lock + drain gate

Defer signing while the open ledger is ahead of validated

open seq > validated?ErrTxPendingretry next round

Tests

Determinism, pin rules, every broadcast result path, the lock

byte-identical signingtec → ErrResignRequiredtxnNotFound never resigns

Line by line · every changed logic line, narrated

8:36runtime
13code chapters
100%logic lines narrated (349/349)
10flagged spots
speed

Chapters

What to check

Ask an AI about this change

Chat assistantClaude, ChatGPT, … (reads a link)

Coding agentClaude Code, Cursor, … (reads the repo)

The context file is context.md. Use Copy with context for an AI that can't open links; it pastes the whole file in.

Glossary

Account sequence
XRP's per-account nonce; each transaction must carry the next unused sequence or it is rejected. XRPL docs ↗
Checkpoint
Metadata saved from a failed sign attempt; its positive sequence pins every retry and is never moved. client.go ↗
ErrResignRequired
Broadcast error telling the signer to drop the signed bytes and checkpoint and sign again. errors.go ↗
Keysign
TSS signing where vault members each sign the same bytes; differing bytes mean no party forms.
LastLedgerSequence
Optional XRP tx field that expires it after a ledger; XRP outbounds here don't set it, so old signatures can stay valid.
SeqInc
Removed per-broadcast bump of the deleted node-local sequence cache (XrpMetaDataStore). metadata.go ↗
Serial drain
At most one outbound per vault in flight, because the sequence only advances on confirmation.
tec / tes / tef
XRPL result-code classes: tes success; tec failed but fee and sequence consumed; tef rejected before applying (e.g. tefPAST_SEQ, tefALREADY). XRPL result codes ↗
telCAN_NOT_QUEUE
rippled local error: the transaction could not be queued, seen on the backed-up XRP vaults.
Validated ledger
The latest XRPL ledger the node has seen reach consensus, versus the open ledger with tentative, per-node transactions. client.go ↗