github.com/prysmaticlabs/prysm@v1.4.4/validator/keymanager/remote/doc.go (about)

     1  /*
     2  Package remote defines an implementation of an on-disk, EIP-2335 keystore.json
     3  approach towards defining validator accounts in Prysm. A validating private key is
     4  encrypted using a passphrase and its resulting encrypted file is stored as a
     5  keystore.json file under a unique, human-readable, account namespace. This imported keymanager approach
     6  relies on storing account information on-disk, making it trivial to import, backup and
     7  list all associated accounts for a user.
     8  
     9  Package remote defines a keymanager implementation which connects to a remote signer
    10  server via gRPC. The connection is established via TLS using supplied paths to
    11  certificates and key files and allows for submitting remote signing requests for
    12  Ethereum data structures as well as retrieving the available signing public keys from
    13  the remote server.
    14  
    15  Remote sign requests are defined by the following protobuf schema:
    16  
    17   // SignRequest is a message type used by a keymanager
    18   // as part of Prysm's accounts implementation.
    19   message SignRequest {
    20       // 48 byte public key corresponding to an associated private key
    21       // being requested to sign data.
    22       bytes public_key = 1;
    23  
    24       // Raw bytes signing root the client is requesting to sign. The client is
    25  	 // expected to determine these raw bytes from the appropriate BLS
    26       // signing domain as well as the signing root of the data structure
    27  	 // the bytes represent.
    28       bytes signing_root = 2;
    29   }
    30  
    31  Remote signing responses will contain a BLS12-381 signature along with the
    32  status of the signing response from the remote server, signifying the
    33  request either failed, was denied, or completed successfully.
    34  
    35   message SignResponse {
    36       enum Status {
    37           UNKNOWN = 0;
    38           SUCCEEDED = 1;
    39           DENIED = 2;
    40           FAILED = 3;
    41       }
    42  
    43       // BLS12-381 signature for the data specified in the request.
    44       bytes signature = 1;
    45   }
    46  
    47  The remote keymanager can be customized via a keymanageropts.json file
    48  which requires the following schema:
    49  
    50   {
    51     "remote_address": "remoteserver.com:4000", // Remote gRPC server address.
    52     "remote_cert": {
    53       "crt_path": "/home/eth2/certs/client.crt", // Client certificate path.
    54       "ca_crt_path": "/home/eth2/certs/ca.crt",  // Certificate authority cert path.
    55       "key_path": "/home/eth2/certs/client.key", // Client key path.
    56     }
    57   }
    58  */
    59  package remote