2026-03-22 03:30:21 +00:00
|
|
|
//! Node federation: trusted multi-node clusters with state sync.
|
|
|
|
|
//!
|
|
|
|
|
//! Nodes federate by exchanging invite codes containing DID + onion address.
|
|
|
|
|
//! Trust is bilateral — both sides must agree. Federated nodes periodically
|
|
|
|
|
//! sync container status, health metrics, and availability.
|
|
|
|
|
|
|
|
|
|
mod invites;
|
2026-04-18 11:07:08 -04:00
|
|
|
pub mod pending;
|
2026-03-22 03:30:21 +00:00
|
|
|
mod storage;
|
|
|
|
|
mod sync;
|
|
|
|
|
mod types;
|
|
|
|
|
|
|
|
|
|
// Re-export all public items so `crate::federation::*` continues to work.
|
|
|
|
|
pub use invites::{accept_invite, create_invite};
|
2026-06-19 09:50:10 -04:00
|
|
|
// Crate-internal: used by the periodic federation auto-sync to re-assert
|
|
|
|
|
// membership to peers that don't list us back (asymmetry self-heal).
|
|
|
|
|
pub(crate) use invites::notify_join;
|
2026-04-19 02:51:26 -04:00
|
|
|
#[allow(unused_imports)]
|
2026-04-19 01:29:13 -04:00
|
|
|
pub use storage::{
|
fix(fips,federation,ui): mesh content browse, removed-node tombstones, modal sizing
FIPS peer content browse over the mesh was failing with "Peer returned
error: 404 Not Found" and never falling back to Tor. `is_peer_allowed_path`
only allowed `/content/<id>` (item fetches) — the catalog endpoint is
exactly `/content` (no trailing slash), so it 404'd over the FIPS peer
listener. A FIPS 404 was also treated as a successful response, so the dial
never retried Tor. Fixes: allow `/content` over the mesh; add
`fips_should_fall_back()` so a FIPS 404/5xx in Auto mode falls back to Tor
(handles version-skew peers reaching a different route). Also correct the
reconnect hint text — the public anchor is TCP/8443, not UDP/8668.
Federation: deleted nodes reappeared because transitive discovery
(`merge` of a peer's advertised trusted peers) re-added any unknown DID.
Add a tombstone store (`removed-nodes.json`): remove_node tombstones the
DID, transitive merge skips tombstoned DIDs, and a remote-triggered
peer-joined is ignored for a removed DID. Explicit local re-add (add_node)
clears the tombstone.
UI: the app credentials modal panel stretched edge-to-edge (height:100%,
max-width:none, items-stretch overlay). Constrain it to a centered card
(max-width 34rem, rounded, dimmed full-screen backdrop) matching the
AppIconGrid / wallet-receive modal.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 08:09:26 -04:00
|
|
|
add_node, fips_npub_for_onion, load_nodes, load_removed_dids, record_peer_transport,
|
|
|
|
|
remove_node, save_nodes, set_trust_level, update_node,
|
2026-04-19 01:29:13 -04:00
|
|
|
};
|
2026-04-20 18:12:02 -04:00
|
|
|
pub use sync::{build_local_state, deploy_to_peer, sync_with_peer, sync_with_peer_by_did};
|
2026-03-22 03:30:21 +00:00
|
|
|
pub use types::{AppStatus, FederatedNode, NodeStateSnapshot, TrustLevel};
|