This guide provides step-by-step instructions for generating validator registration signatures using a existing validator keystore files and submitting them to the Gnosis Chain using a DApp. It also includes an optional step for uploading registration files when the DApp is hosted on a separate machine.
Important
Currently (as of 2025-09) only version 0 is fully usable on Gnosis Chain i.e. only one validator can be registered at a time.
The workflow consists of two main components:
- Signature generator:
- Uses an existing validator keystore files to create the
signedRegistrations.json
file required for registration.
- Uses an existing validator keystore files to create the
- Validator Registration DApp:
-
Either automatically uses the
signedRegistrations.json
file generated above, -
Or allows the user to upload the
signedRegistrations.json
file manually(useful when the DApp is hosted on a separate machine, see below for details).
-
Submits the registration to the
VALIDATOR_REGISTRY_ADDRESS
smart contract.
-
- Uses existing validator keystore files to generate registration signatures.
- Creates the
signedRegistrations.json
file with validator registration data. - Preconfigured with Gnosis Chain endpoints and contract addresses.
- Docker and the docker compose plugin installed on your system.
- Access to:
- Validator keystore files for your validator keys.
- The password for the keystore files.
The .env.example
file is provided as a template. Copy it to create your own .env
file.
cp .env.example .env
Replace the placeholders (valued in angle brackets) in the .env
file with your actual values:
Example:
# Path to Keystore Files
KEYSTORE_DIR=/some/path/to/validator_keys
# Validator Keystore Password
KEYSTORE_PASSWORD=very-secure-password
# Validator start and end index (inclusive)
# Registration signatures will be generated for these indices.
VALIDATOR_START_INDEX=4242
VALIDATOR_END_INDEX=4243
How you run the script depends on whether you want to run both parts (signature generator and DApp) on the same machine or on separate ones. The easiest is to run both parts on the same machine where your validator is also running.
Build the validator script Docker image:
docker compose build
Run the Docker container to generate registration signatures:
docker compose up signer
-
registrations/signedRegistrations.json
:- Contains the
message
andsignature
required for registration.
- Contains the
-
registrations/validatorInfo.json
:- Contains metadata necessary for running your validator client with Shutter enabled.
If you are generating registration files on a remote server (e.g., via SSH) and need to upload them to a machine running the DApp, follow these steps:
- On your local machine, run:
scp -r user@server:/path/to/output/signedRegistrations.json /local/path/
- Replace
user
with your SSH username. - Replace
/path/to/output/
with the directory where the registration files are saved on the server. - Replace
/local/path/
with the directory on your local machine where the file should be copied.
- Replace
- Open an SFTP session:
sftp user@server
- Navigate to the output directory:
cd /path/to/output/
- Download the file:
get signedRegistrations.json
The dapp/.env.example
file is provided with preconfigured values. Copy it to create your own .env
file.
cp dapp/.env.example dapp/.env
REACT_APP_EL_ENDPOINT=https://rpc.gnosis.gateway.fm
REACT_APP_VALIDATOR_REGISTRY_ADDRESS=0xefCC23E71f6bA9B22C4D28F7588141d44496A6D6
-
Navigate to the
dapp/
directory:cd dapp/
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open the DApp in your browser:
http://localhost:3000
-
Build the Docker image:
docker build -t validator-dapp -f docker/Dockerfile.dapp .
-
Run the Docker container:
docker run --rm -p 3000:3000 validator-dapp
-
Open the DApp in your browser:
http://localhost:3000
-
Connect Wallet:
- Connect your Web3 wallet (e.g., MetaMask).
- Ensure the wallet has sufficient funds to cover gas fees.
-
Upload
signedRegistrations.json
:- Use the file upload button to select the
signedRegistrations.json
file generated by the script.
- Use the file upload button to select the
-
Submit Signatures through transaction:
- Click the "Send Transaction" button to send the registration data.
- Wait for the transaction confirmation.
-
View Transaction:
- The DApp will display the transaction hash.
- You can view it on GnosisScan.
Use the validatorInfo.json
file generated by the script to configure your validator node.
nethermind --Shutter.Enabled=true --Shutter.ValidatorInfoFile=/path/to/output/validatorInfo.json
project-root/
├── output/
│ ├── signedRegistrations.json # Registration signatures
│ ├── validatorInfo.json # Validator configuration
├── dapp/
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── App.js
│ │ ├── index.js
│ ├── .env # DApp configuration (ignored in Git)
│ ├── .env.example # Example DApp configuration
│ ├── Dockerfile
│ ├── package.json
├── script/
│ ├── validator_script.js # Main validator script
│ ├── .env # Script configuration (ignored in Git)
│ ├── .env.example # Example script configuration
├── docker/
│ ├── Dockerfile.script # Dockerfile for the script
│ ├── Dockerfile.dapp # Dockerfile for the DApp
├── README.md # This documentation