A Remote Signing Server for Ethereum 2 Prysm Client (See Prysm Documentation)
** USE AT YOUR OWN RISK. IMPROPER SETUP MAY RESULT IN SLASHING **
- Implements a gRPC Microservice according to Prysm Specs
- Built on NestJS
- Compatible with the Official Ethereum 2.0 CLI
- Pre-Requisites
- Networking
- TLS Certificates
- Install Pluto-RS
- Run Pluto-RS
- Configure Prysm Validator
- Run Prysm Validator
- Active + Synced
Beacon Node
running on Prysm (See Prysm Documentation) - Server for running
Validator Node
on Prysm (can be same server asBeacon
). If using a separate server, ensure theBeacon
Server can receive requests from yourValidator
Server. - Set of Validator Keys in EIP-2335 Format. (ex: Ethereum 2.0 Launchpad)
- Server for Running Pluto-RS
The default Pluto port is 50055
. This can be changed in configuration, so modify below values if defaults are changed in config.
- Ensure
Validator
server has outbound port50055
open. - Ensure
Pluto-rs
server has inbound port50055
open.
First we need to generate a self-signed TLS certificate. On your remote signing server
, find a place to store your TLS Certificate(s) and Key(s). For this example I will be using ~/.ssl
.
cd ~/.ssl
openssl genrsa -out ca.key 4096
openssl req -new -x509 -key ca.key -sha256 -subj "/C=US/ST=CA/O=StakeInc" -days 3650 -out ca.cert
This generates a 4096-bit key, which is then used to generate a new x509 certificate authority valid for 10 years (10 x 365). Adjust the validity period to suit your needs. You'll use this certificate to sign the server
and client
certs.
Still on the remote signing server
.
- First generate an SSL configuration file. (see
config/certificate.conf
and replace areas with curly {} braces). Below is only an example. Modify it for your server and organizational needs. Pay particular attention to theCN
andalt_names
sections.
nano certificate.conf
[req]
default_bits = 4096
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[dn]
C = US
ST = CA
O = StakeInc
CN = localhost
[req_ext]
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
IP.1 = ::1
IP.2 = 127.0.0.1
IP.3 = 172.0.9.3
- Next, generate a
server
key and signing request (CSR).
openssl genrsa -out server.key 4096
openssl req -new -key server.key -out server.csr -config certificate.conf
- Finally, sign the CSR to generate the
server
certificate. Valid for 1 year.
openssl x509 -req -in server.csr -CA ca.cert -CAkey ca.key -CAcreateserial -out server.pem -days 365 -sha256 -extfile certificate.conf -extensions req_ext
Switching to your validator server
.
-
Generate SSL Configuration File (Same as
Server
process, modify IP and CN details to suit your needs). -
Generate a
client
key and signing request (CSR).
cd ~/.ssl
openssl genrsa -out client.key 4096
openssl req -new -key client.key -out client.csr -config certificate.conf
- Copy the contents of
client.csr
and make a copy on theremote signing server
. - On the
remote signing server
, sign the CSR to generate theclient
certificate. Valid for 1 year.
openssl x509 -req -in client.csr -CA ca.cert -CAkey ca.key -out client.pem -days 365 -sha256
- Copy the contents of
client.pem
andca.cert
to make a copy on thevalidator server
.
** Requires NodeJS **
git clone https://github.com/copernicrypt/pluto-rs
cd pluto-rs
npm install
- Import your Validator Keys to the
remote signing server
.
mkdir validators
unzip validators.zip
- Create Password File
nano password.txt
- Create Pluto Config File (see
config/default.yml
for example) - Start Pluto-RS
cd pluto-rs
npm run start --config=<PATH_TO_CONFIG>
See Prysm Documentation.
On your validator server
, create a new remote wallet and reference your TLS credentials and remote signing server
. NOTE If you already have a wallet setup on this server, you will either need to delete it, or specify a new --wallet-dir
for the new remote wallet.
cd prysm
./prysm.sh validator wallet create --keymanager-kind=remote --grpc-remote-address=<YOUR_REMOTE_SIGNING_SERVER_ADDRESS> --remote-signer-crt-path=<PATH_TO_CLIENT_CERTIFICATE> --remote-signer-key-path=<PATH_TO_CLIENT_KEY> --remote-signer-ca-crt-path=<PATH_TO_CERTIFCATE_AUTHORITY>
Test that your configuration is working and can see your validators:
./prysm.sh validator accounts list
If you created a new wallet-dir
for the remote server, make sure you specify it in the config.
./prysm validator --config-file=<PATH_TO_CONFIG>
Could not list accounts: could not list validator accounts with remote keymanager: could not fetch validating public keys: could not list accounts from remote server: rpc error: code = Unavailable desc = connection error: desc = "transport: authentication handshake failed: x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0"
Problem: Generating Certificates using a Common Name (CN), instead of the newer Subjective Alternative Name (SAN) breaks in GO >= v1.15
.
Solution: Prefix running your validator with GODEBUG=x509ignoreCN=0
.
GODEBUG=x509ignoreCN=0 ./prysm.sh validator accounts list
- Add Teku Compatibility