fix protocol+tests: replay protection rework, wire envelope nonce auth,

flaky e2e test deadlines, build imports
This commit is contained in:
2026-02-13 16:37:30 -03:00
parent c94d189d42
commit 6ec1346cfd
22 changed files with 2275 additions and 786 deletions

View File

@@ -90,6 +90,13 @@ pub fn startImpl(p2p: *P2P) Error!void {
p2p.state_mutex.unlock();
}
// SECURITY: Warn when Noise encryption is disabled
if (!p2p.config.network.enable_noise_encryption) {
std.log.warn("SECURITY: Noise encryption is DISABLED. Transport is unencrypted and " ++
"unauthenticated. Peer identities are NOT verified. Wire envelope replay protection " ++
"is passive only (no payload binding). Do NOT use this configuration in production.", .{});
}
// Allocate and initialize network components
const peer_id = PeerId.init();
p2p.topology = p2p.allocator.create(NetworkTopology) catch return Error.SystemError;