Skip to content

feat(code): Limit the number of values in sync response to cfg.sync.max_response_size #1164

@ancazamfir

Description

@ancazamfir

This is an issue remaining after #1070

The syncing node may request a value range for which the response exceeds the cfg.p2p.rpc_max_size.
cfg.p2p.rpc_max_size is sometimes used to overwrite cfg.sync.max_response_size.
The number of values per batch can be configured with sync_cfg.batch_size.

This issue is to address the following:

  • Ensure that the response payload does not exceed:

    • the number of values required: i.e. if n values are requested do not respond with N>n values, AND
    • the min(cfg.p2p.rpc_max_size, cfg.p2p.rpc_max_size) in byte size
  • Make sure that the syncing node does not penalize peers that respond with less than n values

See also these comments

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions