-
-
Notifications
You must be signed in to change notification settings - Fork 1
Restrictions on P2P data streaming. #13
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needednodePeer-to-peer node features and optimizations.Peer-to-peer node features and optimizations.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needednodePeer-to-peer node features and optimizations.Peer-to-peer node features and optimizations.
The current implementation of the P2P data streaming in the Connection class allows nodes to send potentially large amounts of data without sufficient structure or limitations. This can lead to inefficiencies, unintended data transmission, or even exploitation by malicious nodes. Enhancements are needed to impose stricter control over the data streaming process, ensuring that only expected and valid data is transmitted and received.
Proposed changes
connection.pyfrom node instances, especially when expecting the data (e.g. when expecting a module or tensors from a worker/user).ConenctiontoSmartNodewhen receiving tagged data to check that we are expecting or can handle it.smart_node.pycould be modularized and set up to work inconnection.pyas well.The changes will primarily impact the Connection class in p2p/connection.py, as well as the handle_data methods of nodes and roles (i.e. smart_node.py, torch_node.py, validator.py, user.py, and worker.py)