WIP: This standard must be cheap to implement to be successful. Core devs are encouraged to voice concerns around complexity to ensure a timely implementation.
Minimal validator API to enable a basic validator manager workflow. Supports:
Does not support:
All routes SHOULD be disabled by default and only be enabled with a CLI flag such as --enable-validator-api
.
All sensitive routes MUST be authenticated. There SHOULD exist a single password per validator client binary such that multiple users are not supported.
The validator API MUST allow to add and delete accounts but SHOULD not allow to retrieve them. Users are encouraged to use alternative locations to backup their keystores and use them to perform validator client migration.
All account and slashing protection routes MUST be authenticated with a token set by the Login route. The server MUST not rely on the UI's Javascript to add extra headers for authentication, and SHOULD use an HttpOnly cookie token for authentication.
401 Unauthorized
if no token is found.403 Forbidden
if a token is found but is invalid or incorrect.WIP: Routes prefix and versioning TBD
GET /accounts
- ListAccountsPOST /accounts/import
- ImportAccountsImport keystores generated by the Eth2.0 deposit CLI tooling. All keystores MUST be encrypted with the same password.
POST /accounts/delete
DeleteAccountsDelete keystores for the pubkeys provided in the request. The validator client MUST stop validating with these keystores immediately and MUST return a 200 status only after confirming no more signatures can be created with those keys.
GET /slashing_protection
- ExportSlashingProtectionMUST return a file with the format defined in EIP-3076: Slashing Protection Interchange Format. If pubkeys
is not specified MUST return data for all pubkeys in the local slashing protection DB.
POST /slashing_protection
- ImportSlashingProtectionMUST accept a file with the format defined in EIP-3076: Slashing Protection Interchange Format.
Users are encouraged to use the slashing_protection_last_entry
field to confirm that they successfully added slashing protection data for their accounts.
GET /login
- LoginStatusConvenience method to check if user has signed up, and their token is valid.
POST /login
- LoginMUST validate the provided passwords against a local "Record". After successful validation MUST return a Set-Cookie
header
Cookie atributes:
HttpOnly
: MUST be includedSameSite
: MUST be set to Strict
Max-Age
: MAY be includedSecure
: SHOULD not be included. Validator client servers may not have TLS/SSL certificatesDomain
: MAY be includedPOST /signup
- SignupRegister a new password to be used to encrypt the local wallet. The password MUST:
The validator binary MUST expose a CLI argument --persist-password
to enable persisting the password such that it can be restarted and perform validator duties without requiring interaction by the user.
POST /logout
LogoutMUST invalidate the token set by the Login route if found in the request headers.
POST /change_password
- ChangePasswordThe validator client MUST re-encrypt the local representation of the keystores if applicable.