validation

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Code generated by fastssz. DO NOT EDIT. Hash: 85173a5d4024978f82aef12765deb4595a073417fb5ca46e4757771d34dd7b53 Version: 0.1.3

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMerkleValidation    = errors.New("merkle validation error")
	ErrExecutionBlockProof = errors.New("execution block proof error")
)

Functions

func MixInLength

func MixInLength(root [32]byte, length uint64) []byte

func TurnToPreMergeProof

func TurnToPreMergeProof(proof []byte) ([][]byte, error)

Types

type BeaconBlockBodyProof

type BeaconBlockBodyProof [beaconBlockBodyProofLen]common.Root

func (BeaconBlockBodyProof) ByteLength

func (b BeaconBlockBodyProof) ByteLength() (out uint64)

func (*BeaconBlockBodyProof) Deserialize

func (b *BeaconBlockBodyProof) Deserialize(dr *codec.DecodingReader) error

func (BeaconBlockBodyProof) FixedLength

func (b BeaconBlockBodyProof) FixedLength() uint64

func (*BeaconBlockBodyProof) HashTreeRoot

func (b *BeaconBlockBodyProof) HashTreeRoot(hFn tree.HashFn) common.Root

func (*BeaconBlockBodyProof) Serialize

type BeaconBlockHeaderProof

type BeaconBlockHeaderProof [beaconBlockHeaderProofLen]common.Root

func (BeaconBlockHeaderProof) ByteLength

func (b BeaconBlockHeaderProof) ByteLength() (out uint64)

func (*BeaconBlockHeaderProof) Deserialize

func (b *BeaconBlockHeaderProof) Deserialize(dr *codec.DecodingReader) error

func (BeaconBlockHeaderProof) FixedLength

func (b BeaconBlockHeaderProof) FixedLength() uint64

func (*BeaconBlockHeaderProof) HashTreeRoot

func (b *BeaconBlockHeaderProof) HashTreeRoot(hFn tree.HashFn) common.Root

func (*BeaconBlockHeaderProof) Serialize

type BlockNumberKey

type BlockNumberKey view.Uint64View

type HeaderValidator

type HeaderValidator struct {
	// contains filtered or unexported fields
}

func NewHeaderValidatorWithHistorySummaries

func NewHeaderValidatorWithHistorySummaries(historySummaries []capella.HistoricalSummary) HeaderValidator

func NewHeaderValidatorWithOracle

func NewHeaderValidatorWithOracle(oracle Oracle) HeaderValidator

func (HeaderValidator) ValidateHeaderAndProof

func (h HeaderValidator) ValidateHeaderAndProof(header *types.Header, proof []byte) error

func (HeaderValidator) ValidateHeaderWithProof

func (h HeaderValidator) ValidateHeaderWithProof(headerWithProof *history.BlockHeaderWithProof) error

type HistoricalRoots

type HistoricalRoots []common.Root

func (HistoricalRoots) ByteLength

func (h HistoricalRoots) ByteLength(spec *common.Spec) uint64

func (*HistoricalRoots) Deserialize

func (h *HistoricalRoots) Deserialize(spec *common.Spec, dr *codec.DecodingReader) error

func (*HistoricalRoots) FixedLength

func (h *HistoricalRoots) FixedLength(_ *common.Spec) uint64

func (HistoricalRoots) HashTreeRoot

func (h HistoricalRoots) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root

func (HistoricalRoots) Serialize

func (h HistoricalRoots) Serialize(spec *common.Spec, w *codec.EncodingWriter) error

type HistoricalRootsAccumulator

type HistoricalRootsAccumulator struct {
	HistoricalRoots HistoricalRoots
}

merge to pre capella accumulator

func DefaultHistoricalRootsAccumulator

func DefaultHistoricalRootsAccumulator() HistoricalRootsAccumulator

func NewHistoricalRootsAccumulator

func NewHistoricalRootsAccumulator(spec *common.Spec) HistoricalRootsAccumulator

type HistoricalRootsBlockProof

type HistoricalRootsBlockProof struct {
	BeaconBlockBodyProof   BeaconBlockBodyProof   `yaml:"beacon_block_body_proof" json:"beacon_block_body_proof"`
	BeaconBlockBodyRoot    common.Root            `yaml:"beacon_block_body_root" json:"beacon_block_body_root"`
	BeaconBlockHeaderProof BeaconBlockHeaderProof `yaml:"beacon_block_header_proof" json:"beacon_block_header_proof"`
	BeaconBlockHeaderRoot  common.Root            `yaml:"beacon_block_header_root" json:"beacon_block_header_root"`
	HistoricalRootsProof   HistoricalRootsProof   `yaml:"historical_roots_proof" json:"historical_roots_proof"`
	Slot                   common.Slot            `yaml:"slot" json:"slot"`
}

func (*HistoricalRootsBlockProof) ByteLength

func (h *HistoricalRootsBlockProof) ByteLength(spec *common.Spec) uint64

func (*HistoricalRootsBlockProof) Deserialize

func (*HistoricalRootsBlockProof) FixedLength

func (h *HistoricalRootsBlockProof) FixedLength(spec *common.Spec) uint64

func (*HistoricalRootsBlockProof) HashTreeRoot

func (h *HistoricalRootsBlockProof) HashTreeRoot(spec *common.Spec, hFn tree.HashFn) common.Root

func (*HistoricalRootsBlockProof) Serialize

type HistoricalRootsProof

type HistoricalRootsProof [historicalRootsProofLen]common.Root

func (HistoricalRootsProof) ByteLength

func (b HistoricalRootsProof) ByteLength() (out uint64)

func (*HistoricalRootsProof) Deserialize

func (b *HistoricalRootsProof) Deserialize(dr *codec.DecodingReader) error

func (HistoricalRootsProof) FixedLength

func (b HistoricalRootsProof) FixedLength() uint64

func (*HistoricalRootsProof) HashTreeRoot

func (b *HistoricalRootsProof) HashTreeRoot(hFn tree.HashFn) common.Root

func (*HistoricalRootsProof) Serialize

type HistoricalSummariesProvider

type HistoricalSummariesProvider struct {
	// contains filtered or unexported fields
}

post capella history summaries provider

func NewWithHistorySummaries

func NewWithHistorySummaries(historySummaries []capella.HistoricalSummary) *HistoricalSummariesProvider

func NewWithOracle

func NewWithOracle(oracle Oracle) *HistoricalSummariesProvider

func (*HistoricalSummariesProvider) GetHistoricalSummary

func (h *HistoricalSummariesProvider) GetHistoricalSummary(slot uint64) (capella.HistoricalSummary, error)

type Oracle

type Oracle interface {
	GetHistoricalSummaries(epoch uint64) (capella.HistoricalSummaries, error)
	GetBlockHeaderByHash(hash []byte) (*types.Header, error)
}

type PreMergeAccumulator

type PreMergeAccumulator struct {
	HistoricalEpochs [][]byte `ssz-max:"1897,32" ssz-size:"?,32"`
}

func DefaultPreMergeAccumulator

func DefaultPreMergeAccumulator() PreMergeAccumulator

func (*PreMergeAccumulator) GetTree

func (p *PreMergeAccumulator) GetTree() (*ssz.Node, error)

GetTree ssz hashes the PreMergeAccumulator object

func (*PreMergeAccumulator) HashTreeRoot

func (p *PreMergeAccumulator) HashTreeRoot() ([32]byte, error)

HashTreeRoot ssz hashes the PreMergeAccumulator object

func (*PreMergeAccumulator) HashTreeRootWith

func (p *PreMergeAccumulator) HashTreeRootWith(hh ssz.HashWalker) (err error)

HashTreeRootWith ssz hashes the PreMergeAccumulator object with a hasher

func (*PreMergeAccumulator) MarshalSSZ

func (p *PreMergeAccumulator) MarshalSSZ() ([]byte, error)

MarshalSSZ ssz marshals the PreMergeAccumulator object

func (*PreMergeAccumulator) MarshalSSZTo

func (p *PreMergeAccumulator) MarshalSSZTo(buf []byte) (dst []byte, err error)

MarshalSSZTo ssz marshals the PreMergeAccumulator object to a target array

func (*PreMergeAccumulator) SizeSSZ

func (p *PreMergeAccumulator) SizeSSZ() (size int)

SizeSSZ returns the ssz encoded size in bytes for the PreMergeAccumulator object

func (*PreMergeAccumulator) UnmarshalSSZ

func (p *PreMergeAccumulator) UnmarshalSSZ(buf []byte) error

UnmarshalSSZ ssz unmarshals the PreMergeAccumulator object

type ValidationOracle

type ValidationOracle struct {
	// contains filtered or unexported fields
}

func NewOracle

func NewOracle(client *rpc.Client) *ValidationOracle

func (*ValidationOracle) GetBlockHeaderByHash

func (o *ValidationOracle) GetBlockHeaderByHash(hash []byte) (*types.Header, error)

GetBlockHeaderByHash implements Oracle.

func (*ValidationOracle) GetHistoricalSummaries

func (o *ValidationOracle) GetHistoricalSummaries(epoch uint64) (capella.HistoricalSummaries, error)

type Validator

type Validator interface {
	ValidateContent(contentKey []byte, content []byte) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL