Expand description

The Epoch Accounts Hash (EAH) is a special hash of the whole accounts state that occurs once per epoch.

This hash is special because all nodes in the cluster will calculate the accounts hash at a predetermined slot in the epoch and then save that result into a later Bank at a predetermined slot.

This results in all nodes effectively voting on the accounts state (at least) once per epoch.

Structs

All the EAH calculation information for a specific epoch
The EpochAccountsHash holds the result after calculating the accounts hash once per epoch
Manage the epoch accounts hash

Functions

For the epoch that bank is in, get all the EAH calculation information
Get the number of slots from EAH calculation start to stop; known as the calculation interval
Calculation of the EAH occurs once per epoch. All nodes in the cluster must agree on which slot the EAH is based on. This slot will be at an offset into the epoch, and referred to as the “start” slot for the EAH calculation.
Calculation of the EAH occurs once per epoch. All nodes in the cluster must agree on which bank will hash the EAH into its Bank::hash. This slot will be at an offset into the epoch, and referred to as the “stop” slot for the EAH calculation. All nodes must complete the EAH calculation before this slot!
For the epoch that bank is in, get the slot that the EAH calculation starts
For the epoch that bank is in, get the slot that the EAH calculation stops
Is the EAH enabled this Epoch?
Is this bank in the calculation window?