Documentation ¶
Overview ¶
Package history defines methods to parse, import, and export slashing protection data from a standard JSON file according to EIP-3076 https://eips.ethereum.org/EIPS/eip-3076. This format is critical to allow safe interoperability between Ethereum consensus clients.
Index ¶
- func EpochFromString(str string) (primitives.Epoch, error)
- func ExportStandardProtectionJSON(ctx context.Context, validatorDB db.Database, filteredKeys ...[]byte) (*format.EIPSlashingProtectionFormat, error)
- func ImportStandardProtectionJSON(ctx context.Context, validatorDB db.Database, r io.Reader) error
- func PubKeyFromHex(str string) ([fieldparams.BLSPubkeyLength]byte, error)
- func RootFromHex(str string) ([32]byte, error)
- func SlotFromString(str string) (primitives.Slot, error)
- func Uint64FromString(str string) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EpochFromString ¶
func EpochFromString(str string) (primitives.Epoch, error)
EpochFromString converts a string into Epoch.
func ExportStandardProtectionJSON ¶
func ExportStandardProtectionJSON( ctx context.Context, validatorDB db.Database, filteredKeys ...[]byte, ) (*format.EIPSlashingProtectionFormat, error)
ExportStandardProtectionJSON extracts all slashing protection data from a validator database and packages it into an EIP-3076 compliant, standard
func ImportStandardProtectionJSON ¶
ImportStandardProtectionJSON takes in EIP-3076 compliant JSON file used for slashing protection by Ethereum validators and imports its data into Prysm's internal representation of slashing protection in the validator client's database. For more information, see the EIP document here: https://eips.ethereum.org/EIPS/eip-3076.
func PubKeyFromHex ¶
func PubKeyFromHex(str string) ([fieldparams.BLSPubkeyLength]byte, error)
PubKeyFromHex takes in a hex string, verifies its length as 48 bytes, and converts that representation.
func RootFromHex ¶
RootFromHex takes in a hex string, verifies its length as 32 bytes, and converts that representation.
func SlotFromString ¶
func SlotFromString(str string) (primitives.Slot, error)
SlotFromString converts a string into Slot.
func Uint64FromString ¶
Uint64FromString converts a string into a uint64 representation.
Types ¶
This section is empty.