Documentation ¶
Overview ¶
Package forks contains useful helpers for Ethereum consensus fork-related functionality.
Index ¶
- func CreateForkDigest(genesisTime time.Time, genesisValidatorsRoot []byte) ([4]byte, error)
- func Fork(targetEpoch types.Epoch) (*ethpb.Fork, error)
- func ForkDigestFromEpoch(currentEpoch types.Epoch, genesisValidatorsRoot []byte) ([4]byte, error)
- func IsForkNextEpoch(genesisTime time.Time, genesisValidatorsRoot []byte) (bool, error)
- func NextForkData(currEpoch types.Epoch) ([4]byte, types.Epoch, error)
- func RetrieveForkDataFromDigest(digest [4]byte, genesisValidatorsRoot []byte) ([4]byte, types.Epoch, error)
- func SortedForkVersions(forkSchedule map[[4]byte]types.Epoch) [][4]byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateForkDigest ¶
CreateForkDigest creates a fork digest from a genesis time and genesis validators root, utilizing the current slot to determine the active fork version in the node.
func ForkDigestFromEpoch ¶
ForkDigestFromEpoch retrieves the fork digest from the current schedule determined by the provided epoch.
func IsForkNextEpoch ¶
IsForkNextEpoch checks if an alloted fork is in the following epoch.
func NextForkData ¶
NextForkData retrieves the next fork data according to the provided current epoch.
func RetrieveForkDataFromDigest ¶
func RetrieveForkDataFromDigest(digest [4]byte, genesisValidatorsRoot []byte) ([4]byte, types.Epoch, error)
RetrieveForkDataFromDigest performs the inverse, where it tries to determine the fork version and epoch from a provided digest by looping through our current fork schedule.
Types ¶
This section is empty.