This document describes a method for tracking the performance of Eth2 validators. It tracks the following parameters for each validator:
attestation_hits
: The validator had an attestation included on-chain.attestation_misses
: There was no attestation included on-chain for an epoch.head_attestation_hits
: The validator had an attestation included on-chain with a correct beacon_block_root
.head_attestation_misses
: The validator had an attestation included on-chain with an incorrect beacon_block_root
.target_attestation_hits
: The validator had an attestation included on-chain with a correct target.root
.target_attestation_misses
: The validator had an attestation included on-chain with an incorrect target.root
.delay_avg
: The average of all the attestation delays where an attestation was included on-chain.It collects CSV data using the lcli
tool, then displays that data in Google Sheets.
There's an example spreadsheet where you can view this data for some random validators. You can also copy the spreadsheet, add your own validators and compare them against the global average:
We provide the tools to run this method across any span of epochs, but we provide an example spreadsheet across the following range:
27112
32300
This example timespan starts immediately after a prior Q1 2021 validator rewards survey by Ben Edgington and stops just before there were issues with block production on mainnet. This timespan feels recent, unstudied and represents typical operating conditions of the chain.
https://github.com/paulhauner/lighthouse/blob/etl/lcli/src/etl/validator_performance.rs
Define the ValidatorPerformance
struct:
struct ValidatorPerformance {
/// The validator had an attestation included on-chain.
pub attestation_hits: usize,
/// Inverse of `attestation_hits`.
pub attestation_misses: usize,
/// The validator had an attestation included on-chain which matched the "head" vote.
pub head_attestation_hits: usize,
/// Inverse of `head_attestation_hits`.
pub head_attestation_misses: usize,
/// The validator had an attestation included on-chain which matched the "target" vote.
pub target_attestation_hits: usize,
/// Inverse of `target_attestation_hits`.
pub target_attestation_misses: usize,
/// The validator achieved a `head_attestation_hits` point when the first slot of the epoch was
/// a skip-slot.
///
/// This is generally *not useful*, it was used to try and debug late blocks on mainnet.
pub first_slot_head_attester_when_first_slot_empty: usize,
/// The validator achieved a `head_attestation_hits` point when the first slot of the epoch was
/// *not* a skip-slot.
///
/// This is generally *not useful*, it was used to try and debug late blocks on mainnet.
pub first_slot_head_attester_when_first_slot_not_empty: usize,
/// A map of `inclusion_distance -> count`, indicating how many times the validator achieved
/// each inclusion distance.
pub delays: HashMap<u64, u64>,
}
The, allocate a list of [ValidatorPerformance; num_validators]
, where all values in ValidatorPerformance
are either usize::zero
or HashMap::empty
.
Then,
Each time an epoch boundary is reached, use ValidatorStatus
to detemine the participation from the previous epoch (i.e., the epoch for which we have a complete set of attestations) and increment any relevant ValidatorPerformance
value for each validator.
Once we have finished applying the blocks to the state, produce a CSV which is a 1:1 representation of the [ValidatorPerformance; num_validators]
list with one exception: we produce a delay_avg
which is simply the average of all attestation delays.
lcli
directory.cargo run --release etl-validator-performance --output ./valperf.csv --start-epoch 27112 --end-epoch 32300
valperf.csv
Sheets will take a while to load it, your browser might complain.
or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing