privateapi

package
v0.0.0-...-1f8a15b Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

View Source
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 (*EthBackendServer) Block

func (*EthBackendServer) BorEvent

func (*EthBackendServer) ClientVersion

func (*EthBackendServer) Etherbase

func (*EthBackendServer) NetPeerCount

func (*EthBackendServer) NetVersion

func (*EthBackendServer) NodeInfo

func (*EthBackendServer) Peers

func (*EthBackendServer) PendingBlock

func (*EthBackendServer) ProtocolVersion

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 (*EthBackendServer) Version

type IsMining

type IsMining interface {
	IsMining() bool
}

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 NewMiningServer(ctx context.Context, isMining IsMining, ethashApi *ethash.API, logger log.Logger) *MiningServer

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 (*MiningServer) Mining

func (*MiningServer) OnMinedBlock

func (*MiningServer) SubmitWork

func (*MiningServer) Version

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)

Jump to

Keyboard shortcuts

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