Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update p2p reqresp with explicit handling of reqresp size bounds #2077

Closed
mbaxter opened this issue Jun 8, 2020 · 0 comments · Fixed by #2360
Closed

Update p2p reqresp with explicit handling of reqresp size bounds #2077

mbaxter opened this issue Jun 8, 2020 · 0 comments · Fixed by #2360
Assignees
Labels
TeamCentaur Under active development by TeamCentaur @PegaSys

Comments

@mbaxter
Copy link
Contributor

mbaxter commented Jun 8, 2020

Description

Apply changes from spec PR: ethereum/consensus-specs#1800

The v0.12.1 networking spec states:

For both requests and responses, the encoding-dependent-header MUST be valid, and the encoded-payload must be valid within the constraints of the encoding-dependent-header. This includes type-specific bounds on payload size for some encoding strategies. Regardless of these type specific bounds, a global maximum uncompressed byte size of MAX_CHUNK_SIZE MUST be applied to all method response chunks.

Clients MUST ensure that lengths are within these bounds; if not, they SHOULD reset the stream immediately. Clients tracking peer reputation MAY decrement the score of the misbehaving peer under this circumstance.

See "What are SSZ type size bounds?" for an explanation of how to calculate type-specific chunk size limits.

@mbaxter mbaxter added the TeamCentaur Under active development by TeamCentaur @PegaSys label Jun 8, 2020
@cemozerr cemozerr changed the title Enforce stricter type-specific size limits for rpc chunks Update p2p reqresp with explicit handling of reqresp size bounds Jun 8, 2020
@rolfyone rolfyone assigned rolfyone and unassigned rolfyone Jun 30, 2020
@ajsutton ajsutton self-assigned this Jul 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TeamCentaur Under active development by TeamCentaur @PegaSys
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants