Documentation
¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: e2277d836aafc5b54e25c6aafc08faeee9d509bd2e0c8a90631c6e8730677ffc Version: 0.1.3
Code generated by fastssz. DO NOT EDIT. Hash: e5beced3c63a663c7b07f1172479ac975900657766d76c489c447d9e9076913b Version: 0.1.3
Index ¶
- Variables
- type BlobSidecar
- func (b *BlobSidecar) GetTree() (*ssz.Node, error)
- func (b *BlobSidecar) HashTreeRoot() ([32]byte, error)
- func (b *BlobSidecar) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (b *BlobSidecar) MarshalSSZ() ([]byte, error)
- func (b *BlobSidecar) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (b *BlobSidecar) SizeSSZ() (size int)
- func (b *BlobSidecar) UnmarshalSSZ(buf []byte) error
- type BlobSidecars
- func (b *BlobSidecars) GetTree() (*ssz.Node, error)
- func (b *BlobSidecars) HashTreeRoot() ([32]byte, error)
- func (b *BlobSidecars) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (b *BlobSidecars) MarshalSSZ() ([]byte, error)
- func (b *BlobSidecars) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (b *BlobSidecars) SizeSSZ() (size int)
- func (b *BlobSidecars) UnmarshalSSZ(buf []byte) error
- func (bs *BlobSidecars) ValidateBlockRoots() error
Constants ¶
This section is empty.
Variables ¶
var ErrSidecarContainsDifferingBlockRoots = errors.New(
"sidecar contains blobs with differing block roots",
)
ErrSidecarContainsDifferingBlockRoots is returned when a sidecar contains blobs with differing block roots.
Functions ¶
This section is empty.
Types ¶
type BlobSidecar ¶
type BlobSidecar struct {
// Index represents the index of the blob in the block.
Index uint64
// Blob represents the blob data.
// TODO: Wrangle fastssz to allow us to use a pointer here to avoid
// copying the blob around all the time. Benchmark this as well.
Blob kzg.Blob
// KzgCommitment is the KZG commitment of the blob.
KzgCommitment kzg.Commitment
// Kzg proof allows folr the verification of the KZG commitment.
KzgProof kzg.Proof
// BeaconBlockHeader represents the beacon block header for which this blob
// is being included.
BeaconBlockHeader *primitives.BeaconBlockHeader
// InclusionProof is the inclusion proof of the blob in the beacon block.
InclusionProof [][]byte `ssz-size:"8,32"`
}
BlobSidecar as per the Ethereum 2.0 specification: https://github.com/ethereum/consensus-specs/blob/dev/specs/deneb/p2p-interface.md?ref=bankless.ghost.io#blobsidecar
func (*BlobSidecar) GetTree ¶
func (b *BlobSidecar) GetTree() (*ssz.Node, error)
GetTree ssz hashes the BlobSidecar object
func (*BlobSidecar) HashTreeRoot ¶
func (b *BlobSidecar) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the BlobSidecar object
func (*BlobSidecar) HashTreeRootWith ¶
func (b *BlobSidecar) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the BlobSidecar object with a hasher
func (*BlobSidecar) MarshalSSZ ¶
func (b *BlobSidecar) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the BlobSidecar object
func (*BlobSidecar) MarshalSSZTo ¶
func (b *BlobSidecar) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the BlobSidecar object to a target array
func (*BlobSidecar) SizeSSZ ¶
func (b *BlobSidecar) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the BlobSidecar object
func (*BlobSidecar) UnmarshalSSZ ¶
func (b *BlobSidecar) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the BlobSidecar object
type BlobSidecars ¶
type BlobSidecars struct {
// Sidecars is a slice of blob side cars to be included in the block.
Sidecars []*BlobSidecar `ssz-max:"6"`
}
SideCars is a slice of blob side cars to be included in the block.
func (*BlobSidecars) GetTree ¶
func (b *BlobSidecars) GetTree() (*ssz.Node, error)
GetTree ssz hashes the BlobSidecars object
func (*BlobSidecars) HashTreeRoot ¶
func (b *BlobSidecars) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the BlobSidecars object
func (*BlobSidecars) HashTreeRootWith ¶
func (b *BlobSidecars) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the BlobSidecars object with a hasher
func (*BlobSidecars) MarshalSSZ ¶
func (b *BlobSidecars) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the BlobSidecars object
func (*BlobSidecars) MarshalSSZTo ¶
func (b *BlobSidecars) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the BlobSidecars object to a target array
func (*BlobSidecars) SizeSSZ ¶
func (b *BlobSidecars) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the BlobSidecars object
func (*BlobSidecars) UnmarshalSSZ ¶
func (b *BlobSidecars) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the BlobSidecars object
func (*BlobSidecars) ValidateBlockRoots ¶
func (bs *BlobSidecars) ValidateBlockRoots() error
ValidateBlockRoots checks to make sure that all blobs in the sidecar are from the same block.