Documentation ¶
Index ¶
- Variables
- func CheckIfDuplicate(array []string, item string) bool
- func ConvertURLToWS(url string) string
- func NewSelfSignedTLSCertificate(ip net.IP) (*x509.CertPool, tls.Certificate, error)
- func NewSelfSignedTLSCertificateChain(rawIP string, pub ed25519.PublicKey, priv ed25519.PrivateKey) (*x509.CertPool, error)
- type LeaderTPUCache
- func (leaderTPUCache *LeaderTPUCache) FetchClusterTPUSockets() (map[string]string, error)
- func (leaderTPUCache *LeaderTPUCache) FetchSlotLeaders(startSlot uint64, fanoutSlots uint64, slotsInEpoch uint64) ([]solana.PublicKey, error)
- func (leaderTPUCache *LeaderTPUCache) GetLeaderSockets(fanoutSlots uint64) []string
- func (leaderTPUCache *LeaderTPUCache) GetSlotLeader(slot uint64) solana.PublicKey
- func (leaderTPUCache *LeaderTPUCache) LastSlot() uint64
- func (leaderTPUCache *LeaderTPUCache) Load(connection *rpc.Client, startSlot uint64, fanout uint64) error
- type LeaderTPUService
- func (leaderTPUService *LeaderTPUService) GetLeaderConnections(fanoutSlots uint64) []quic.Connection
- func (leaderTPUService *LeaderTPUService) LeaderTPUSockets(fanoutSlots uint64) []string
- func (leaderTPUService *LeaderTPUService) LeaderTPUSocketsWithConn(fanoutSlots uint64) []string
- func (leaderTPUService *LeaderTPUService) Load(connection *rpc.Client, websocketURL string, fanout uint64) error
- func (leaderTPUService *LeaderTPUService) Run(fanout uint64)
- type RecentLeaderSlots
- type TPUClient
- func (tpuClient *TPUClient) Load(connection *rpc.Client, websocketURL string, config TPUClientConfig) error
- func (tpuClient *TPUClient) SendRawTransaction(transaction []byte, amount int) error
- func (tpuClient *TPUClient) SendRawTransactionSameConn(transaction []byte, amount int) error
- func (tpuClient *TPUClient) SendTransaction(transaction *solana.Transaction, amount int) (solana.Signature, error)
- func (tpuClient *TPUClient) SendTransactionSameConn(transaction *solana.Transaction, amount int) (solana.Signature, error)
- type TPUClientConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var DEFAULT_FANOUT_SLOTS uint64 = 12
View Source
var MAX_FANOUT_SLOTS uint64 = 100
View Source
var MAX_SLOT_SKIP_DISTANCE uint64 = 48
Functions ¶
func CheckIfDuplicate ¶
func ConvertURLToWS ¶
Types ¶
type LeaderTPUCache ¶
type LeaderTPUCache struct { LeaderTPUMap map[string]string Connection *rpc.Client FirstSlot uint64 SlotsInEpoch uint64 LastEpochInfoSlot uint64 Leaders []solana.PublicKey }
func (*LeaderTPUCache) FetchClusterTPUSockets ¶
func (leaderTPUCache *LeaderTPUCache) FetchClusterTPUSockets() (map[string]string, error)
func (*LeaderTPUCache) FetchSlotLeaders ¶
func (leaderTPUCache *LeaderTPUCache) FetchSlotLeaders(startSlot uint64, fanoutSlots uint64, slotsInEpoch uint64) ([]solana.PublicKey, error)
func (*LeaderTPUCache) GetLeaderSockets ¶
func (leaderTPUCache *LeaderTPUCache) GetLeaderSockets(fanoutSlots uint64) []string
func (*LeaderTPUCache) GetSlotLeader ¶
func (leaderTPUCache *LeaderTPUCache) GetSlotLeader(slot uint64) solana.PublicKey
func (*LeaderTPUCache) LastSlot ¶
func (leaderTPUCache *LeaderTPUCache) LastSlot() uint64
type LeaderTPUService ¶
type LeaderTPUService struct { RecentSlots *RecentLeaderSlots LTPUCache *LeaderTPUCache Subscription *ws.SlotsUpdatesSubscription Connection *rpc.Client WSConnection *ws.Client ConnectionPool *ConnectionPool }
func (*LeaderTPUService) GetLeaderConnections ¶
func (leaderTPUService *LeaderTPUService) GetLeaderConnections(fanoutSlots uint64) []quic.Connection
func (*LeaderTPUService) LeaderTPUSockets ¶
func (leaderTPUService *LeaderTPUService) LeaderTPUSockets(fanoutSlots uint64) []string
func (*LeaderTPUService) LeaderTPUSocketsWithConn ¶
func (leaderTPUService *LeaderTPUService) LeaderTPUSocketsWithConn(fanoutSlots uint64) []string
func (*LeaderTPUService) Run ¶
func (leaderTPUService *LeaderTPUService) Run(fanout uint64)
type RecentLeaderSlots ¶
type RecentLeaderSlots struct {
RecentSlots []float64
}
func (*RecentLeaderSlots) EstimatedCurrentSlot ¶
func (recentLeaderSlots *RecentLeaderSlots) EstimatedCurrentSlot() uint64
func (*RecentLeaderSlots) Load ¶
func (recentLeaderSlots *RecentLeaderSlots) Load(currentSlot uint64)
func (*RecentLeaderSlots) RecordSlot ¶
func (recentLeaderSlots *RecentLeaderSlots) RecordSlot(currentSlot uint64)
type TPUClient ¶
type TPUClient struct { FanoutSlots uint64 LTPUService *LeaderTPUService Exit bool Connection *rpc.Client SendMutex sync.Mutex }
func (*TPUClient) SendRawTransaction ¶
func (*TPUClient) SendRawTransactionSameConn ¶
func (*TPUClient) SendTransaction ¶
func (*TPUClient) SendTransactionSameConn ¶
type TPUClientConfig ¶
type TPUClientConfig struct {
FanoutSlots uint64
}
Click to show internal directories.
Click to hide internal directories.