You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
By changing from the stateless http protocol to persistent socket connections, we aim to improve block / transaction propagations times, and the general efficiency of peer to peer communications.
For communication with peers, different process (worker) can be launched- it is easy to do with SocketCluster. SocketCluster very seems to be a very good choice in terms of scalability. However, it is not compatible with the WAMP protocol (such as AutobahnJS), and from the point of how peers communicating, RPC could be very useful. It addresses the problem of the response order in case of subscription to an event after peer sends many requests one by one. Merging ideas of WAMP protocol to introduce RPC with good performance of SocketCluster seems to be the best solution.
library to extend WebSocket Socket object with RPC methods
setup SocketCluster server and client in Lisk
handshake between peers as WS middleware
transactions broadcast and receiving as WS stream
signatures broadcast and receiving as WS stream
new block broadcast and receiving as WS stream
ping peer as WS RPC method
get height from peer as WS RPC method
get peers list from peer as WS RPC method
get common block from peer as WS RPC method
load blocks from peer as WS RPC method
load signatures from peer as WS RPC method
load transactions from peer as WS RPC method
introduce another layer of tests, which will test the peer's integration
Also, some changes should be introduced in current Lisk protocol:
get rid of passing the peer headers with every request and updating the peer after every request as it will be done by preceding handshake
remove getFromRandomPeer and getFromPeer functions
Decoupling @4miners ideas from #406:
Phase 2 of 2: Change peers communication protocol from http to websockets.
The text was updated successfully, but these errors were encountered: