From 91da3bf6dfe95d53ba21f2d19627f5423e8e6b9a Mon Sep 17 00:00:00 2001 From: DeFiDude <59237470+DeFiDude@users.noreply.github.com> Date: Fri, 13 Nov 2026 23:06:43 -0700 Subject: [PATCH] api: version 1.5.0 with refreshed baselines and the 1.5 migration guide --- Cargo.lock | 22 +-- Cargo.toml | 24 ++-- api/README.md | 21 ++- api/fixtures/Cargo.lock | 117 +++++++++++++++- api/migrations/{next.md => 1.5.md} | 112 +++++++++++---- api/snapshots/lxmf-core.txt | 196 ++++++++++++++++----------- api/snapshots/lxmf-tools.txt | 9 +- api/snapshots/manifest-contract.json | 59 +++++--- api/stability.json | 46 ++++++- 9 files changed, 435 insertions(+), 171 deletions(-) rename api/migrations/{next.md => 1.5.md} (61%) diff --git a/Cargo.lock b/Cargo.lock index d8b4a64..6a7d235 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -725,7 +725,7 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lxmf-core" -version = "1.4.0" +version = "1.5.0" dependencies = [ "base64", "bytes", @@ -756,7 +756,7 @@ dependencies = [ [[package]] name = "lxmf-tools" -version = "1.4.0" +version = "1.5.0" dependencies = [ "base64", "bytes", @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "rns-crypto" -version = "1.4.0" +version = "1.5.0" dependencies = [ "aes", "cbc", @@ -1229,7 +1229,7 @@ dependencies = [ [[package]] name = "rns-identity" -version = "1.4.0" +version = "1.5.0" dependencies = [ "hex", "libc", @@ -1249,7 +1249,7 @@ dependencies = [ [[package]] name = "rns-interface" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bytes", "hex", @@ -1278,7 +1278,7 @@ dependencies = [ [[package]] name = "rns-link" -version = "1.4.0" +version = "1.5.0" dependencies = [ "hex", "libc", @@ -1295,7 +1295,7 @@ dependencies = [ [[package]] name = "rns-protocol" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bzip2", "hex", @@ -1312,7 +1312,7 @@ dependencies = [ [[package]] name = "rns-runtime" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bytes", "hex", @@ -1340,7 +1340,7 @@ dependencies = [ [[package]] name = "rns-tools" -version = "1.4.0" +version = "1.5.0" dependencies = [ "base64", "bytes", @@ -1367,7 +1367,7 @@ dependencies = [ [[package]] name = "rns-transport" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bytes", "hex", @@ -1387,7 +1387,7 @@ dependencies = [ [[package]] name = "rns-wire" -version = "1.4.0" +version = "1.5.0" dependencies = [ "rns-crypto", "sha2", diff --git a/Cargo.toml b/Cargo.toml index 485799d..13df74f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,26 +6,26 @@ members = [ ] [workspace.package] -version = "1.4.0" +version = "1.5.0" edition = "2024" license-file = "LICENSE" rust-version = "1.89" [workspace.dependencies] # Reticulum crates from a sibling rsReticulum checkout during development. -rns-crypto = { path = "../rsReticulum/crates/rns-crypto", version = "~1.4.0" } -rns-wire = { path = "../rsReticulum/crates/rns-wire", version = "~1.4.0" } -rns-identity = { path = "../rsReticulum/crates/rns-identity", version = "~1.4.0" } -rns-link = { path = "../rsReticulum/crates/rns-link", version = "~1.4.0" } -rns-protocol = { path = "../rsReticulum/crates/rns-protocol", version = "~1.4.0" } -rns-transport = { path = "../rsReticulum/crates/rns-transport", version = "~1.4.0", default-features = false } -rns-runtime = { path = "../rsReticulum/crates/rns-runtime", version = "~1.4.0" } -rns-interface = { path = "../rsReticulum/crates/rns-interface", version = "~1.4.0" } -rns-tools = { path = "../rsReticulum/crates/rns-tools", version = "~1.4.0", default-features = false } +rns-crypto = { path = "../rsReticulum/crates/rns-crypto", version = "~1.5.0" } +rns-wire = { path = "../rsReticulum/crates/rns-wire", version = "~1.5.0" } +rns-identity = { path = "../rsReticulum/crates/rns-identity", version = "~1.5.0" } +rns-link = { path = "../rsReticulum/crates/rns-link", version = "~1.5.0" } +rns-protocol = { path = "../rsReticulum/crates/rns-protocol", version = "~1.5.0" } +rns-transport = { path = "../rsReticulum/crates/rns-transport", version = "~1.5.0", default-features = false } +rns-runtime = { path = "../rsReticulum/crates/rns-runtime", version = "~1.5.0" } +rns-interface = { path = "../rsReticulum/crates/rns-interface", version = "~1.5.0" } +rns-tools = { path = "../rsReticulum/crates/rns-tools", version = "~1.5.0", default-features = false } # Workspace LXMF crates -lxmf-core = { path = "crates/lxmf-core", version = "~1.4.0" } -lxmf-tools = { path = "crates/lxmf-tools", version = "~1.4.0" } +lxmf-core = { path = "crates/lxmf-core", version = "~1.5.0" } +lxmf-tools = { path = "crates/lxmf-tools", version = "~1.5.0" } # Encoding base64 = "0.22" diff --git a/api/README.md b/api/README.md index 2cd9a94..2faac17 100644 --- a/api/README.md +++ b/api/README.md @@ -1,10 +1,11 @@ # Rust API -This guide describes the 1.4.0 API, published as v1.4.0, not the 1.3.0 +This guide describes the 1.5.0 API, published as v1.5.0, not the 1.4.0 daemon. Application code should use `lxmf_core::message_api`, which re-exports the message types without wrappers. The equivalent module-qualified -paths remain available. The [1.4 migration guide](migrations/1.4.md) explains -the source-breaking change from mutable messages to drafts, signed messages +paths remain available. The [1.5 migration guide](migrations/1.5.md) covers +the changes since 1.4.0. The [1.4 migration guide](migrations/1.4.md) explains +the source-breaking change from mutable messages to drafts, signed messages, and immutable finalized messages. The compiled `lxmf-core` `message` example demonstrates message construction, @@ -12,6 +13,11 @@ signing, packing, and unpacking through this path. ## Stability +The 1.5 line follows LXMF 1.3.0. It makes stamp costs and values `f64`, keeps +the router's delivered ids, stamp costs, and tickets in LXMF's SQLite state +store, and marks the router and daemon configuration structs +`#[non_exhaustive]`. See the [1.5 migration guide](migrations/1.5.md). + `lxmf-core` is candidate stable, but that classification does not make every public implementation detail a permanent API. The message facade is the recommended application path. Router ownership, delivery orchestration, @@ -23,9 +29,10 @@ provisional module-qualified APIs. integration target. Choosing the facade instead of the equivalent module-qualified path does not -change behavior. Upgrading from 1.3 to 1.4 does change message and persistence -APIs; follow the migration guide. Further reductions to the broader module tree -require a reviewed API diff, downstream migration and an explicit version decision. +change behavior. Upgrading from 1.3 to 1.4, and from 1.4 to 1.5, does change +message and persistence APIs; follow the migration guides. Further reductions +to the broader module tree require a reviewed API diff, downstream migration, +and an explicit version decision. ## Delivery-owner integration @@ -36,7 +43,7 @@ Keep periodic ticks for protocol deadlines, but schedule application maintenance separately. Drains are bounded and may leave another ready turn. Cancelling the wait does not discard a packet or publish an unread endpoint binding; existing periodic consumers remain supported. The API is provisional delivery-owner -integration (LXMF-02/03, RET-05/07), not a new wire protocol or success signal. +integration, not a new wire protocol or success signal. `LinkDeliveryManager::set_link_endpoint_dispatch_handle` opts Direct packet sends into the Reticulum owner's exact local-admission receipts. Supply the diff --git a/api/fixtures/Cargo.lock b/api/fixtures/Cargo.lock index 3c5c28e..9600d00 100644 --- a/api/fixtures/Cargo.lock +++ b/api/fixtures/Cargo.lock @@ -14,6 +14,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ahash" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + [[package]] name = "autocfg" version = "1.5.1" @@ -80,6 +92,16 @@ dependencies = [ "cipher", ] +[[package]] +name = "cc" +version = "1.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ef9e3e8154a45c7a95cff4c1299702106ad94062d7bb85fdc5d3a5afd91d45" +dependencies = [ + "find-msvc-tools", + "shlex", +] + [[package]] name = "cesu8" version = "1.1.0" @@ -221,12 +243,30 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "fallible-iterator" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" + +[[package]] +name = "fallible-streaming-iterator" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" + [[package]] name = "fiat-crypto" version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "find-msvc-tools" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48" + [[package]] name = "generic-array" version = "0.14.7" @@ -248,6 +288,24 @@ dependencies = [ "wasi", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +dependencies = [ + "ahash", +] + +[[package]] +name = "hashlink" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" +dependencies = [ + "hashbrown", +] + [[package]] name = "hex" version = "0.4.3" @@ -336,6 +394,17 @@ version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" +[[package]] +name = "libsqlite3-sys" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" +dependencies = [ + "cc", + "pkg-config", + "vcpkg", +] + [[package]] name = "lock_api" version = "0.4.14" @@ -353,7 +422,7 @@ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" [[package]] name = "lxmf-core" -version = "1.4.0" +version = "1.5.0" dependencies = [ "base64", "bytes", @@ -370,6 +439,7 @@ dependencies = [ "rns-protocol", "rns-transport", "rns-wire", + "rusqlite", "serde", "sha2", "thiserror 2.0.20", @@ -472,6 +542,12 @@ dependencies = [ "spki", ] +[[package]] +name = "pkg-config" +version = "0.3.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548" + [[package]] name = "ppv-lite86" version = "0.2.21" @@ -570,7 +646,7 @@ dependencies = [ [[package]] name = "rns-crypto" -version = "1.4.0" +version = "1.5.0" dependencies = [ "aes", "cbc", @@ -588,7 +664,7 @@ dependencies = [ [[package]] name = "rns-identity" -version = "1.4.0" +version = "1.5.0" dependencies = [ "hex", "libc", @@ -608,7 +684,7 @@ dependencies = [ [[package]] name = "rns-link" -version = "1.4.0" +version = "1.5.0" dependencies = [ "hex", "libc", @@ -625,7 +701,7 @@ dependencies = [ [[package]] name = "rns-protocol" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bzip2", "hex", @@ -642,7 +718,7 @@ dependencies = [ [[package]] name = "rns-transport" -version = "1.4.0" +version = "1.5.0" dependencies = [ "bytes", "hex", @@ -652,6 +728,7 @@ dependencies = [ "rns-crypto", "rns-identity", "rns-wire", + "rusqlite", "serde", "subtle", "thiserror 2.0.20", @@ -661,13 +738,27 @@ dependencies = [ [[package]] name = "rns-wire" -version = "1.4.0" +version = "1.5.0" dependencies = [ "rns-crypto", "sha2", "thiserror 2.0.20", ] +[[package]] +name = "rusqlite" +version = "0.32.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" +dependencies = [ + "bitflags", + "fallible-iterator", + "fallible-streaming-iterator", + "hashlink", + "libsqlite3-sys", + "smallvec", +] + [[package]] name = "rustc_version" version = "0.4.1" @@ -749,6 +840,12 @@ dependencies = [ "digest", ] +[[package]] +name = "shlex" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba" + [[package]] name = "signal-hook-registry" version = "1.4.8" @@ -963,6 +1060,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + [[package]] name = "version_check" version = "0.9.5" diff --git a/api/migrations/next.md b/api/migrations/1.5.md similarity index 61% rename from api/migrations/next.md rename to api/migrations/1.5.md index 198ffa2..529cff5 100644 --- a/api/migrations/next.md +++ b/api/migrations/1.5.md @@ -1,21 +1,20 @@ -# Migrating to the next rsLXMF release (draft) +# Migrating to rsLXMF 1.5 -This draft covers source and behaviour changes since the published 1.4.0 -release (commit `00f439d`). The crates now follow LXMF 1.3.0 on Reticulum -1.6.0. The release number belongs to the owner. Upstream references are to -LXMF 1.3.0 (`LXMF/...:line`) and Reticulum 1.6.0 (`RNS/...:line`). -`api/stability.json` lists every removed snapshot line under -`approvedBreakingChanges`. +This guide covers source and behaviour changes from the published 1.4.0 +release (commit `00f439d`) to 1.5.0. The crates now follow LXMF 1.3.0 on +Reticulum 1.6.0. Upstream references are to LXMF 1.3.0 (`LXMF/...:line`) and +Reticulum 1.6.0 (`RNS/...:line`). `api/stability.json` lists every removed +snapshot line under `approvedBreakingChanges`. -Migrate together with the matching rsReticulum release, whose guide covers -`StampControl`, link request stamps and the runtime changes. +Migrate together with rsReticulum 1.5, whose guide covers `StampControl`, link +request stamps, the transport's SQLite stores, and the runtime changes. ## Stamp costs are fractional LXMF 1.3.0 takes stamp values from `RNS.Stamps.stamp_value`, which returns a float (`LXMF/LXStamper.py:12`, `RNS/Stamps.py:104`). Its router costs are floats too (`PEERING_COST = 18.0`, `PROPAGATION_COST = 16.0`, -`LXMF/LXMRouter.py:63-67`). Every stamp cost, flexibility, peering cost and +`LXMF/LXMRouter.py:63-67`). Every stamp cost, flexibility, peering cost, and stamp value in the API is now `f64`: - the `constants::{PROPAGATION_COST, PROPAGATION_COST_MIN, PROPAGATION_COST_FLEX, @@ -29,7 +28,11 @@ stamp value in the API is now `f64`: `LxMessage::{validate_stamp_with_tickets, validated_stamp_value}`; - the `LxmPeer`, `OutboundOfferPolicy`, `AutopeerCandidate`, `PeerStats`, `NodeStats`, `PropagationEntry`, `PropagationNodeConfig`, - `AdvertisedNodePolicy` and `RecoveryPolicy` cost fields; + `AdvertisedNodePolicy`, and `RecoveryPolicy` cost fields; +- `LxmPeer::{from_announce, from_announce_with_metadata, refresh_from_announce, + refresh_from_announce_with_metadata, minimum_accepted_stamp_cost}`, + `PropagationEntry::{new_stamped, parse_filename}`, and + `PropagationStore::get_stamp_value`; - `PropagationNode::{min_stamp_cost, set_min_stamp_cost, create_offer, accept_stamped_propagated_blob, plan_accept_stamped_propagated_blob}`, `ValidatedOpaquePropagationBlob::{validate, stamp_value}`; @@ -37,9 +40,10 @@ stamp value in the API is now `f64`: stamp_cost_from_app_data, pn_stamp_cost_from_app_data}`. The announce cost slot may be an int or a float (`LXMF/LXMF.py:183-195`). -`StampCostEntry::cost` is `Option`. A destination that announces no cost -is recorded as `None`, as `outbound_stamp_costs[dest] = [time, stamp_cost]` -stores `None` (`LXMF/LXMRouter.py:1160`). +A destination that announces no cost is recorded with no cost, as +`outbound_stamp_costs[dest] = [time, stamp_cost]` stores `None` +(`LXMF/LXMRouter.py:1160`). The costs live in the router's state store (see +"Router state"); read them with `get_outbound_lxm_stamp_cost`. ```rust // old @@ -54,13 +58,14 @@ router.set_stamp_cost(dest, 8.0); | --- | --- | | `stamper::generate_stamp(&[u8], u8, usize) -> Option<([u8; 32], u32)>` | `generate_stamp(&[u8], f64, usize, &StampControl) -> Result, StampError>` | | `generate_stamp_cancellable(.., &AtomicBool)`, `generate_stamp_limited`, `stamp_iteration_cap` | `generate_stamp` with `StampControl { cancel, deadline, threads }` | -| `stamper::stamp_value`, `stamper::stamp_workblock` | `rns_identity::stamps::{stamp_value, stamp_workblock}` | +| `stamper::stamp_value(&[u8], &[u8; 32]) -> u32`, `stamper::stamp_workblock` | re-exports of `rns_identity::stamps::{stamp_value, stamp_workblock}`; `stamp_value(&[u8], &[u8]) -> f64` | | `stamp_valid(&[u8; 32], u8, &[u8])` | `stamp_valid(&[u8], f64, &[u8])` | | `validate_stamp(&[u8; 32], &[u8; 32], u8, usize)` | `validate_stamp(&[u8; 32], &[u8], f64, usize)` | | `validate_peering_key(&[u8], &[u8; 32], u8)` | `validate_peering_key(&[u8], &[u8], f64)` (`LXMF/LXStamper.py:26-29`) | | `validate_pn_stamp(&[u8], u8)`, `PropagationStampParts` with a `u32` value | `f64` value | | `spawn_deferred_stamp(_on)(.., u8, ..)`, `DeferredStampResult::Success { value: u32 }` | `f64`; new `DeferredStampResult::Failed(StampError)` | | `PropagationEnvelope::new_cancellable(.., &AtomicBool)`, `pack_for_cancellable(.., &AtomicBool)` | `&StampControl` | +| `PropagationEnvelope::{new, new_cancellable, matches}(.., [u8; 32], ..)` | `EncryptionBinding`, from `EncryptionBinding::for_recipient(&public_key, ratchet)` | | `LxmPeer::generate_peering_key(&mut self, &[u8; 16], &[u8; 16])` | adds `&StampControl` | | `LxmfDiscoveryStamper::{generate, valid, value}` | `f64` costs; `generate` takes `&StampControl` | @@ -89,7 +94,7 @@ These helpers are removed: - `LxmRouter::process_outbound_with_direct`, `defer_outbound_for_path_request`. Call `process_outbound_with_inputs(&OutboundInputs, now)` with a snapshot of -known identities, links and routes (`OutboundInputs::medium: MediumSnapshot`). +known identities, links, and routes (`OutboundInputs::medium: MediumSnapshot`). Use `await_outbound_path` / `outbound_link_closed` for the path and link callbacks. `process_outbound()` keeps working with empty inputs. @@ -109,6 +114,38 @@ callbacks (`LXMF/LXMRouter.py:2905`). `DeliveryRatchetState::create_announce` takes a trailing `Option<&AnnounceStampExt>` for the stamped announce. +## Router state + +`RouterConfig` and `RouterConfigExt` are `#[non_exhaustive]`. Start from +`RouterConfig::default()` and set fields: + +```rust +let mut config = RouterConfig::default(); +config.stamp_cost = Some(8.0); +let router = LxmRouter::new(config); +``` + +`LxmRouter::load_state(dir)` keeps delivered and processed message ids, +outbound stamp costs, and tickets in `dir/state.db` (`state_store::FILE_NAME`), +the store LXMF 1.3.0 keeps (`LXMFStore`, `LXMF/Storage.py`). The +`state_store` module holds `SqliteStateStore`, the sealed `StateStore` trait, +and `StateStoreError`. Before `load_state`, or when the file cannot be opened, +the state is kept in memory for the session. + +| Old | New | +| --- | --- | +| `persist::{load,save}_{local_deliveries, locally_processed, stamp_costs, tickets}`, `LOCAL_DELIVERIES_FILE`, `LOCALLY_PROCESSED_FILE`, `STAMP_COSTS_FILE`, `TICKETS_FILE` | removed; `load_state` imports those files once | +| `LxmRouter::outbound_stamp_costs`, `StampCostEntry`, `RouterStats::stamp_costs_cached` | `get_outbound_lxm_stamp_cost`, `update_stamp_cost`, `cull_stamp_costs` | +| `LxmRouter::ticket_store` | `generate_ticket`, `get_inbound_tickets`, `get_outbound_ticket`, `remember_ticket` | +| `generate_ticket(..) -> [u8; 16]` | `-> Option`; `None` within `TICKET_INTERVAL` of the last ticket delivered there, or when the store could not commit the new one (`LXMRouter.generate_ticket`) | +| `get_inbound_tickets(&self) -> &[Ticket]` | `get_inbound_tickets(&self, &[u8; 16]) -> Option>`, the unexpired tickets issued to one destination (`LXMRouter.get_inbound_tickets`) | +| `prepare_outbound(..) -> Result`, `OutboundTicketIntent::{persist, requires_persistence}`, `TicketPreparationError::PendingPersistence` | `prepare_outbound(..) -> Result<(), _>`; a reply ticket is in the store when it returns | + +`lxmf-core` has a default `sqlite-store` feature. It builds SQLite from source +through `rusqlite`'s `bundled` feature, so the build needs a C compiler, and +turns on `rns-transport/sqlite-store`. With `default-features = false` the +router keeps this state in memory only. + ## Propagation - `LxmRouter::sync_peers(&mut self) -> Vec<[u8; 16]>` becomes @@ -130,19 +167,26 @@ callbacks (`LXMF/LXMRouter.py:2905`). `handlers::PnLimit` (`Int(u64)` or `Float(f64)`, `From`/`From`): - `PropagationNodeAnnounceData::{transfer_limit, sync_limit}`; - `DaemonConfig::{propagation_limit_kb, sync_limit_kb}`; - - `PythonLxmdConfig::propagation_{transfer,sync}_max_accepted_size`. + - `PythonLxmdConfig::propagation_{transfer,sync}_max_accepted_size`; + - `RouterConfig::{propagation_limit_kb, sync_limit_kb}`; + - `NodeStats::{propagation_limit, sync_limit}`. - `PropagationNodeAnnounceData::new` takes `impl Into` for both. - `RouterConfig::{propagation_limit_kb, sync_limit_kb}`, `NodeStats` limits and - `LxmRouter::set_propagation_limit` are `f64`. -- `PropagationClientState`, `SyncTaskState` and `PeerSyncTerminalState` gain + `PropagationNodeAnnounceData::new` and `LxmRouter::set_propagation_limit` + take `impl Into`. +- `PropagationClientState`, `SyncTaskState`, and `PeerSyncTerminalState` gain `NoPath`, `PathRequested`, `NoAccess`, `Throttled`, `LinkFailed`, - `TransferFailed` and `NoIdentityReceived`, where they apply. + `TransferFailed`, and `NoIdentityReceived`, where they apply. `PropagationAdmission` gains `AlreadyProcessed`. Exhaustive matches need the new arms. ## Tools (lxmd library) +- `DaemonConfig` is `#[non_exhaustive]`; build it with `from_config` or + `DaemonConfig::default()` and set fields. +- `LxmdPaths::received_ratchets_dir` and `known_identities_path` become + `legacy_received_ratchets_dir` and `legacy_known_identities_path`. Reticulum + now keeps received ratchets and known destinations. `LocalStatusView:: + stamp_costs_cached` is removed. - `DaemonConfig::from_config` and `PythonLxmdConfig::from_config` return `Result`. lxmd exits when `as_float`/`as_int`/ `as_bool` raise on a malformed key (`LXMF/Utilities/lxmd.py:187-240`): @@ -160,13 +204,18 @@ callbacks (`LXMF/LXMRouter.py:2905`). ## New fields and variants +`RouterConfig`, `RouterConfigExt` (which gains `pn_stamp_throttle`), and +`DaemonConfig` (likewise) are now `#[non_exhaustive]`; set fields on their +defaults. + Exhaustive literals and matches over these types need updating: - `MessageMetadata`, `PropagationNodeAnnounceData`, `LxmPeer`, `OutboundOfferPolicy`; -- `RouterConfigExt` (`pn_stamp_throttle`), `PnInboundAdmissionConfig`, - `DirectLinkSnapshot`; -- `DaemonConfig`, `PythonLxmdConfig` (`propagation_stamp_throttle`); +- `PnInboundAdmissionConfig` (`invalid_stamp_throttle`), `DirectLinkSnapshot`, + and `DeliveryResult::Failed` (`link_activated`); +- `PythonLxmdConfig` (`propagation_stamp_throttle`), `lxmd_cli::Args` + (`version`), `LxmdPaths`; - `LinkDeliveryStartError::StampFailure`, `SendError::ContentTooLarge`. ## Behaviour and configuration an operator sees @@ -183,8 +232,15 @@ Exhaustive literals and matches over these types need updating: `PropagationNodeAnnounceData::new` sets it. `lxmd-rs --version` still names both versions. - **Stored files.** - - Delivered message ids are journaled in `delivery_claims` in the router's - storage directory. + - Delivered and processed message ids, outbound stamp costs, and tickets + move to `lxmf/state.db`. On first start the caches it replaces + (`local_deliveries`, `locally_processed`, `outbound_stamp_costs`, + `available_tickets`) are imported once and renamed with an `.imported` + suffix (`LXMRouter.__import_legacy_storage`). A file that cannot be opened + never stops the router; the state is kept in memory for the session. + - lxmd moves the received-ratchet files of earlier releases from its + `ratchets/received` directory to Reticulum's `storage/ratchets`, where + Reticulum imports them once, and removes `ratchets/known_identities`. - Admission bodies move from the messages directory to `download-admission-bodies` under the router state directory. Bodies still in the old place are moved on first start. @@ -192,7 +248,7 @@ Exhaustive literals and matches over these types need updating: - **Log levels.** lxmd starts at Notice (3) without a `loglevel` key and always applies `-v`/`-q`, as `lxmd.py` does. Control commands log at Notice on stdout. -- **Link MTU and stamps.** Delivery, the propagation client and peer sync open +- **Link MTU and stamps.** Delivery, the propagation client, and peer sync open links that signal the next hop's MTU and carry link request stamps at the cost the destination announced. These follow the Reticulum `link_mtu_discovery` and `[stamps]` settings. diff --git a/api/snapshots/lxmf-core.txt b/api/snapshots/lxmf-core.txt index 4441f2a..678cc51 100644 --- a/api/snapshots/lxmf-core.txt +++ b/api/snapshots/lxmf-core.txt @@ -235,6 +235,7 @@ pub const lxmf_core::constants::JOB_STAMPS_INTERVAL: u64 pub const lxmf_core::constants::JOB_STORE_INTERVAL: u64 pub const lxmf_core::constants::JOB_TRANSIENT_INTERVAL: u64 pub const lxmf_core::constants::LINK_MAX_INACTIVITY: u64 +pub const lxmf_core::constants::LXMF_COMPAT_VERSION: &str pub const lxmf_core::constants::LXMF_OVERHEAD: usize pub const lxmf_core::constants::MAX_DELIVERY_ATTEMPTS: u32 pub const lxmf_core::constants::MAX_PATHLESS_TRIES: u32 @@ -371,6 +372,7 @@ pub lxmf_core::handlers::PnLimit::Float(f64) pub lxmf_core::handlers::PnLimit::Int(u64) impl lxmf_core::handlers::PnLimit pub fn lxmf_core::handlers::PnLimit::as_f64(self) -> f64 +pub fn lxmf_core::handlers::PnLimit::to_value(self) -> rmpv::Value impl core::convert::From for lxmf_core::handlers::PnLimit pub fn lxmf_core::handlers::PnLimit::from(f64) -> Self impl core::convert::From for lxmf_core::handlers::PnLimit @@ -1436,30 +1438,13 @@ pub lxmf_core::persist::PersistedNodeStats::client_propagation_messages_received pub lxmf_core::persist::PersistedNodeStats::client_propagation_messages_served: u64 pub lxmf_core::persist::PersistedNodeStats::unpeered_propagation_incoming: u64 pub lxmf_core::persist::PersistedNodeStats::unpeered_propagation_rx_bytes: u64 -pub const lxmf_core::persist::DELIVERY_CLAIMS_FILE: &str -pub const lxmf_core::persist::LOCALLY_PROCESSED_FILE: &str -pub const lxmf_core::persist::LOCAL_DELIVERIES_FILE: &str pub const lxmf_core::persist::NODE_STATS_FILE: &str -pub const lxmf_core::persist::STAMP_COSTS_FILE: &str -pub const lxmf_core::persist::TICKETS_FILE: &str -pub fn lxmf_core::persist::append_delivery_claim(&std::path::Path, &lxmf_core::types::PropagationTransientId, bool, f64) -> core::io::error::Result<()> -pub fn lxmf_core::persist::clear_rotated_delivery_claims(&std::path::Path) -> core::io::error::Result<()> -pub fn lxmf_core::persist::load_delivery_claims(&std::path::Path) -> core::io::error::Result<(alloc::vec::Vec<(lxmf_core::types::PropagationTransientId, f64)>, alloc::vec::Vec<(lxmf_core::types::PropagationTransientId, f64)>)> -pub fn lxmf_core::persist::load_local_deliveries(&std::path::Path) -> core::io::error::Result> -pub fn lxmf_core::persist::load_locally_processed(&std::path::Path) -> core::io::error::Result> pub fn lxmf_core::persist::load_node_policies(&std::path::Path) -> core::io::error::Result> pub fn lxmf_core::persist::load_node_stats(&std::path::Path) -> core::io::error::Result -pub fn lxmf_core::persist::load_stamp_costs(&std::path::Path) -> core::io::error::Result> pub fn lxmf_core::persist::load_suppression(&std::path::Path) -> core::io::error::Result -pub fn lxmf_core::persist::load_tickets(&std::path::Path) -> core::io::error::Result<(lxmf_core::ticket::TicketStoreSnapshot, core::option::Option>)> -pub fn lxmf_core::persist::rotate_delivery_claims(&std::path::Path) -> core::io::error::Result<()> -pub fn lxmf_core::persist::save_local_deliveries(&std::path::Path, &std::collections::hash::map::HashMap) -> core::io::error::Result<()> -pub fn lxmf_core::persist::save_locally_processed(&std::path::Path, &std::collections::hash::map::HashMap) -> core::io::error::Result<()> pub fn lxmf_core::persist::save_node_policies(&std::path::Path, &std::collections::hash::map::HashMap<[u8; 16], lxmf_core::propagation_send::AdvertisedNodePolicy>) -> core::io::error::Result<()> pub fn lxmf_core::persist::save_node_stats(&std::path::Path, &lxmf_core::persist::PersistedNodeStats) -> core::io::error::Result<()> -pub fn lxmf_core::persist::save_stamp_costs(&std::path::Path, &std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::StampCostEntry>) -> core::io::error::Result<()> pub fn lxmf_core::persist::save_suppression(&std::path::Path, &lxmf_core::admission::SuppressionLedger) -> core::io::error::Result<()> -pub fn lxmf_core::persist::save_tickets(&std::path::Path, &lxmf_core::ticket::TicketStoreSnapshot) -> core::io::error::Result<()> pub fn lxmf_core::persist::write_file_atomic(&std::path::Path, &[u8]) -> core::io::error::Result<()> pub mod lxmf_core::presentation pub const lxmf_core::presentation::MAX_ADVERTISED_NAME_CHARS: usize @@ -1847,17 +1832,22 @@ pub struct lxmf_core::propagation_send::AdvertisedNodePolicy pub lxmf_core::propagation_send::AdvertisedNodePolicy::recorded_at: f64 pub lxmf_core::propagation_send::AdvertisedNodePolicy::stamp_cost: f64 pub lxmf_core::propagation_send::AdvertisedNodePolicy::transfer_limit_kb: f64 +impl lxmf_core::propagation_send::AdvertisedNodePolicy +pub fn lxmf_core::propagation_send::AdvertisedNodePolicy::from_announce(&[u8], f64) -> core::option::Option +pub struct lxmf_core::propagation_send::EncryptionBinding(_) +impl lxmf_core::propagation_send::EncryptionBinding +pub fn lxmf_core::propagation_send::EncryptionBinding::for_recipient(&[u8; 64], core::option::Option<&[u8; 32]>) -> Self pub struct lxmf_core::propagation_send::PreparedNode pub lxmf_core::propagation_send::PreparedNode::node: [u8; 16] pub lxmf_core::propagation_send::PreparedNode::policy: lxmf_core::propagation_send::AdvertisedNodePolicy pub struct lxmf_core::propagation_send::PropagationEnvelope impl lxmf_core::propagation_send::PropagationEnvelope pub fn lxmf_core::propagation_send::PropagationEnvelope::ciphertext(&self) -> &bytes::bytes::Bytes -pub fn lxmf_core::propagation_send::PropagationEnvelope::matches(&self, &lxmf_core::message::LxMessage, &[u8; 32]) -> bool +pub fn lxmf_core::propagation_send::PropagationEnvelope::matches(&self, &lxmf_core::message::LxMessage, &lxmf_core::propagation_send::EncryptionBinding) -> bool pub fn lxmf_core::propagation_send::PropagationEnvelope::meets(&self, f64) -> bool pub fn lxmf_core::propagation_send::PropagationEnvelope::message(&self) -> &lxmf_core::message::LxMessage -pub fn lxmf_core::propagation_send::PropagationEnvelope::new(lxmf_core::message::LxMessage, [u8; 32], f64, F) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError> -pub fn lxmf_core::propagation_send::PropagationEnvelope::new_cancellable(lxmf_core::message::LxMessage, [u8; 32], f64, F, &rns_identity::stamps::StampControl) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError> +pub fn lxmf_core::propagation_send::PropagationEnvelope::new(lxmf_core::message::LxMessage, lxmf_core::propagation_send::EncryptionBinding, f64, F) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError> +pub fn lxmf_core::propagation_send::PropagationEnvelope::new_cancellable(lxmf_core::message::LxMessage, lxmf_core::propagation_send::EncryptionBinding, f64, F, &rns_identity::stamps::StampControl) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError> pub fn lxmf_core::propagation_send::PropagationEnvelope::pack_for(&mut self, lxmf_core::propagation_send::PreparedNode, f64) -> core::result::Result, lxmf_core::message::MessageError> pub fn lxmf_core::propagation_send::PropagationEnvelope::pack_for_cancellable(&mut self, lxmf_core::propagation_send::PreparedNode, f64, &rns_identity::stamps::StampControl) -> core::result::Result, lxmf_core::message::MessageError> pub fn lxmf_core::propagation_send::PropagationEnvelope::stamp(&self) -> &[u8; 32] @@ -1953,28 +1943,6 @@ pub fn lxmf_core::propagation_sync::PropagationSyncTask::tick(&mut self) pub fn lxmf_core::propagation_sync::PropagationSyncTask::with_shared_node(tokio::sync::mpsc::bounded::Sender, alloc::sync::Arc>) -> Self pub fn lxmf_core::propagation_sync::PropagationSyncTask::with_storage(tokio::sync::mpsc::bounded::Sender, [u8; 16], std::path::PathBuf) -> core::io::error::Result pub mod lxmf_core::router -pub mod lxmf_core::router::outbound -pub struct lxmf_core::router::outbound::MediumSnapshot -pub lxmf_core::router::outbound::MediumSnapshot::lowest_interface_bitrate: core::option::Option -pub lxmf_core::router::outbound::MediumSnapshot::medium_path_timeout: f64 -pub lxmf_core::router::outbound::MediumSnapshot::routes: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::outbound::RouteInfo> -impl lxmf_core::router::outbound::MediumSnapshot -pub fn lxmf_core::router::outbound::MediumSnapshot::destination_round_trip(&self, &[u8; 16]) -> f64 -pub fn lxmf_core::router::outbound::MediumSnapshot::has_path(&self, &[u8; 16]) -> bool -pub fn lxmf_core::router::outbound::MediumSnapshot::path_request_debounce(&self) -> f64 -pub fn lxmf_core::router::outbound::MediumSnapshot::path_request_wait(&self) -> f64 -pub fn lxmf_core::router::outbound::MediumSnapshot::route(&self, &[u8; 16]) -> core::option::Option -pub fn lxmf_core::router::outbound::MediumSnapshot::slow_interface_online(&self) -> bool -pub struct lxmf_core::router::outbound::RouteInfo -pub lxmf_core::router::outbound::RouteInfo::first_hop_timeout: f64 -pub lxmf_core::router::outbound::RouteInfo::hops: u8 -pub const lxmf_core::router::outbound::AIRTIME_AWARE_MTU_TIME: f64 -pub const lxmf_core::router::outbound::PATH_REQUEST_DEBOUNCE: f64 -pub const lxmf_core::router::outbound::SLOW_INTERFACE_BITRATE: u64 -pub fn lxmf_core::router::outbound::attempt_due(&lxmf_core::message::LxMessage, bool, f64) -> bool -pub fn lxmf_core::router::outbound::attempt_limit(&lxmf_core::message::LxMessage) -> u32 -pub fn lxmf_core::router::outbound::opportunistic_receipt_timeout(core::option::Option, core::option::Option) -> core::time::Duration -pub fn lxmf_core::router::outbound::schedule_attempt(&mut lxmf_core::message::LxMessage, f64, bool, f64) pub enum lxmf_core::router::DirectReusableLinkState pub lxmf_core::router::DirectReusableLinkState::Active pub lxmf_core::router::DirectReusableLinkState::Closed @@ -2016,7 +1984,6 @@ pub fn lxmf_core::router::SendError::fmt(&self, &mut core::fmt::Formatter<'_>) - pub enum lxmf_core::router::TicketPreparationError pub lxmf_core::router::TicketPreparationError::AlreadySigned pub lxmf_core::router::TicketPreparationError::Encode(alloc::string::String) -pub lxmf_core::router::TicketPreparationError::PendingPersistence pub struct lxmf_core::router::AutopeerCandidate pub lxmf_core::router::AutopeerCandidate::destination_hash: [u8; 16] pub lxmf_core::router::AutopeerCandidate::hops: core::option::Option @@ -2041,7 +2008,6 @@ pub lxmf_core::router::LxmRouter::config: lxmf_core::router::RouterConfig pub lxmf_core::router::LxmRouter::delivery_callback: core::option::Option pub lxmf_core::router::LxmRouter::ignored: alloc::vec::Vec<[u8; 16]> pub lxmf_core::router::LxmRouter::outbound_propagation_node: core::option::Option<[u8; 16]> -pub lxmf_core::router::LxmRouter::outbound_stamp_costs: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::StampCostEntry> pub lxmf_core::router::LxmRouter::peers: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::peer::LxmPeer> pub lxmf_core::router::LxmRouter::pending_deferred_stamps: std::collections::hash::map::HashMap<[u8; 32], lxmf_core::message::SignedLxMessage> pub lxmf_core::router::LxmRouter::pending_outbound: alloc::vec::Vec @@ -2053,7 +2019,6 @@ pub lxmf_core::router::LxmRouter::propagation_transfer_status: lxmf_core::propag pub lxmf_core::router::LxmRouter::runtime_handle: core::option::Option pub lxmf_core::router::LxmRouter::static_peers: alloc::vec::Vec<[u8; 16]> pub lxmf_core::router::LxmRouter::throttled_peers: std::collections::hash::map::HashMap<[u8; 16], f64> -pub lxmf_core::router::LxmRouter::ticket_store: lxmf_core::ticket::TicketStore pub lxmf_core::router::LxmRouter::transport_tx: core::option::Option> pub lxmf_core::router::LxmRouter::unpeered_propagation_incoming: u64 pub lxmf_core::router::LxmRouter::unpeered_propagation_rx_bytes: u64 @@ -2063,7 +2028,7 @@ pub fn lxmf_core::router::LxmRouter::add_peer(&mut self, lxmf_core::peer::LxmPee pub fn lxmf_core::router::LxmRouter::allow(&mut self, [u8; 16]) pub fn lxmf_core::router::LxmRouter::allow_control(&mut self, [u8; 16]) pub fn lxmf_core::router::LxmRouter::autopeer(&mut self, lxmf_core::router::AutopeerCandidate) -> bool -pub fn lxmf_core::router::LxmRouter::await_outbound_path(&mut self, &[u8; 32], &lxmf_core::router::outbound::MediumSnapshot, f64) -> alloc::vec::Vec +pub fn lxmf_core::router::LxmRouter::await_outbound_path(&mut self, &[u8; 32], &lxmf_core::router::MediumSnapshot, f64) -> alloc::vec::Vec pub fn lxmf_core::router::LxmRouter::block(&mut self, [u8; 16]) pub fn lxmf_core::router::LxmRouter::cancel_all_inbound(&self) -> usize pub fn lxmf_core::router::LxmRouter::cancel_all_inbound_wait(&self) -> impl core::future::future::Future + core::marker::Send + 'static @@ -2086,8 +2051,8 @@ pub fn lxmf_core::router::LxmRouter::disallow_control(&mut self, &[u8; 16]) pub fn lxmf_core::router::LxmRouter::execute_actions(&mut self, alloc::vec::Vec) pub fn lxmf_core::router::LxmRouter::execute_actions_with_encryptor(&mut self, alloc::vec::Vec, F) where F: core::ops::function::FnMut([u8; 16], &[u8]) -> core::result::Result, lxmf_core::message::MessageError> pub fn lxmf_core::router::LxmRouter::flush_peer_distribution(&mut self, &[(lxmf_core::types::PropagationTransientId, core::option::Option<[u8; 16]>)]) -pub fn lxmf_core::router::LxmRouter::generate_ticket(&mut self, [u8; 16], core::option::Option) -> [u8; 16] -pub fn lxmf_core::router::LxmRouter::get_inbound_tickets(&self) -> &[lxmf_core::ticket::Ticket] +pub fn lxmf_core::router::LxmRouter::generate_ticket(&mut self, [u8; 16], core::option::Option) -> core::option::Option +pub fn lxmf_core::router::LxmRouter::get_inbound_tickets(&self, &[u8; 16]) -> core::option::Option> pub fn lxmf_core::router::LxmRouter::get_outbound_lxm_propagation_stamp_cost(&self, &[u8; 32]) -> core::option::Option pub fn lxmf_core::router::LxmRouter::get_outbound_lxm_stamp_cost(&self, &[u8; 16]) -> core::option::Option pub fn lxmf_core::router::LxmRouter::get_outbound_progress(&self, &[u8; 32]) -> core::option::Option @@ -2119,18 +2084,19 @@ pub fn lxmf_core::router::LxmRouter::mark_outbound_rejected(&mut self, &[u8; 32] pub fn lxmf_core::router::LxmRouter::message_storage_limit(&self) -> core::option::Option pub fn lxmf_core::router::LxmRouter::message_storage_size(&self) -> usize pub fn lxmf_core::router::LxmRouter::new(lxmf_core::router::RouterConfig) -> Self -pub fn lxmf_core::router::LxmRouter::outbound_link_closed(&mut self, &[u8; 32], bool, &lxmf_core::router::outbound::MediumSnapshot, f64) -> alloc::vec::Vec -pub fn lxmf_core::router::LxmRouter::path_request_pending(&self, &[u8; 16], &lxmf_core::router::outbound::MediumSnapshot, f64) -> bool -pub fn lxmf_core::router::LxmRouter::prepare_outbound(&mut self, &mut lxmf_core::message::LxMessageDraft) -> core::result::Result +pub fn lxmf_core::router::LxmRouter::outbound_link_closed(&mut self, &[u8; 32], bool, &lxmf_core::router::MediumSnapshot, f64) -> alloc::vec::Vec +pub fn lxmf_core::router::LxmRouter::path_request_pending(&self, &[u8; 16], &lxmf_core::router::MediumSnapshot, f64) -> bool +pub fn lxmf_core::router::LxmRouter::prepare_outbound(&mut self, &mut lxmf_core::message::LxMessageDraft) -> core::result::Result<(), lxmf_core::router::TicketPreparationError> pub fn lxmf_core::router::LxmRouter::prioritise(&mut self, [u8; 16], u8) pub fn lxmf_core::router::LxmRouter::process_deferred_stamps(&mut self) pub fn lxmf_core::router::LxmRouter::process_outbound(&mut self) -> alloc::vec::Vec pub fn lxmf_core::router::LxmRouter::process_outbound_with_inputs(&mut self, &lxmf_core::router::OutboundInputs, f64) -> alloc::vec::Vec +pub fn lxmf_core::router::LxmRouter::record_processed_claims(&mut self, &[(lxmf_core::types::PropagationTransientId, f64)]) pub fn lxmf_core::router::LxmRouter::register_delivery_callback(&mut self, F) where F: core::ops::function::Fn(&lxmf_core::message::LxMessage) + core::marker::Send + 'static pub fn lxmf_core::router::LxmRouter::register_plain_destination(&mut self, [u8; 16]) pub fn lxmf_core::router::LxmRouter::remember_ticket(&mut self, [u8; 16], [u8; 16], f64) pub fn lxmf_core::router::LxmRouter::remove_peer(&mut self, &[u8; 16]) -pub fn lxmf_core::router::LxmRouter::request_path(&mut self, [u8; 16], &lxmf_core::router::outbound::MediumSnapshot, f64) -> bool +pub fn lxmf_core::router::LxmRouter::request_path(&mut self, [u8; 16], &lxmf_core::router::MediumSnapshot, f64) -> bool pub fn lxmf_core::router::LxmRouter::requires_authentication(&self) -> bool pub fn lxmf_core::router::LxmRouter::reserve_inbound(&mut self, &lxmf_core::message::LxMessage) -> core::option::Option pub fn lxmf_core::router::LxmRouter::restore_signed(&self, &lxmf_core::message::ResumableLxMessage, &[u8; 64], lxmf_core::constants::DeliveryMethod) -> core::result::Result @@ -2146,7 +2112,7 @@ pub fn lxmf_core::router::LxmRouter::set_max_peers(&mut self, usize) pub fn lxmf_core::router::LxmRouter::set_message_storage_limit(&mut self, core::option::Option) pub fn lxmf_core::router::LxmRouter::set_outbound_propagation_node(&mut self, core::option::Option<[u8; 16]>) pub fn lxmf_core::router::LxmRouter::set_propagation_enabled(&mut self, bool) -pub fn lxmf_core::router::LxmRouter::set_propagation_limit(&mut self, f64) +pub fn lxmf_core::router::LxmRouter::set_propagation_limit(&mut self, impl core::convert::Into) pub fn lxmf_core::router::LxmRouter::set_retain_node_lxms(&mut self, bool) pub fn lxmf_core::router::LxmRouter::set_stamp_cost(&mut self, [u8; 16], f64) pub fn lxmf_core::router::LxmRouter::set_stamp_requirements(&mut self, f64, f64) @@ -2176,14 +2142,14 @@ pub fn lxmf_core::router::LxmRouter::validate_stamp_with_tickets(&self, &[u8; 32 pub struct lxmf_core::router::MediumSnapshot pub lxmf_core::router::MediumSnapshot::lowest_interface_bitrate: core::option::Option pub lxmf_core::router::MediumSnapshot::medium_path_timeout: f64 -pub lxmf_core::router::MediumSnapshot::routes: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::outbound::RouteInfo> -impl lxmf_core::router::outbound::MediumSnapshot -pub fn lxmf_core::router::outbound::MediumSnapshot::destination_round_trip(&self, &[u8; 16]) -> f64 -pub fn lxmf_core::router::outbound::MediumSnapshot::has_path(&self, &[u8; 16]) -> bool -pub fn lxmf_core::router::outbound::MediumSnapshot::path_request_debounce(&self) -> f64 -pub fn lxmf_core::router::outbound::MediumSnapshot::path_request_wait(&self) -> f64 -pub fn lxmf_core::router::outbound::MediumSnapshot::route(&self, &[u8; 16]) -> core::option::Option -pub fn lxmf_core::router::outbound::MediumSnapshot::slow_interface_online(&self) -> bool +pub lxmf_core::router::MediumSnapshot::routes: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::RouteInfo> +impl lxmf_core::router::MediumSnapshot +pub fn lxmf_core::router::MediumSnapshot::destination_round_trip(&self, &[u8; 16]) -> f64 +pub fn lxmf_core::router::MediumSnapshot::has_path(&self, &[u8; 16]) -> bool +pub fn lxmf_core::router::MediumSnapshot::path_request_debounce(&self) -> f64 +pub fn lxmf_core::router::MediumSnapshot::path_request_wait(&self) -> f64 +pub fn lxmf_core::router::MediumSnapshot::route(&self, &[u8; 16]) -> core::option::Option +pub fn lxmf_core::router::MediumSnapshot::slow_interface_online(&self) -> bool pub struct lxmf_core::router::NodeStats pub lxmf_core::router::NodeStats::delivery_limit: f64 pub lxmf_core::router::NodeStats::max_peers: usize @@ -2191,26 +2157,22 @@ pub lxmf_core::router::NodeStats::message_count: usize pub lxmf_core::router::NodeStats::message_size: usize pub lxmf_core::router::NodeStats::peer_stats: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::PeerStats> pub lxmf_core::router::NodeStats::peering_cost: f64 -pub lxmf_core::router::NodeStats::propagation_limit: f64 +pub lxmf_core::router::NodeStats::propagation_limit: lxmf_core::handlers::PnLimit pub lxmf_core::router::NodeStats::stamp_cost: f64 pub lxmf_core::router::NodeStats::stamp_flex: f64 pub lxmf_core::router::NodeStats::storage_limit: core::option::Option -pub lxmf_core::router::NodeStats::sync_limit: f64 +pub lxmf_core::router::NodeStats::sync_limit: lxmf_core::handlers::PnLimit pub lxmf_core::router::NodeStats::total_peers: usize pub lxmf_core::router::NodeStats::uptime: f64 pub struct lxmf_core::router::OutboundInputs pub lxmf_core::router::OutboundInputs::direct_links: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::DirectReusableLinkState> pub lxmf_core::router::OutboundInputs::identities: std::collections::hash::set::HashSet<[u8; 16]> pub lxmf_core::router::OutboundInputs::link_owned: std::collections::hash::set::HashSet<[u8; 32]> -pub lxmf_core::router::OutboundInputs::medium: lxmf_core::router::outbound::MediumSnapshot +pub lxmf_core::router::OutboundInputs::medium: lxmf_core::router::MediumSnapshot pub lxmf_core::router::OutboundInputs::propagation_link: lxmf_core::router::DirectReusableLinkState pub lxmf_core::router::OutboundInputs::propagation_unready: std::collections::hash::set::HashSet<[u8; 32]> impl core::default::Default for lxmf_core::router::OutboundInputs pub fn lxmf_core::router::OutboundInputs::default() -> Self -pub struct lxmf_core::router::OutboundTicketIntent -impl lxmf_core::router::OutboundTicketIntent -pub fn lxmf_core::router::OutboundTicketIntent::persist(self, &std::path::Path, &mut lxmf_core::message::LxMessageDraft) -> core::io::error::Result<()> -pub fn lxmf_core::router::OutboundTicketIntent::requires_persistence(&self) -> bool pub struct lxmf_core::router::PeerStats pub lxmf_core::router::PeerStats::alive: bool pub lxmf_core::router::PeerStats::incoming: u64 @@ -2229,20 +2191,20 @@ pub lxmf_core::router::PeerSyncPass::selected: core::option::Option<[u8; 16]> pub struct lxmf_core::router::RouteInfo pub lxmf_core::router::RouteInfo::first_hop_timeout: f64 pub lxmf_core::router::RouteInfo::hops: u8 -pub struct lxmf_core::router::RouterConfig +#[non_exhaustive] pub struct lxmf_core::router::RouterConfig pub lxmf_core::router::RouterConfig::autopeer: bool pub lxmf_core::router::RouterConfig::delivery_limit_kb: f64 pub lxmf_core::router::RouterConfig::ext: lxmf_core::router::RouterConfigExt pub lxmf_core::router::RouterConfig::max_peers: usize pub lxmf_core::router::RouterConfig::propagation_enabled: bool -pub lxmf_core::router::RouterConfig::propagation_limit_kb: f64 +pub lxmf_core::router::RouterConfig::propagation_limit_kb: lxmf_core::handlers::PnLimit pub lxmf_core::router::RouterConfig::propagation_stamp_cost: f64 pub lxmf_core::router::RouterConfig::propagation_stamp_flex: f64 pub lxmf_core::router::RouterConfig::stamp_cost: core::option::Option -pub lxmf_core::router::RouterConfig::sync_limit_kb: f64 +pub lxmf_core::router::RouterConfig::sync_limit_kb: lxmf_core::handlers::PnLimit impl core::default::Default for lxmf_core::router::RouterConfig pub fn lxmf_core::router::RouterConfig::default() -> Self -pub struct lxmf_core::router::RouterConfigExt +#[non_exhaustive] pub struct lxmf_core::router::RouterConfigExt pub lxmf_core::router::RouterConfigExt::auth_required: bool pub lxmf_core::router::RouterConfigExt::autopeer_maxdepth: usize pub lxmf_core::router::RouterConfigExt::defer_stamp_generation: bool @@ -2267,12 +2229,9 @@ pub lxmf_core::router::RouterStats::pending_deferred_stamps: usize pub lxmf_core::router::RouterStats::pending_outbound: usize pub lxmf_core::router::RouterStats::propagation_entries: usize pub lxmf_core::router::RouterStats::propagation_size: usize -pub lxmf_core::router::RouterStats::stamp_costs_cached: usize -pub struct lxmf_core::router::StampCostEntry -pub lxmf_core::router::StampCostEntry::cost: core::option::Option -pub lxmf_core::router::StampCostEntry::recorded_at: f64 pub fn lxmf_core::router::attempt_due(&lxmf_core::message::LxMessage, bool, f64) -> bool pub fn lxmf_core::router::attempt_limit(&lxmf_core::message::LxMessage) -> u32 +pub fn lxmf_core::router::opportunistic_receipt_timeout(core::option::Option, core::option::Option) -> core::time::Duration pub fn lxmf_core::router::schedule_attempt(&mut lxmf_core::message::LxMessage, f64, bool, f64) pub type lxmf_core::router::DeliveryCallback = alloc::boxed::Box<(dyn core::ops::function::Fn(&lxmf_core::message::LxMessage) + core::marker::Send)> pub mod lxmf_core::stamper @@ -2304,6 +2263,91 @@ pub fn lxmf_core::stamper::validate_pn_stamp(&[u8], f64) -> core::option::Option pub fn lxmf_core::stamper::validate_stamp(&[u8; 32], &[u8], f64, usize) -> bool pub fn lxmf_core::stamper::value_meets(f64, f64) -> bool pub type lxmf_core::stamper::PropagationStampParts = ([u8; 32], alloc::vec::Vec, f64, [u8; 32]) +pub mod lxmf_core::state_store +#[non_exhaustive] pub enum lxmf_core::state_store::StateStoreError +pub lxmf_core::state_store::StateStoreError::InvalidRow +pub lxmf_core::state_store::StateStoreError::InvalidRow::reason: alloc::string::String +pub lxmf_core::state_store::StateStoreError::InvalidRow::table: &'static str +pub lxmf_core::state_store::StateStoreError::NewerVersion +pub lxmf_core::state_store::StateStoreError::NewerVersion::found: i64 +pub lxmf_core::state_store::StateStoreError::NewerVersion::supported: i64 +pub lxmf_core::state_store::StateStoreError::Open(alloc::string::String) +pub lxmf_core::state_store::StateStoreError::Operation(alloc::string::String) +pub struct lxmf_core::state_store::SqliteStateStore +impl lxmf_core::state_store::SqliteStateStore +pub fn lxmf_core::state_store::SqliteStateStore::open(&std::path::Path) -> core::result::Result +impl core::ops::drop::Drop for lxmf_core::state_store::SqliteStateStore +pub fn lxmf_core::state_store::SqliteStateStore::drop(&mut self) +impl lxmf_core::state_store::StateStore for lxmf_core::state_store::SqliteStateStore +pub fn lxmf_core::state_store::SqliteStateStore::conditionally_claim_delivered(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::conditionally_claim_processed(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_delivered(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_processed(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_stamp_costs(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_tickets_inbound(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_tickets_outbound(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::get_inbound_tickets(&mut self, &[u8; 16]) -> core::result::Result>, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_last_ticket_delivery(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_outbound_stamp_cost(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_outbound_ticket(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_outbound_ticket_expiry(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_reusable_inbound_ticket(&mut self, &[u8; 16], f64) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::has_delivered(&mut self, &lxmf_core::types::PropagationTransientId) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::incremental_vacuum(&mut self, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::known_delivered(&mut self, &[lxmf_core::types::PropagationTransientId]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::mark_last_ticket_delivery(&mut self, &[u8; 16], f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::mark_locally_delivered(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::remember_ticket(&mut self, &[u8; 16], f64, &[u8; 16]) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::store_inbound_ticket(&mut self, &[u8; 16], &[u8; 16], f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::unconditionally_mark_processed(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::update_stamp_cost(&mut self, &[u8; 16], core::option::Option) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub const lxmf_core::state_store::FILE_NAME: &str +pub trait lxmf_core::state_store::StateStore: core::marker::Send + lxmf_core::state_store::sealed::Sealed +pub fn lxmf_core::state_store::StateStore::conditionally_claim_delivered(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::conditionally_claim_processed(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::cull_delivered(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::cull_processed(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::cull_stamp_costs(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::cull_tickets_inbound(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::cull_tickets_outbound(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::get_inbound_tickets(&mut self, &[u8; 16]) -> core::result::Result>, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::get_last_ticket_delivery(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::get_outbound_stamp_cost(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::get_outbound_ticket(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::get_outbound_ticket_expiry(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::get_reusable_inbound_ticket(&mut self, &[u8; 16], f64) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::has_delivered(&mut self, &lxmf_core::types::PropagationTransientId) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::incremental_vacuum(&mut self, usize) -> core::result::Result +pub fn lxmf_core::state_store::StateStore::known_delivered(&mut self, &[lxmf_core::types::PropagationTransientId]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::mark_last_ticket_delivery(&mut self, &[u8; 16], f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::mark_locally_delivered(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::remember_ticket(&mut self, &[u8; 16], f64, &[u8; 16]) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::store_inbound_ticket(&mut self, &[u8; 16], &[u8; 16], f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::unconditionally_mark_processed(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::StateStore::update_stamp_cost(&mut self, &[u8; 16], core::option::Option) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +impl lxmf_core::state_store::StateStore for lxmf_core::state_store::SqliteStateStore +pub fn lxmf_core::state_store::SqliteStateStore::conditionally_claim_delivered(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::conditionally_claim_processed(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_delivered(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_processed(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_stamp_costs(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_tickets_inbound(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::cull_tickets_outbound(&mut self, f64, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::get_inbound_tickets(&mut self, &[u8; 16]) -> core::result::Result>, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_last_ticket_delivery(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_outbound_stamp_cost(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_outbound_ticket(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_outbound_ticket_expiry(&mut self, &[u8; 16]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::get_reusable_inbound_ticket(&mut self, &[u8; 16], f64) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::has_delivered(&mut self, &lxmf_core::types::PropagationTransientId) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::incremental_vacuum(&mut self, usize) -> core::result::Result +pub fn lxmf_core::state_store::SqliteStateStore::known_delivered(&mut self, &[lxmf_core::types::PropagationTransientId]) -> core::result::Result, lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::mark_last_ticket_delivery(&mut self, &[u8; 16], f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::mark_locally_delivered(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::remember_ticket(&mut self, &[u8; 16], f64, &[u8; 16]) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::store_inbound_ticket(&mut self, &[u8; 16], &[u8; 16], f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::unconditionally_mark_processed(&mut self, &lxmf_core::types::PropagationTransientId, f64) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> +pub fn lxmf_core::state_store::SqliteStateStore::update_stamp_cost(&mut self, &[u8; 16], core::option::Option) -> core::result::Result<(), lxmf_core::state_store::StateStoreError> pub mod lxmf_core::sync pub enum lxmf_core::sync::OfferResponse pub lxmf_core::sync::OfferResponse::ErrorInvalidData diff --git a/api/snapshots/lxmf-tools.txt b/api/snapshots/lxmf-tools.txt index f01e657..66e3b05 100644 --- a/api/snapshots/lxmf-tools.txt +++ b/api/snapshots/lxmf-tools.txt @@ -20,7 +20,7 @@ pub lxmf_tools::daemon::DaemonConfigError::NotAnInteger pub lxmf_tools::daemon::DaemonConfigError::NotAnInteger::key: &'static str pub lxmf_tools::daemon::DaemonConfigError::NotAnInteger::section: &'static str pub lxmf_tools::daemon::DaemonConfigError::NotAnInteger::value: alloc::string::String -pub struct lxmf_tools::daemon::DaemonConfig +#[non_exhaustive] pub struct lxmf_tools::daemon::DaemonConfig pub lxmf_tools::daemon::DaemonConfig::announce_at_start: bool pub lxmf_tools::daemon::DaemonConfig::announce_interval: core::option::Option pub lxmf_tools::daemon::DaemonConfig::auth_required: bool @@ -129,6 +129,8 @@ pub lxmf_tools::lxmd_cli::Args::sync: core::option::Option pub lxmf_tools::lxmd_cli::Args::unpeer: core::option::Option pub lxmf_tools::lxmd_cli::Args::verbose: u8 +pub lxmf_tools::lxmd_cli::Args::version: bool +pub const lxmf_tools::lxmd_cli::LXMF_COMPAT_VERSION: &str pub fn lxmf_tools::lxmd_cli::default_config_file_text() -> alloc::string::String pub fn lxmf_tools::lxmd_cli::example_config() -> &'static str pub fn lxmf_tools::lxmd_cli::load_hash_list(&std::path::Path) -> alloc::vec::Vec<[u8; 16]> @@ -181,25 +183,24 @@ pub lxmf_tools::lxmd_runtime::LocalStatusView::pending_outbound: usize pub lxmf_tools::lxmd_runtime::LocalStatusView::propagation_enabled: bool pub lxmf_tools::lxmd_runtime::LocalStatusView::propagation_entries: usize pub lxmf_tools::lxmd_runtime::LocalStatusView::propagation_size: usize -pub lxmf_tools::lxmd_runtime::LocalStatusView::stamp_costs_cached: usize impl lxmf_tools::lxmd_runtime::LocalStatusView pub fn lxmf_tools::lxmd_runtime::LocalStatusView::from_router_stats([u8; 16], bool, &lxmf_core::router::RouterStats) -> Self pub struct lxmf_tools::lxmd_runtime::LxmdPaths pub lxmf_tools::lxmd_runtime::LxmdPaths::config_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::identity_path: std::path::PathBuf -pub lxmf_tools::lxmd_runtime::LxmdPaths::known_identities_path: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_identity_path: std::path::PathBuf +pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_known_identities_path: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_lxmf_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_messages_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_propagation_store_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_ratchets_dir: std::path::PathBuf +pub lxmf_tools::lxmd_runtime::LxmdPaths::legacy_received_ratchets_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::lxmf_storage_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::messages_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::propagation_store_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::ratchet_control_path: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::ratchet_ring_path: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::ratchets_dir: std::path::PathBuf -pub lxmf_tools::lxmd_runtime::LxmdPaths::received_ratchets_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::router_state_dir: std::path::PathBuf pub lxmf_tools::lxmd_runtime::LxmdPaths::storage_dir: std::path::PathBuf impl lxmf_tools::lxmd_runtime::LxmdPaths diff --git a/api/snapshots/manifest-contract.json b/api/snapshots/manifest-contract.json index 8369615..8c25840 100644 --- a/api/snapshots/manifest-contract.json +++ b/api/snapshots/manifest-contract.json @@ -4,10 +4,18 @@ "packages": [ { "name": "lxmf-core", - "version": "1.4.0", + "version": "1.5.0", "rustVersion": "1.89", "edition": "2024", - "features": {}, + "features": { + "default": [ + "sqlite-store" + ], + "sqlite-store": [ + "dep:rusqlite", + "rns-transport/sqlite-store" + ] + }, "targets": [ { "name": "lxmf_core", @@ -105,7 +113,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -116,7 +124,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -127,7 +135,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -138,7 +146,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -149,9 +157,9 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, - "defaultFeatures": true, + "defaultFeatures": false, "features": [], "sourceKind": "path" }, @@ -160,12 +168,25 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], "sourceKind": "path" }, + { + "name": "rusqlite", + "rename": null, + "kind": null, + "target": null, + "requirement": "^0.32", + "optional": true, + "defaultFeatures": true, + "features": [ + "bundled" + ], + "sourceKind": "registry" + }, { "name": "serde", "rename": null, @@ -273,7 +294,7 @@ }, { "name": "lxmf-tools", - "version": "1.4.0", + "version": "1.5.0", "rustVersion": "1.89", "edition": "2024", "features": {}, @@ -341,7 +362,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -363,7 +384,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -374,7 +395,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], @@ -385,7 +406,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [ @@ -398,9 +419,9 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, - "defaultFeatures": true, + "defaultFeatures": false, "features": [], "sourceKind": "path" }, @@ -409,9 +430,9 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, - "defaultFeatures": true, + "defaultFeatures": false, "features": [], "sourceKind": "path" }, @@ -420,7 +441,7 @@ "rename": null, "kind": null, "target": null, - "requirement": "~1.4.0", + "requirement": "~1.5.0", "optional": false, "defaultFeatures": true, "features": [], diff --git a/api/stability.json b/api/stability.json index 34eb0e4..4e680e0 100644 --- a/api/stability.json +++ b/api/stability.json @@ -24,8 +24,8 @@ "tier": "candidate-stable", "compatibility": "reviewed-snapshot", "snapshot": "api/snapshots/lxmf-core.txt", - "itemCount": 2408, - "sha256": "6220acee3bc246ba462110cd344c210b0c1349702c42c56fe2cf9e035439930b" + "itemCount": 2452, + "sha256": "36fa8acae92bcb9902def95ffb965fb901655d81414060ed7fce16539ec0f180" }, { "name": "lxmf-tools", @@ -33,22 +33,27 @@ "tier": "tool-internal", "compatibility": "reviewed-snapshot", "snapshot": "api/snapshots/lxmf-tools.txt", - "itemCount": 213, - "sha256": "7d3387d13dd18490062b7e61aa0803e8db08275c19451bb7b82f1dd7bcdcef94" + "itemCount": 214, + "sha256": "61656c05c28423f95c71f716998a834e0e9bc8855d0ddd29617aed1a0ee3045b" } ], "approvedBreakingChanges": { - "releaseLine": "1.4", - "migrationGuide": "api/migrations/next.md", + "releaseLine": "1.5", + "migrationGuide": "api/migrations/1.5.md", "removed": { "lxmf-core": [ "impl lxmf_core::router::DirectRouteSnapshot", + "impl lxmf_core::router::OutboundTicketIntent", "pub const lxmf_core::constants::COST_TICKET: u16", "pub const lxmf_core::constants::MAX_PEERING_COST: u8", "pub const lxmf_core::constants::PEERING_COST: u8", "pub const lxmf_core::constants::PROPAGATION_COST: u8", "pub const lxmf_core::constants::PROPAGATION_COST_FLEX: u8", "pub const lxmf_core::constants::PROPAGATION_COST_MIN: u8", + "pub const lxmf_core::persist::LOCALLY_PROCESSED_FILE: &str", + "pub const lxmf_core::persist::LOCAL_DELIVERIES_FILE: &str", + "pub const lxmf_core::persist::STAMP_COSTS_FILE: &str", + "pub const lxmf_core::persist::TICKETS_FILE: &str", "pub enum lxmf_core::router::DirectDeliveryPlan", "pub fn lxmf_core::delivery_ratchet::DeliveryRatchetState::create_announce(&mut self, &rns_identity::identity::Identity, &[u8], u64, f64, lxmf_core::delivery_ratchet::DeliveryAnnounceKind<'_>) -> core::result::Result, lxmf_core::delivery_ratchet::DeliveryRatchetError>", "pub fn lxmf_core::discovery_stamper::LxmfDiscoveryStamper::generate(&self, &[u8; 32], u8) -> core::option::Option>", @@ -73,6 +78,14 @@ "pub fn lxmf_core::peer::LxmPeer::set_unhandled_count(&mut self, u32)", "pub fn lxmf_core::peer::LxmPeer::unhandled_messages(&self) -> u32", "pub fn lxmf_core::peer::select_sync_peer(&[&lxmf_core::peer::LxmPeer]) -> core::option::Option", + "pub fn lxmf_core::persist::load_local_deliveries(&std::path::Path) -> core::io::error::Result>", + "pub fn lxmf_core::persist::load_locally_processed(&std::path::Path) -> core::io::error::Result>", + "pub fn lxmf_core::persist::load_stamp_costs(&std::path::Path) -> core::io::error::Result>", + "pub fn lxmf_core::persist::load_tickets(&std::path::Path) -> core::io::error::Result<(lxmf_core::ticket::TicketStoreSnapshot, core::option::Option>)>", + "pub fn lxmf_core::persist::save_local_deliveries(&std::path::Path, &std::collections::hash::map::HashMap) -> core::io::error::Result<()>", + "pub fn lxmf_core::persist::save_locally_processed(&std::path::Path, &std::collections::hash::map::HashMap) -> core::io::error::Result<()>", + "pub fn lxmf_core::persist::save_stamp_costs(&std::path::Path, &std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::StampCostEntry>) -> core::io::error::Result<()>", + "pub fn lxmf_core::persist::save_tickets(&std::path::Path, &lxmf_core::ticket::TicketStoreSnapshot) -> core::io::error::Result<()>", "pub fn lxmf_core::propagation::PropagationEntry::new(lxmf_core::types::PropagationTransientId, [u8; 32], [u8; 16], usize, u8) -> Self", "pub fn lxmf_core::propagation::PropagationEntry::new_stamped(lxmf_core::types::PropagationTransientId, [u8; 32], [u8; 16], usize, u8) -> Self", "pub fn lxmf_core::propagation::PropagationEntry::parse_filename(&str) -> core::option::Option<(lxmf_core::types::PropagationTransientId, f64, u8)>", @@ -84,16 +97,20 @@ "pub fn lxmf_core::propagation_node::PropagationNode::set_min_stamp_cost(&mut self, u8)", "pub fn lxmf_core::propagation_node::ValidatedOpaquePropagationBlob::stamp_value(&self) -> u8", "pub fn lxmf_core::propagation_node::ValidatedOpaquePropagationBlob::validate(bytes::bytes::Bytes, u8) -> core::option::Option", + "pub fn lxmf_core::propagation_send::PropagationEnvelope::matches(&self, &lxmf_core::message::LxMessage, &[u8; 32]) -> bool", "pub fn lxmf_core::propagation_send::PropagationEnvelope::new(lxmf_core::message::LxMessage, [u8; 32], u8, F) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError>", "pub fn lxmf_core::propagation_send::PropagationEnvelope::new_cancellable(lxmf_core::message::LxMessage, [u8; 32], u8, F, &core::sync::atomic::AtomicBool) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError>", "pub fn lxmf_core::propagation_send::PropagationEnvelope::pack_for_cancellable(&mut self, lxmf_core::propagation_send::PreparedNode, f64, &core::sync::atomic::AtomicBool) -> core::result::Result, lxmf_core::message::MessageError>", "pub fn lxmf_core::propagation_send::PropagationEnvelope::stamp_value(&self) -> u32", "pub fn lxmf_core::router::DirectRouteSnapshot::new([u8; 16], u8) -> Self", "pub fn lxmf_core::router::LxmRouter::defer_outbound_for_path_request(&mut self, &[u8; 32], f64) -> bool", + "pub fn lxmf_core::router::LxmRouter::generate_ticket(&mut self, [u8; 16], core::option::Option) -> [u8; 16]", + "pub fn lxmf_core::router::LxmRouter::get_inbound_tickets(&self) -> &[lxmf_core::ticket::Ticket]", "pub fn lxmf_core::router::LxmRouter::get_outbound_lxm_propagation_stamp_cost(&self, &[u8; 32]) -> core::option::Option", "pub fn lxmf_core::router::LxmRouter::get_outbound_lxm_stamp_cost(&self, &[u8; 16]) -> core::option::Option", "pub fn lxmf_core::router::LxmRouter::get_stamp_cost(&self, &[u8; 16]) -> core::option::Option", "pub fn lxmf_core::router::LxmRouter::ingest_lxm_uri(&mut self, &str, F) -> core::result::Result where F: core::ops::function::FnOnce(&[u8]) -> core::result::Result, lxmf_core::message::MessageError>", + "pub fn lxmf_core::router::LxmRouter::prepare_outbound(&mut self, &mut lxmf_core::message::LxMessageDraft) -> core::result::Result", "pub fn lxmf_core::router::LxmRouter::process_outbound_with_direct(&mut self, F) -> alloc::vec::Vec where F: core::ops::function::FnMut(&lxmf_core::message::LxMessage, f64) -> lxmf_core::router::DirectDeliveryPlanInput", "pub fn lxmf_core::router::LxmRouter::set_propagation_limit(&mut self, usize)", "pub fn lxmf_core::router::LxmRouter::set_stamp_cost(&mut self, [u8; 16], u8)", @@ -102,6 +119,8 @@ "pub fn lxmf_core::router::LxmRouter::sync_peers(&mut self) -> alloc::vec::Vec<[u8; 16]>", "pub fn lxmf_core::router::LxmRouter::validate_stamp(&self, &[u8; 32], &[u8; 32], u8) -> bool", "pub fn lxmf_core::router::LxmRouter::validate_stamp_with_tickets(&self, &[u8; 32], &[u8], u8, &[u8; 16]) -> bool", + "pub fn lxmf_core::router::OutboundTicketIntent::persist(self, &std::path::Path, &mut lxmf_core::message::LxMessageDraft) -> core::io::error::Result<()>", + "pub fn lxmf_core::router::OutboundTicketIntent::requires_persistence(&self) -> bool", "pub fn lxmf_core::router::plan_direct_delivery(&mut lxmf_core::message::LxMessage, lxmf_core::router::DirectDeliveryPlanInput, f64) -> lxmf_core::router::DirectDeliveryPlan", "pub fn lxmf_core::stamper::generate_stamp(&[u8], u8, usize) -> core::option::Option<([u8; 32], u32)>", "pub fn lxmf_core::stamper::generate_stamp_cancellable(&[u8], u8, usize, &core::sync::atomic::AtomicBool) -> core::option::Option<([u8; 32], u32)>", @@ -157,6 +176,8 @@ "pub lxmf_core::router::DirectRouteSnapshot::hops: u8", "pub lxmf_core::router::DirectRouteSnapshot::interface_name: core::option::Option", "pub lxmf_core::router::DirectRouteSnapshot::learned_at: core::option::Option", + "pub lxmf_core::router::LxmRouter::outbound_stamp_costs: std::collections::hash::map::HashMap<[u8; 16], lxmf_core::router::StampCostEntry>", + "pub lxmf_core::router::LxmRouter::ticket_store: lxmf_core::ticket::TicketStore", "pub lxmf_core::router::NodeStats::peering_cost: u8", "pub lxmf_core::router::NodeStats::propagation_limit: usize", "pub lxmf_core::router::NodeStats::stamp_cost: u8", @@ -185,10 +206,17 @@ "pub lxmf_core::router::RouterConfigExt::max_peering_cost: u8", "pub lxmf_core::router::RouterConfigExt::peering_cost: u8", "pub lxmf_core::router::RouterConfigExt::propagation_cost_min: u8", + "pub lxmf_core::router::RouterStats::stamp_costs_cached: usize", "pub lxmf_core::router::StampCostEntry::cost: u8", + "pub lxmf_core::router::StampCostEntry::recorded_at: f64", + "pub lxmf_core::router::TicketPreparationError::PendingPersistence", "pub lxmf_core::stamper::DeferredStampResult::Success::value: u32", "pub struct lxmf_core::router::DirectDeliveryPlanInput", "pub struct lxmf_core::router::DirectRouteSnapshot", + "pub struct lxmf_core::router::OutboundTicketIntent", + "pub struct lxmf_core::router::RouterConfig", + "pub struct lxmf_core::router::RouterConfigExt", + "pub struct lxmf_core::router::StampCostEntry", "pub type lxmf_core::stamper::PropagationStampParts = ([u8; 32], alloc::vec::Vec, u32, [u8; 32])" ], "lxmf-tools": [ @@ -210,7 +238,11 @@ "pub lxmf_tools::daemon::PythonLxmdConfig::propagation_stamp_cost_target: i64", "pub lxmf_tools::daemon::PythonLxmdConfig::propagation_sync_max_accepted_size: f64", "pub lxmf_tools::daemon::PythonLxmdConfig::propagation_transfer_max_accepted_size: f64", - "pub lxmf_tools::daemon::PythonLxmdConfig::remote_peering_cost_max: i64" + "pub lxmf_tools::daemon::PythonLxmdConfig::remote_peering_cost_max: i64", + "pub lxmf_tools::lxmd_runtime::LocalStatusView::stamp_costs_cached: usize", + "pub lxmf_tools::lxmd_runtime::LxmdPaths::known_identities_path: std::path::PathBuf", + "pub lxmf_tools::lxmd_runtime::LxmdPaths::received_ratchets_dir: std::path::PathBuf", + "pub struct lxmf_tools::daemon::DaemonConfig" ] } }