!5313fix/solvency-halt-unbroadcast-outbounds → developc0e2224751

Keep a solvency halt until the vault's gap is covered

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
19files
1.3klines changed
495lines to read
3 / 0new lag / hold constants (blocks)
nonemigration

Where the diff is

When a solvency halt lifts

Outbounds released after the cutoff stop hiding the gap; flagged vaults hold the halt

newchanged

3-minute explainer

What changed

The halt/unhalt cycle

Queued outbounds outgrew the gap, so a short vault unhalted

haltqueue > gapunhaltpay outhalt

Release cutoff

While halted: only outbounds pending before halt+3 count

halt+3countstill in wallet

Replaced outbounds followed

An original counts while LackSigning's copy is still unsent

copy still unsent → original countscopy observed or missing → doesn't countcopy replaced again → follow itmigration / consolidation → neither

The halt keeps its height

Insolvent reports no longer refresh the halt height

halt h=1200insolvent reportstill h=1200

Flagged vaults hold the halt

Until the vault's own solvent report, which Bifrost now sends

Active ✓flagged insolventInactive / no funds ignored

State + upgrade

Constants (Mimir-tunable)

  • newSolvencyHaltSigningLagBlocks3
  • newSolvencyHaltHoldBlocks0 (until solvent)

Mimir writes changed

SolvencyHalt<Chain>Chain
+ keeps the height the halt began at (no per-report refresh)+ not reset to 0 while another funded Active/Retiring vault is flagged insolvent
SolvencyHaltVault-<pubkey>-<chain>
+ now the height of the latest insolvent report (was the first); rewritten each report

Line by line · every changed logic line, narrated

9:33runtime
15code chapters
100%logic lines narrated (416/416)
11flagged 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

Bifrost
The node's chain client: scans external chains, reports solvency and signs outbounds. It stops signing a chain while it is halted. bifrost/ ↗
BlankTxID
Sentinel OutHash that marks an outbound as replaced by a copy rather than sent.
Insolvency flag
Per-vault, per-chain Mimir set to the height of the vault's latest insolvent report; excludes it from inbound addresses and can hold a halt. handler_solvency_helpers.go ↗
LackSigning
Keeper step that replaces outbounds unsigned past their signing period: it blanks the original's OutHash and adds a copy at height+period, rounded up, possibly on another vault.
Mimir
On-chain key/value overrides voted by nodes or admin; halts and the per-vault insolvency flags are stored as Mimir values. docs/mimir.md ↗
RecoveredVaultReports
New Bifrost helper: while halted, picks the solvent vaults THORChain still flags insolvent, so each chain client reports them and their flags clear. runners/solvency.go ↗
RescheduleCoalesceBlocks
LackSigning rounds a copy's height up to a multiple of this; the halted scan reaches back this much further.
SolvencyHalt<Chain>Chain
Mimir holding the height the solvency checker halted a chain at; 0 means not halted, 1 a manual indefinite halt. It now keeps the start height. docs/mimir.md ↗
SolvencyHaltHoldBlocks
New constant, default 0: a flagged vault holds the halt until it reports solvent. Mimir can set a window as a way out for a vault that can't report. docs/mimir.md ↗
SolvencyHaltSigningLagBlocks
New constant, default 3: blocks after the halt height in which Bifrost may still sign. Halt height plus this is the release cutoff. docs/mimir.md ↗
StopSolvencyCheck<Chain>
Mimir that turns off the solvency checker for a chain, used to lift a halt by hand. docs/mimir.md ↗