near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.32k stars 623 forks source link

[network] Implement p2p state part transfer #12001

Open saketh-are opened 2 months ago

saketh-are commented 2 months ago

We will replace StateRequestPart with a routed message which can be sent over Tier1 or Tier2. The message will include the details of the state part request along with the IP address of the requesting node.

Snapshot hosts which receive and accept a state part request will initiate a direct connection with the originating node using the IP address in the request.

After the connection is established, the snapshot host will send a message containing the requested state part. It is expected that the receiving node will terminate the connection once the state part is transferred. If that does not occur, the snapshot host will terminate the connection after a time-out.