create Mutual Witness Protocol specs and implementation. mwp aims to be

a zero-infrastructure NAT traversal
This commit is contained in:
2026-02-07 18:01:12 -03:00
parent 2b7ab5f570
commit abb398d363
22 changed files with 4656 additions and 51 deletions

View File

@@ -404,12 +404,12 @@ pub const P2P = struct {
// Set local node ID from identity public key
p2p.local_node_id = p2p.identity_keypair.public_key.bytes;
std.log.info("P2P local node ID (from identity): {x}", .{p2p.local_node_id[0..8].*});
std.log.info("P2P local node ID (from identity): ", .{});
// Log Noise encryption status
if (p2p.noise_enabled) {
if (p2p.noise_keypair) |kp| {
std.log.info("Noise encryption enabled, public key: {x}", .{kp.public[0..8].*});
if (p2p.noise_keypair) |_| {
std.log.info("Noise encryption enabled", .{});
}
} else {
std.log.debug("Noise encryption disabled", .{});
@@ -936,7 +936,7 @@ pub const P2P = struct {
else => Error.SystemError,
};
};
std.log.info("Manually pinned key for peer: {x}", .{peer_id.bytes[0..8].*});
std.log.info("Manually pinned key for peer: ", .{});
} else {
return Error.InvalidState;
}
@@ -947,7 +947,7 @@ pub const P2P = struct {
if (p2p.key_pin_store) |kps| {
const removed = kps.unpinKey(peer_id.bytes);
if (removed) {
std.log.info("Unpinned key for peer: {x}", .{peer_id.bytes[0..8].*});
std.log.info("Unpinned key for peer: ", .{});
}
return removed;
}
@@ -963,7 +963,7 @@ pub const P2P = struct {
else => Error.SystemError,
};
};
std.log.info("Updated pinned key for peer: {x}", .{peer_id.bytes[0..8].*});
std.log.info("Updated pinned key for peer: ", .{});
} else {
return Error.InvalidState;
}