Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat(near-client): Chunk distribution via message bus (near#10480)
This PR implements the changes to nearcore proposed in near#10083 To summarize briefly here, the goal of this project is to reduce the latency experienced by RPC nodes through directly distributing chunks over a message bus. Validators eagerly push the chunks they produce on to this bus in addition to the peer-to-peer messages they send. When any node (validator or RPC) realizes it needs a chunk (e.g. because it is present in a new block) then it can check the message bus to see if it present there before trying a request over the peer-to-peer network. Participation in chunk distribution via the message bus is entirely optional and disabled by default. This PR has no impact on nodes that are not participating in the new chunk distribution. To be clear: this PR is not a replacement for the existing chunk distribution logic via the peer-to-peer network; it is a secondary channel which should provide faster chunk distribution (on the happy path). If invalid chunks are published to the message bus then nodes which receive them will request via the peer-to-peer network instead. The details of how the chunks are posted to the message bus and what service exists for querying from the message bus are left intentionally abstract. These will be handled by separate a application (or applications). The nearcore code only sends HTTP requests to endpoints specified in config that is used by node operators to opt-in to this feature.
- Loading branch information