Skip to content

docs(pong): bound Pong.servers and Pong.properties to max 256 entries - #55

Merged
davvd merged 1 commit into
APN-Network:masterfrom
VasilevNStas:25-docs/servers-entry-limit
Jul 4, 2026
Merged

docs(pong): bound Pong.servers and Pong.properties to max 256 entries#55
davvd merged 1 commit into
APN-Network:masterfrom
VasilevNStas:25-docs/servers-entry-limit

Conversation

@VasilevNStas

Copy link
Copy Markdown
Contributor

Description

Documents a maximum entry count of 256 for both Pong.servers and Pong.properties. No wire changes.

Problem

Both Pong.servers (repeated Peer) and Pong.properties (repeated Property) had no documented upper bound. A compromised Node could return millions of entries, forcing the client to allocate unbounded memory before any application-level check can run — the outbound counterpart of issue #23 (Ping.canaries).

Changes

  • Pong.properties: added "Max 256 entries; clients MUST reject a Pong carrying more."
  • Pong.servers: added "Max 256 entries; clients MUST reject a Pong carrying more."

Migration

Clients should add a check after deserialising the Pong: if len(servers) > 256 or len(properties) > 256, discard the Pong and treat the Node as compromised.

Closes #25

@VasilevNStas

Copy link
Copy Markdown
Contributor Author

@yegor256 @davvd plz review

@0crat

0crat commented Jul 4, 2026

Copy link
Copy Markdown

@VasilevNStas Thanks for the contribution! You've earned +8 points for this: +16 as a basis; -8 for too few (2) hits-of-code. Please, keep them coming. Your running score is +68; don't forget to check your Zerocracy account too).

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.

Pong.servers has no maximum-entry contract, enabling unbounded client-side memory allocation

3 participants