Files
fips/src/proto/mod.rs
T
Johnathan Corgan 5d13090d8f proto: add a bounds-checked byte reader/writer and adopt it across the wire codecs
Introduce a shared proto/codec module with a cursor Reader (short reads fail with
MessageTooShort { expected: position + needed, got: total }) and an append Writer,
and adopt them across the seven subsystem wire codecs, replacing the repetitive
manual slicing, try_into, and from_le_bytes extraction. Each existing length check
maps to the reader (an up-front minimum becomes require at position zero, so the
per-field expected values, including the tree-announce expected 99, are reproduced
exactly); the bloom exact-length check stays explicit since it also rejects
over-long payloads. Encoded bytes and decode decisions are unchanged.
2026-07-08 19:00:25 +00:00

20 lines
459 B
Rust

//! Sans-IO (runtime-agnostic) protocol state machines.
//!
//! A module here has been migrated out of the async node shell; the async
//! I/O adapters remain in `node::handlers`.
mod error;
pub use error::Error;
pub(crate) mod bloom;
pub(crate) mod codec;
pub(crate) mod coord;
pub(crate) mod discovery;
pub(crate) mod fmp;
pub(crate) mod fsp;
pub(crate) mod link;
pub(crate) mod mmp;
pub(crate) mod rate_limit;
pub(crate) mod routing;
pub(crate) mod stp;