From 7404dcef34dbad11a5ac2a6b8a27836b01c82635 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 18 Nov 2026 20:12:04 +0000 Subject: 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. --- src/api/events.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/api/events.rs') diff --git a/src/api/events.rs b/src/api/events.rs index bd6db70..496a077 100644 --- a/src/api/events.rs +++ b/src/api/events.rs @@ -17,6 +17,7 @@ use serde_json::{Value as JsonValue, json}; use super::auth::AuthenticatedUser; use super::{ApiError, error_response, store_status}; +use crate::federation::client; use crate::federation::fold::Federation; use crate::federation::fork; use crate::federation::jcs::Json as Jcs; @@ -124,7 +125,9 @@ async fn event(State(state): State, Path(id): Path) -> Respons /// `GET /events/counts`: what counts, as the store reads now: the current version, each /// party's keys and nodes, the values at places, the members, and the proposals on the /// current version, each with the events proposing it, the votes on it, the parties -/// voting `true` and `false`, and whether it passed and whether it is dead. +/// voting `true` and `false`, whether it passed and whether it is dead, and why a party's +/// client backs it not, where it is no version that can be written on the current one +/// (`client::backable`). async fn counts(State(state): State) -> Response { with_store(&state, |store| { let read = store.state(); @@ -152,6 +155,9 @@ async fn counts(State(state): State) -> Response { .into_iter() .map(|(hash, ballot)| { let tally = read.tally(current, &hash); + let none = read + .proposal(&hash) + .and_then(|proposed| client::backable(current, proposed).err()); ( hash.to_string(), json!({ @@ -161,6 +167,7 @@ async fn counts(State(state): State) -> Response { "no": tally.no, "passed": tally.passed, "dead": tally.dead, + "none": none, }), ) }) -- cgit v1.3.1