!5341itz/parity-c3-outbound-guard → itz/parity-c2-errata-pending-liquidity8f8b151b5c

UTXO outbound-already-paid guard + observed-outbound query (parity C3)

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.

6commits
39files
2.6klines changed
978lines to read
no gatenew consensus write
field 11query proto

Where the diff is

Where the guard sits

SignTx now checks for a live payment, from local and network candidates, before signing.

newchanged

3-minute explainer

What changed

Paid, then paid again

Rescheduled outbounds slip past the payload-keyed signer cache.

vault A paysreschedulevault B pays

Guard in SignTx

Found or ambiguous: nothing is signed this round.

not found → signfound → skipambiguous → skip

Bounded, never trusted

256 candidates, 1024 reads, 30s; every hash re-read on chain.

  • 256 reported candidates
  • 1024 daemon reads
  • 30s deadline

Split legs

Skip only when a matching proves every look-alike leg paid.

1 pay · 2 legs → sign2 pay · 2 legs → skip

Vault snapshot

Live scan unchanged; guard trusts its own churned-vault records.

getTxInvaultSender=falsesame result

Observed-outbound query

Ranked consensus first, capped at 256, in proto field 11.

ob_linkrankcap 256response

Consensus link write

New ob_link_consensus state on every outbound, no version gate.

ungated state write

State + upgrade

Hard-coded limits

  • newmaxReportedOutboundCandidates256
  • newmaxOutboundGuardDaemonReads1024
  • newoutboundGuardTimeout30s
  • newmaxObservedOutboundsPerInbound32
  • newmaxObservedOutboundQueryScan1024

State and fields added

KV prefix ob_link_consensus/
+ inhash → []outhash (consensus only)
QueryObservedTxVoter
+ observed_outbound_tx_ids = 11
bifrost leveldb observed-outbound-v1-
+ ≤32 hashes per inbound (local)

Line by line · every changed logic line, narrated

10:34runtime
17code chapters
100%logic lines narrated (733/733)
9flagged 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

Asgard vault
A TSS vault that holds and pays out funds. Vaults churn, so an old payer may no longer be in the current Asgard list. client_internal.go ↗
LookupAmbiguous
Guard result when a local record can't be checked; SignTx treats it like found and does not sign this round. outbound_guard.go ↗
Maximum matching
The largest assignment of payments to distinct actions they fit; PaymentsCoverTargets uses it to prove each look-alike leg is paid. outbound_cover.go ↗
Memoless outbound
An outbound with no OP_RETURN memo; nothing ties it to its inbound on chain, so the guard skips it.
Observed tx voter
THORChain's record of node observations for one transaction; the query now lists outbounds reported against an inbound. query_tx.proto ↗
Parity cluster
A batch porting shipped mainnet 3.21.1 code to public develop; C3 stacks on C2 (!5339).
Signer cache
Bifrost's local leveldb of payloads already signed or observed; it now also indexes observed outbounds by inbound hash. signer_cache_store.go ↗
TxOutItem
A scheduled outbound: chain, destination, coins, max gas, memo and the inbound hash it pays.