direct

package
v0.0.0-...-75fb2f0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ETH65 = 65
	ETH66 = 66
	ETH67 = 67
	ETH68 = 68
)

Variables

View Source
var ProtoIds = map[uint]map[sentry.MessageId]struct{}{
	ETH65: {
		sentry.MessageId_GET_BLOCK_HEADERS_65:             struct{}{},
		sentry.MessageId_BLOCK_HEADERS_65:                 struct{}{},
		sentry.MessageId_GET_BLOCK_BODIES_65:              struct{}{},
		sentry.MessageId_BLOCK_BODIES_65:                  struct{}{},
		sentry.MessageId_GET_NODE_DATA_65:                 struct{}{},
		sentry.MessageId_NODE_DATA_65:                     struct{}{},
		sentry.MessageId_GET_RECEIPTS_65:                  struct{}{},
		sentry.MessageId_RECEIPTS_65:                      struct{}{},
		sentry.MessageId_NEW_BLOCK_HASHES_65:              struct{}{},
		sentry.MessageId_NEW_BLOCK_65:                     struct{}{},
		sentry.MessageId_TRANSACTIONS_65:                  struct{}{},
		sentry.MessageId_NEW_POOLED_TRANSACTION_HASHES_65: struct{}{},
		sentry.MessageId_GET_POOLED_TRANSACTIONS_65:       struct{}{},
		sentry.MessageId_POOLED_TRANSACTIONS_65:           struct{}{},
	},
	ETH66: {
		sentry.MessageId_GET_BLOCK_HEADERS_66:             struct{}{},
		sentry.MessageId_BLOCK_HEADERS_66:                 struct{}{},
		sentry.MessageId_GET_BLOCK_BODIES_66:              struct{}{},
		sentry.MessageId_BLOCK_BODIES_66:                  struct{}{},
		sentry.MessageId_GET_NODE_DATA_66:                 struct{}{},
		sentry.MessageId_NODE_DATA_66:                     struct{}{},
		sentry.MessageId_GET_RECEIPTS_66:                  struct{}{},
		sentry.MessageId_RECEIPTS_66:                      struct{}{},
		sentry.MessageId_NEW_BLOCK_HASHES_66:              struct{}{},
		sentry.MessageId_NEW_BLOCK_66:                     struct{}{},
		sentry.MessageId_TRANSACTIONS_66:                  struct{}{},
		sentry.MessageId_NEW_POOLED_TRANSACTION_HASHES_66: struct{}{},
		sentry.MessageId_GET_POOLED_TRANSACTIONS_66:       struct{}{},
		sentry.MessageId_POOLED_TRANSACTIONS_66:           struct{}{},
	},
	ETH67: {
		sentry.MessageId_GET_BLOCK_HEADERS_66:             struct{}{},
		sentry.MessageId_BLOCK_HEADERS_66:                 struct{}{},
		sentry.MessageId_GET_BLOCK_BODIES_66:              struct{}{},
		sentry.MessageId_BLOCK_BODIES_66:                  struct{}{},
		sentry.MessageId_GET_RECEIPTS_66:                  struct{}{},
		sentry.MessageId_RECEIPTS_66:                      struct{}{},
		sentry.MessageId_NEW_BLOCK_HASHES_66:              struct{}{},
		sentry.MessageId_NEW_BLOCK_66:                     struct{}{},
		sentry.MessageId_TRANSACTIONS_66:                  struct{}{},
		sentry.MessageId_NEW_POOLED_TRANSACTION_HASHES_66: struct{}{},
		sentry.MessageId_GET_POOLED_TRANSACTIONS_66:       struct{}{},
		sentry.MessageId_POOLED_TRANSACTIONS_66:           struct{}{},
	},
	ETH68: {
		sentry.MessageId_GET_BLOCK_HEADERS_66:             struct{}{},
		sentry.MessageId_BLOCK_HEADERS_66:                 struct{}{},
		sentry.MessageId_GET_BLOCK_BODIES_66:              struct{}{},
		sentry.MessageId_BLOCK_BODIES_66:                  struct{}{},
		sentry.MessageId_GET_RECEIPTS_66:                  struct{}{},
		sentry.MessageId_RECEIPTS_66:                      struct{}{},
		sentry.MessageId_NEW_BLOCK_HASHES_66:              struct{}{},
		sentry.MessageId_NEW_BLOCK_66:                     struct{}{},
		sentry.MessageId_TRANSACTIONS_66:                  struct{}{},
		sentry.MessageId_NEW_POOLED_TRANSACTION_HASHES_68: struct{}{},
		sentry.MessageId_GET_POOLED_TRANSACTIONS_66:       struct{}{},
		sentry.MessageId_POOLED_TRANSACTIONS_66:           struct{}{},
	},
}

Functions

This section is empty.

Types

type DownloaderClient

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

func (*DownloaderClient) Download

func (*DownloaderClient) Stats

func (*DownloaderClient) Verify

type EthBackendClientDirect

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

func NewEthBackendClientDirect

func NewEthBackendClientDirect(server remote.ETHBACKENDServer) *EthBackendClientDirect

func (*EthBackendClientDirect) Block

func (*EthBackendClientDirect) ClientVersion

func (*EthBackendClientDirect) EngineGetBlobsBundleV1

func (*EthBackendClientDirect) EngineGetPayload

func (*EthBackendClientDirect) EngineNewPayload

func (*EthBackendClientDirect) Etherbase

func (*EthBackendClientDirect) NetPeerCount

func (*EthBackendClientDirect) NetVersion

func (*EthBackendClientDirect) NodeInfo

func (*EthBackendClientDirect) Peers

func (*EthBackendClientDirect) PendingBlock

func (*EthBackendClientDirect) ProtocolVersion

func (*EthBackendClientDirect) Subscribe

func (*EthBackendClientDirect) SubscribeLogs

func (*EthBackendClientDirect) TxnLookup

func (*EthBackendClientDirect) Version

type MiningClient

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

func NewMiningClient

func NewMiningClient(server txpool_proto.MiningServer) *MiningClient

func (*MiningClient) GetWork

func (*MiningClient) HashRate

func (*MiningClient) Mining

func (*MiningClient) SubmitWork

func (*MiningClient) Version

func (s *MiningClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*types.VersionReply, error)

type MiningOnMinedBlockC

type MiningOnMinedBlockC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*MiningOnMinedBlockC) Context

func (c *MiningOnMinedBlockC) Context() context.Context

func (*MiningOnMinedBlockC) Recv

type MiningOnMinedBlockS

type MiningOnMinedBlockS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*MiningOnMinedBlockS) Context

func (s *MiningOnMinedBlockS) Context() context.Context

func (*MiningOnMinedBlockS) Err

func (s *MiningOnMinedBlockS) Err(err error)

func (*MiningOnMinedBlockS) Send

type MiningOnPendingBlockC

type MiningOnPendingBlockC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*MiningOnPendingBlockC) Context

func (c *MiningOnPendingBlockC) Context() context.Context

func (*MiningOnPendingBlockC) Recv

type MiningOnPendingBlockS

type MiningOnPendingBlockS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*MiningOnPendingBlockS) Context

func (s *MiningOnPendingBlockS) Context() context.Context

func (*MiningOnPendingBlockS) Err

func (s *MiningOnPendingBlockS) Err(err error)

func (*MiningOnPendingBlockS) Send

type MiningOnPendingLogsC

type MiningOnPendingLogsC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*MiningOnPendingLogsC) Context

func (c *MiningOnPendingLogsC) Context() context.Context

func (*MiningOnPendingLogsC) Recv

type MiningOnPendingLogsS

type MiningOnPendingLogsS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*MiningOnPendingLogsS) Context

func (s *MiningOnPendingLogsS) Context() context.Context

func (*MiningOnPendingLogsS) Err

func (s *MiningOnPendingLogsS) Err(err error)

func (*MiningOnPendingLogsS) Send

type SentryClient

type SentryClient interface {
	sentry.SentryClient
	Protocol() uint
	Ready() bool
	MarkDisconnected()
}

type SentryClientDirect

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

SentryClientDirect implements SentryClient interface by connecting the instance of the client directly with the corresponding instance of SentryServer

func NewSentryClientDirect

func NewSentryClientDirect(protocol uint, sentryServer sentry.SentryServer) *SentryClientDirect

func (*SentryClientDirect) HandShake

func (*SentryClientDirect) MarkDisconnected

func (c *SentryClientDirect) MarkDisconnected()

func (*SentryClientDirect) Messages

func (*SentryClientDirect) NodeInfo

func (*SentryClientDirect) PeerById

func (*SentryClientDirect) PeerCount

func (*SentryClientDirect) PeerEvents

func (*SentryClientDirect) PeerMinBlock

func (*SentryClientDirect) Peers

func (*SentryClientDirect) PenalizePeer

func (*SentryClientDirect) Protocol

func (c *SentryClientDirect) Protocol() uint

func (*SentryClientDirect) Ready

func (c *SentryClientDirect) Ready() bool

func (*SentryClientDirect) SendMessageById

func (*SentryClientDirect) SendMessageByMinBlock

func (*SentryClientDirect) SendMessageToAll

func (c *SentryClientDirect) SendMessageToAll(ctx context.Context, in *sentry.OutboundMessageData, opts ...grpc.CallOption) (*sentry.SentPeers, error)

func (*SentryClientDirect) SendMessageToRandomPeers

func (c *SentryClientDirect) SendMessageToRandomPeers(ctx context.Context, in *sentry.SendMessageToRandomPeersRequest, opts ...grpc.CallOption) (*sentry.SentPeers, error)

func (*SentryClientDirect) SetStatus

type SentryClientRemote

type SentryClientRemote struct {
	sentry.SentryClient
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewSentryClientRemote

func NewSentryClientRemote(client sentry.SentryClient) *SentryClientRemote

NewSentryClientRemote - app code must use this class to avoid concurrency - it accepts protocol (which received async by SetStatus) in constructor, means app can't use client which protocol unknown yet

func (*SentryClientRemote) HandShake

func (*SentryClientRemote) MarkDisconnected

func (c *SentryClientRemote) MarkDisconnected()

func (*SentryClientRemote) Messages

func (*SentryClientRemote) PeerCount

func (*SentryClientRemote) Protocol

func (c *SentryClientRemote) Protocol() uint

func (*SentryClientRemote) Ready

func (c *SentryClientRemote) Ready() bool

func (*SentryClientRemote) SetStatus

type SentryMessagesStreamC

type SentryMessagesStreamC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*SentryMessagesStreamC) Context

func (c *SentryMessagesStreamC) Context() context.Context

func (*SentryMessagesStreamC) Recv

func (*SentryMessagesStreamC) RecvMsg

func (c *SentryMessagesStreamC) RecvMsg(anyMessage interface{}) error

type SentryMessagesStreamS

type SentryMessagesStreamS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

SentryMessagesStreamS implements proto_sentry.Sentry_ReceiveMessagesServer

func (*SentryMessagesStreamS) Context

func (s *SentryMessagesStreamS) Context() context.Context

func (*SentryMessagesStreamS) Err

func (s *SentryMessagesStreamS) Err(err error)

func (*SentryMessagesStreamS) Send

type SentryPeersStreamC

type SentryPeersStreamC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*SentryPeersStreamC) Context

func (c *SentryPeersStreamC) Context() context.Context

func (*SentryPeersStreamC) Recv

func (c *SentryPeersStreamC) Recv() (*sentry.PeerEvent, error)

func (*SentryPeersStreamC) RecvMsg

func (c *SentryPeersStreamC) RecvMsg(anyMessage interface{}) error

type SentryPeersStreamS

type SentryPeersStreamS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

SentryPeersStreamS - implements proto_sentry.Sentry_ReceivePeersServer

func (*SentryPeersStreamS) Context

func (s *SentryPeersStreamS) Context() context.Context

func (*SentryPeersStreamS) Err

func (s *SentryPeersStreamS) Err(err error)

func (*SentryPeersStreamS) Send

type StateDiffClient

type StateDiffClient interface {
	StateChanges(ctx context.Context, in *remote.StateChangeRequest, opts ...grpc.CallOption) (remote.KV_StateChangesClient, error)
	Snapshots(ctx context.Context, in *remote.SnapshotsRequest, opts ...grpc.CallOption) (*remote.SnapshotsReply, error)
}

type StateDiffClientDirect

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

SentryClientDirect implements SentryClient interface by connecting the instance of the client directly with the corresponding instance of SentryServer

func NewStateDiffClientDirect

func NewStateDiffClientDirect(server remote.KVServer) *StateDiffClientDirect

func (*StateDiffClientDirect) Snapshots

func (*StateDiffClientDirect) StateChanges

type StateDiffStreamC

type StateDiffStreamC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*StateDiffStreamC) Context

func (c *StateDiffStreamC) Context() context.Context

func (*StateDiffStreamC) Recv

type StateDiffStreamS

type StateDiffStreamS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

StateDiffStreamS implements proto_sentry.Sentry_ReceiveMessagesServer

func (*StateDiffStreamS) Context

func (s *StateDiffStreamS) Context() context.Context

func (*StateDiffStreamS) Err

func (s *StateDiffStreamS) Err(err error)

func (*StateDiffStreamS) Send

type SubscribeLogsStreamC

type SubscribeLogsStreamC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*SubscribeLogsStreamC) Recv

func (*SubscribeLogsStreamC) Send

type SubscribeLogsStreamS

type SubscribeLogsStreamS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*SubscribeLogsStreamS) Err

func (s *SubscribeLogsStreamS) Err(err error)

func (*SubscribeLogsStreamS) Recv

func (*SubscribeLogsStreamS) Send

type SubscribeStreamC

type SubscribeStreamC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*SubscribeStreamC) Context

func (c *SubscribeStreamC) Context() context.Context

func (*SubscribeStreamC) Recv

type SubscribeStreamS

type SubscribeStreamS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*SubscribeStreamS) Context

func (s *SubscribeStreamS) Context() context.Context

func (*SubscribeStreamS) Err

func (s *SubscribeStreamS) Err(err error)

func (*SubscribeStreamS) Send

type TxPoolClient

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

func NewTxPoolClient

func NewTxPoolClient(server txpool_proto.TxpoolServer) *TxPoolClient

func (*TxPoolClient) Add

func (*TxPoolClient) All

func (*TxPoolClient) FindUnknown

func (*TxPoolClient) Nonce

func (*TxPoolClient) OnAdd

func (*TxPoolClient) Pending

func (*TxPoolClient) Status

func (*TxPoolClient) Transactions

func (*TxPoolClient) Version

func (s *TxPoolClient) Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*types.VersionReply, error)

type TxPoolOnAddC

type TxPoolOnAddC struct {
	grpc.ClientStream
	// contains filtered or unexported fields
}

func (*TxPoolOnAddC) Context

func (c *TxPoolOnAddC) Context() context.Context

func (*TxPoolOnAddC) Recv

func (c *TxPoolOnAddC) Recv() (*txpool_proto.OnAddReply, error)

type TxPoolOnAddS

type TxPoolOnAddS struct {
	grpc.ServerStream
	// contains filtered or unexported fields
}

func (*TxPoolOnAddS) Context

func (s *TxPoolOnAddS) Context() context.Context

func (*TxPoolOnAddS) Err

func (s *TxPoolOnAddS) Err(err error)

func (*TxPoolOnAddS) Send

Jump to

Keyboard shortcuts

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