Skip to content

docs: document dotted-decimal conversion between Peer.ip and Ping.canaries#46

Open
VasilevNStas wants to merge 1 commit into
APN-Network:masterfrom
VasilevNStas:14-docs/canaries-ip-conversion
Open

docs: document dotted-decimal conversion between Peer.ip and Ping.canaries#46
VasilevNStas wants to merge 1 commit into
APN-Network:masterfrom
VasilevNStas:14-docs/canaries-ip-conversion

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Description

Documents the required string-to-bytes conversion between Peer.ip (raw 4 bytes) and Ping.canaries keys (dotted-decimal string). No wire changes.

Problem

Ping.canaries (ping.proto:23) uses dotted-decimal string keys like "203.0.113.7", while Peer.ip (pong.proto:68) delivers the same address as bytes — four raw bytes in network byte order. A client inserting the raw bytes directly as a canary key produces a 4-character binary key like "\xcb\x00\x71\x07" that the Node cannot match, silently dropping every failure report from that client.

Changes

  • Peer.ip comment: added "Clients MUST convert this to dotted-decimal form when using the address as a Ping.canaries key."
  • Ping.canaries comment: added "When producing keys from Peer.ip (four raw bytes, network byte order), the client MUST convert each byte to its decimal representation and join with dots before inserting into this map."

Closes #14

@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@davvd plz review

@davvd

davvd commented Jul 4, 2026

Copy link
Copy Markdown
Member

@VasilevNStas we have merge conflicts here, please resolve them and we'll merge

@VasilevNStas
VasilevNStas force-pushed the 14-docs/canaries-ip-conversion branch from bb01648 to 0307a59 Compare July 4, 2026 17:59
@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@davvd conflicts resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ping.canaries key format (dotted string) is incompatible with Peer.ip encoding (raw bytes), requiring an undocumented conversion

2 participants