pub struct DaemonState {
pub identity: Identity,
pub services: RwLock<ServiceRegistry>,
pub network_state: Arc<RwLock<NetworkState>>,
pub networks: RwLock<Vec<String>>,
pub net_tx: Sender<NetworkCommand>,
pub storage_managers: StorageManagerMap,
pub qos: Arc<RwLock<QosRegistry>>,
pub outgoing_assignments: OutgoingAssignments,
pub remote_fragment_index: Arc<RwLock<RemoteFragmentIndex>>,
pub chunk_cek_hints: RwLock<HashMap<String, [u8; 32]>>,
pub reputation: RwLock<ReputationStore>,
pub file_registry: RwLock<FileRegistry>,
}Expand description
Shared daemon state accessible from the control server.
Fields§
§identity: Identity§services: RwLock<ServiceRegistry>§network_state: Arc<RwLock<NetworkState>>§networks: RwLock<Vec<String>>§net_tx: Sender<NetworkCommand>§storage_managers: StorageManagerMapOne StorageManager per active Pouch service, keyed by service_id.
Shared with the network loop so incoming fragment-fetch requests can be served directly from the P2P event handler.
qos: Arc<RwLock<QosRegistry>>Per-peer QoS data updated by the network quality monitor.
Used by PutFile to derive adaptive k/n from live stability scores.
outgoing_assignments: OutgoingAssignmentsTracks which fragments were pushed to which remote Pouch peer.
Updated by the network loop on every PushFragment; read by the
quality monitor to select Proof-of-Storage challenge targets.
remote_fragment_index: Arc<RwLock<RemoteFragmentIndex>>In-memory index of chunk_id → [(peer_id, fragment_id)] learned from
gossipped FragmentIndexAnnouncements.
Populated when received from the network; used by GetFile to issue
targeted FetchChunkFragments requests instead of broadcasting to all
known Pouches.
chunk_cek_hints: RwLock<HashMap<String, [u8; 32]>>Maps chunk_id → BLAKE3(plaintext_chunk) so that GetFile can
re-derive the per-user CEK for decryption after RLNC decode.
Populated by PutFile; persisted only for the daemon’s lifetime
(lost on restart — full persistence comes with the manifest system).
reputation: RwLock<ReputationStore>Per-peer reputation state (tier R0–R4, score, uptime, PoS pass rate).
Updated by the quality monitor and by eviction events.
file_registry: RwLock<FileRegistry>Local catalogue of files uploaded by this node’s Bill services.
Populated on each successful PutFile.
Persisted to file_registry.json.
Auto Trait Implementations§
impl !Freeze for DaemonState
impl RefUnwindSafe for DaemonState
impl Send for DaemonState
impl Sync for DaemonState
impl Unpin for DaemonState
impl UnwindSafe for DaemonState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more