Documentation ¶
Index ¶
Constants ¶
View Source
const ( LegacyCodeID = uint8(0b0101_1010) LegacyDataID = uint8(0b1010_0101) MerkleTypeMask = uint8(0xF0) MerkleDepthMask = uint8(0x0F) MerkleCodeID = uint8(0x40) MerkleDataID = uint8(0x80) )
View Source
const ( FlagDataTickMask = uint8(0b0011_1111) FlagDataEndOfBatch = uint8(0b0100_0000) FlagDataEndOfBlock = uint8(0b1100_0000) )
View Source
const ( RevisionV1 = 1 RevisionV2 = 2 )
View Source
const ( LegacyDataV1HeaderSize = 86 LegacyDataV2HeaderSize = 88 LegacyDataV1PayloadSize = 1057 // TODO where does this number come from? )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CommonHeader ¶
type CommonHeader struct { Signature solana.Signature Variant uint8 Slot uint64 Index uint32 Version uint16 FECSetIndex uint32 }
func (*CommonHeader) IsCode ¶
func (c *CommonHeader) IsCode() bool
func (*CommonHeader) IsData ¶
func (c *CommonHeader) IsData() bool
func (*CommonHeader) Ok ¶
func (c *CommonHeader) Ok() bool
type DataHeader ¶
func (*DataHeader) EndOfBatch ¶
func (s *DataHeader) EndOfBatch() bool
func (*DataHeader) EndOfBlock ¶
func (d *DataHeader) EndOfBlock() bool
func (*DataHeader) Tick ¶
func (s *DataHeader) Tick() uint8
type Entry ¶
type Entry struct { NumHashes uint64 Hash solana.Hash Txns []solana.Transaction }
func (*Entry) UnmarshalWithDecoder ¶
type Shred ¶
type Shred struct { CommonHeader //CodeHeader DataHeader Payload []byte MerklePath [][20]byte }
func NewShredFromSerialized ¶
NewShredFromSerialized creates a shred object from the given buffer.
The original slice may be deallocated after this function returns.
func (Shred) MarshalYAML ¶
Click to show internal directories.
Click to hide internal directories.