txpool

package
v0.0.0-...-c80a3f0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ImportResult_name = map[int32]string{
		0: "SUCCESS",
		1: "ALREADY_EXISTS",
		2: "FEE_TOO_LOW",
		3: "STALE",
		4: "INVALID",
		5: "INTERNAL_ERROR",
	}
	ImportResult_value = map[string]int32{
		"SUCCESS":        0,
		"ALREADY_EXISTS": 1,
		"FEE_TOO_LOW":    2,
		"STALE":          3,
		"INVALID":        4,
		"INTERNAL_ERROR": 5,
	}
)

Enum value maps for ImportResult.

View Source
var (
	AllReply_TxnType_name = map[int32]string{
		0: "PENDING",
		1: "QUEUED",
		2: "BASE_FEE",
	}
	AllReply_TxnType_value = map[string]int32{
		"PENDING":  0,
		"QUEUED":   1,
		"BASE_FEE": 2,
	}
)

Enum value maps for AllReply_TxnType.

View Source
var File_txpool_mining_proto protoreflect.FileDescriptor
View Source
var File_txpool_txpool_proto protoreflect.FileDescriptor
View Source
var Mining_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "txpool.Mining",
	HandlerType: (*MiningServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Mining_Version_Handler,
		},
		{
			MethodName: "GetWork",
			Handler:    _Mining_GetWork_Handler,
		},
		{
			MethodName: "SubmitWork",
			Handler:    _Mining_SubmitWork_Handler,
		},
		{
			MethodName: "SubmitHashRate",
			Handler:    _Mining_SubmitHashRate_Handler,
		},
		{
			MethodName: "HashRate",
			Handler:    _Mining_HashRate_Handler,
		},
		{
			MethodName: "Mining",
			Handler:    _Mining_Mining_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "OnPendingBlock",
			Handler:       _Mining_OnPendingBlock_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "OnMinedBlock",
			Handler:       _Mining_OnMinedBlock_Handler,
			ServerStreams: true,
		},
		{
			StreamName:    "OnPendingLogs",
			Handler:       _Mining_OnPendingLogs_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "txpool/mining.proto",
}

Mining_ServiceDesc is the grpc.ServiceDesc for Mining service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var Txpool_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "txpool.Txpool",
	HandlerType: (*TxpoolServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Version",
			Handler:    _Txpool_Version_Handler,
		},
		{
			MethodName: "FindUnknown",
			Handler:    _Txpool_FindUnknown_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _Txpool_Add_Handler,
		},
		{
			MethodName: "Transactions",
			Handler:    _Txpool_Transactions_Handler,
		},
		{
			MethodName: "All",
			Handler:    _Txpool_All_Handler,
		},
		{
			MethodName: "Pending",
			Handler:    _Txpool_Pending_Handler,
		},
		{
			MethodName: "Status",
			Handler:    _Txpool_Status_Handler,
		},
		{
			MethodName: "Nonce",
			Handler:    _Txpool_Nonce_Handler,
		},
	},
	Streams: []grpc.StreamDesc{
		{
			StreamName:    "OnAdd",
			Handler:       _Txpool_OnAdd_Handler,
			ServerStreams: true,
		},
	},
	Metadata: "txpool/txpool.proto",
}

Txpool_ServiceDesc is the grpc.ServiceDesc for Txpool service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterMiningServer

func RegisterMiningServer(s grpc.ServiceRegistrar, srv MiningServer)

func RegisterTxpoolServer

func RegisterTxpoolServer(s grpc.ServiceRegistrar, srv TxpoolServer)

Types

type AddReply

type AddReply struct {
	Imported []ImportResult `protobuf:"varint,1,rep,packed,name=imported,proto3,enum=txpool.ImportResult" json:"imported,omitempty"`
	Errors   []string       `protobuf:"bytes,2,rep,name=errors,proto3" json:"errors,omitempty"`
	// contains filtered or unexported fields
}

func (*AddReply) Descriptor deprecated

func (*AddReply) Descriptor() ([]byte, []int)

Deprecated: Use AddReply.ProtoReflect.Descriptor instead.

func (*AddReply) GetErrors

func (x *AddReply) GetErrors() []string

func (*AddReply) GetImported

func (x *AddReply) GetImported() []ImportResult

func (*AddReply) ProtoMessage

func (*AddReply) ProtoMessage()

func (*AddReply) ProtoReflect

func (x *AddReply) ProtoReflect() protoreflect.Message

func (*AddReply) Reset

func (x *AddReply) Reset()

func (*AddReply) String

func (x *AddReply) String() string

type AddRequest

type AddRequest struct {
	RlpTxs [][]byte `protobuf:"bytes,1,rep,name=rlpTxs,proto3" json:"rlpTxs,omitempty"`
	// contains filtered or unexported fields
}

func (*AddRequest) Descriptor deprecated

func (*AddRequest) Descriptor() ([]byte, []int)

Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.

func (*AddRequest) GetRlpTxs

func (x *AddRequest) GetRlpTxs() [][]byte

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) ProtoReflect

func (x *AddRequest) ProtoReflect() protoreflect.Message

func (*AddRequest) Reset

func (x *AddRequest) Reset()

func (*AddRequest) String

func (x *AddRequest) String() string

type AllReply

type AllReply struct {
	Txs []*AllReply_Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

func (*AllReply) Descriptor deprecated

func (*AllReply) Descriptor() ([]byte, []int)

Deprecated: Use AllReply.ProtoReflect.Descriptor instead.

func (*AllReply) GetTxs

func (x *AllReply) GetTxs() []*AllReply_Tx

func (*AllReply) ProtoMessage

func (*AllReply) ProtoMessage()

func (*AllReply) ProtoReflect

func (x *AllReply) ProtoReflect() protoreflect.Message

func (*AllReply) Reset

func (x *AllReply) Reset()

func (*AllReply) String

func (x *AllReply) String() string

type AllReply_Tx

type AllReply_Tx struct {
	TxnType AllReply_TxnType `protobuf:"varint,1,opt,name=txnType,proto3,enum=txpool.AllReply_TxnType" json:"txnType,omitempty"`
	Sender  *types.H160      `protobuf:"bytes,2,opt,name=sender,proto3" json:"sender,omitempty"`
	RlpTx   []byte           `protobuf:"bytes,3,opt,name=rlpTx,proto3" json:"rlpTx,omitempty"`
	// contains filtered or unexported fields
}

func (*AllReply_Tx) Descriptor deprecated

func (*AllReply_Tx) Descriptor() ([]byte, []int)

Deprecated: Use AllReply_Tx.ProtoReflect.Descriptor instead.

func (*AllReply_Tx) GetRlpTx

func (x *AllReply_Tx) GetRlpTx() []byte

func (*AllReply_Tx) GetSender

func (x *AllReply_Tx) GetSender() *types.H160

func (*AllReply_Tx) GetTxnType

func (x *AllReply_Tx) GetTxnType() AllReply_TxnType

func (*AllReply_Tx) ProtoMessage

func (*AllReply_Tx) ProtoMessage()

func (*AllReply_Tx) ProtoReflect

func (x *AllReply_Tx) ProtoReflect() protoreflect.Message

func (*AllReply_Tx) Reset

func (x *AllReply_Tx) Reset()

func (*AllReply_Tx) String

func (x *AllReply_Tx) String() string

type AllReply_TxnType

type AllReply_TxnType int32
const (
	AllReply_PENDING  AllReply_TxnType = 0 // All currently processable transactions
	AllReply_QUEUED   AllReply_TxnType = 1 // Queued but non-processable transactions
	AllReply_BASE_FEE AllReply_TxnType = 2 // BaseFee not enough baseFee non-processable transactions
)

func (AllReply_TxnType) Descriptor

func (AllReply_TxnType) Enum

func (AllReply_TxnType) EnumDescriptor deprecated

func (AllReply_TxnType) EnumDescriptor() ([]byte, []int)

Deprecated: Use AllReply_TxnType.Descriptor instead.

func (AllReply_TxnType) Number

func (AllReply_TxnType) String

func (x AllReply_TxnType) String() string

func (AllReply_TxnType) Type

type AllRequest

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

func (*AllRequest) Descriptor deprecated

func (*AllRequest) Descriptor() ([]byte, []int)

Deprecated: Use AllRequest.ProtoReflect.Descriptor instead.

func (*AllRequest) ProtoMessage

func (*AllRequest) ProtoMessage()

func (*AllRequest) ProtoReflect

func (x *AllRequest) ProtoReflect() protoreflect.Message

func (*AllRequest) Reset

func (x *AllRequest) Reset()

func (*AllRequest) String

func (x *AllRequest) String() string

type GetWorkReply

type GetWorkReply struct {
	HeaderHash  string `protobuf:"bytes,1,opt,name=headerHash,proto3" json:"headerHash,omitempty"`   // 32 bytes hex encoded current block header pow-hash
	SeedHash    string `protobuf:"bytes,2,opt,name=seedHash,proto3" json:"seedHash,omitempty"`       // 32 bytes hex encoded seed hash used for DAG
	Target      string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`           // 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
	BlockNumber string `protobuf:"bytes,4,opt,name=blockNumber,proto3" json:"blockNumber,omitempty"` // hex encoded block number
	// contains filtered or unexported fields
}

func (*GetWorkReply) Descriptor deprecated

func (*GetWorkReply) Descriptor() ([]byte, []int)

Deprecated: Use GetWorkReply.ProtoReflect.Descriptor instead.

func (*GetWorkReply) GetBlockNumber

func (x *GetWorkReply) GetBlockNumber() string

func (*GetWorkReply) GetHeaderHash

func (x *GetWorkReply) GetHeaderHash() string

func (*GetWorkReply) GetSeedHash

func (x *GetWorkReply) GetSeedHash() string

func (*GetWorkReply) GetTarget

func (x *GetWorkReply) GetTarget() string

func (*GetWorkReply) ProtoMessage

func (*GetWorkReply) ProtoMessage()

func (*GetWorkReply) ProtoReflect

func (x *GetWorkReply) ProtoReflect() protoreflect.Message

func (*GetWorkReply) Reset

func (x *GetWorkReply) Reset()

func (*GetWorkReply) String

func (x *GetWorkReply) String() string

type GetWorkRequest

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

func (*GetWorkRequest) Descriptor deprecated

func (*GetWorkRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetWorkRequest.ProtoReflect.Descriptor instead.

func (*GetWorkRequest) ProtoMessage

func (*GetWorkRequest) ProtoMessage()

func (*GetWorkRequest) ProtoReflect

func (x *GetWorkRequest) ProtoReflect() protoreflect.Message

func (*GetWorkRequest) Reset

func (x *GetWorkRequest) Reset()

func (*GetWorkRequest) String

func (x *GetWorkRequest) String() string

type HashRateReply

type HashRateReply struct {
	HashRate uint64 `protobuf:"varint,1,opt,name=hashRate,proto3" json:"hashRate,omitempty"`
	// contains filtered or unexported fields
}

func (*HashRateReply) Descriptor deprecated

func (*HashRateReply) Descriptor() ([]byte, []int)

Deprecated: Use HashRateReply.ProtoReflect.Descriptor instead.

func (*HashRateReply) GetHashRate

func (x *HashRateReply) GetHashRate() uint64

func (*HashRateReply) ProtoMessage

func (*HashRateReply) ProtoMessage()

func (*HashRateReply) ProtoReflect

func (x *HashRateReply) ProtoReflect() protoreflect.Message

func (*HashRateReply) Reset

func (x *HashRateReply) Reset()

func (*HashRateReply) String

func (x *HashRateReply) String() string

type HashRateRequest

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

func (*HashRateRequest) Descriptor deprecated

func (*HashRateRequest) Descriptor() ([]byte, []int)

Deprecated: Use HashRateRequest.ProtoReflect.Descriptor instead.

func (*HashRateRequest) ProtoMessage

func (*HashRateRequest) ProtoMessage()

func (*HashRateRequest) ProtoReflect

func (x *HashRateRequest) ProtoReflect() protoreflect.Message

func (*HashRateRequest) Reset

func (x *HashRateRequest) Reset()

func (*HashRateRequest) String

func (x *HashRateRequest) String() string

type ImportResult

type ImportResult int32
const (
	ImportResult_SUCCESS        ImportResult = 0
	ImportResult_ALREADY_EXISTS ImportResult = 1
	ImportResult_FEE_TOO_LOW    ImportResult = 2
	ImportResult_STALE          ImportResult = 3
	ImportResult_INVALID        ImportResult = 4
	ImportResult_INTERNAL_ERROR ImportResult = 5
)

func (ImportResult) Descriptor

func (ImportResult) Enum

func (x ImportResult) Enum() *ImportResult

func (ImportResult) EnumDescriptor deprecated

func (ImportResult) EnumDescriptor() ([]byte, []int)

Deprecated: Use ImportResult.Descriptor instead.

func (ImportResult) Number

func (ImportResult) String

func (x ImportResult) String() string

func (ImportResult) Type

type MiningClient

type MiningClient interface {
	// Version returns the service version number
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*types.VersionReply, error)
	// subscribe to pending blocks event
	OnPendingBlock(ctx context.Context, in *OnPendingBlockRequest, opts ...grpc.CallOption) (Mining_OnPendingBlockClient, error)
	// subscribe to mined blocks event
	OnMinedBlock(ctx context.Context, in *OnMinedBlockRequest, opts ...grpc.CallOption) (Mining_OnMinedBlockClient, error)
	// subscribe to pending blocks event
	OnPendingLogs(ctx context.Context, in *OnPendingLogsRequest, opts ...grpc.CallOption) (Mining_OnPendingLogsClient, error)
	// GetWork returns a work package for external miner.
	//
	// The work package consists of 3 strings:
	//   result[0] - 32 bytes hex encoded current block header pow-hash
	//   result[1] - 32 bytes hex encoded seed hash used for DAG
	//   result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
	//   result[3] - hex encoded block number
	GetWork(ctx context.Context, in *GetWorkRequest, opts ...grpc.CallOption) (*GetWorkReply, error)
	// SubmitWork can be used by external miner to submit their POW solution.
	// It returns an indication if the work was accepted.
	// Note either an invalid solution, a stale work a non-existent work will return false.
	SubmitWork(ctx context.Context, in *SubmitWorkRequest, opts ...grpc.CallOption) (*SubmitWorkReply, error)
	// SubmitHashRate can be used for remote miners to submit their hash rate.
	// This enables the node to report the combined hash rate of all miners
	// which submit work through this node.
	//
	// It accepts the miner hash rate and an identifier which must be unique
	// between nodes.
	SubmitHashRate(ctx context.Context, in *SubmitHashRateRequest, opts ...grpc.CallOption) (*SubmitHashRateReply, error)
	// HashRate returns the current hashrate for local CPU miner and remote miner.
	HashRate(ctx context.Context, in *HashRateRequest, opts ...grpc.CallOption) (*HashRateReply, error)
	// Mining returns an indication if this node is currently mining and it's mining configuration
	Mining(ctx context.Context, in *MiningRequest, opts ...grpc.CallOption) (*MiningReply, error)
}

MiningClient is the client API for Mining service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewMiningClient

func NewMiningClient(cc grpc.ClientConnInterface) MiningClient

type MiningReply

type MiningReply struct {
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	Running bool `protobuf:"varint,2,opt,name=running,proto3" json:"running,omitempty"`
	// contains filtered or unexported fields
}

func (*MiningReply) Descriptor deprecated

func (*MiningReply) Descriptor() ([]byte, []int)

Deprecated: Use MiningReply.ProtoReflect.Descriptor instead.

func (*MiningReply) GetEnabled

func (x *MiningReply) GetEnabled() bool

func (*MiningReply) GetRunning

func (x *MiningReply) GetRunning() bool

func (*MiningReply) ProtoMessage

func (*MiningReply) ProtoMessage()

func (*MiningReply) ProtoReflect

func (x *MiningReply) ProtoReflect() protoreflect.Message

func (*MiningReply) Reset

func (x *MiningReply) Reset()

func (*MiningReply) String

func (x *MiningReply) String() string

type MiningRequest

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

func (*MiningRequest) Descriptor deprecated

func (*MiningRequest) Descriptor() ([]byte, []int)

Deprecated: Use MiningRequest.ProtoReflect.Descriptor instead.

func (*MiningRequest) ProtoMessage

func (*MiningRequest) ProtoMessage()

func (*MiningRequest) ProtoReflect

func (x *MiningRequest) ProtoReflect() protoreflect.Message

func (*MiningRequest) Reset

func (x *MiningRequest) Reset()

func (*MiningRequest) String

func (x *MiningRequest) String() string

type MiningServer

type MiningServer interface {
	// Version returns the service version number
	Version(context.Context, *emptypb.Empty) (*types.VersionReply, error)
	// subscribe to pending blocks event
	OnPendingBlock(*OnPendingBlockRequest, Mining_OnPendingBlockServer) error
	// subscribe to mined blocks event
	OnMinedBlock(*OnMinedBlockRequest, Mining_OnMinedBlockServer) error
	// subscribe to pending blocks event
	OnPendingLogs(*OnPendingLogsRequest, Mining_OnPendingLogsServer) error
	// GetWork returns a work package for external miner.
	//
	// The work package consists of 3 strings:
	//   result[0] - 32 bytes hex encoded current block header pow-hash
	//   result[1] - 32 bytes hex encoded seed hash used for DAG
	//   result[2] - 32 bytes hex encoded boundary condition ("target"), 2^256/difficulty
	//   result[3] - hex encoded block number
	GetWork(context.Context, *GetWorkRequest) (*GetWorkReply, error)
	// SubmitWork can be used by external miner to submit their POW solution.
	// It returns an indication if the work was accepted.
	// Note either an invalid solution, a stale work a non-existent work will return false.
	SubmitWork(context.Context, *SubmitWorkRequest) (*SubmitWorkReply, error)
	// SubmitHashRate can be used for remote miners to submit their hash rate.
	// This enables the node to report the combined hash rate of all miners
	// which submit work through this node.
	//
	// It accepts the miner hash rate and an identifier which must be unique
	// between nodes.
	SubmitHashRate(context.Context, *SubmitHashRateRequest) (*SubmitHashRateReply, error)
	// HashRate returns the current hashrate for local CPU miner and remote miner.
	HashRate(context.Context, *HashRateRequest) (*HashRateReply, error)
	// Mining returns an indication if this node is currently mining and it's mining configuration
	Mining(context.Context, *MiningRequest) (*MiningReply, error)
	// contains filtered or unexported methods
}

MiningServer is the server API for Mining service. All implementations must embed UnimplementedMiningServer for forward compatibility

type Mining_OnMinedBlockClient

type Mining_OnMinedBlockClient interface {
	Recv() (*OnMinedBlockReply, error)
	grpc.ClientStream
}

type Mining_OnMinedBlockServer

type Mining_OnMinedBlockServer interface {
	Send(*OnMinedBlockReply) error
	grpc.ServerStream
}

type Mining_OnPendingBlockClient

type Mining_OnPendingBlockClient interface {
	Recv() (*OnPendingBlockReply, error)
	grpc.ClientStream
}

type Mining_OnPendingBlockServer

type Mining_OnPendingBlockServer interface {
	Send(*OnPendingBlockReply) error
	grpc.ServerStream
}

type Mining_OnPendingLogsClient

type Mining_OnPendingLogsClient interface {
	Recv() (*OnPendingLogsReply, error)
	grpc.ClientStream
}

type Mining_OnPendingLogsServer

type Mining_OnPendingLogsServer interface {
	Send(*OnPendingLogsReply) error
	grpc.ServerStream
}

type NonceReply

type NonceReply struct {
	Found bool   `protobuf:"varint,1,opt,name=found,proto3" json:"found,omitempty"`
	Nonce uint64 `protobuf:"varint,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

func (*NonceReply) Descriptor deprecated

func (*NonceReply) Descriptor() ([]byte, []int)

Deprecated: Use NonceReply.ProtoReflect.Descriptor instead.

func (*NonceReply) GetFound

func (x *NonceReply) GetFound() bool

func (*NonceReply) GetNonce

func (x *NonceReply) GetNonce() uint64

func (*NonceReply) ProtoMessage

func (*NonceReply) ProtoMessage()

func (*NonceReply) ProtoReflect

func (x *NonceReply) ProtoReflect() protoreflect.Message

func (*NonceReply) Reset

func (x *NonceReply) Reset()

func (*NonceReply) String

func (x *NonceReply) String() string

type NonceRequest

type NonceRequest struct {
	Address *types.H160 `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// contains filtered or unexported fields
}

func (*NonceRequest) Descriptor deprecated

func (*NonceRequest) Descriptor() ([]byte, []int)

Deprecated: Use NonceRequest.ProtoReflect.Descriptor instead.

func (*NonceRequest) GetAddress

func (x *NonceRequest) GetAddress() *types.H160

func (*NonceRequest) ProtoMessage

func (*NonceRequest) ProtoMessage()

func (*NonceRequest) ProtoReflect

func (x *NonceRequest) ProtoReflect() protoreflect.Message

func (*NonceRequest) Reset

func (x *NonceRequest) Reset()

func (*NonceRequest) String

func (x *NonceRequest) String() string

type OnAddReply

type OnAddReply struct {
	RplTxs [][]byte `protobuf:"bytes,1,rep,name=rplTxs,proto3" json:"rplTxs,omitempty"`
	// contains filtered or unexported fields
}

func (*OnAddReply) Descriptor deprecated

func (*OnAddReply) Descriptor() ([]byte, []int)

Deprecated: Use OnAddReply.ProtoReflect.Descriptor instead.

func (*OnAddReply) GetRplTxs

func (x *OnAddReply) GetRplTxs() [][]byte

func (*OnAddReply) ProtoMessage

func (*OnAddReply) ProtoMessage()

func (*OnAddReply) ProtoReflect

func (x *OnAddReply) ProtoReflect() protoreflect.Message

func (*OnAddReply) Reset

func (x *OnAddReply) Reset()

func (*OnAddReply) String

func (x *OnAddReply) String() string

type OnAddRequest

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

func (*OnAddRequest) Descriptor deprecated

func (*OnAddRequest) Descriptor() ([]byte, []int)

Deprecated: Use OnAddRequest.ProtoReflect.Descriptor instead.

func (*OnAddRequest) ProtoMessage

func (*OnAddRequest) ProtoMessage()

func (*OnAddRequest) ProtoReflect

func (x *OnAddRequest) ProtoReflect() protoreflect.Message

func (*OnAddRequest) Reset

func (x *OnAddRequest) Reset()

func (*OnAddRequest) String

func (x *OnAddRequest) String() string

type OnMinedBlockReply

type OnMinedBlockReply struct {
	RplBlock []byte `protobuf:"bytes,1,opt,name=rplBlock,proto3" json:"rplBlock,omitempty"`
	// contains filtered or unexported fields
}

func (*OnMinedBlockReply) Descriptor deprecated

func (*OnMinedBlockReply) Descriptor() ([]byte, []int)

Deprecated: Use OnMinedBlockReply.ProtoReflect.Descriptor instead.

func (*OnMinedBlockReply) GetRplBlock

func (x *OnMinedBlockReply) GetRplBlock() []byte

func (*OnMinedBlockReply) ProtoMessage

func (*OnMinedBlockReply) ProtoMessage()

func (*OnMinedBlockReply) ProtoReflect

func (x *OnMinedBlockReply) ProtoReflect() protoreflect.Message

func (*OnMinedBlockReply) Reset

func (x *OnMinedBlockReply) Reset()

func (*OnMinedBlockReply) String

func (x *OnMinedBlockReply) String() string

type OnMinedBlockRequest

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

func (*OnMinedBlockRequest) Descriptor deprecated

func (*OnMinedBlockRequest) Descriptor() ([]byte, []int)

Deprecated: Use OnMinedBlockRequest.ProtoReflect.Descriptor instead.

func (*OnMinedBlockRequest) ProtoMessage

func (*OnMinedBlockRequest) ProtoMessage()

func (*OnMinedBlockRequest) ProtoReflect

func (x *OnMinedBlockRequest) ProtoReflect() protoreflect.Message

func (*OnMinedBlockRequest) Reset

func (x *OnMinedBlockRequest) Reset()

func (*OnMinedBlockRequest) String

func (x *OnMinedBlockRequest) String() string

type OnPendingBlockReply

type OnPendingBlockReply struct {
	RplBlock []byte `protobuf:"bytes,1,opt,name=rplBlock,proto3" json:"rplBlock,omitempty"`
	// contains filtered or unexported fields
}

func (*OnPendingBlockReply) Descriptor deprecated

func (*OnPendingBlockReply) Descriptor() ([]byte, []int)

Deprecated: Use OnPendingBlockReply.ProtoReflect.Descriptor instead.

func (*OnPendingBlockReply) GetRplBlock

func (x *OnPendingBlockReply) GetRplBlock() []byte

func (*OnPendingBlockReply) ProtoMessage

func (*OnPendingBlockReply) ProtoMessage()

func (*OnPendingBlockReply) ProtoReflect

func (x *OnPendingBlockReply) ProtoReflect() protoreflect.Message

func (*OnPendingBlockReply) Reset

func (x *OnPendingBlockReply) Reset()

func (*OnPendingBlockReply) String

func (x *OnPendingBlockReply) String() string

type OnPendingBlockRequest

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

func (*OnPendingBlockRequest) Descriptor deprecated

func (*OnPendingBlockRequest) Descriptor() ([]byte, []int)

Deprecated: Use OnPendingBlockRequest.ProtoReflect.Descriptor instead.

func (*OnPendingBlockRequest) ProtoMessage

func (*OnPendingBlockRequest) ProtoMessage()

func (*OnPendingBlockRequest) ProtoReflect

func (x *OnPendingBlockRequest) ProtoReflect() protoreflect.Message

func (*OnPendingBlockRequest) Reset

func (x *OnPendingBlockRequest) Reset()

func (*OnPendingBlockRequest) String

func (x *OnPendingBlockRequest) String() string

type OnPendingLogsReply

type OnPendingLogsReply struct {
	RplLogs []byte `protobuf:"bytes,1,opt,name=rplLogs,proto3" json:"rplLogs,omitempty"`
	// contains filtered or unexported fields
}

func (*OnPendingLogsReply) Descriptor deprecated

func (*OnPendingLogsReply) Descriptor() ([]byte, []int)

Deprecated: Use OnPendingLogsReply.ProtoReflect.Descriptor instead.

func (*OnPendingLogsReply) GetRplLogs

func (x *OnPendingLogsReply) GetRplLogs() []byte

func (*OnPendingLogsReply) ProtoMessage

func (*OnPendingLogsReply) ProtoMessage()

func (*OnPendingLogsReply) ProtoReflect

func (x *OnPendingLogsReply) ProtoReflect() protoreflect.Message

func (*OnPendingLogsReply) Reset

func (x *OnPendingLogsReply) Reset()

func (*OnPendingLogsReply) String

func (x *OnPendingLogsReply) String() string

type OnPendingLogsRequest

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

func (*OnPendingLogsRequest) Descriptor deprecated

func (*OnPendingLogsRequest) Descriptor() ([]byte, []int)

Deprecated: Use OnPendingLogsRequest.ProtoReflect.Descriptor instead.

func (*OnPendingLogsRequest) ProtoMessage

func (*OnPendingLogsRequest) ProtoMessage()

func (*OnPendingLogsRequest) ProtoReflect

func (x *OnPendingLogsRequest) ProtoReflect() protoreflect.Message

func (*OnPendingLogsRequest) Reset

func (x *OnPendingLogsRequest) Reset()

func (*OnPendingLogsRequest) String

func (x *OnPendingLogsRequest) String() string

type PendingReply

type PendingReply struct {
	Txs []*PendingReply_Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"`
	// contains filtered or unexported fields
}

func (*PendingReply) Descriptor deprecated

func (*PendingReply) Descriptor() ([]byte, []int)

Deprecated: Use PendingReply.ProtoReflect.Descriptor instead.

func (*PendingReply) GetTxs

func (x *PendingReply) GetTxs() []*PendingReply_Tx

func (*PendingReply) ProtoMessage

func (*PendingReply) ProtoMessage()

func (*PendingReply) ProtoReflect

func (x *PendingReply) ProtoReflect() protoreflect.Message

func (*PendingReply) Reset

func (x *PendingReply) Reset()

func (*PendingReply) String

func (x *PendingReply) String() string

type PendingReply_Tx

type PendingReply_Tx struct {
	Sender  *types.H160 `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"`
	RlpTx   []byte      `protobuf:"bytes,2,opt,name=rlpTx,proto3" json:"rlpTx,omitempty"`
	IsLocal bool        `protobuf:"varint,3,opt,name=isLocal,proto3" json:"isLocal,omitempty"`
	// contains filtered or unexported fields
}

func (*PendingReply_Tx) Descriptor deprecated

func (*PendingReply_Tx) Descriptor() ([]byte, []int)

Deprecated: Use PendingReply_Tx.ProtoReflect.Descriptor instead.

func (*PendingReply_Tx) GetIsLocal

func (x *PendingReply_Tx) GetIsLocal() bool

func (*PendingReply_Tx) GetRlpTx

func (x *PendingReply_Tx) GetRlpTx() []byte

func (*PendingReply_Tx) GetSender

func (x *PendingReply_Tx) GetSender() *types.H160

func (*PendingReply_Tx) ProtoMessage

func (*PendingReply_Tx) ProtoMessage()

func (*PendingReply_Tx) ProtoReflect

func (x *PendingReply_Tx) ProtoReflect() protoreflect.Message

func (*PendingReply_Tx) Reset

func (x *PendingReply_Tx) Reset()

func (*PendingReply_Tx) String

func (x *PendingReply_Tx) String() string

type StatusReply

type StatusReply struct {
	PendingCount uint32 `protobuf:"varint,1,opt,name=pendingCount,proto3" json:"pendingCount,omitempty"`
	QueuedCount  uint32 `protobuf:"varint,2,opt,name=queuedCount,proto3" json:"queuedCount,omitempty"`
	BaseFeeCount uint32 `protobuf:"varint,3,opt,name=baseFeeCount,proto3" json:"baseFeeCount,omitempty"`
	// contains filtered or unexported fields
}

func (*StatusReply) Descriptor deprecated

func (*StatusReply) Descriptor() ([]byte, []int)

Deprecated: Use StatusReply.ProtoReflect.Descriptor instead.

func (*StatusReply) GetBaseFeeCount

func (x *StatusReply) GetBaseFeeCount() uint32

func (*StatusReply) GetPendingCount

func (x *StatusReply) GetPendingCount() uint32

func (*StatusReply) GetQueuedCount

func (x *StatusReply) GetQueuedCount() uint32

func (*StatusReply) ProtoMessage

func (*StatusReply) ProtoMessage()

func (*StatusReply) ProtoReflect

func (x *StatusReply) ProtoReflect() protoreflect.Message

func (*StatusReply) Reset

func (x *StatusReply) Reset()

func (*StatusReply) String

func (x *StatusReply) String() string

type StatusRequest

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

func (*StatusRequest) Descriptor deprecated

func (*StatusRequest) Descriptor() ([]byte, []int)

Deprecated: Use StatusRequest.ProtoReflect.Descriptor instead.

func (*StatusRequest) ProtoMessage

func (*StatusRequest) ProtoMessage()

func (*StatusRequest) ProtoReflect

func (x *StatusRequest) ProtoReflect() protoreflect.Message

func (*StatusRequest) Reset

func (x *StatusRequest) Reset()

func (*StatusRequest) String

func (x *StatusRequest) String() string

type SubmitHashRateReply

type SubmitHashRateReply struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitHashRateReply) Descriptor deprecated

func (*SubmitHashRateReply) Descriptor() ([]byte, []int)

Deprecated: Use SubmitHashRateReply.ProtoReflect.Descriptor instead.

func (*SubmitHashRateReply) GetOk

func (x *SubmitHashRateReply) GetOk() bool

func (*SubmitHashRateReply) ProtoMessage

func (*SubmitHashRateReply) ProtoMessage()

func (*SubmitHashRateReply) ProtoReflect

func (x *SubmitHashRateReply) ProtoReflect() protoreflect.Message

func (*SubmitHashRateReply) Reset

func (x *SubmitHashRateReply) Reset()

func (*SubmitHashRateReply) String

func (x *SubmitHashRateReply) String() string

type SubmitHashRateRequest

type SubmitHashRateRequest struct {
	Rate uint64 `protobuf:"varint,1,opt,name=rate,proto3" json:"rate,omitempty"`
	Id   []byte `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitHashRateRequest) Descriptor deprecated

func (*SubmitHashRateRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubmitHashRateRequest.ProtoReflect.Descriptor instead.

func (*SubmitHashRateRequest) GetId

func (x *SubmitHashRateRequest) GetId() []byte

func (*SubmitHashRateRequest) GetRate

func (x *SubmitHashRateRequest) GetRate() uint64

func (*SubmitHashRateRequest) ProtoMessage

func (*SubmitHashRateRequest) ProtoMessage()

func (*SubmitHashRateRequest) ProtoReflect

func (x *SubmitHashRateRequest) ProtoReflect() protoreflect.Message

func (*SubmitHashRateRequest) Reset

func (x *SubmitHashRateRequest) Reset()

func (*SubmitHashRateRequest) String

func (x *SubmitHashRateRequest) String() string

type SubmitWorkReply

type SubmitWorkReply struct {
	Ok bool `protobuf:"varint,1,opt,name=ok,proto3" json:"ok,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitWorkReply) Descriptor deprecated

func (*SubmitWorkReply) Descriptor() ([]byte, []int)

Deprecated: Use SubmitWorkReply.ProtoReflect.Descriptor instead.

func (*SubmitWorkReply) GetOk

func (x *SubmitWorkReply) GetOk() bool

func (*SubmitWorkReply) ProtoMessage

func (*SubmitWorkReply) ProtoMessage()

func (*SubmitWorkReply) ProtoReflect

func (x *SubmitWorkReply) ProtoReflect() protoreflect.Message

func (*SubmitWorkReply) Reset

func (x *SubmitWorkReply) Reset()

func (*SubmitWorkReply) String

func (x *SubmitWorkReply) String() string

type SubmitWorkRequest

type SubmitWorkRequest struct {
	BlockNonce []byte `protobuf:"bytes,1,opt,name=blockNonce,proto3" json:"blockNonce,omitempty"`
	PowHash    []byte `protobuf:"bytes,2,opt,name=powHash,proto3" json:"powHash,omitempty"`
	Digest     []byte `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

func (*SubmitWorkRequest) Descriptor deprecated

func (*SubmitWorkRequest) Descriptor() ([]byte, []int)

Deprecated: Use SubmitWorkRequest.ProtoReflect.Descriptor instead.

func (*SubmitWorkRequest) GetBlockNonce

func (x *SubmitWorkRequest) GetBlockNonce() []byte

func (*SubmitWorkRequest) GetDigest

func (x *SubmitWorkRequest) GetDigest() []byte

func (*SubmitWorkRequest) GetPowHash

func (x *SubmitWorkRequest) GetPowHash() []byte

func (*SubmitWorkRequest) ProtoMessage

func (*SubmitWorkRequest) ProtoMessage()

func (*SubmitWorkRequest) ProtoReflect

func (x *SubmitWorkRequest) ProtoReflect() protoreflect.Message

func (*SubmitWorkRequest) Reset

func (x *SubmitWorkRequest) Reset()

func (*SubmitWorkRequest) String

func (x *SubmitWorkRequest) String() string

type TransactionsReply

type TransactionsReply struct {
	RlpTxs [][]byte `protobuf:"bytes,1,rep,name=rlpTxs,proto3" json:"rlpTxs,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionsReply) Descriptor deprecated

func (*TransactionsReply) Descriptor() ([]byte, []int)

Deprecated: Use TransactionsReply.ProtoReflect.Descriptor instead.

func (*TransactionsReply) GetRlpTxs

func (x *TransactionsReply) GetRlpTxs() [][]byte

func (*TransactionsReply) ProtoMessage

func (*TransactionsReply) ProtoMessage()

func (*TransactionsReply) ProtoReflect

func (x *TransactionsReply) ProtoReflect() protoreflect.Message

func (*TransactionsReply) Reset

func (x *TransactionsReply) Reset()

func (*TransactionsReply) String

func (x *TransactionsReply) String() string

type TransactionsRequest

type TransactionsRequest struct {
	Hashes []*types.H256 `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*TransactionsRequest) Descriptor deprecated

func (*TransactionsRequest) Descriptor() ([]byte, []int)

Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead.

func (*TransactionsRequest) GetHashes

func (x *TransactionsRequest) GetHashes() []*types.H256

func (*TransactionsRequest) ProtoMessage

func (*TransactionsRequest) ProtoMessage()

func (*TransactionsRequest) ProtoReflect

func (x *TransactionsRequest) ProtoReflect() protoreflect.Message

func (*TransactionsRequest) Reset

func (x *TransactionsRequest) Reset()

func (*TransactionsRequest) String

func (x *TransactionsRequest) String() string

type TxHashes

type TxHashes struct {
	Hashes []*types.H256 `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"`
	// contains filtered or unexported fields
}

func (*TxHashes) Descriptor deprecated

func (*TxHashes) Descriptor() ([]byte, []int)

Deprecated: Use TxHashes.ProtoReflect.Descriptor instead.

func (*TxHashes) GetHashes

func (x *TxHashes) GetHashes() []*types.H256

func (*TxHashes) ProtoMessage

func (*TxHashes) ProtoMessage()

func (*TxHashes) ProtoReflect

func (x *TxHashes) ProtoReflect() protoreflect.Message

func (*TxHashes) Reset

func (x *TxHashes) Reset()

func (*TxHashes) String

func (x *TxHashes) String() string

type TxpoolClient

type TxpoolClient interface {
	// Version returns the service version number
	Version(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*types.VersionReply, error)
	// preserves incoming order, changes amount, unknown hashes will be omitted
	FindUnknown(ctx context.Context, in *TxHashes, opts ...grpc.CallOption) (*TxHashes, error)
	// Expecting signed transactions. Preserves incoming order and amount
	// Adding txs as local (use P2P to add remote txs)
	Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddReply, error)
	// preserves incoming order and amount, if some transaction doesn't exists in pool - returns nil in this slot
	Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error)
	// returns all transactions from tx pool
	All(ctx context.Context, in *AllRequest, opts ...grpc.CallOption) (*AllReply, error)
	// Returns all pending (processable) transactions, in ready-for-mining order
	Pending(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PendingReply, error)
	// subscribe to new transactions add event
	OnAdd(ctx context.Context, in *OnAddRequest, opts ...grpc.CallOption) (Txpool_OnAddClient, error)
	// returns high level status
	Status(ctx context.Context, in *StatusRequest, opts ...grpc.CallOption) (*StatusReply, error)
	// returns nonce for given account
	Nonce(ctx context.Context, in *NonceRequest, opts ...grpc.CallOption) (*NonceReply, error)
}

TxpoolClient is the client API for Txpool service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewTxpoolClient

func NewTxpoolClient(cc grpc.ClientConnInterface) TxpoolClient

type TxpoolServer

type TxpoolServer interface {
	// Version returns the service version number
	Version(context.Context, *emptypb.Empty) (*types.VersionReply, error)
	// preserves incoming order, changes amount, unknown hashes will be omitted
	FindUnknown(context.Context, *TxHashes) (*TxHashes, error)
	// Expecting signed transactions. Preserves incoming order and amount
	// Adding txs as local (use P2P to add remote txs)
	Add(context.Context, *AddRequest) (*AddReply, error)
	// preserves incoming order and amount, if some transaction doesn't exists in pool - returns nil in this slot
	Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error)
	// returns all transactions from tx pool
	All(context.Context, *AllRequest) (*AllReply, error)
	// Returns all pending (processable) transactions, in ready-for-mining order
	Pending(context.Context, *emptypb.Empty) (*PendingReply, error)
	// subscribe to new transactions add event
	OnAdd(*OnAddRequest, Txpool_OnAddServer) error
	// returns high level status
	Status(context.Context, *StatusRequest) (*StatusReply, error)
	// returns nonce for given account
	Nonce(context.Context, *NonceRequest) (*NonceReply, error)
	// contains filtered or unexported methods
}

TxpoolServer is the server API for Txpool service. All implementations must embed UnimplementedTxpoolServer for forward compatibility

type Txpool_OnAddClient

type Txpool_OnAddClient interface {
	Recv() (*OnAddReply, error)
	grpc.ClientStream
}

type Txpool_OnAddServer

type Txpool_OnAddServer interface {
	Send(*OnAddReply) error
	grpc.ServerStream
}

type UnimplementedMiningServer

type UnimplementedMiningServer struct {
}

UnimplementedMiningServer must be embedded to have forward compatible implementations.

func (UnimplementedMiningServer) GetWork

func (UnimplementedMiningServer) HashRate

func (UnimplementedMiningServer) Mining

func (UnimplementedMiningServer) OnMinedBlock

func (UnimplementedMiningServer) OnPendingBlock

func (UnimplementedMiningServer) OnPendingLogs

func (UnimplementedMiningServer) SubmitHashRate

func (UnimplementedMiningServer) SubmitWork

func (UnimplementedMiningServer) Version

type UnimplementedTxpoolServer

type UnimplementedTxpoolServer struct {
}

UnimplementedTxpoolServer must be embedded to have forward compatible implementations.

func (UnimplementedTxpoolServer) Add

func (UnimplementedTxpoolServer) All

func (UnimplementedTxpoolServer) FindUnknown

func (UnimplementedTxpoolServer) Nonce

func (UnimplementedTxpoolServer) OnAdd

func (UnimplementedTxpoolServer) Pending

func (UnimplementedTxpoolServer) Status

func (UnimplementedTxpoolServer) Transactions

func (UnimplementedTxpoolServer) Version

type UnsafeMiningServer

type UnsafeMiningServer interface {
	// contains filtered or unexported methods
}

UnsafeMiningServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to MiningServer will result in compilation errors.

type UnsafeTxpoolServer

type UnsafeTxpoolServer interface {
	// contains filtered or unexported methods
}

UnsafeTxpoolServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to TxpoolServer will result in compilation errors.

Jump to

Keyboard shortcuts

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