P2P Auth Layer
Overview
Authentication in a peer-to-peer (P2P) network is critical, ensuring that only verified peers participate in the network. We introduce an authentication mechanism that leverages BLS signatures, where only authorized peers can connect and broadcast messages.
Authentication Protocol
Upon peer connection to the network, it must complete an authentication process before being accepted. The protocol follows these steps:
Challenge Generation: The new peer receives a unique challenge string upon attempting to connect.
BLS Signature Signing: The peer must sign the challenge using its private BLS key.
Validation: The network validates the signed challenge by checking the BLS signature against the operator’s registered public key. If the signature is valid, the peer is authenticated and allowed to participate.
This mechanism prevents unauthorized nodes from connecting.
Control via AVSGovernance Contract [Optional]
This authentication protocol is optional and is controlled by the AVS governance contract. The governance contract determines whether authentication is enforced, allowing flexibility in network security policies.
Important Considerations:
Once this feature is enabled, peers running older versions of the client that do not support authentication will no longer be able to connect to upgraded peers.
Protocol Buffers for Authentication Messages
The authentication protocol defines the following Protobuf messages for communication:
CLI Commands for Authentication
Two new CLI commands to facilitate authentication:
Signing a Challenge with BLS Prompts the operator for their private key and signs the given hashed message.
Verifying an Authentication Signature Verifies if the given signature is valid for the provided message hash and operator ID. The operator ID is used to fetch the BLS public key from the contract for verification.
These commands ensure that authentication can be seamlessly integrated into the P2P network while maintaining security and trust.
Last updated