From d7d7a4de4274d45bbf491acf0e5adbf9857a10d9 Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 05:18:29 -0600 Subject: [PATCH 1/7] fix(sync): fence every key on a node that never saw a writer's open fence A node that joins, or gaps, after a strong write was announced cannot hold that fence, so it served the key from its own index. Every event carries the writer's oldest open write; when the first one a node sees from a writer is older than that event, the node answers every key from the origin until a later floor passes it. a_joiner_that_missed_a_fence_answers_from_the_origin failed 6 of 6 runs before this change. --- src/index/fleet.rs | 8 ++- src/index/pending.rs | 123 ++++++++++++++++++++++++++++++++++++++++--- src/sync/tests.rs | 95 ++++++++++++++++++++++++++++++++- 3 files changed, 216 insertions(+), 10 deletions(-) diff --git a/src/index/fleet.rs b/src/index/fleet.rs index 3f90ca3..79a6e99 100644 --- a/src/index/fleet.rs +++ b/src/index/fleet.rs @@ -346,13 +346,19 @@ impl super::KeyIndex { /// an origin rebuild discards it. Without the discard an install would /// carry pre-gap rows the donor no longer holds — a key the missed writes /// deleted, whose tombstone the donor's own rebuild forgot — as if they - /// were this node's own later effects. + /// were this node's own later effects. A pending write the gap hid fences + /// every key until the writer's floor passes it. pub(crate) fn discard_for_gap(&self, missed_through: &NativeCut) { let mut index = self .inner .write() .unwrap_or_else(std::sync::PoisonError::into_inner); index.skip_native_gap(missed_through); + index.pending.skip( + &missed_through.writer, + missed_through.epoch, + missed_through.sequence, + ); index.discard_buckets(); } } diff --git a/src/index/pending.rs b/src/index/pending.rs index 0e626da..2b8213e 100644 --- a/src/index/pending.rs +++ b/src/index/pending.rs @@ -8,6 +8,10 @@ //! to a gap is covered by the next event. What a writer's ended life left open is //! fenced as uncertain instead (see [`fence_uncertain_key`](super::fence_uncertain_key)): //! only the origin can say what it did. +//! +//! A reader that joined, or gapped, after a write was announced never held it, and +//! cannot tell which key it fences. Until that writer's floor shows nothing older than +//! the reader's first event is open, the reader answers every key from the origin. use std::collections::{BTreeMap, HashMap}; use std::ops::Bound; @@ -25,11 +29,21 @@ struct Life { open: BTreeMap, } +/// The writer life a reader last saw, and, while that life may hold a pending write +/// from before what the reader saw, the first sequence the reader did see. +struct Seen { + epoch: u64, + blind_below: Option, +} + #[derive(Default)] pub(super) struct PendingWrites { writers: HashMap, Life>, /// How many open pending writes fence each key, per bucket. keys: HashMap>, + seen: HashMap, Seen>, + /// How many writers in `seen` may hold a pending write this reader never saw. + blind: usize, } impl PendingWrites { @@ -39,15 +53,53 @@ impl PendingWrites { } fn fenced(&self, bucket: &str, key: &str) -> bool { - self.keys - .get(bucket) - .is_some_and(|keys| keys.contains_key(key)) + self.blind > 0 + || self + .keys + .get(bucket) + .is_some_and(|keys| keys.contains_key(key)) } pub(super) fn fenced_under(&self, bucket: &str, prefix: &str) -> bool { - self.keys - .get(bucket) - .is_some_and(|keys| first_under(keys, prefix)) + self.blind > 0 + || self + .keys + .get(bucket) + .is_some_and(|keys| first_under(keys, prefix)) + } + + fn set_seen(&mut self, writer: &[u8], seen: Option) { + let blind = seen.as_ref().is_some_and(|seen| seen.blind_below.is_some()); + let was = match seen { + Some(seen) => self.seen.insert(writer.to_vec(), seen), + None => self.seen.remove(writer), + }; + self.blind += usize::from(blind); + self.blind -= usize::from(was.is_some_and(|was| was.blind_below.is_some())); + } + + /// Note an event of `writer` at `seq`, carrying `floor`. The first one seen of a + /// life leaves anything open below it unknown here, until a floor at or above it. + fn see(&mut self, writer: &[u8], epoch: u64, seq: u64, floor: Option) { + let from = match self.seen.get(writer) { + Some(seen) if seen.epoch > epoch => return, + Some(seen) if seen.epoch == epoch => match seen.blind_below { + Some(from) => from, + None => return, + }, + _ => seq, + }; + let blind_below = floor.is_some_and(|floor| floor < from).then_some(from); + self.set_seen(writer, Some(Seen { epoch, blind_below })); + } + + /// A feed gap: every event of `writer` through `through` was missed. + pub(super) fn skip(&mut self, writer: &[u8], epoch: u64, through: u64) { + if self.seen.get(writer).is_some_and(|seen| seen.epoch > epoch) { + return; + } + let blind_below = (through > 0).then(|| through + 1); + self.set_seen(writer, Some(Seen { epoch, blind_below })); } fn hold(&mut self, writer: &[u8], epoch: u64, seq: u64, bucket: &str, key: &str) { @@ -79,6 +131,7 @@ impl PendingWrites { settles: Option, floor: Option, ) { + self.see(writer, epoch, seq, floor); let Some(life) = self.writers.get_mut(writer) else { return; }; @@ -101,6 +154,9 @@ impl PendingWrites { /// End `writer`'s life if it is older than `epoch`, returning what it left open. fn end_life_before(&mut self, writer: &[u8], epoch: u64) -> Vec<(String, String)> { + if self.seen.get(writer).is_some_and(|seen| seen.epoch < epoch) { + self.set_seen(writer, None); + } if self .writers .get(writer) @@ -233,7 +289,8 @@ impl KeyIndex { impl KeyIndexReadGuard<'_> { /// Whether `key` may only be answered from the origin: its last mutation is - /// unreconciled, or a peer's write of it is pending. + /// unreconciled, a peer's write of it is pending, or a peer may hold a pending + /// write this node never saw. pub(crate) fn key_fenced(&self, bucket: &str, key: &str) -> bool { self.0.pending.fenced(bucket, key) || self @@ -346,4 +403,56 @@ mod tests { assert!(!guard.fenced_under("bkt", "log/0003")); assert!(!guard.fenced_under("other", "")); } + + /// The first event a reader sees of a writer names an older open write it never + /// held: every key goes to the origin until the floor reaches that first event. + #[test] + fn an_unseen_open_write_fences_every_key_until_the_floor_passes_it() { + let state = KeyIndex::default(); + state.hold_pending_native("bkt", "m", &cut(1, 5), Some(3)); + assert!(fenced(&state, "elsewhere")); + assert!(state.read().unwrap().fenced_under("other", "")); + // 3 settled; 5, which this reader holds, is still open. + state.settle_pending_native(&cut(1, 6), None, Some(5), true); + assert!(!fenced(&state, "elsewhere")); + assert!(fenced(&state, "m")); + } + + #[test] + fn a_first_event_with_nothing_older_open_fences_only_its_own_key() { + let state = KeyIndex::default(); + state.hold_pending_native("bkt", "m", &cut(1, 5), None); + assert!(fenced(&state, "m")); + assert!(!fenced(&state, "elsewhere")); + } + + /// A gap may hide an announcement; a gap into a new life before its first event + /// hides none. + #[test] + fn a_gap_fences_every_key_until_the_floor_passes_it() { + let state = KeyIndex::default(); + state.hold_pending_native("bkt", "k", &cut(1, 1), None); + state.discard_for_gap(&cut(1, 9)); + assert!(fenced(&state, "elsewhere")); + state.settle_pending_native(&cut(1, 10), None, Some(1), true); + assert!( + fenced(&state, "elsewhere"), + "1 is held, but 2 to 9 may hide another" + ); + state.settle_pending_native(&cut(1, 11), Some(1), None, true); + assert!(!fenced(&state, "elsewhere") && !fenced(&state, "k")); + state.discard_for_gap(&cut(2, 0)); + assert!(!fenced(&state, "elsewhere")); + } + + /// A writer's next life ends the last one's blindness: a gap into it rebuilds the + /// index from the origin, and a seal follows every outcome of the life it ends. + #[test] + fn a_new_life_ends_the_last_ones_blindness() { + let state = KeyIndex::default(); + state.hold_pending_native("bkt", "m", &cut(1, 5), Some(3)); + assert_eq!(state.end_pending_life(b"writer", 2).len(), 1); + assert!(!fenced(&state, "elsewhere")); + assert!(fenced(&state, "m"), "uncertain until the origin says"); + } } diff --git a/src/sync/tests.rs b/src/sync/tests.rs index 03d4dd9..2cd8a82 100644 --- a/src/sync/tests.rs +++ b/src/sync/tests.rs @@ -12,8 +12,8 @@ use groupnet::transport::mem::Network; use s3s::dto::GetObjectOutput; use crate::index::{ - AuthoritativeKeyState, KeyIndex, ObjEntry, resolve_uncertain_key, standard_class, - uncertain_key_is_current, + AuthoritativeKeyState, KeyIndex, ObjEntry, apply_observed_put, resolve_uncertain_key, + standard_class, uncertain_key_is_current, }; use crate::metrics::Metrics; use crate::sync::coherence::{ @@ -831,6 +831,97 @@ async fn a_writer_that_dies_after_its_fence_leaves_the_keys_to_the_origin() { assert_eq!(indexed_size(&state, "bkt", "unsent"), Some(4)); } +/// A node that joins after a write's fence never saw that announcement, so it cannot +/// fence the key itself. The writer's next event carries its oldest open write, older +/// than anything the joiner saw: the joiner answers every key from the origin until that +/// floor passes, which a writer that crashes and never comes back never lets happen. +#[tokio::test] +async fn a_joiner_that_missed_a_fence_answers_from_the_origin() { + let net = Network::new(); + let (w_id, w_node, w_group) = spawn_neighbors(&net, "late-w", &["late-p", "late-j"]).await; + let (p_id, _p_node, p_group) = spawn_neighbors(&net, "late-p", &["late-w", "late-j"]).await; + let metrics = Arc::new(Metrics::default()); + let cache = TieredCache::new(1024 * 1024, None, metrics.clone()); + let sync_p = Arc::new(attach(p_group, p_id.clone(), Consistency::Strong)); + sync_p.start_apply( + cache.local(), + Arc::new(KeyIndex::default()), + metrics.clone(), + no_reconcile(), + ); + let sync_w = attach(w_group, w_id, Consistency::Strong); + adopted(&sync_w, &p_id).await; + let own = KeyIndex::default(); + let wait = Duration::from_secs(5); + let fence = async |key: &str| { + sync_w + .fence(&own, "bkt", &[key.to_owned()], wait, &metrics) + .await + .expect("the peers acknowledge the fence") + .pop() + .flatten() + .expect("strong announces each key") + }; + let write = async |key: &str, size: i64| { + let pending = fence(key).await; + let (_, publishing) = + sync_w.index_put(&own, "bkt", key, written(size), Some(&pending), &metrics); + let receipt = publishing.await; + assert!( + sync_w + .ack_write(receipt.token, wait, "bkt", key, &metrics) + .await + ); + receipt + }; + + // `k` is fenced and its origin call lands; `m` is written whole meanwhile, and its + // acknowledgement retires the feed past `k`'s announcement. + let k = fence("k").await; + write("m", 2).await; + + // The joiner lists `k` as the origin held it before that call landed. + let (j_id, _j_node, j_group) = spawn_neighbors(&net, "late-j", &["late-w", "late-p"]).await; + let state = Arc::new(KeyIndex::default()); + assert!(apply_observed_put(&state, "bkt", "k", written(4))); + let sync_j = Arc::new(attach(j_group, j_id, Consistency::Strong)); + sync_j.start_apply( + cache.local(), + state.clone(), + metrics.clone(), + no_reconcile(), + ); + let n = write("n", 3).await; + assert!(sync_j.reached_token(&n.header, wait).await); + // What the joiner's recovery affirms once its index is built. + eventually( + || sync_j.affirm_lease_now() && sync_j.mode_allows_local(), + "the joiner's serve-lease to be granted once it applied the writer's feed", + ) + .await; + assert_eq!(indexed_size(&state, "bkt", "k"), Some(4)); + assert!( + fenced(&state, "k"), + "the joiner never saw k's fence, and its listed row is stale" + ); + assert!( + fenced(&state, "n"), + "nor can it tell which key that fence is" + ); + + // The writer crashes before it reports `k`, and never comes back. + drop(k); + drop(sync_w); + w_node.close().await; + drop(w_node); + eventually( + || !sync_j.peer_alive("late-w"), + "the joiner to see the writer gone", + ) + .await; + assert!(fenced(&state, "k")); +} + /// A peer cut off from the writer cannot hold the fence up: its serve-lease lapses on /// the writer's clock, and the fence completes with the guarantee intact. #[tokio::test] From 64def5d5a6cf82417c7c553461eb3e92dbc416f2 Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 05:18:30 -0600 Subject: [PATCH 2/7] docs: describe how a node treats a fence it never saw --- AGENTS.md | 4 +++- README.md | 7 +++++++ docs/fleet-bootstrap.md | 12 +++++++----- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index eaeadb8..abfcf12 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -212,7 +212,9 @@ peers granted (groupnet's `consistency::lease`, tier T3). A write is **fenced** its origin call: it publishes `IndexOp::Pending` and waits until every lease-holder has applied it or lapsed (`WriteSync::fence`), and each peer answers the key from the origin until the outcome event settles it (`index::pending`); a writer's next life hands -anything it left open to the origin reconciliation. A write ends when every +anything it left open to the origin reconciliation. A peer that joined or gapped after +an announcement answers every key from the origin until the floor each event carries +(the writer's oldest open write) passes the first event it saw. A write ends when every lease-holder has either applied the outcome (one ack round) or had its lease lapse in the writer's engine (bounded by `D`, on the straggler's own clock). That replaces the old view-stability heuristic (`Stability`/`settled()`), which survives only for diff --git a/README.md b/README.md index 7b6c539..ee13d08 100644 --- a/README.md +++ b/README.md @@ -329,6 +329,13 @@ box is the long form): answered **503** without calling the origin (`ack_timeouts`). A write the origin refused abandons its fence. A node holding a peer's open fence offers no index image to a joining node. +- **A node that never saw a fence answers every key from the origin until it is + settled.** A node that joins, or gaps, after a write was fenced cannot tell which key + it fences. Every feed event carries its writer's oldest open write, so the first + event such a node applies from that writer shows whether one predates what it saw; + until a later event shows none does, the node answers every read from the origin, + and offers no index image. If the writer crashes first, the node is waiting on it + as a lease granter anyway, and its next life's gap rebuilds the index. - **A feed gap discards the gapped node's index.** The node missed writes it can no longer order its rows against, so it keeps nothing for a peer-image install to carry forward; the install or the origin rebuild repopulates it. diff --git a/docs/fleet-bootstrap.md b/docs/fleet-bootstrap.md index 69dd1a4..821c526 100644 --- a/docs/fleet-bootstrap.md +++ b/docs/fleet-bootstrap.md @@ -148,10 +148,10 @@ LIST/HEAD callbacks. A row carries exact key, size when known, storage class. Peer rows deliberately become **skeletal**: `Content-Type` and user HEAD metadata are not fabricated; HEAD falls through to origin. The donor cannot offer an image while any unresolved per-key uncertainty, or any -peer's pending `strong` write, exists. A follower carries its own unresolved -uncertainty and the pending writes it holds across the swap (see Follower -handoff); such reads keep going to the origin until exact HEAD reconciliation, -the writer's outcome, or origin rebuild. +peer's pending `strong` write, exists, nor while a peer may hold one it never +saw. A follower carries its own unresolved uncertainty and the pending writes it +holds across the swap (see Follower handoff); such reads keep going to the +origin until exact HEAD reconciliation, the writer's outcome, or origin rebuild. Absence and LIST can be served locally only after a complete image, continuous native handoff, independent frontier check, and the existing lease/domain gate. Direct external S3 mutations still lack a fleet event and remain outside @@ -327,7 +327,9 @@ token epoch. The fenced key stays origin-read, and a LIST whose prefix covers it stays origin-served, until that key's own HEAD resolves it in the installed index or a later definitive mutation supersedes it, as on a node that never bootstrapped. No later fence can reuse a carried token. Pending peer writes cross -the swap unchanged and are settled by their writers' later events. +the swap unchanged and are settled by their writers' later events. So does what +the follower knows of each writer's feed: a write announced before the follower +first saw that feed keeps every key origin-read until the writer's floor passes it. **No live effect is lost.** A native effect the barrier does not cover misaligns the cuts and answers `NativePending`; the stage waits for a later From 70c4a294a2c82b8a5be692f2080e23f2e6b040b8 Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 05:22:35 -0600 Subject: [PATCH 3/7] docs(sync): state that the frame budget, not FEED_CAPACITY, bounds the feed ring The ring is cut to one 60 kB gossip frame first: a strong write (Pending plus outcome, about 230 bytes for a 44-byte key) leaves a window of about 260 writes, against about 400 single-event writes before the fence, and even the smallest valid event stops the ring near 2,700 events. Doubling FEED_CAPACITY would change neither the gap horizon nor memory, so it stays; a test pins that the byte budget binds first. --- README.md | 9 +++++---- src/sync/coherence.rs | 7 ++++--- src/sync/tests.rs | 41 ++++++++++++++++++++++++++++++++++++++--- 3 files changed, 47 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ee13d08..ea80d94 100644 --- a/README.md +++ b/README.md @@ -108,10 +108,11 @@ gossiped advertisements refresh admitted neighbors' addresses; discovering anoth member does not grant admission. The Helm chart configures every ordinal, including later-starting peers. Groupnet starts one managed network asynchronously and closes its links and resolver after the planned mutation drain and feed seal. -The ring is bounded by both -event count and encoded bytes: sustained long-key writes shorten its replay window and -surface the same explicit gap instead of growing one state entry past the transport -envelope and silently arresting peer application. +The ring is bounded by both event count (4096) and encoded bytes (one 60 kB gossip +frame), and the bytes bind first: a `strong` write is two events, about 230 bytes for a +44-byte key, so a peer about 260 such writes behind gets a gap. Longer keys shorten +that window and surface the same explicit gap instead of growing one state entry past +the transport envelope and silently arresting peer application. After a `strong`/`strong-acks` write has a real all-readers acknowledgement (or every straggler has lost serving authority), its safe feed prefix is retired while the newest head remains advertised as an anchor. Healthy feeds therefore carry an anchor plus only diff --git a/src/sync/coherence.rs b/src/sync/coherence.rs index f38a819..eeafaab 100644 --- a/src/sync/coherence.rs +++ b/src/sync/coherence.rs @@ -34,9 +34,10 @@ use crate::sync::wire::{ IndexEvent, IndexOp, encode_event, etag_to_wire, from_micros, parse_token, to_micros, }; -/// Ring capacity: a peer that falls further behind than this many feed events (a -/// `strong` write publishes two) gets a gap (Groupnet closes serving, distrusts -/// bodies, and rescans origin) instead of per-event application. +/// Ring capacity in events, a ceiling only: the ring is also cut to one gossip frame +/// (60 kB by default), which binds first. That holds about 260 `strong` writes (two +/// events each) of a 44-byte key, and never 4096 events. A peer further behind gets a +/// gap (Groupnet closes serving, distrusts bodies, and rescans origin). pub(super) const FEED_CAPACITY: usize = 4096; /// A peer feed position as the index's native writer cut. diff --git a/src/sync/tests.rs b/src/sync/tests.rs index 2cd8a82..0cecfca 100644 --- a/src/sync/tests.rs +++ b/src/sync/tests.rs @@ -2,9 +2,9 @@ use std::num::NonZeroU32; use std::sync::Arc; use std::time::{Duration, Instant, SystemTime}; -use groupnet::consistency::CAP_ACKS; use groupnet::consistency::lease::{CAP_LEASE, LeaseConfig}; use groupnet::consistency::volatile_recovery::{RecoveryStage, RecoveryStatus}; +use groupnet::consistency::{CAP_ACKS, PeerWrites, advertised_head}; use groupnet::core::volatile_recovery::RecoveryState; use groupnet::core::{Config, NodeId, Status}; use groupnet::runtime::{NamedSeeds, ResolveFuture, SeedResolver, SystemResolver}; @@ -17,8 +17,8 @@ use crate::index::{ }; use crate::metrics::Metrics; use crate::sync::coherence::{ - CAP_BOUNDED, Consistency, DEFAULT_LEASE_MS, KeyReconcile, WriteReceipt, WriteSync, WriteWait, - recovery_generation_permits, waits_on, waits_on_unleased, + CAP_BOUNDED, Consistency, DEFAULT_LEASE_MS, FEED_CAPACITY, KeyReconcile, WriteReceipt, + WriteSync, WriteWait, recovery_generation_permits, waits_on, waits_on_unleased, }; use crate::sync::config::{SyncConfig, parse_lease_ms, parse_seeds}; use crate::sync::wire::{ @@ -119,6 +119,41 @@ fn only_acknowledged_strong_waits_retire_feed_history() { assert!(!WriteWait::Lapsed(Vec::new()).retires_feed(Consistency::Bounded)); } +/// The feed ring is cut to the gossip frame budget long before `FEED_CAPACITY` events: +/// even the smallest event a valid bucket and key make stops it short of the cap, so +/// the cap sets neither the gap horizon nor the ring's memory. +#[tokio::test] +async fn the_frame_budget_binds_the_feed_ring_before_its_event_cap() { + let net = Network::new(); + let (w_id, _w_node, w_group) = spawn_node(&net, "ring-w", "ring-s").await; + let (s_id, _s_node, s_group) = spawn_node(&net, "ring-s", "ring-w").await; + // It never polls, so it never enters the writer's epoch: its lag is the whole window. + let unseen = PeerWrites::new(s_group.clone(), s_id, decode_event); + let sync_w = attach(w_group, w_id.clone(), Consistency::Bounded); + let smallest = IndexEvent { + op: IndexOp::Pending, + bucket: "abc".to_owned(), + key: "k".to_owned(), + ts_us: to_micros(SystemTime::now()), + settles: None, + floor: None, + }; + let mut head = None; + for _ in 0..FEED_CAPACITY { + head = sync_w.feed.publish(&smallest).await.ok(); + } + eventually( + || head.is_some() && advertised_head(&s_group, &w_id) == head, + "the subscriber to see the writer's head", + ) + .await; + let window = unseen.lag(&w_id).expect("a decodable feed"); + assert!( + window < FEED_CAPACITY as u64, + "the byte budget holds {window} events" + ); +} + fn cached(body: &'static [u8]) -> Arc { Arc::new(CachedObject::from_get( &GetObjectOutput::default(), From 772db00d2638b1cf43f74bfc710de7bf087550f9 Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 05:42:12 -0600 Subject: [PATCH 4/7] fix(fleet): hash and decode a peer image as its chunks arrive Groupnet's bootstrap worker runs a follower's transfer steps one at a time and refreshes the donor's claim only between them. VerifyImage hashed and decoded the whole image in one step: for the 800k-row, 116 MB image of fleet_bootstrap::peer_bootstrap_transfers_a_production_scale_index that took 2.6-2.8 s under load (hash 21 ms, decode 2781 ms), past what remained of the 3 s claim, so the follower released a live donor (DonorUnavailable) and listed the origin. The same test fails that way on ae04f11, before the fence. Each chunk is now hashed and decoded as it lands, and verification only finishes both. --- src/index/fleet.rs | 133 +++++------------- src/index/fleet/decoder.rs | 205 ++++++++++++++++++++++++++++ src/index/fleet/stage.rs | 41 ++++-- src/index/rows.rs | 10 ++ src/sync/volatile/fleet/follower.rs | 20 +-- 5 files changed, 284 insertions(+), 125 deletions(-) create mode 100644 src/index/fleet/decoder.rs diff --git a/src/index/fleet.rs b/src/index/fleet.rs index 79a6e99..62c7f27 100644 --- a/src/index/fleet.rs +++ b/src/index/fleet.rs @@ -4,7 +4,6 @@ //! rebuilds local generations at install; donor generation numbers never //! authorize a delayed local LIST or HEAD callback. -use std::collections::{BTreeMap, HashMap}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use groupnet::consistency::volatile_recovery::bootstrap::ports::{JournalIngress, LogicalClock}; @@ -14,8 +13,7 @@ use groupnet::core::volatile_bootstrap::journal::{ use s3s::dto::{ETag, ObjectStorageClass}; -use super::pending::PendingWrites; -use super::{BucketState, GoneRows, IndexStats, KeyIndexState, KeyRows, ObjEntry}; +use super::{BucketState, KeyIndexState, ObjEntry}; const VERSION: u8 = 1; pub(crate) const IMAGE_SCHEMA: u32 = 1; @@ -23,6 +21,7 @@ const MAX_NATIVE_WRITERS: usize = 256; const MAX_NATIVE_ID_BYTES: usize = 256; mod capture; +mod decoder; mod delta; mod install; mod snapshot; @@ -397,6 +396,8 @@ pub(crate) enum ImageError { Incomplete, Corrupt, Schema, + /// The bytes end inside an item: more of the image may complete it. + Truncated, } struct Writer { @@ -469,7 +470,7 @@ impl<'a> Reader<'a> { let part = self .bytes .get(self.offset..end) - .ok_or(ImageError::Corrupt)?; + .ok_or(ImageError::Truncated)?; self.offset = end; Ok(part) } @@ -870,105 +871,23 @@ fn read_entry<'a>( )) } -/// Decode a private skeletal image. The caller holds a decoded-state permit; -/// this function never publishes the result or treats donor generations as -/// local callback fences. -pub(super) fn decode(bytes: &[u8], caps: ImageCaps) -> Result { - let caps = caps.validate()?; - if bytes.is_empty() || bytes.len() > caps.bytes { - return Err(ImageError::Capacity); - } - let mut reader = Reader { bytes, offset: 0 }; - if reader.u8()? != VERSION { - return Err(ImageError::Schema); - } - let count = reader.u32()?; - if count > caps.buckets { +/// Decode a whole private skeletal image (see [`decoder::ImageDecoder`]). +#[cfg(test)] +fn decode(bytes: &[u8], caps: ImageCaps) -> Result { + let decoder = decoder::ImageDecoder::new(caps)?; + if bytes.is_empty() { return Err(ImageError::Capacity); } - let mut budget = DecodeBudget::new(caps.decoded_bytes)?; - budget.take(state_charge(count)?)?; - let mut buckets = HashMap::new(); - buckets - .try_reserve(count) - .map_err(|_| ImageError::Capacity)?; - let mut total = IndexStats::default(); - let mut rows = 0usize; - let mut previous_bucket = None::<&str>; - for _ in 0..count { - let name = reader.text(caps.name_bytes)?; - if previous_bucket.is_some_and(|last| last >= name) { - return Err(ImageError::Corrupt); - } - previous_bucket = Some(name); - budget.take(bucket_charge(name.len())?)?; - let key_count = reader.u32()?; - rows = rows.checked_add(key_count).ok_or(ImageError::Capacity)?; - if rows > caps.rows { - return Err(ImageError::Capacity); - } - let mut keys = KeyRows::default(); - let mut stats = IndexStats::default(); - let mut previous_key = None::<&str>; - for _ in 0..key_count { - let (key, entry) = read_entry(&mut reader, &mut budget, caps.name_bytes)?; - if previous_key.is_some_and(|last| last >= key) { - return Err(ImageError::Corrupt); - } - previous_key = Some(key); - stats.replace(IndexStats::default(), IndexStats::for_entry(&entry)); - keys.insert(key.to_owned(), entry); - } - let gone_count = reader.u32()?; - rows = rows.checked_add(gone_count).ok_or(ImageError::Capacity)?; - if rows > caps.rows { - return Err(ImageError::Capacity); - } - let mut gone = GoneRows::default(); - let mut previous_gone = None::<&str>; - for _ in 0..gone_count { - let key = reader.text(caps.name_bytes)?; - if previous_gone.is_some_and(|last| last >= key) { - return Err(ImageError::Corrupt); - } - previous_gone = Some(key); - budget.take(gone_charge(key.len())?)?; - let deleted_at = read_timestamp(&mut reader)?; - if keys - .get(key) - .is_some_and(|entry: &ObjEntry| deleted_at >= entry.last_modified) - { - return Err(ImageError::Corrupt); - } - gone.insert(key.to_owned(), deleted_at); - } - total.replace(IndexStats::default(), stats); - buckets.insert( - name.to_owned(), - BucketState { - synced: true, - keys, - gone, - stats, - ..BucketState::default() - }, - ); - } - if reader.offset != bytes.len() { - return Err(ImageError::Corrupt); - } - Ok(KeyIndexState { - buckets, - stats: total, - capture: None, - native_cuts: BTreeMap::new(), - pending: PendingWrites::default(), - }) + decoder.finish(bytes) } #[cfg(test)] mod tests { + use std::collections::{BTreeMap, HashMap}; + use super::*; + use crate::index::pending::PendingWrites; + use crate::index::{GoneRows, IndexStats, KeyRows}; /// Measure then encode, as a donor does at C. fn encode( @@ -1150,6 +1069,28 @@ mod tests { )); } + /// A follower decodes chunks as they land: any split decodes as the whole + /// does, and a bad item fails when it lands rather than after the last. + #[test] + fn an_image_fed_in_pieces_decodes_as_it_does_whole() { + let encoded = encode(&image(), &["bucket".to_owned()], caps()).unwrap(); + for step in [1, 3, 7, encoded.len()] { + let mut pieces = decoder::ImageDecoder::new(caps()).unwrap(); + let mut end = 0; + while end < encoded.len() { + end = (end + step).min(encoded.len()); + pieces.feed(&encoded[..end]).unwrap(); + } + let state = pieces.finish(&encoded).unwrap(); + let bucket = &state.buckets["bucket"]; + assert_eq!(bucket.keys["present"].size, Some(17)); + assert!(bucket.gone.get("deleted").is_some()); + assert_eq!(state.stats.objects, 1); + } + let mut bad = decoder::ImageDecoder::new(caps()).unwrap(); + assert!(matches!(bad.feed(&[99]), Err(ImageError::Schema))); + } + #[test] fn overlap_requires_tombstone_older_than_live_entry() { let mut encoded = encode(&image(), &["bucket".to_owned()], caps()).unwrap(); diff --git a/src/index/fleet/decoder.rs b/src/index/fleet/decoder.rs new file mode 100644 index 0000000..a411338 --- /dev/null +++ b/src/index/fleet/decoder.rs @@ -0,0 +1,205 @@ +//! A follower decodes a peer's image as its chunks arrive, one whole item at a +//! time. Groupnet's worker refreshes the donor's claim only between its steps, +//! so decoding a production-sized image in one step after the last chunk let +//! that claim lapse on the follower while the donor was live. + +use std::collections::{BTreeMap, HashMap}; + +use crate::index::fleet::{ + DecodeBudget, ImageCaps, ImageError, Reader, VERSION, bucket_charge, gone_charge, read_entry, + read_timestamp, state_charge, +}; +use crate::index::pending::PendingWrites; +use crate::index::{BucketState, IndexStats, KeyIndexState}; + +/// What the next bytes of an image hold. +enum Next { + Header, + Bucket, + Keys(usize), + GoneCount, + Gone(usize), + Done, +} + +/// Decodes a private skeletal image from a growing prefix of its bytes. The +/// caller holds a decoded-state permit, and checks the whole image's +/// commitment before it uses the result. +pub(in crate::index) struct ImageDecoder { + caps: ImageCaps, + budget: DecodeBudget, + offset: usize, + next: Next, + buckets_left: usize, + rows: usize, + buckets: HashMap, + stats: IndexStats, + /// The bucket being decoded, or the last one decoded. + name: Option, + bucket: BucketState, +} + +impl ImageDecoder { + pub(in crate::index) fn new(caps: ImageCaps) -> Result { + let caps = caps.validate()?; + Ok(Self { + budget: DecodeBudget::new(caps.decoded_bytes)?, + caps, + offset: 0, + next: Next::Header, + buckets_left: 0, + rows: 0, + buckets: HashMap::new(), + stats: IndexStats::default(), + name: None, + bucket: BucketState::default(), + }) + } + + /// Decode every whole item of `bytes`, the image received so far, past + /// what earlier calls decoded. + pub(in crate::index) fn feed(&mut self, bytes: &[u8]) -> Result<(), ImageError> { + if bytes.len() > self.caps.bytes { + return Err(ImageError::Capacity); + } + while !matches!(self.next, Next::Done) { + let mut reader = Reader { + bytes, + offset: self.offset, + }; + match self.item(&mut reader) { + Ok(()) => self.offset = reader.offset, + Err(ImageError::Truncated) => return Ok(()), + Err(error) => return Err(error), + } + } + Ok(()) + } + + /// The decoded image, once `bytes` is all of it. + pub(in crate::index) fn finish(mut self, bytes: &[u8]) -> Result { + self.feed(bytes)?; + if !matches!(self.next, Next::Done) || self.offset != bytes.len() { + return Err(ImageError::Corrupt); + } + Ok(KeyIndexState { + buckets: self.buckets, + stats: self.stats, + capture: None, + native_cuts: BTreeMap::new(), + pending: PendingWrites::default(), + }) + } + + /// Decode one item. Every read precedes every charge and insert, so an + /// item cut short leaves nothing to undo. + fn item(&mut self, reader: &mut Reader<'_>) -> Result<(), ImageError> { + match self.next { + Next::Header => { + if reader.u8()? != VERSION { + return Err(ImageError::Schema); + } + let count = reader.u32()?; + if count > self.caps.buckets { + return Err(ImageError::Capacity); + } + self.budget.take(state_charge(count)?)?; + self.buckets + .try_reserve(count) + .map_err(|_| ImageError::Capacity)?; + self.buckets_left = count; + self.next = if count == 0 { Next::Done } else { Next::Bucket }; + } + Next::Bucket => { + let name = reader.text(self.caps.name_bytes)?; + let keys = reader.u32()?; + if self.name.as_deref().is_some_and(|last| last >= name) { + return Err(ImageError::Corrupt); + } + self.budget.take(bucket_charge(name.len())?)?; + self.add_rows(keys)?; + self.name = Some(name.to_owned()); + self.next = if keys == 0 { + Next::GoneCount + } else { + Next::Keys(keys) + }; + } + Next::Keys(left) => { + let (key, entry) = read_entry(reader, &mut self.budget, self.caps.name_bytes)?; + if self.bucket.keys.last_key().is_some_and(|last| last >= key) { + return Err(ImageError::Corrupt); + } + self.bucket + .stats + .replace(IndexStats::default(), IndexStats::for_entry(&entry)); + self.bucket.keys.insert(key.to_owned(), entry); + self.next = if left > 1 { + Next::Keys(left - 1) + } else { + Next::GoneCount + }; + } + Next::GoneCount => { + let gone = reader.u32()?; + self.add_rows(gone)?; + if gone == 0 { + self.end_bucket(); + } else { + self.next = Next::Gone(gone); + } + } + Next::Gone(left) => { + let key = reader.text(self.caps.name_bytes)?; + let deleted_at = read_timestamp(reader)?; + if self.bucket.gone.last_key().is_some_and(|last| last >= key) { + return Err(ImageError::Corrupt); + } + self.budget.take(gone_charge(key.len())?)?; + if self + .bucket + .keys + .get(key) + .is_some_and(|entry| deleted_at >= entry.last_modified) + { + return Err(ImageError::Corrupt); + } + self.bucket.gone.insert(key.to_owned(), deleted_at); + if left > 1 { + self.next = Next::Gone(left - 1); + } else { + self.end_bucket(); + } + } + Next::Done => {} + } + Ok(()) + } + + fn add_rows(&mut self, rows: usize) -> Result<(), ImageError> { + self.rows = self.rows.checked_add(rows).ok_or(ImageError::Capacity)?; + if self.rows > self.caps.rows { + return Err(ImageError::Capacity); + } + Ok(()) + } + + fn end_bucket(&mut self) { + let bucket = std::mem::take(&mut self.bucket); + self.stats.replace(IndexStats::default(), bucket.stats); + let name = self.name.clone().unwrap_or_default(); + self.buckets.insert( + name, + BucketState { + synced: true, + ..bucket + }, + ); + self.buckets_left -= 1; + self.next = if self.buckets_left == 0 { + Next::Done + } else { + Next::Bucket + }; + } +} diff --git a/src/index/fleet/stage.rs b/src/index/fleet/stage.rs index 37c5419..0a3e6cd 100644 --- a/src/index/fleet/stage.rs +++ b/src/index/fleet/stage.rs @@ -7,14 +7,17 @@ use groupnet::core::volatile_bootstrap::journal::{JournalBatch, JournalCursor, N use crate::index::KeyIndex; -use super::{ImageCaps, ImageError, InstallRefusal, decode, delta::decode_delta}; +use super::decoder::ImageDecoder; +use super::{ImageCaps, ImageError, InstallRefusal, delta::decode_delta}; /// Private, non-serving candidate. Its owner holds the encoded and decoded /// `StageResources` permits through verification, replay, and publication. pub(crate) struct FleetStage { encoded: Vec, + hasher: blake3::Hasher, + /// Decodes each chunk as it lands, until verification takes the result. + decoder: Option, expected_bytes: usize, - decoded_bytes: usize, expected_chunks: usize, next_chunk: usize, caps: ImageCaps, @@ -50,10 +53,16 @@ impl FleetStage { if encoded.capacity() > expected_bytes { return Err(ImageError::Capacity); } + let decoder = ImageDecoder::new(ImageCaps { + bytes: expected_bytes, + decoded_bytes, + ..caps + })?; Ok(Self { encoded, + hasher: blake3::Hasher::new(), + decoder: Some(decoder), expected_bytes, - decoded_bytes, expected_chunks, next_chunk: 0, caps, @@ -65,7 +74,8 @@ impl FleetStage { }) } - /// Append one exact nonempty chunk to the pre-admitted buffer. + /// Append one exact nonempty chunk to the pre-admitted buffer, and hash + /// and decode it there. pub(crate) fn store_chunk(&mut self, sequence: usize, chunk: &[u8]) -> Result<(), ImageError> { if sequence != self.next_chunk || chunk.is_empty() || sequence >= self.expected_chunks { return Err(ImageError::Corrupt); @@ -79,12 +89,16 @@ impl FleetStage { return Err(ImageError::Capacity); } self.encoded.extend_from_slice(chunk); + self.hasher.update(chunk); self.next_chunk += 1; - Ok(()) + self.decoder + .as_mut() + .ok_or(ImageError::Incomplete)? + .feed(&self.encoded) } - /// Verify the complete encoded image and decode a non-serving private - /// index under exactly the offered decoded-state reservation. + /// Check the complete image against its commitment, and take the private + /// index decoded from it under exactly the offered decoded-state reservation. pub(crate) fn verify(&mut self, commitment: [u8; 32]) -> Result<(), ImageError> { if self.index.is_some() || self.next_chunk != self.expected_chunks @@ -92,15 +106,14 @@ impl FleetStage { { return Err(ImageError::Incomplete); } - if *blake3::hash(&self.encoded).as_bytes() != commitment { + if *self.hasher.finalize().as_bytes() != commitment { return Err(ImageError::Corrupt); } - let reserved = ImageCaps { - bytes: self.expected_bytes, - decoded_bytes: self.decoded_bytes, - ..self.caps - }; - let state = decode(&self.encoded, reserved)?; + let state = self + .decoder + .take() + .ok_or(ImageError::Incomplete)? + .finish(&self.encoded)?; self.rows = state .buckets .values() diff --git a/src/index/rows.rs b/src/index/rows.rs index 24e2ebe..c9f579e 100644 --- a/src/index/rows.rs +++ b/src/index/rows.rs @@ -36,6 +36,11 @@ impl KeyRows { self.map.contains_key(key) } + /// The greatest key held. + pub(crate) fn last_key(&self) -> Option<&str> { + self.map.get_max().map(|(key, _)| key.as_str()) + } + pub(crate) fn iter(&self) -> Iter<'_, String, ObjEntry, DefaultSharedPtr> { self.map.iter() } @@ -136,6 +141,11 @@ impl GoneRows { self.map.get(key) } + /// The greatest key held. + pub(crate) fn last_key(&self) -> Option<&str> { + self.map.get_max().map(|(key, _)| key.as_str()) + } + pub(crate) fn iter(&self) -> Iter<'_, String, SystemTime, DefaultSharedPtr> { self.map.iter() } diff --git a/src/sync/volatile/fleet/follower.rs b/src/sync/volatile/fleet/follower.rs index e474943..5cd9e42 100644 --- a/src/sync/volatile/fleet/follower.rs +++ b/src/sync/volatile/fleet/follower.rs @@ -115,23 +115,13 @@ impl FleetStatePort { } TransferEffect::VerifyImage { op, commitment } => { let mut stage = resources.stage.take().ok_or_else(fenced)?; - // Hash and full map decode are bounded but potentially large. - // The blocking task owns the stage and both permits until it - // exits, even if the recovery worker is cancelled. - let verified = tokio::task::spawn_blocking(move || { - stage - .stage_mut() - .verify(commitment) - .map_err(|_| AdapterError::new(AdapterErrorKind::Malformed))?; - Ok::<_, AdapterError>(stage) - }) - .await - .map_err(|error| AdapterError::with_source(AdapterErrorKind::Unavailable, error)) - .flatten() - .inspect_err(|_| { + // Each chunk was hashed and decoded as it landed: this only + // finishes both, so no long step lets the donor's claim lapse. + stage.stage_mut().verify(commitment).map_err(|_| { tracing::debug!("fleet peer image declined: commitment or decode failed"); + AdapterError::new(AdapterErrorKind::Malformed) })?; - resources.stage = Some(verified); + resources.stage = Some(stage); Ok(Some( Self::event_charge(admission, false)? .hold(TransferEvent::ImageVerified { op, commitment }), From 5efe92005d40544d4b7a12d46c4aa71b55de8f50 Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 05:42:12 -0600 Subject: [PATCH 5/7] docs(fleet): describe chunk-wise decoding of a peer image --- docs/fleet-bootstrap.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/fleet-bootstrap.md b/docs/fleet-bootstrap.md index 821c526..1c6bb87 100644 --- a/docs/fleet-bootstrap.md +++ b/docs/fleet-bootstrap.md @@ -164,6 +164,10 @@ unknown schema. Encoded bytes, decoded rows, native overlap, donor suffix, and each physical reply clone use distinct shared `ByteAdmission` permits. The decoder precharges conservative hash-table and tree-node capacity before allocation. This bounds private image ownership, not allocator RSS exactly. +A follower hashes and decodes each chunk as it lands, so verification only +finishes both: Groupnet's worker refreshes the donor's claim between its +steps, and one long decode after the last chunk let that claim lapse on the +follower under a live donor. The exact `DonorJournal::storage_bound` must fit the configured Suffix and global caps before cloning the image. Tests price the configured bound and measured live usage; a cap refusal falls back to origin without publishing a From 711a26dc2d7718b48c7e3a614e54d398b31841f7 Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 05:51:20 -0600 Subject: [PATCH 6/7] test(readiness): read the donor's declaration before the probe a_node_left_alone_is_ready asserted the node was not ready from the moment the donor latched its index, before the donor's declaration could reach it over gossip. Until it arrives the node holds the donor's earlier declaration, without an index, and is ready by design; the full suite caught that window once. The probe is now read after the declaration, as not_ready_until_indexed already reads the latch before the probe. --- tests/it/readiness_probe.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/it/readiness_probe.rs b/tests/it/readiness_probe.rs index 2d7c9be..95efd9b 100644 --- a/tests/it/readiness_probe.rs +++ b/tests/it/readiness_probe.rs @@ -259,8 +259,11 @@ async fn a_node_left_alone_is_ready() { donor.start(&fleet.bucket).await; until("the donor holds the index", || donor.indexed()).await; until("the other node reads the donor's index", || { - assert!(!alone.ready(), "ready beside an index holder"); - alone.reads_indexed(fleet.names[0]) + // The declaration first: until it arrives this node rightly reads the + // donor's earlier one, without an index, and is ready. + let reads = alone.reads_indexed(fleet.names[0]); + assert!(!reads || !alone.ready(), "ready beside an index holder"); + reads }) .await; From 89dccca777fff29ae1747edefe5c18b720a0d90c Mon Sep 17 00:00:00 2001 From: Jon-Luke Biddle Date: Thu, 12 Nov 2026 08:16:16 -0600 Subject: [PATCH 7/7] build: bump groupnet to e7c7b38, which keeps a transfer from a briefly suspected donor --- Cargo.lock | 32 ++++++++++++++++---------------- Cargo.toml | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aee551e..4b08043 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1308,7 +1308,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -1541,7 +1541,7 @@ dependencies = [ [[package]] name = "groupnet" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "groupnet-consistency", "groupnet-core", @@ -1558,7 +1558,7 @@ dependencies = [ [[package]] name = "groupnet-consistency" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "futures-util", @@ -1571,12 +1571,12 @@ dependencies = [ [[package]] name = "groupnet-core" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" [[package]] name = "groupnet-messaging" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "groupnet-core", @@ -1591,7 +1591,7 @@ dependencies = [ [[package]] name = "groupnet-network" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "futures-util", @@ -1608,7 +1608,7 @@ dependencies = [ [[package]] name = "groupnet-runtime" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "groupnet-core", "groupnet-messaging", @@ -1622,7 +1622,7 @@ dependencies = [ [[package]] name = "groupnet-streams" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "futures-util", @@ -1638,7 +1638,7 @@ dependencies = [ [[package]] name = "groupnet-transport" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "futures-util", @@ -1652,7 +1652,7 @@ dependencies = [ [[package]] name = "groupnet-transport-mem" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "groupnet-core", @@ -1664,7 +1664,7 @@ dependencies = [ [[package]] name = "groupnet-transport-tcp" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "groupnet-core", @@ -1677,7 +1677,7 @@ dependencies = [ [[package]] name = "groupnet-transport-udp" version = "0.1.0" -source = "git+https://github.com/napbat/groupnet?rev=30407c0bb057a7f12bf1520397f7398b38f97103#30407c0bb057a7f12bf1520397f7398b38f97103" +source = "git+https://github.com/napbat/groupnet?rev=e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e#e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e" dependencies = [ "bytes", "groupnet-core", @@ -2885,7 +2885,7 @@ dependencies = [ "once_cell", "socket2 0.5.10", "tracing", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3115,7 +3115,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -3185,7 +3185,7 @@ dependencies = [ "security-framework", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -4452,7 +4452,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 6b269c8..b6c1177 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ blake3 = "1.8.5" bytes = { version = "1", features = ["serde"] } futures = "0.3" getrandom = "0.4" -groupnet = { git = "https://github.com/napbat/groupnet", rev = "30407c0bb057a7f12bf1520397f7398b38f97103", default-features = false, features = ["runtime", "consistency-leases", "consistency-volatile-recovery", "consistency-volatile-bootstrap-bulk", "dns", "tcp", "udp"] } +groupnet = { git = "https://github.com/napbat/groupnet", rev = "e7c7b38cde46d338d54e4a7bb978dd1052e6fc9e", default-features = false, features = ["runtime", "consistency-leases", "consistency-volatile-recovery", "consistency-volatile-bootstrap-bulk", "dns", "tcp", "udp"] } http = "1" http-body-util = "0.1" # Already under hyper-util/s3s; direct so the metrics endpoint can build its own responses.