Documentation
¶
Index ¶
- Constants
- func BigToLittleEndian(input *big.Int) [32]byte
- func ConvertTo32ByteArray(b []byte) [32]byte
- func ConvertUint64ToRoot(n uint64) phase0.Root
- func GetDepth(d uint64) uint8
- func GetSlotTimestamp(beaconState *spec.VersionedBeaconState, blockHeader *phase0.BeaconBlockHeader) (uint64, error)
- func NextPowerOfTwo(v uint64) uint
- type BalanceProof
- type Bytes32
- type EigenPodProofs
- func (epp *EigenPodProofs) ComputeBeaconStateRoot(beaconState *deneb.BeaconState) (phase0.Root, error)
- func (epp *EigenPodProofs) ComputeBeaconStateTopLevelRoots(beaconState *spec.VersionedBeaconState) (*beacon.BeaconStateTopLevelRoots, error)
- func (epp *EigenPodProofs) ComputeValidatorBalancesTree(slot phase0.Slot, balances []phase0.Gwei) ([][]phase0.Root, error)
- func (epp *EigenPodProofs) ComputeValidatorTree(slot phase0.Slot, validators []*phase0.Validator) ([][]phase0.Root, error)
- func (epp *EigenPodProofs) ComputeVersionedBeaconStateTopLevelRoots(beaconState *spec.VersionedBeaconState) (*beacon.BeaconStateTopLevelRoots, error)
- func (epp *EigenPodProofs) PrecomputeCache(state *spec.VersionedBeaconState) error
- func (epp *EigenPodProofs) ProveCheckpointProofs(oracleBlockHeader *phase0.BeaconBlockHeader, ...) (*VerifyCheckpointProofsCallParams, error)
- func (epp *EigenPodProofs) ProveValidatorContainers(oracleBlockHeader *phase0.BeaconBlockHeader, ...) (*VerifyValidatorFieldsCallParams, error)
- type StateRootProof
- type ValidatorBalancesRootProof
- type VerifyCheckpointProofsCallParams
- type VerifyValidatorFieldsCallParams
Constants ¶
const (
MAX_ORACLE_STATE_CACHE_SIZE = 2000000
)
Variables ¶
This section is empty.
Functions ¶
func BigToLittleEndian ¶
func ConvertTo32ByteArray ¶
func ConvertUint64ToRoot ¶
func GetSlotTimestamp ¶
func GetSlotTimestamp(beaconState *spec.VersionedBeaconState, blockHeader *phase0.BeaconBlockHeader) (uint64, error)
func NextPowerOfTwo ¶
Types ¶
type BalanceProof ¶
type Bytes32 ¶
type Bytes32 [32]byte
func ConvertUint64ToBytes32 ¶
func (*Bytes32) MarshalJSON ¶
func (*Bytes32) UnmarshalJSON ¶
type EigenPodProofs ¶
type EigenPodProofs struct {
// contains filtered or unexported fields
}
func NewEigenPodProofs ¶
func NewEigenPodProofs(chainID uint64, oracleStateCacheExpirySeconds int) (*EigenPodProofs, error)
NewEigenPodProofs creates a new EigenPodProofs instance. chainID is the chain ID of the chain that the EigenPodProofs instance will be used for. oracleStateCacheExpirySeconds is the expiry time for the oracle state cache in seconds. After this time caches of beacon state roots, validator trees and validator balances trees will be evicted.
func (*EigenPodProofs) ComputeBeaconStateRoot ¶
func (epp *EigenPodProofs) ComputeBeaconStateRoot(beaconState *deneb.BeaconState) (phase0.Root, error)
func (*EigenPodProofs) ComputeBeaconStateTopLevelRoots ¶
func (epp *EigenPodProofs) ComputeBeaconStateTopLevelRoots(beaconState *spec.VersionedBeaconState) (*beacon.BeaconStateTopLevelRoots, error)
func (*EigenPodProofs) ComputeValidatorBalancesTree ¶
func (*EigenPodProofs) ComputeValidatorTree ¶
func (*EigenPodProofs) ComputeVersionedBeaconStateTopLevelRoots ¶
func (epp *EigenPodProofs) ComputeVersionedBeaconStateTopLevelRoots(beaconState *spec.VersionedBeaconState) (*beacon.BeaconStateTopLevelRoots, error)
func (*EigenPodProofs) PrecomputeCache ¶
func (epp *EigenPodProofs) PrecomputeCache(state *spec.VersionedBeaconState) error
func (*EigenPodProofs) ProveCheckpointProofs ¶
func (epp *EigenPodProofs) ProveCheckpointProofs(oracleBlockHeader *phase0.BeaconBlockHeader, oracleBeaconState *spec.VersionedBeaconState, validatorIndices []uint64) (*VerifyCheckpointProofsCallParams, error)
func (*EigenPodProofs) ProveValidatorContainers ¶
func (epp *EigenPodProofs) ProveValidatorContainers(oracleBlockHeader *phase0.BeaconBlockHeader, oracleBeaconState *spec.VersionedBeaconState, validatorIndices []uint64) (*VerifyValidatorFieldsCallParams, error)
ProveValidatorContainers generates proofs for the validator containers. oracleBlockHeader is the block header of block whose state root will be looked up from the EIP-4788 precompile oracleBeaconState is the beacon state corresponding to the oracleBlockHeader validatorIndices is the list of validator indices for which the proofs are to be generated
type StateRootProof ¶
type VerifyCheckpointProofsCallParams ¶
type VerifyCheckpointProofsCallParams struct { ValidatorBalancesRootProof *ValidatorBalancesRootProof `json:"validatorBalancesRootProof"` BalanceProofs []*BalanceProof `json:"balanceProofs"` }
type VerifyValidatorFieldsCallParams ¶
type VerifyValidatorFieldsCallParams struct { StateRootProof *StateRootProof `json:"stateRootProof"` ValidatorIndices []uint64 `json:"validatorIndices"` ValidatorFieldsProofs []common.Proof `json:"validatorFieldsProofs"` ValidatorFields [][]Bytes32 `json:"validatorFields"` }