Johnathan Corgan
|
d71e48b0f2
|
Module reorganization, identity test coverage, design doc corrections
Module reorganization:
- Split identity.rs (930 lines) into identity/ directory module:
mod.rs, node_addr.rs, address.rs, peer.rs, local.rs, auth.rs,
encoding.rs, tests.rs — following established bloom/, tree/, noise/
pattern
- Group TUN, DNS, and ICMPv6 into upper/ module as the IPv6 adaptation
layer: move tun.rs, icmp.rs, node/dns.rs into upper/
Identity test coverage (28 new tests, 52 total):
- Encoding error paths: invalid npub/nsec length, bad hex input
- NodeAddr: Debug, Display, as_slice, AsRef, Hash
- FipsAddress: from_slice, From trait, Debug, Display, Eq+Hash
- PeerIdentity: from_pubkey_full, pubkey_full parity paths, Debug
- Identity: keypair, pubkey_full, Debug
- AuthChallenge: from_bytes
Design doc corrections (fips-software-architecture.md):
- Identity struct: npub+nsec fields → keypair: Keypair with accessors
- Node struct: TunInterface → TunState, Transport → TransportHandle,
Peer → PeerSlot
- Peer section: monolithic Peer → two-phase PeerSlot (PeerConnection +
ActivePeer) with HandshakeState/ConnectivityState
- ActivePeer: npub → identity: PeerIdentity, ancestry Vec → Option,
declaration/inbound_filter wrapped in Option
- BloomState: add 4 missing fields, fix update_debounce type
- DiscoveredPeer: field name and type corrections
|
2026-02-15 17:11:58 +00:00 |
|