|
1 | 1 | # Ethereum Distributed Validator Specification |
2 | 2 |
|
3 | | -Distributed Validators allow for implementing an Ethereum validator using a set of distributed nodes in a way that improves the resilience as compared to running a client on a single machine. |
| 3 | +Distributed Validators (DV) are a technique for distributing the job of an Ethereum validator among a set of distributed nodes in order to improve resilience (safety, liveness, or both) as compared to running a validator client on a single machine. |
4 | 4 |
|
5 | 5 | ## Introduction |
6 | 6 |
|
7 | | - |
| 7 | +### Motivation |
8 | 8 |
|
9 | | -This specification presents a way to implement Distributed Validator software as middleware between the Beacon Node and Validator Client. |
| 9 | +#### Traditional Validator Client Setup |
| 10 | +Ethereum validators participate in the [proof-of-stake (PoS) protocol](https://github.com/ethereum/consensus-specs) by signing messages (such as blocks or attestations) using their staking private key. The staking key is accessible only by the validator client software, which schedules the creation & signing of messages according to the duties assigned to the validator. Some risks involved in a traditional validator client setup are: |
| 11 | +- The staking private key resides in one location. If an adversary gains access to this key, it can create conflicting messages that result in slashing of the validator's deposit. |
| 12 | + - Stakers who do not operate their own validator need to hand over their staking private key to the operator. They must trust the operator for the security of their staking private key. |
| 13 | +- If the validator client software is unable to create timely messages to perform validator duties, the validator suffers an inactivity leak that reduces its balance. |
| 14 | + - This could happen due to causes such as software crashes, loss of network connection, hardware faults, etc. |
| 15 | +- If the Beacon Node to which the validator client is connected has a fault, a validator may end up following a minority fork resulting it appearing to be offline to the rest of the PoS protocol. |
10 | 16 |
|
11 | | -### Desired Guarantees |
12 | | -- Safety: Validator is never slashed unless `X` fraction of the Validator Client nodes are Byzantine, even under asynchronous network |
13 | | -- No Deadlock: The protocol never ends up in a deadlock state where no progress can be made |
14 | | -- Liveness: The protocol will eventually produce a new attestation/block, under partially synchronous network |
| 17 | +#### Distributed Validator Protocol |
| 18 | +The Distributed Validator protocol presents a solution to mitigate the risks & concerns associated with traditional, single Validator Client setups. In addition, this protocol can be used to enable advanced staking setups such as decentralized staking pools. |
| 19 | + |
| 20 | +### Basic Concepts |
| 21 | + |
| 22 | +The two fundamental concepts behind Distributed Validators are: |
| 23 | +- **consensus**: the responsibilities of a single validator are split among several co-validators, who must work together to reach agreement on how to vote before signing any message. |
| 24 | +- ***M-of-N* threshold signatures**: the validator's staking key is split into *N* pieces and each of the co-validators holds a share. When at least *M* of the co-validators reach consensus on how to vote, they each sign the message with their share and a combined signature can be reconstructed from the shares. |
| 25 | + |
| 26 | +Ethereum proof-of-stake uses the BLS signature scheme, in which the private keys can be *M-of-N* secret-shared to implement *M-of-N* threshold signatures. |
| 27 | + |
| 28 | +**Note**: Refer to the [glossary](glossary.md) for an explanation of new terms introduced in the Distributed Validator specifications. |
| 29 | + |
| 30 | +By combining a suitable (safety-favouring) consensus algorithm with an *M-of-N* threshold signature scheme, the DV protocol ensures that agreement is backed up by cryptography and at least *M* co-validators agree about any decision. |
| 31 | + |
| 32 | +### Resources |
| 33 | + |
| 34 | +#### Implementations |
| 35 | + |
| 36 | +The following are existing implementations of DIstributed Validator technology (but not necessarily implementations of this specification). |
| 37 | + |
| 38 | +- [`python-ssv`](https://github.com/dankrad/python-ssv): A proof-of-concept implementation of the distributed validator protocol in Python that interacts with the [Prysm Ethereum client](https://github.com/prysmaticlabs/prysm). |
| 39 | +- [`ssv`](https://github.com/bloxapp/ssv): An implementation of the distributed validator protocol in Go that interacts with the [Prysm Ethereum client](https://github.com/prysmaticlabs/prysm). |
| 40 | + |
| 41 | +#### Documents |
| 42 | +- [Distributed Validator Architecture Video Introduction](https://www.youtube.com/watch?v=awBX1SrXOhk) |
| 43 | + |
| 44 | +### General Architecture |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +This specification presents a way to implement Distributed Validator Client software as middleware between the Beacon Node (BN) and Validator Client (VC): |
| 49 | +- all communication between the BN and VC is intercepted by the DVC in order for it to provide the additional DV functionality. |
| 50 | +- the BN & VC are unaware of the presence of the DVC, i.e., they think they are connected to each other as usual. |
15 | 51 |
|
16 | 52 | ### Assumptions |
17 | | -- This specification assumes [some leader-based consensus protocol](src/dvspec/consensus.py) for the DV nodes to decide on signing upon the same attestation/block. |
| 53 | +- We assume *N* total nodes and an *M-of-N* threshold signature scheme. |
| 54 | + - For general compatibility with BFT consensus protocols, we assume that `M = (2 * N / 3) + 1`. |
| 55 | +- This specification assumes [some leader-based safety-favoring consensus protocol](src/dvspec/consensus.py) for the Co-Validators to decide on signing upon the same attestation/block. We assume that the consensus protocol runs successfully with *M* correct nodes out of *N* total nodes. |
| 56 | +- We assume the usual prerequisites for safe operation of the Validator Client, such as an up-to-date anti-slashing database, correct system clock, etc. |
18 | 57 | - We disregard the voting on the "correct" Ethereum fork for now - this functionality will be added in a future update. |
19 | 58 |
|
20 | | -### Design Rationale |
21 | | -- Validity of attestation data must be checked against the slashing DB at the beginning of the consensus process |
22 | | -- If the consensus process returns an attestation, then the slashing DB must allow it at that time |
23 | | -- There can only be one consensus process running at any given moment |
24 | | -- Slashing DB cannot be updated when a consensus process is running |
25 | | -- Consensus processes for attestation duties must be spawned in increasing order of slot |
| 59 | +### Desired Guarantees |
| 60 | +- **Safety (against key theft)**: |
| 61 | + - The Validator's staking private key is secure unless security is compromised at more than *M* of the *N* Co-Validators. |
| 62 | +- **Safety (against slashing)**: |
| 63 | + - Under the assumption of an asynchronous network, the Validator is never slashed unless more than 2/3rd of the Co-Validators are Byzantine. |
| 64 | + - Under the assumption of a synchronous network, the Validator is never slashed unless more than 1/3rd of the Co-Validators are Byzantine. |
| 65 | +- **Liveness**: The protocol will eventually produce a new attestation/block under partially synchronous network unless more than 1/3rd of the Co-Validators are Byzantine. |
26 | 66 |
|
27 | 67 | ## Spec |
28 | 68 |
|
29 | | -The distributed validator [specification](src/dvspec/spec.py) defines the behavior of the distributed validator regarding attestation & block production processes. It utilizes the [standard Ethereum node interface](src/dvspec/eth_node_interface.py) to communicate with the associated Beacon Node & Validator Client. |
| 69 | +The specifications are organized as follows: |
| 70 | +- The [distributed validator specification](src/dvspec/spec.py) defines the behavior of a Co-Validator regarding attestation & block production processes. |
| 71 | +- The [Ethereum node interface](src/dvspec/eth_node_interface.py) describes the interface to communicate with the associated Beacon Node & Validator Client. |
| 72 | +- The [consensus specification](src/dvspec/consensus.py) describes the basic structure for the consensus protocol used between Co-Validators. |
| 73 | +- The [networking specification](src/dvspec/networking.py) defines the required networking logic between Distributed Validator Clients. |
30 | 74 |
|
31 | 75 | ### Attestation Production Process |
32 | 76 |
|
|
0 commit comments