Session 48: Wire format design and logging improvements

Wire format:
- Add HandshakeMessageType enum (NoiseIKMsg1=0x01, NoiseIKMsg2=0x02)
- Define unified TLV framing for handshake and post-handshake messages
- Update fips-design.md and fips-protocol-flow.md with wire format details

Initialization:
- Defer TUN setup until after peer connections initiated
- Order: packet channel → transports → peers → TUN

Logging cleanup:
- Consolidate node/TUN info logs into aligned multi-line format
- TUN shutdown: single start/stop message, remove intermediate noise
- Remove ip link show callout and redundant Starting node message
- Change UDP transport stopped to debug level
This commit is contained in:
Johnathan Corgan
2026-02-01 05:18:59 +00:00
parent 8ba24c38ae
commit 0076e9930c
8 changed files with 149 additions and 62 deletions
+4 -18
View File
@@ -244,12 +244,6 @@ impl Node {
.sign_declaration(&identity)
.expect("signing own declaration should never fail");
info!(
node_id = %node_id,
address = %identity.address(),
"Node initialized as root"
);
Ok(Self {
identity,
config,
@@ -293,12 +287,6 @@ impl Node {
.sign_declaration(&identity)
.expect("signing own declaration should never fail");
info!(
node_id = %node_id,
address = %identity.address(),
"Node initialized as root"
);
Self {
identity,
config,
@@ -1032,12 +1020,10 @@ impl Node {
}
self.state = NodeState::Running;
info!(
state = %self.state,
transports = self.transports.len(),
connections = self.connections.len(),
"Node started"
);
info!("Node started:");
info!(" state: {}", self.state);
info!(" transports: {}", self.transports.len());
info!(" connections: {}", self.connections.len());
Ok(())
}