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

[ProjectTracking]: congestion control milestone 2 #11

Closed
akhi3030 opened this issue Dec 7, 2023 · 1 comment
Closed

[ProjectTracking]: congestion control milestone 2 #11

akhi3030 opened this issue Dec 7, 2023 · 1 comment

Comments

@akhi3030
Copy link
Contributor

akhi3030 commented Dec 7, 2023

All information below was gathered by @Akashin. I am filling it out on his behalf.

Goals

Current status

Right now we have fully implemented Local Congestion Control, meaning that shard validators and RPC nodes will not be overloaded by transactions coming into their local transaction pools and receipts generated from local transactions.

Technically, this is achieved by introducing two limits:

  • The size of the local transaction pool for each shard is limited to 100MB, after the limit is reached, the node stops accepting new transactions. This limit is configurable
  • The size of the delayed receipts queue is limited to 20,000 receipts, after the limit is reached, the chunk producer will stop including new receipts in the chunk. This limit is not configurable but is not yet enforced by consensus

For the exact implemented features see https://github.com/near/nearcore/milestone/26?closed=1

Next steps

Local Congestion Control only limits local congestion sources but ignores global sources of congestion such as receipts incoming from the other shards. The Global Congestion Control milestone aims to address this by introducing a global limit on the number/size of delayed receipts that are present in the queues across all shards.

Technically, this can be achieved through:

  • Communicating information about the per-shard size of delayed receipts by including it in the chunk header
  • Chunk producers should stop including new receipts in the chunk when the aggregate size of delayed receipts across all shards is more than some threshold (e.g. 100MB)

The high-level outline of technical work can be found at https://github.com/near/nearcore/milestone/27

See the meeting notes for the relevant discussion.

As a nice to have, we can enforce this constraint at a protocol level, though this is arguably a low-priority attack vector.

Links to external documentations and discussions

Estimated effort

TODO. Nominally all the engineering effort should be in code owned by the core team. In the past engineers from the runtime team have also contributed and may contribute in future as well.

Assumptions

TODO

Pre-requisites

TODO

Out of scope

TODO. I believe that this project should just be for implementing global congestion control. The related project for transaction priority should be tracked in a different project.

@jakmeier
Copy link

jakmeier commented Feb 28, 2024

I suggest we close this issue in favour of its successor #48

@akhi3030 akhi3030 closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants