Documentation ¶
Index ¶
- Variables
- func StartGrpc(kv *remotedbserver.KvServer, ethBackendSrv *EthBackendServer, ...) (*grpc.Server, error)
- type EthBackend
- type EthBackendServer
- func (s *EthBackendServer) AddPeer(ctx context.Context, req *remote.AddPeerRequest) (*remote.AddPeerReply, error)
- func (s *EthBackendServer) Block(ctx context.Context, req *remote.BlockRequest) (*remote.BlockReply, error)
- func (s *EthBackendServer) BorEvent(ctx context.Context, req *remote.BorEventRequest) (*remote.BorEventReply, error)
- func (s *EthBackendServer) ClientVersion(_ context.Context, _ *remote.ClientVersionRequest) (*remote.ClientVersionReply, error)
- func (s *EthBackendServer) Etherbase(_ context.Context, _ *remote.EtherbaseRequest) (*remote.EtherbaseReply, error)
- func (s *EthBackendServer) NetPeerCount(_ context.Context, _ *remote.NetPeerCountRequest) (*remote.NetPeerCountReply, error)
- func (s *EthBackendServer) NetVersion(_ context.Context, _ *remote.NetVersionRequest) (*remote.NetVersionReply, error)
- func (s *EthBackendServer) NodeInfo(_ context.Context, r *remote.NodesInfoRequest) (*remote.NodesInfoReply, error)
- func (s *EthBackendServer) Peers(ctx context.Context, _ *emptypb.Empty) (*remote.PeersReply, error)
- func (s *EthBackendServer) PendingBlock(ctx context.Context, _ *emptypb.Empty) (*remote.PendingBlockReply, error)
- func (s *EthBackendServer) ProtocolVersion(_ context.Context, _ *remote.ProtocolVersionRequest) (*remote.ProtocolVersionReply, error)
- func (s *EthBackendServer) Subscribe(r *remote.SubscribeRequest, subscribeServer remote.ETHBACKEND_SubscribeServer) (err error)
- func (s *EthBackendServer) SubscribeLogs(server remote.ETHBACKEND_SubscribeLogsServer) (err error)
- func (s *EthBackendServer) TxnLookup(ctx context.Context, req *remote.TxnLookupRequest) (*remote.TxnLookupReply, error)
- func (s *EthBackendServer) Version(context.Context, *emptypb.Empty) (*types2.VersionReply, error)
- type IsMining
- type LogsFilter
- type LogsFilterAggregator
- type MinedBlockStreams
- type MiningServer
- func (s *MiningServer) BroadcastMinedBlock(block *types.Block) error
- func (s *MiningServer) BroadcastPendingBlock(block *types.Block) error
- func (s *MiningServer) BroadcastPendingLogs(l types.Logs) error
- func (s *MiningServer) GetHashRate(_ context.Context, req *proto_txpool.HashRateRequest) (*proto_txpool.HashRateReply, error)
- func (s *MiningServer) GetWork(context.Context, *proto_txpool.GetWorkRequest) (*proto_txpool.GetWorkReply, error)
- func (s *MiningServer) Mining(_ context.Context, req *proto_txpool.MiningRequest) (*proto_txpool.MiningReply, error)
- func (s *MiningServer) OnMinedBlock(req *proto_txpool.OnMinedBlockRequest, ...) error
- func (s *MiningServer) OnPendingBlock(req *proto_txpool.OnPendingBlockRequest, ...) error
- func (s *MiningServer) OnPendingLogs(req *proto_txpool.OnPendingLogsRequest, ...) error
- func (s *MiningServer) SubmitHashRate(_ context.Context, req *proto_txpool.SubmitHashRateRequest) (*proto_txpool.SubmitHashRateReply, error)
- func (s *MiningServer) SubmitWork(_ context.Context, req *proto_txpool.SubmitWorkRequest) (*proto_txpool.SubmitWorkReply, error)
- func (s *MiningServer) Version(context.Context, *emptypb.Empty) (*types2.VersionReply, error)
- type PendingBlockStreams
- type PendingLogsStreams
Constants ¶
This section is empty.
Variables ¶
var EthBackendAPIVersion = &types2.VersionReply{Major: 3, Minor: 3, Patch: 0}
EthBackendAPIVersion 2.0.0 - move all mining-related methods to 'txpool/mining' server 2.1.0 - add NetPeerCount function 2.2.0 - add NodesInfo function 3.0.0 - adding PoS interfaces 3.1.0 - add Subscribe to logs 3.2.0 - add EngineGetBlobsBundleV1 3.3.0 - merge EngineGetBlobsBundleV1 into EngineGetPayload
var MiningAPIVersion = &types2.VersionReply{Major: 1, Minor: 0, Patch: 0}
MiningAPIVersion 2.0.0 - move all mining-related methods to 'txpool/mining' server
Functions ¶
func StartGrpc ¶
func StartGrpc(kv *remotedbserver.KvServer, ethBackendSrv *EthBackendServer, txPoolServer txpool_proto.TxpoolServer, miningServer txpool_proto.MiningServer, addr string, rateLimit uint32, creds credentials.TransportCredentials, healthCheck bool, logger log.Logger) (*grpc.Server, error)
Types ¶
type EthBackend ¶
type EthBackend interface { Etherbase() (libcommon.Address, error) NetVersion() (uint64, error) NetPeerCount() (uint64, error) NodesInfo(limit int) (*remote.NodesInfoReply, error) Peers(ctx context.Context) (*remote.PeersReply, error) AddPeer(ctx context.Context, url *remote.AddPeerRequest) (*remote.AddPeerReply, error) }
type EthBackendServer ¶
type EthBackendServer struct { remote.UnimplementedETHBACKENDServer // must be embedded to have forward compatible implementations. // contains filtered or unexported fields }
func NewEthBackendServer ¶
func NewEthBackendServer(ctx context.Context, eth EthBackend, db kv.RwDB, events *shards.Events, blockReader services.FullBlockReader, logger log.Logger, latestBlockBuiltStore *builder.LatestBlockBuiltStore, ) *EthBackendServer
func (*EthBackendServer) AddPeer ¶
func (s *EthBackendServer) AddPeer(ctx context.Context, req *remote.AddPeerRequest) (*remote.AddPeerReply, error)
func (*EthBackendServer) Block ¶
func (s *EthBackendServer) Block(ctx context.Context, req *remote.BlockRequest) (*remote.BlockReply, error)
func (*EthBackendServer) BorEvent ¶
func (s *EthBackendServer) BorEvent(ctx context.Context, req *remote.BorEventRequest) (*remote.BorEventReply, error)
func (*EthBackendServer) ClientVersion ¶
func (s *EthBackendServer) ClientVersion(_ context.Context, _ *remote.ClientVersionRequest) (*remote.ClientVersionReply, error)
func (*EthBackendServer) Etherbase ¶
func (s *EthBackendServer) Etherbase(_ context.Context, _ *remote.EtherbaseRequest) (*remote.EtherbaseReply, error)
func (*EthBackendServer) NetPeerCount ¶
func (s *EthBackendServer) NetPeerCount(_ context.Context, _ *remote.NetPeerCountRequest) (*remote.NetPeerCountReply, error)
func (*EthBackendServer) NetVersion ¶
func (s *EthBackendServer) NetVersion(_ context.Context, _ *remote.NetVersionRequest) (*remote.NetVersionReply, error)
func (*EthBackendServer) NodeInfo ¶
func (s *EthBackendServer) NodeInfo(_ context.Context, r *remote.NodesInfoRequest) (*remote.NodesInfoReply, error)
func (*EthBackendServer) Peers ¶
func (s *EthBackendServer) Peers(ctx context.Context, _ *emptypb.Empty) (*remote.PeersReply, error)
func (*EthBackendServer) PendingBlock ¶
func (s *EthBackendServer) PendingBlock(ctx context.Context, _ *emptypb.Empty) (*remote.PendingBlockReply, error)
func (*EthBackendServer) ProtocolVersion ¶
func (s *EthBackendServer) ProtocolVersion(_ context.Context, _ *remote.ProtocolVersionRequest) (*remote.ProtocolVersionReply, error)
func (*EthBackendServer) Subscribe ¶
func (s *EthBackendServer) Subscribe(r *remote.SubscribeRequest, subscribeServer remote.ETHBACKEND_SubscribeServer) (err error)
func (*EthBackendServer) SubscribeLogs ¶
func (s *EthBackendServer) SubscribeLogs(server remote.ETHBACKEND_SubscribeLogsServer) (err error)
func (*EthBackendServer) TxnLookup ¶
func (s *EthBackendServer) TxnLookup(ctx context.Context, req *remote.TxnLookupRequest) (*remote.TxnLookupReply, error)
func (*EthBackendServer) Version ¶
func (s *EthBackendServer) Version(context.Context, *emptypb.Empty) (*types2.VersionReply, error)
type LogsFilter ¶
type LogsFilter struct {
// contains filtered or unexported fields
}
LogsFilter is used for both representing log filter for a specific subscriber (RPC daemon usually) and "aggregated" log filter representing a union of all subscribers. Therefore, the values in the mappings are counters (of type int) and they get deleted when counter goes back to 0 Also, addAddr and allTopic are int instead of bool because they are also counter, counting how many subscribers have this set on
type LogsFilterAggregator ¶
type LogsFilterAggregator struct {
// contains filtered or unexported fields
}
func NewLogsFilterAggregator ¶
func NewLogsFilterAggregator(events *shards.Events) *LogsFilterAggregator
type MinedBlockStreams ¶
type MinedBlockStreams struct {
// contains filtered or unexported fields
}
MinedBlockStreams - it's safe to use this class as non-pointer
func (*MinedBlockStreams) Add ¶
func (s *MinedBlockStreams) Add(stream proto_txpool.Mining_OnMinedBlockServer) (remove func())
func (*MinedBlockStreams) Broadcast ¶
func (s *MinedBlockStreams) Broadcast(reply *proto_txpool.OnMinedBlockReply, logger log.Logger)
type MiningServer ¶
type MiningServer struct { proto_txpool.UnimplementedMiningServer // contains filtered or unexported fields }
func NewMiningServer ¶
func (*MiningServer) BroadcastMinedBlock ¶
func (s *MiningServer) BroadcastMinedBlock(block *types.Block) error
func (*MiningServer) BroadcastPendingBlock ¶
func (s *MiningServer) BroadcastPendingBlock(block *types.Block) error
func (*MiningServer) BroadcastPendingLogs ¶
func (s *MiningServer) BroadcastPendingLogs(l types.Logs) error
func (*MiningServer) GetHashRate ¶
func (s *MiningServer) GetHashRate(_ context.Context, req *proto_txpool.HashRateRequest) (*proto_txpool.HashRateReply, error)
func (*MiningServer) GetWork ¶
func (s *MiningServer) GetWork(context.Context, *proto_txpool.GetWorkRequest) (*proto_txpool.GetWorkReply, error)
func (*MiningServer) Mining ¶
func (s *MiningServer) Mining(_ context.Context, req *proto_txpool.MiningRequest) (*proto_txpool.MiningReply, error)
func (*MiningServer) OnMinedBlock ¶
func (s *MiningServer) OnMinedBlock(req *proto_txpool.OnMinedBlockRequest, reply proto_txpool.Mining_OnMinedBlockServer) error
func (*MiningServer) OnPendingBlock ¶
func (s *MiningServer) OnPendingBlock(req *proto_txpool.OnPendingBlockRequest, reply proto_txpool.Mining_OnPendingBlockServer) error
func (*MiningServer) OnPendingLogs ¶
func (s *MiningServer) OnPendingLogs(req *proto_txpool.OnPendingLogsRequest, reply proto_txpool.Mining_OnPendingLogsServer) error
func (*MiningServer) SubmitHashRate ¶
func (s *MiningServer) SubmitHashRate(_ context.Context, req *proto_txpool.SubmitHashRateRequest) (*proto_txpool.SubmitHashRateReply, error)
func (*MiningServer) SubmitWork ¶
func (s *MiningServer) SubmitWork(_ context.Context, req *proto_txpool.SubmitWorkRequest) (*proto_txpool.SubmitWorkReply, error)
func (*MiningServer) Version ¶
func (s *MiningServer) Version(context.Context, *emptypb.Empty) (*types2.VersionReply, error)
type PendingBlockStreams ¶
type PendingBlockStreams struct {
// contains filtered or unexported fields
}
PendingBlockStreams - it's safe to use this class as non-pointer
func (*PendingBlockStreams) Add ¶
func (s *PendingBlockStreams) Add(stream proto_txpool.Mining_OnPendingBlockServer) (remove func())
func (*PendingBlockStreams) Broadcast ¶
func (s *PendingBlockStreams) Broadcast(reply *proto_txpool.OnPendingBlockReply, logger log.Logger)
type PendingLogsStreams ¶
type PendingLogsStreams struct {
// contains filtered or unexported fields
}
PendingLogsStreams - it's safe to use this class as non-pointer
func (*PendingLogsStreams) Add ¶
func (s *PendingLogsStreams) Add(stream proto_txpool.Mining_OnPendingLogsServer) (remove func())
func (*PendingLogsStreams) Broadcast ¶
func (s *PendingLogsStreams) Broadcast(reply *proto_txpool.OnPendingLogsReply, logger log.Logger)