Documentation ¶
Index ¶
- Constants
- func BloomMaskBits(numItems, maxItems float64) uint32
- func BloomMaxItems(m, p, k float64) float64
- func BloomNumBits(n, p float64) float64
- func BloomNumKeys(m, n float64) float64
- func DeserializeInstruction(deserializer serde.Deserializer) (solana.CompiledInstruction, error)
- func DeserializeTxMessage(deserializer serde.Deserializer) (solana.Message, error)
- func FNV1a(slice []byte, hash uint64) uint64
- func HashPingToken(token [32]byte) [32]byte
- type Addr
- type BitVecU64
- type BitVecU64Inner
- type BitVecU8
- type BitVecU8Inner
- type Bloom
- type CompressedSlots
- type CompressedSlots__Flate2
- type CompressedSlots__Uncompressed
- type ContactInfo
- type CrdsData
- type CrdsData__AccountsHashes
- type CrdsData__ContactInfo
- type CrdsData__DuplicateShred
- type CrdsData__EpochSlots
- type CrdsData__IncrementalSnapshotHashes
- type CrdsData__LegacyVersion
- type CrdsData__LowestSlot
- type CrdsData__NodeInstance
- type CrdsData__SnapshotHashes
- type CrdsData__Version
- type CrdsData__Vote
- type CrdsFilter
- type CrdsFilterSet
- type CrdsValue
- type Driver
- type DuplicateShred
- type EpochSlots
- type Handler
- type Hash
- type IncrementalSnapshotHashes
- type LowestSlot
- type Message
- type Message__Ping
- type Message__Pong
- type Message__PruneMessage
- type Message__PullRequest
- type Message__PullResponse
- type Message__PushMessage
- type Ping
- type PingClient
- type PingServer
- type PruneData
- type Pubkey
- type PullClient
- type RawAddr
- type RawAddr__V4
- type RawAddr__V6
- type RawSocketAddr
- type Signature
- type SlotHash
- type SlotsFlate2
- type SlotsUncompressed
- type SnapshotHashes
- type SocketAddr
- type Transaction
- type Vote
Constants ¶
const CrdsBloomP = 0.1
CrdsBloomP is bloom filter 'p' parameter (probability)
const MaxBloomSize = 928
const PacketSize = 1232
const PingSize = 128
PingSize is the size of a serialized ping message.
Variables ¶
This section is empty.
Functions ¶
func BloomMaskBits ¶
func BloomMaxItems ¶
func BloomNumBits ¶
func BloomNumKeys ¶
func DeserializeInstruction ¶
func DeserializeInstruction(deserializer serde.Deserializer) (solana.CompiledInstruction, error)
func DeserializeTxMessage ¶
func DeserializeTxMessage(deserializer serde.Deserializer) (solana.Message, error)
func HashPingToken ¶
HashPingToken returns the pong token given a ping token.
Types ¶
type Addr ¶
func DeserializeAddr ¶
func DeserializeAddr(deserializer serde.Deserializer) (sa Addr, err error)
type BitVecU64 ¶
type BitVecU64 struct { Bits BitVecU64Inner Len uint64 }
func DeserializeBitVecU64 ¶
func DeserializeBitVecU64(deserializer serde.Deserializer) (BitVecU64, error)
func MakeBitVecU64 ¶
func (*BitVecU64) BincodeSerialize ¶
type BitVecU64Inner ¶
type BitVecU64Inner struct {
Value *[]uint64
}
func BincodeDeserializeBitVecU64Inner ¶
func BincodeDeserializeBitVecU64Inner(input []byte) (BitVecU64Inner, error)
func DeserializeBitVecU64Inner ¶
func DeserializeBitVecU64Inner(deserializer serde.Deserializer) (BitVecU64Inner, error)
func (*BitVecU64Inner) BincodeSerialize ¶
func (obj *BitVecU64Inner) BincodeSerialize() ([]byte, error)
func (*BitVecU64Inner) Serialize ¶
func (obj *BitVecU64Inner) Serialize(serializer serde.Serializer) error
type BitVecU8 ¶
type BitVecU8 struct { Bits BitVecU8Inner Len uint64 }
func DeserializeBitVecU8 ¶
func DeserializeBitVecU8(deserializer serde.Deserializer) (BitVecU8, error)
func MakeBitVecU8 ¶
func (*BitVecU8) BincodeSerialize ¶
type BitVecU8Inner ¶
type BitVecU8Inner struct {
Value *[]uint8
}
func BincodeDeserializeBitVecU8Inner ¶
func BincodeDeserializeBitVecU8Inner(input []byte) (BitVecU8Inner, error)
func DeserializeBitVecU8Inner ¶
func DeserializeBitVecU8Inner(deserializer serde.Deserializer) (BitVecU8Inner, error)
func (*BitVecU8Inner) BincodeSerialize ¶
func (obj *BitVecU8Inner) BincodeSerialize() ([]byte, error)
func (*BitVecU8Inner) Serialize ¶
func (obj *BitVecU8Inner) Serialize(serializer serde.Serializer) error
type Bloom ¶
func BincodeDeserializeBloom ¶
func DeserializeBloom ¶
func DeserializeBloom(deserializer serde.Deserializer) (Bloom, error)
func NewBloomRandom ¶
func (*Bloom) BincodeSerialize ¶
type CompressedSlots ¶
type CompressedSlots interface { Serialize(serializer serde.Serializer) error BincodeSerialize() ([]byte, error) // contains filtered or unexported methods }
func BincodeDeserializeCompressedSlots ¶
func BincodeDeserializeCompressedSlots(input []byte) (CompressedSlots, error)
func DeserializeCompressedSlots ¶
func DeserializeCompressedSlots(deserializer serde.Deserializer) (CompressedSlots, error)
type CompressedSlots__Flate2 ¶
type CompressedSlots__Flate2 struct {
Value SlotsFlate2
}
func (*CompressedSlots__Flate2) BincodeSerialize ¶
func (obj *CompressedSlots__Flate2) BincodeSerialize() ([]byte, error)
func (*CompressedSlots__Flate2) Serialize ¶
func (obj *CompressedSlots__Flate2) Serialize(serializer serde.Serializer) error
type CompressedSlots__Uncompressed ¶
type CompressedSlots__Uncompressed struct {
Value SlotsUncompressed
}
func (*CompressedSlots__Uncompressed) BincodeSerialize ¶
func (obj *CompressedSlots__Uncompressed) BincodeSerialize() ([]byte, error)
func (*CompressedSlots__Uncompressed) Serialize ¶
func (obj *CompressedSlots__Uncompressed) Serialize(serializer serde.Serializer) error
type ContactInfo ¶
type ContactInfo struct { Id Pubkey Gossip SocketAddr Tvu SocketAddr TvuForwards SocketAddr Repair SocketAddr Tpu SocketAddr TpuForwards SocketAddr TpuVote SocketAddr Rpc SocketAddr RpcPubsub SocketAddr ServeRepair SocketAddr Wallclock uint64 ShredVersion uint16 }
func BincodeDeserializeContactInfo ¶
func BincodeDeserializeContactInfo(input []byte) (ContactInfo, error)
func DeserializeContactInfo ¶
func DeserializeContactInfo(deserializer serde.Deserializer) (ContactInfo, error)
func (*ContactInfo) BincodeSerialize ¶
func (obj *ContactInfo) BincodeSerialize() ([]byte, error)
func (*ContactInfo) Serialize ¶
func (obj *ContactInfo) Serialize(serializer serde.Serializer) error
type CrdsData ¶
type CrdsData interface { Serialize(serializer serde.Serializer) error BincodeSerialize() ([]byte, error) Pubkey() *Pubkey // contains filtered or unexported methods }
func DeserializeCrdsData ¶
func DeserializeCrdsData(deserializer serde.Deserializer) (CrdsData, error)
type CrdsData__AccountsHashes ¶
type CrdsData__AccountsHashes struct {
Value SnapshotHashes
}
func (*CrdsData__AccountsHashes) BincodeSerialize ¶
func (obj *CrdsData__AccountsHashes) BincodeSerialize() ([]byte, error)
func (*CrdsData__AccountsHashes) Pubkey ¶
func (obj *CrdsData__AccountsHashes) Pubkey() *Pubkey
func (*CrdsData__AccountsHashes) Serialize ¶
func (obj *CrdsData__AccountsHashes) Serialize(serializer serde.Serializer) error
type CrdsData__ContactInfo ¶
type CrdsData__ContactInfo struct {
Value ContactInfo
}
func (*CrdsData__ContactInfo) BincodeSerialize ¶
func (obj *CrdsData__ContactInfo) BincodeSerialize() ([]byte, error)
func (*CrdsData__ContactInfo) Pubkey ¶
func (obj *CrdsData__ContactInfo) Pubkey() *Pubkey
func (*CrdsData__ContactInfo) Serialize ¶
func (obj *CrdsData__ContactInfo) Serialize(serializer serde.Serializer) error
type CrdsData__DuplicateShred ¶
type CrdsData__DuplicateShred struct { Field0 uint16 Field1 DuplicateShred }
func (*CrdsData__DuplicateShred) BincodeSerialize ¶
func (obj *CrdsData__DuplicateShred) BincodeSerialize() ([]byte, error)
func (*CrdsData__DuplicateShred) Pubkey ¶
func (obj *CrdsData__DuplicateShred) Pubkey() *Pubkey
func (*CrdsData__DuplicateShred) Serialize ¶
func (obj *CrdsData__DuplicateShred) Serialize(serializer serde.Serializer) error
type CrdsData__EpochSlots ¶
type CrdsData__EpochSlots struct { Field0 uint8 Field1 EpochSlots }
func (*CrdsData__EpochSlots) BincodeSerialize ¶
func (obj *CrdsData__EpochSlots) BincodeSerialize() ([]byte, error)
func (*CrdsData__EpochSlots) Pubkey ¶
func (obj *CrdsData__EpochSlots) Pubkey() *Pubkey
func (*CrdsData__EpochSlots) Serialize ¶
func (obj *CrdsData__EpochSlots) Serialize(serializer serde.Serializer) error
type CrdsData__IncrementalSnapshotHashes ¶
type CrdsData__IncrementalSnapshotHashes struct {
Value IncrementalSnapshotHashes
}
func (*CrdsData__IncrementalSnapshotHashes) BincodeSerialize ¶
func (obj *CrdsData__IncrementalSnapshotHashes) BincodeSerialize() ([]byte, error)
func (*CrdsData__IncrementalSnapshotHashes) Pubkey ¶
func (obj *CrdsData__IncrementalSnapshotHashes) Pubkey() *Pubkey
func (*CrdsData__IncrementalSnapshotHashes) Serialize ¶
func (obj *CrdsData__IncrementalSnapshotHashes) Serialize(serializer serde.Serializer) error
type CrdsData__LegacyVersion ¶
type CrdsData__LegacyVersion struct { From Pubkey Wallclock uint64 Major uint16 Minor uint16 Patch uint16 Commit *uint32 }
func (*CrdsData__LegacyVersion) BincodeSerialize ¶
func (obj *CrdsData__LegacyVersion) BincodeSerialize() ([]byte, error)
func (*CrdsData__LegacyVersion) Pubkey ¶
func (obj *CrdsData__LegacyVersion) Pubkey() *Pubkey
func (*CrdsData__LegacyVersion) Serialize ¶
func (obj *CrdsData__LegacyVersion) Serialize(serializer serde.Serializer) error
type CrdsData__LowestSlot ¶
type CrdsData__LowestSlot struct { Field0 uint8 Field1 LowestSlot }
func (*CrdsData__LowestSlot) BincodeSerialize ¶
func (obj *CrdsData__LowestSlot) BincodeSerialize() ([]byte, error)
func (*CrdsData__LowestSlot) Pubkey ¶
func (obj *CrdsData__LowestSlot) Pubkey() *Pubkey
func (*CrdsData__LowestSlot) Serialize ¶
func (obj *CrdsData__LowestSlot) Serialize(serializer serde.Serializer) error
type CrdsData__NodeInstance ¶
func (*CrdsData__NodeInstance) BincodeSerialize ¶
func (obj *CrdsData__NodeInstance) BincodeSerialize() ([]byte, error)
func (*CrdsData__NodeInstance) Pubkey ¶
func (obj *CrdsData__NodeInstance) Pubkey() *Pubkey
func (*CrdsData__NodeInstance) Serialize ¶
func (obj *CrdsData__NodeInstance) Serialize(serializer serde.Serializer) error
type CrdsData__SnapshotHashes ¶
type CrdsData__SnapshotHashes struct {
Value SnapshotHashes
}
func (*CrdsData__SnapshotHashes) BincodeSerialize ¶
func (obj *CrdsData__SnapshotHashes) BincodeSerialize() ([]byte, error)
func (*CrdsData__SnapshotHashes) Pubkey ¶
func (obj *CrdsData__SnapshotHashes) Pubkey() *Pubkey
func (*CrdsData__SnapshotHashes) Serialize ¶
func (obj *CrdsData__SnapshotHashes) Serialize(serializer serde.Serializer) error
type CrdsData__Version ¶
type CrdsData__Version struct { From Pubkey Wallclock uint64 Major uint16 Minor uint16 Patch uint16 Commit *uint32 FeatureSet uint32 }
func (*CrdsData__Version) BincodeSerialize ¶
func (obj *CrdsData__Version) BincodeSerialize() ([]byte, error)
func (*CrdsData__Version) Pubkey ¶
func (obj *CrdsData__Version) Pubkey() *Pubkey
func (*CrdsData__Version) Serialize ¶
func (obj *CrdsData__Version) Serialize(serializer serde.Serializer) error
type CrdsData__Vote ¶
func (*CrdsData__Vote) BincodeSerialize ¶
func (obj *CrdsData__Vote) BincodeSerialize() ([]byte, error)
func (*CrdsData__Vote) Pubkey ¶
func (obj *CrdsData__Vote) Pubkey() *Pubkey
func (*CrdsData__Vote) Serialize ¶
func (obj *CrdsData__Vote) Serialize(serializer serde.Serializer) error
type CrdsFilter ¶
func BincodeDeserializeCrdsFilter ¶
func BincodeDeserializeCrdsFilter(input []byte) (CrdsFilter, error)
func DeserializeCrdsFilter ¶
func DeserializeCrdsFilter(deserializer serde.Deserializer) (CrdsFilter, error)
func (*CrdsFilter) BincodeSerialize ¶
func (obj *CrdsFilter) BincodeSerialize() ([]byte, error)
func (*CrdsFilter) Contains ¶
func (f *CrdsFilter) Contains(item *Hash) bool
func (*CrdsFilter) Serialize ¶
func (obj *CrdsFilter) Serialize(serializer serde.Serializer) error
func (*CrdsFilter) TestMask ¶
func (f *CrdsFilter) TestMask(item *Hash) bool
type CrdsFilterSet ¶
type CrdsFilterSet []CrdsFilter
func NewCrdsFilterSet ¶
func NewCrdsFilterSet(numItems, maxBytes uint64) CrdsFilterSet
func (CrdsFilterSet) Add ¶
func (c CrdsFilterSet) Add(h Hash)
type CrdsValue ¶
func DeserializeCrdsValue ¶
func DeserializeCrdsValue(deserializer serde.Deserializer) (CrdsValue, error)
func (*CrdsValue) BincodeSerialize ¶
func (*CrdsValue) VerifySignature ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements the network main loop.
Note: This uses Go 1.19 standard library networking, which processes packets one-by-one. (slow!) Looks like Go 1.20 will add batch packet receive: https://github.com/golang/go/issues/45886
type DuplicateShred ¶
type DuplicateShred struct { From Pubkey Wallclock uint64 Slot uint64 ShredIndex uint32 ShredType uint8 NumChunks uint8 ChunkIndex uint8 Chunk []uint8 }
func BincodeDeserializeDuplicateShred ¶
func BincodeDeserializeDuplicateShred(input []byte) (DuplicateShred, error)
func DeserializeDuplicateShred ¶
func DeserializeDuplicateShred(deserializer serde.Deserializer) (DuplicateShred, error)
func (*DuplicateShred) BincodeSerialize ¶
func (obj *DuplicateShred) BincodeSerialize() ([]byte, error)
func (*DuplicateShred) Serialize ¶
func (obj *DuplicateShred) Serialize(serializer serde.Serializer) error
type EpochSlots ¶
type EpochSlots struct { From Pubkey Slots []CompressedSlots Wallclock uint64 }
func BincodeDeserializeEpochSlots ¶
func BincodeDeserializeEpochSlots(input []byte) (EpochSlots, error)
func DeserializeEpochSlots ¶
func DeserializeEpochSlots(deserializer serde.Deserializer) (EpochSlots, error)
func (*EpochSlots) BincodeSerialize ¶
func (obj *EpochSlots) BincodeSerialize() ([]byte, error)
func (*EpochSlots) Serialize ¶
func (obj *EpochSlots) Serialize(serializer serde.Serializer) error
type Handler ¶
type Handler struct { *PullClient *PingClient *PingServer // contains filtered or unexported fields }
Handler is a network-agnostic multiplexer for incoming gossip messages.
type Hash ¶
type Hash [32]uint8
func BincodeDeserializeHash ¶
func DeserializeHash ¶
func DeserializeHash(deserializer serde.Deserializer) (Hash, error)
func (*Hash) BincodeSerialize ¶
func (Hash) MarshalText ¶
type IncrementalSnapshotHashes ¶
type IncrementalSnapshotHashes struct { From Pubkey Base SlotHash Hashes []SlotHash Wallclock uint64 }
func BincodeDeserializeIncrementalSnapshotHashes ¶
func BincodeDeserializeIncrementalSnapshotHashes(input []byte) (IncrementalSnapshotHashes, error)
func DeserializeIncrementalSnapshotHashes ¶
func DeserializeIncrementalSnapshotHashes(deserializer serde.Deserializer) (IncrementalSnapshotHashes, error)
func (*IncrementalSnapshotHashes) BincodeSerialize ¶
func (obj *IncrementalSnapshotHashes) BincodeSerialize() ([]byte, error)
func (*IncrementalSnapshotHashes) Serialize ¶
func (obj *IncrementalSnapshotHashes) Serialize(serializer serde.Serializer) error
type LowestSlot ¶
type LowestSlot struct { From Pubkey Root uint64 Lowest uint64 Slots []uint64 Stash []struct{} Wallclock uint64 }
func BincodeDeserializeLowestSlot ¶
func BincodeDeserializeLowestSlot(input []byte) (LowestSlot, error)
func DeserializeLowestSlot ¶
func DeserializeLowestSlot(deserializer serde.Deserializer) (LowestSlot, error)
func (*LowestSlot) BincodeSerialize ¶
func (obj *LowestSlot) BincodeSerialize() ([]byte, error)
func (*LowestSlot) Serialize ¶
func (obj *LowestSlot) Serialize(serializer serde.Serializer) error
type Message ¶
type Message interface { Serialize(serializer serde.Serializer) error BincodeSerialize() ([]byte, error) // contains filtered or unexported methods }
func DeserializeMessage ¶
func DeserializeMessage(deserializer serde.Deserializer) (Message, error)
type Message__Ping ¶
type Message__Ping struct {
Value Ping
}
func (*Message__Ping) BincodeSerialize ¶
func (obj *Message__Ping) BincodeSerialize() ([]byte, error)
func (*Message__Ping) Serialize ¶
func (obj *Message__Ping) Serialize(serializer serde.Serializer) error
type Message__Pong ¶
type Message__Pong struct {
Value Ping
}
func (*Message__Pong) BincodeSerialize ¶
func (obj *Message__Pong) BincodeSerialize() ([]byte, error)
func (*Message__Pong) Serialize ¶
func (obj *Message__Pong) Serialize(serializer serde.Serializer) error
type Message__PruneMessage ¶
func (*Message__PruneMessage) BincodeSerialize ¶
func (obj *Message__PruneMessage) BincodeSerialize() ([]byte, error)
func (*Message__PruneMessage) Serialize ¶
func (obj *Message__PruneMessage) Serialize(serializer serde.Serializer) error
type Message__PullRequest ¶
type Message__PullRequest struct { Filter CrdsFilter Value CrdsValue }
func (*Message__PullRequest) BincodeSerialize ¶
func (obj *Message__PullRequest) BincodeSerialize() ([]byte, error)
func (*Message__PullRequest) Serialize ¶
func (obj *Message__PullRequest) Serialize(serializer serde.Serializer) error
type Message__PullResponse ¶
func (*Message__PullResponse) BincodeSerialize ¶
func (obj *Message__PullResponse) BincodeSerialize() ([]byte, error)
func (*Message__PullResponse) Serialize ¶
func (obj *Message__PullResponse) Serialize(serializer serde.Serializer) error
type Message__PushMessage ¶
func (*Message__PushMessage) BincodeSerialize ¶
func (obj *Message__PushMessage) BincodeSerialize() ([]byte, error)
func (*Message__PushMessage) Serialize ¶
func (obj *Message__PushMessage) Serialize(serializer serde.Serializer) error
type Ping ¶
func BincodeDeserializePing ¶
func DeserializePing ¶
func DeserializePing(deserializer serde.Deserializer) (Ping, error)
func NewPing ¶
func NewPing(token [32]byte, key ed25519.PrivateKey) (p Ping)
NewPing creates and signs a new ping message.
Panics if the provided private key is invalid.
func NewPingRandom ¶
func NewPingRandom(key ed25519.PrivateKey) Ping
func (*Ping) BincodeSerialize ¶
type PingClient ¶
type PingClient struct { NumSent atomic.Uint64 // ping messages sent NumOK atomic.Uint64 // successful ping transaction NumInvalid atomic.Uint64 // invalid sig in pong NumTimeout atomic.Uint64 // context errored before pong arrived NumSendFail atomic.Uint64 // socket refused to send (tx buffer full) NumMartian atomic.Uint64 // unsolicited pong // contains filtered or unexported fields }
PingClient implements the stateful client (initiator) side of the gossip ping protocol.
It tracks every pending request to match it with solicited pong frames.
func NewPingClient ¶
func NewPingClient(identity ed25519.PrivateKey, so udpSender) *PingClient
func (*PingClient) Close ¶
func (p *PingClient) Close()
func (*PingClient) HandlePong ¶
func (p *PingClient) HandlePong(msg *Message__Pong, from netip.AddrPort)
HandlePong processes incoming gossip pong messages.
func (*PingClient) Ping ¶
func (p *PingClient) Ping(ctx context.Context, target netip.AddrPort) (pong Ping, responder netip.AddrPort, err error)
Ping sends a gossip ping packet. Blocks until a valid matching pong packet arrives or the context is cancelled.
Note that this mechanism is unrelated to ICMP pings.
type PingServer ¶
type PingServer struct { NumOK atomic.Uint64 // handled pings, though uncertain whether pong arrived NumInvalid atomic.Uint64 // invalid sig in ping NumSendFail atomic.Uint64 // socket refused to send (tx buffer full) // contains filtered or unexported fields }
PingServer implements the stateless server (reactor) side of the gossip ping protocol.
It implements no rate-limits and is thus vulnerable to packet floods.
func NewPingServer ¶
func NewPingServer(identity ed25519.PrivateKey, so udpSender) *PingServer
func (*PingServer) HandlePing ¶
func (p *PingServer) HandlePing(ping *Message__Ping, from netip.AddrPort)
HandlePing processes incoming gossip ping messages.
type PruneData ¶
type PruneData struct { Pubkey Pubkey Prunes []Pubkey Signature Signature Destination Pubkey Wallclock uint64 }
func DeserializePruneData ¶
func DeserializePruneData(deserializer serde.Deserializer) (PruneData, error)
func (*PruneData) BincodeSerialize ¶
type Pubkey ¶
type Pubkey [32]uint8
func DeserializePubkey ¶
func DeserializePubkey(deserializer serde.Deserializer) (Pubkey, error)
func (*Pubkey) BincodeSerialize ¶
func (Pubkey) MarshalText ¶
type PullClient ¶
type PullClient struct {
// contains filtered or unexported fields
}
PullClient implements the stateful client (initiator) side of the gossip pull protocol.
func NewPullClient ¶
func NewPullClient(identity ed25519.PrivateKey, so udpSender) *PullClient
func (*PullClient) HandlePullResponse ¶
func (p *PullClient) HandlePullResponse(msg *Message__PullResponse, _ netip.AddrPort)
type RawAddr ¶
type RawAddr interface { Serialize(serializer serde.Serializer) error BincodeSerialize() ([]byte, error) // contains filtered or unexported methods }
func DeserializeRawAddr ¶
func DeserializeRawAddr(deserializer serde.Deserializer) (RawAddr, error)
type RawAddr__V4 ¶
type RawAddr__V4 [4]uint8
func (*RawAddr__V4) BincodeSerialize ¶
func (obj *RawAddr__V4) BincodeSerialize() ([]byte, error)
func (*RawAddr__V4) Serialize ¶
func (obj *RawAddr__V4) Serialize(serializer serde.Serializer) error
type RawAddr__V6 ¶
type RawAddr__V6 [16]uint8
func (*RawAddr__V6) BincodeSerialize ¶
func (obj *RawAddr__V6) BincodeSerialize() ([]byte, error)
func (*RawAddr__V6) Serialize ¶
func (obj *RawAddr__V6) Serialize(serializer serde.Serializer) error
type RawSocketAddr ¶
func BincodeDeserializeRawSocketAddr ¶
func BincodeDeserializeRawSocketAddr(input []byte) (RawSocketAddr, error)
func DeserializeRawSocketAddr ¶
func DeserializeRawSocketAddr(deserializer serde.Deserializer) (RawSocketAddr, error)
func (*RawSocketAddr) BincodeSerialize ¶
func (obj *RawSocketAddr) BincodeSerialize() ([]byte, error)
func (*RawSocketAddr) Serialize ¶
func (obj *RawSocketAddr) Serialize(serializer serde.Serializer) error
type Signature ¶
type Signature [64]uint8
func DeserializeSignature ¶
func DeserializeSignature(deserializer serde.Deserializer) (Signature, error)
func (*Signature) BincodeSerialize ¶
func (Signature) MarshalText ¶
type SlotHash ¶
func DeserializeSlotHash ¶
func DeserializeSlotHash(deserializer serde.Deserializer) (SlotHash, error)
func (*SlotHash) BincodeSerialize ¶
type SlotsFlate2 ¶
func BincodeDeserializeSlotsFlate2 ¶
func BincodeDeserializeSlotsFlate2(input []byte) (SlotsFlate2, error)
func DeserializeSlotsFlate2 ¶
func DeserializeSlotsFlate2(deserializer serde.Deserializer) (SlotsFlate2, error)
func (*SlotsFlate2) BincodeSerialize ¶
func (obj *SlotsFlate2) BincodeSerialize() ([]byte, error)
func (*SlotsFlate2) Serialize ¶
func (obj *SlotsFlate2) Serialize(serializer serde.Serializer) error
type SlotsUncompressed ¶
func BincodeDeserializeSlotsUncompressed ¶
func BincodeDeserializeSlotsUncompressed(input []byte) (SlotsUncompressed, error)
func DeserializeSlotsUncompressed ¶
func DeserializeSlotsUncompressed(deserializer serde.Deserializer) (SlotsUncompressed, error)
func (*SlotsUncompressed) BincodeSerialize ¶
func (obj *SlotsUncompressed) BincodeSerialize() ([]byte, error)
func (*SlotsUncompressed) Serialize ¶
func (obj *SlotsUncompressed) Serialize(serializer serde.Serializer) error
type SnapshotHashes ¶
func BincodeDeserializeSnapshotHashes ¶
func BincodeDeserializeSnapshotHashes(input []byte) (SnapshotHashes, error)
func DeserializeSnapshotHashes ¶
func DeserializeSnapshotHashes(deserializer serde.Deserializer) (SnapshotHashes, error)
func (*SnapshotHashes) BincodeSerialize ¶
func (obj *SnapshotHashes) BincodeSerialize() ([]byte, error)
func (*SnapshotHashes) Serialize ¶
func (obj *SnapshotHashes) Serialize(serializer serde.Serializer) error
type SocketAddr ¶
func DeserializeSocketAddr ¶
func DeserializeSocketAddr(deserializer serde.Deserializer) (sa SocketAddr, err error)
func (SocketAddr) Serialize ¶
func (sa SocketAddr) Serialize(serializer serde.Serializer) error
type Transaction ¶
type Transaction solana.Transaction
func DeserializeTransaction ¶
func DeserializeTransaction(deserializer serde.Deserializer) (Transaction, error)
func (*Transaction) Serialize ¶
func (obj *Transaction) Serialize(serializer serde.Serializer) error
type Vote ¶
type Vote struct { From Pubkey Transaction Transaction Wallclock uint64 Slot *uint64 }
func BincodeDeserializeVote ¶
func DeserializeVote ¶
func DeserializeVote(deserializer serde.Deserializer) (Vote, error)