!4322odin/operator-blame-tracking → develop7f80152ff3

Per-node TSS blame tracking and keygen penalty escalation

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.

37commits
42files
11.0klines changed
583lines to read
1×→3×max standby keygen jail
+2queries
nonemigration / version gate

Where the diff is

4-minute explainer

What changed

Blame record

Four counters per node: lifetime and since-churn, keygen and keysign.

node_blame/<node address> keygen total keysign total keygen since churn keysign since churn

Penalty escalation

Standby/ready nodes: jail and bond slash × min(blames, cap 3).

blamedcount + 1mult = min(count, 3)jail, bond slash × mult

active nodes: flat 720 slash points, unchanged

Jail ladder

4,320 → 8,640 → 12,960 blocks, then held by the cap.

4,320 8,640 12,960 cap cap 12345

Counter reset

Members on Asgard success; everyone once the regular churn completes.

Asgard successmembers resetchurn completeall resetXMR successno reset

Bifrost timeout check

KeygenTimeout must be shorter than both keygen jail constants.

  • KeygenTimeout < JailTimeKeygen
  • KeygenTimeout < JailTimeKeygenBase
  • else log.Fatal at startup

Blame queries

One node, or every active validator sorted by a counter.

/thorchain/blame/node/{address}/thorchain/blame/nodessort_by · sort_order

State + upgrade

Constants / mimir

  • newJailTimeKeygenBase— (JailTimeKeygen 4,320 flat) → 4,320 (mocknet 30)
  • newMaxKeygenBlameMultiplier— (effectively 1) → 3 (0 = no cap)

New store record

NodeBlameRecord (prefix node_blame/)
+ node_address+ keygen_blame_count_total+ keysign_blame_count_total+ keygen_blame_count_since_churn+ keysign_blame_count_since_churn
Query service
+ NodeBlame /thorchain/blame/node/{address}+ NodeBlames /thorchain/blame/nodes

Line by line · every changed logic line, narrated

8:18runtime
14code chapters
100%logic lines narrated (419/419)
8flagged 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 held by the active validators. A regular churn may create several in parallel. docs/bifrost/vault-behaviors.md ↗
Bifrost
The node's off-chain signer and chain observer that runs TSS; it checks keygen timeout against jail times at startup. docs/bifrost/how-bifrost-works.md ↗
Blame
The list of nodes a failed keygen or keysign names as responsible. This MR counts each blame per node. type_node_blame.proto ↗
Churn
Periodic rotation of the active validator set into new Asgard vaults via keygen, retried every ChurnRetryInterval on failure. docs/bifrost/vault-behaviors.md ↗
Jail
A release height before which a node can't be chosen for churn. Standby offenders now get JailTimeKeygenBase × multiplier blocks. docs/mimir.md ↗
Mimir
On-chain admin/node-voted overrides of constants. MaxKeygenBlameMultiplier is read through mimir; the jail base is not. docs/mimir.md ↗
since_churn counter
Blames counted since the node's last reset; drives the keygen penalty multiplier. Lifetime totals never reset. keeper_node_blame.go ↗
Slash points / bond slash
Slash points cut an active node's rewards; non-active offenders instead lose bond worth the rewards of FailKeygenSlashPoints × multiplier. docs/mimir.md ↗
TSS keygen / keysign
Threshold-signature key generation for a new vault, and signing with a vault. Failures name blamed nodes. docs/bifrost/tss.md ↗
XMR monovault
A separate FROST-keygen vault for Monero. Its keygens are ignored by both blame resets here. xmr_monovault.go ↗