diff options
| author | tv <tv@krebsco.de> | 2026-11-18 20:12:04 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-18 21:17:57 +0100 |
| commit | 7404dcef34dbad11a5ac2a6b8a27836b01c82635 (patch) | |
| tree | 9f2f55ad01130e454f6c6e9f308b459caadea6e9 /src/federation/attacks.rs | |
| parent | 657765cc512743c248d71b852b4f2e81fa124af7 (diff) | |
events: why no party's client backs a proposal
`GET /events/counts` gives each proposal on the current version `none`: why a party's
client backs it not (`client::backable`), where it is no version as this node reads it,
none changing the current one, or one naming the heads of the current one's checkpoint;
else `null`. So a node shows that a proposal is none, and why, before it passes: one that
passes all the same is never written, or, no version here, the node stops at its version
event. The dashboard shows it with the proposal, and `continuum-party proposals` says it
by the federation the client knows.
Row 48's test checks what a node shows of the proposal.
Diffstat (limited to 'src/federation/attacks.rs')
| -rw-r--r-- | src/federation/attacks.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/federation/attacks.rs b/src/federation/attacks.rs index 8782528..3f44ad0 100644 --- a/src/federation/attacks.rs +++ b/src/federation/attacks.rs @@ -928,6 +928,10 @@ fn federation_attack_48() { let mut bad = fed.first.after(on); bad.rules.push(("_continuum/x".to_owned(), s("tv"))); let proposal = fed.take(tv.propose(&[root], &bad.json())); + // A node shows why a client backs it not (`none` in `GET /events/counts`). + let state = fed.store.state(); + let why = super::client::backable(state.current(), state.proposal(&bad.hash()).unwrap()); + assert!(why.unwrap_err().contains("_continuum/x")); let yes = fed.take(tv.vote(&[proposal], on, bad.hash(), true)); let also = fed.take(lass.vote(&[proposal], on, bad.hash(), true)); fed.stops(harness::version_event(&[yes, also], bad.hash())); |
