Documentation ¶
Overview ¶
Package config provides configuration for GRPC and HTTP api servers
Code generated by MockGen. DO NOT EDIT. Source: ./interface.go
Generated by this command:
mockgen -typed -package=grpcserver -destination=./mocks.go -source=./interface.go
Package grpcserver is a generated GoMock package.
Index ¶
- func NewActivationService(atxProvider atxProvider, goldenAtx types.ATXID) *activationService
- type AdminService
- func (a AdminService) CheckpointStream(req *pb.CheckpointStreamRequest, stream pb.AdminService_CheckpointStreamServer) error
- func (a AdminService) EventsStream(req *pb.EventStreamRequest, stream pb.AdminService_EventsStreamServer) error
- func (a AdminService) PeerInfoStream(_ *emptypb.Empty, stream pb.AdminService_PeerInfoStreamServer) error
- func (a AdminService) Recover(ctx context.Context, _ *pb.RecoverRequest) (*emptypb.Empty, error)
- func (s AdminService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (a AdminService) RegisterService(server *grpc.Server)
- func (a AdminService) String() string
- type Config
- type DebugService
- func (d DebugService) Accounts(ctx context.Context, in *pb.AccountsRequest) (*pb.AccountsResponse, error)
- func (d DebugService) ActiveSet(ctx context.Context, req *pb.ActiveSetRequest) (*pb.ActiveSetResponse, error)
- func (d DebugService) NetworkInfo(ctx context.Context, _ *emptypb.Empty) (*pb.NetworkInfoResponse, error)
- func (d DebugService) ProposalsStream(_ *emptypb.Empty, stream pb.DebugService_ProposalsStreamServer) error
- func (s DebugService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (d DebugService) RegisterService(server *grpc.Server)
- func (d DebugService) String() string
- type GlobalStateService
- func (s GlobalStateService) Account(ctx context.Context, in *pb.AccountRequest) (*pb.AccountResponse, error)
- func (s GlobalStateService) AccountDataQuery(ctx context.Context, in *pb.AccountDataQueryRequest) (*pb.AccountDataQueryResponse, error)
- func (s GlobalStateService) AccountDataStream(in *pb.AccountDataStreamRequest, ...) error
- func (s GlobalStateService) AppEventStream(*pb.AppEventStreamRequest, pb.GlobalStateService_AppEventStreamServer) error
- func (s GlobalStateService) GlobalStateHash(context.Context, *pb.GlobalStateHashRequest) (*pb.GlobalStateHashResponse, error)
- func (s GlobalStateService) GlobalStateStream(in *pb.GlobalStateStreamRequest, ...) error
- func (s GlobalStateService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (s GlobalStateService) RegisterService(server *grpc.Server)
- func (s GlobalStateService) SmesherDataQuery(_ context.Context, in *pb.SmesherDataQueryRequest) (*pb.SmesherDataQueryResponse, error)
- func (s GlobalStateService) SmesherRewardStream(in *pb.SmesherRewardStreamRequest, ...) error
- func (s GlobalStateService) String() string
- type JSONHTTPServer
- type MeshService
- func (s MeshService) AccountMeshDataQuery(ctx context.Context, in *pb.AccountMeshDataQueryRequest) (*pb.AccountMeshDataQueryResponse, error)
- func (s MeshService) AccountMeshDataStream(in *pb.AccountMeshDataStreamRequest, ...) error
- func (s MeshService) CurrentEpoch(context.Context, *pb.CurrentEpochRequest) (*pb.CurrentEpochResponse, error)
- func (s MeshService) CurrentLayer(context.Context, *pb.CurrentLayerRequest) (*pb.CurrentLayerResponse, error)
- func (s MeshService) EpochNumLayers(context.Context, *pb.EpochNumLayersRequest) (*pb.EpochNumLayersResponse, error)
- func (s MeshService) EpochStream(req *pb.EpochStreamRequest, stream pb.MeshService_EpochStreamServer) error
- func (s MeshService) GenesisID(context.Context, *pb.GenesisIDRequest) (*pb.GenesisIDResponse, error)
- func (s MeshService) GenesisTime(context.Context, *pb.GenesisTimeRequest) (*pb.GenesisTimeResponse, error)
- func (s MeshService) LayerDuration(context.Context, *pb.LayerDurationRequest) (*pb.LayerDurationResponse, error)
- func (s MeshService) LayerStream(_ *pb.LayerStreamRequest, stream pb.MeshService_LayerStreamServer) error
- func (s MeshService) LayersQuery(ctx context.Context, in *pb.LayersQueryRequest) (*pb.LayersQueryResponse, error)
- func (s MeshService) MalfeasanceQuery(ctx context.Context, req *pb.MalfeasanceRequest) (*pb.MalfeasanceResponse, error)
- func (s MeshService) MalfeasanceStream(req *pb.MalfeasanceStreamRequest, ...) error
- func (s MeshService) MaxTransactionsPerSecond(context.Context, *pb.MaxTransactionsPerSecondRequest) (*pb.MaxTransactionsPerSecondResponse, error)
- func (s MeshService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (s MeshService) RegisterService(server *grpc.Server)
- func (s MeshService) String() string
- type MockatxProvider
- func (m *MockatxProvider) EXPECT() *MockatxProviderMockRecorder
- func (m *MockatxProvider) GetFullAtx(id types.ATXID) (*types.VerifiedActivationTx, error)
- func (m *MockatxProvider) GetMalfeasanceProof(id types.NodeID) (*types.MalfeasanceProof, error)
- func (m *MockatxProvider) MaxHeightAtx() (types.ATXID, error)
- type MockatxProviderMockRecorder
- type MockconservativeState
- func (m *MockconservativeState) EXPECT() *MockconservativeStateMockRecorder
- func (m *MockconservativeState) GetAllAccounts() ([]*types.Account, error)
- func (m *MockconservativeState) GetBalance(arg0 types.Address) (uint64, error)
- func (m *MockconservativeState) GetLayerStateRoot(arg0 types.LayerID) (types.Hash32, error)
- func (m *MockconservativeState) GetMeshTransaction(arg0 types.TransactionID) (*types.MeshTransaction, error)
- func (m *MockconservativeState) GetMeshTransactions(arg0 []types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})
- func (m *MockconservativeState) GetNonce(arg0 types.Address) (types.Nonce, error)
- func (m *MockconservativeState) GetProjection(arg0 types.Address) (uint64, uint64)
- func (m *MockconservativeState) GetStateRoot() (types.Hash32, error)
- func (m *MockconservativeState) GetTransactionsByAddress(arg0, arg1 types.LayerID, arg2 types.Address) ([]*types.MeshTransaction, error)
- func (m *MockconservativeState) Validation(raw types.RawTx) system.ValidationRequest
- type MockconservativeStateMockRecorder
- func (mr *MockconservativeStateMockRecorder) GetAllAccounts() *conservativeStateGetAllAccountsCall
- func (mr *MockconservativeStateMockRecorder) GetBalance(arg0 any) *conservativeStateGetBalanceCall
- func (mr *MockconservativeStateMockRecorder) GetLayerStateRoot(arg0 any) *conservativeStateGetLayerStateRootCall
- func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 any) *conservativeStateGetMeshTransactionCall
- func (mr *MockconservativeStateMockRecorder) GetMeshTransactions(arg0 any) *conservativeStateGetMeshTransactionsCall
- func (mr *MockconservativeStateMockRecorder) GetNonce(arg0 any) *conservativeStateGetNonceCall
- func (mr *MockconservativeStateMockRecorder) GetProjection(arg0 any) *conservativeStateGetProjectionCall
- func (mr *MockconservativeStateMockRecorder) GetStateRoot() *conservativeStateGetStateRootCall
- func (mr *MockconservativeStateMockRecorder) GetTransactionsByAddress(arg0, arg1, arg2 any) *conservativeStateGetTransactionsByAddressCall
- func (mr *MockconservativeStateMockRecorder) Validation(raw any) *conservativeStateValidationCall
- type MockgenesisTimeAPI
- type MockgenesisTimeAPIMockRecorder
- type MockmeshAPI
- func (m *MockmeshAPI) EXPECT() *MockmeshAPIMockRecorder
- func (m *MockmeshAPI) GetATXs(arg0 context.Context, arg1 []types.ATXID) (map[types.ATXID]*types.VerifiedActivationTx, []types.ATXID)
- func (m *MockmeshAPI) GetLayer(arg0 types.LayerID) (*types.Layer, error)
- func (m *MockmeshAPI) GetLayerVerified(arg0 types.LayerID) (*types.Block, error)
- func (m *MockmeshAPI) GetRewardsByCoinbase(arg0 types.Address) ([]*types.Reward, error)
- func (m *MockmeshAPI) GetRewardsBySmesherId(id types.NodeID) ([]*types.Reward, error)
- func (m *MockmeshAPI) LatestLayer() types.LayerID
- func (m *MockmeshAPI) LatestLayerInState() types.LayerID
- func (m *MockmeshAPI) MeshHash(arg0 types.LayerID) (types.Hash32, error)
- func (m *MockmeshAPI) ProcessedLayer() types.LayerID
- type MockmeshAPIMockRecorder
- func (mr *MockmeshAPIMockRecorder) GetATXs(arg0, arg1 any) *meshAPIGetATXsCall
- func (mr *MockmeshAPIMockRecorder) GetLayer(arg0 any) *meshAPIGetLayerCall
- func (mr *MockmeshAPIMockRecorder) GetLayerVerified(arg0 any) *meshAPIGetLayerVerifiedCall
- func (mr *MockmeshAPIMockRecorder) GetRewardsByCoinbase(arg0 any) *meshAPIGetRewardsByCoinbaseCall
- func (mr *MockmeshAPIMockRecorder) GetRewardsBySmesherId(id any) *meshAPIGetRewardsBySmesherIdCall
- func (mr *MockmeshAPIMockRecorder) LatestLayer() *meshAPILatestLayerCall
- func (mr *MockmeshAPIMockRecorder) LatestLayerInState() *meshAPILatestLayerInStateCall
- func (mr *MockmeshAPIMockRecorder) MeshHash(arg0 any) *meshAPIMeshHashCall
- func (mr *MockmeshAPIMockRecorder) ProcessedLayer() *meshAPIProcessedLayerCall
- type MocknetworkInfo
- func (m *MocknetworkInfo) DHTServerEnabled() bool
- func (m *MocknetworkInfo) EXPECT() *MocknetworkInfoMockRecorder
- func (m *MocknetworkInfo) ID() p2p.Peer
- func (m *MocknetworkInfo) KnownAddresses() []multiaddr.Multiaddr
- func (m *MocknetworkInfo) ListenAddresses() []multiaddr.Multiaddr
- func (m *MocknetworkInfo) NATDeviceType() (network.NATDeviceType, network.NATDeviceType)
- func (m *MocknetworkInfo) Reachability() network.Reachability
- type MocknetworkInfoMockRecorder
- func (mr *MocknetworkInfoMockRecorder) DHTServerEnabled() *networkInfoDHTServerEnabledCall
- func (mr *MocknetworkInfoMockRecorder) ID() *networkInfoIDCall
- func (mr *MocknetworkInfoMockRecorder) KnownAddresses() *networkInfoKnownAddressesCall
- func (mr *MocknetworkInfoMockRecorder) ListenAddresses() *networkInfoListenAddressesCall
- func (mr *MocknetworkInfoMockRecorder) NATDeviceType() *networkInfoNATDeviceTypeCall
- func (mr *MocknetworkInfoMockRecorder) Reachability() *networkInfoReachabilityCall
- type Mockoracle
- type MockoracleMockRecorder
- type MockpeerCounter
- type MockpeerCounterMockRecorder
- type Mockpeers
- type MockpeersMockRecorder
- type MockpostSupervisor
- func (m *MockpostSupervisor) Benchmark(p activation.PostSetupProvider) (int, error)
- func (m *MockpostSupervisor) Config() activation.PostConfig
- func (m *MockpostSupervisor) EXPECT() *MockpostSupervisorMockRecorder
- func (m *MockpostSupervisor) Providers() ([]activation.PostSetupProvider, error)
- func (m *MockpostSupervisor) Start(opts activation.PostSetupOpts) error
- func (m *MockpostSupervisor) Status() *activation.PostSetupStatus
- func (m *MockpostSupervisor) Stop(deleteFiles bool) error
- type MockpostSupervisorMockRecorder
- func (mr *MockpostSupervisorMockRecorder) Benchmark(p any) *postSupervisorBenchmarkCall
- func (mr *MockpostSupervisorMockRecorder) Config() *postSupervisorConfigCall
- func (mr *MockpostSupervisorMockRecorder) Providers() *postSupervisorProvidersCall
- func (mr *MockpostSupervisorMockRecorder) Start(opts any) *postSupervisorStartCall
- func (mr *MockpostSupervisorMockRecorder) Status() *postSupervisorStatusCall
- func (mr *MockpostSupervisorMockRecorder) Stop(deleteFiles any) *postSupervisorStopCall
- type Mocksyncer
- type MocksyncerMockRecorder
- type MocktxValidator
- type MocktxValidatorMockRecorder
- type NodeService
- func (s NodeService) Build(context.Context, *emptypb.Empty) (*pb.BuildResponse, error)
- func (s NodeService) Echo(_ context.Context, in *pb.EchoRequest) (*pb.EchoResponse, error)
- func (s NodeService) ErrorStream(_ *pb.ErrorStreamRequest, stream pb.NodeService_ErrorStreamServer) error
- func (s NodeService) NodeInfo(context.Context, *emptypb.Empty) (*pb.NodeInfoResponse, error)
- func (s NodeService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (s NodeService) RegisterService(server *grpc.Server)
- func (s NodeService) Status(ctx context.Context, _ *pb.StatusRequest) (*pb.StatusResponse, error)
- func (s NodeService) StatusStream(_ *pb.StatusStreamRequest, stream pb.NodeService_StatusStreamServer) error
- func (s NodeService) String() string
- func (s NodeService) Version(context.Context, *emptypb.Empty) (*pb.VersionResponse, error)
- type PostService
- func (s *PostService) Client(nodeId types.NodeID) (activation.PostClient, error)
- func (s *PostService) Register(stream pb.PostService_RegisterServer) error
- func (s *PostService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (s *PostService) RegisterService(server *grpc.Server)
- func (s *PostService) String() string
- type Server
- func New(listener string, logger *zap.Logger, config Config, ...) *Server
- func NewPrivate(logger *zap.Logger, config Config, svc []ServiceAPI) (*Server, error)
- func NewPublic(logger *zap.Logger, config Config, svc []ServiceAPI) (*Server, error)
- func NewTLS(logger *zap.Logger, config Config, svc []ServiceAPI) (*Server, error)
- type Service
- type ServiceAPI
- type SmesherService
- func (s SmesherService) Coinbase(context.Context, *emptypb.Empty) (*pb.CoinbaseResponse, error)
- func (s SmesherService) EstimatedRewards(context.Context, *pb.EstimatedRewardsRequest) (*pb.EstimatedRewardsResponse, error)
- func (s SmesherService) IsSmeshing(context.Context, *emptypb.Empty) (*pb.IsSmeshingResponse, error)
- func (s SmesherService) MinGas(context.Context, *emptypb.Empty) (*pb.MinGasResponse, error)
- func (s SmesherService) PostConfig(context.Context, *emptypb.Empty) (*pb.PostConfigResponse, error)
- func (s SmesherService) PostSetupProviders(ctx context.Context, in *pb.PostSetupProvidersRequest) (*pb.PostSetupProvidersResponse, error)
- func (s SmesherService) PostSetupStatus(ctx context.Context, _ *emptypb.Empty) (*pb.PostSetupStatusResponse, error)
- func (s SmesherService) PostSetupStatusStream(_ *emptypb.Empty, stream pb.SmesherService_PostSetupStatusStreamServer) error
- func (s SmesherService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (s SmesherService) RegisterService(server *grpc.Server)
- func (s SmesherService) SetCoinbase(_ context.Context, in *pb.SetCoinbaseRequest) (*pb.SetCoinbaseResponse, error)
- func (s SmesherService) SetMinGas(context.Context, *pb.SetMinGasRequest) (*pb.SetMinGasResponse, error)
- func (s SmesherService) SmesherID(context.Context, *emptypb.Empty) (*pb.SmesherIDResponse, error)
- func (s SmesherService) StartSmeshing(ctx context.Context, in *pb.StartSmeshingRequest) (*pb.StartSmeshingResponse, error)
- func (s SmesherService) StopSmeshing(ctx context.Context, in *pb.StopSmeshingRequest) (*pb.StopSmeshingResponse, error)
- func (s SmesherService) String() string
- type TransactionService
- func (s TransactionService) ParseTransaction(ctx context.Context, in *pb.ParseTransactionRequest) (*pb.ParseTransactionResponse, error)
- func (s TransactionService) RegisterHandlerService(mux *runtime.ServeMux) error
- func (s TransactionService) RegisterService(server *grpc.Server)
- func (s TransactionService) StreamResults(in *pb.TransactionResultsRequest, ...) error
- func (s TransactionService) String() string
- func (s TransactionService) SubmitTransaction(ctx context.Context, in *pb.SubmitTransactionRequest) (*pb.SubmitTransactionResponse, error)
- func (s TransactionService) TransactionsState(_ context.Context, in *pb.TransactionsStateRequest) (*pb.TransactionsStateResponse, error)
- func (s TransactionService) TransactionsStateStream(in *pb.TransactionsStateStreamRequest, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewActivationService ¶ added in v1.0.0
Types ¶
type AdminService ¶ added in v1.0.0
type AdminService struct {
// contains filtered or unexported fields
}
AdminService exposes endpoints for node administration.
func NewAdminService ¶ added in v1.0.0
func NewAdminService(db *sql.Database, dataDir string, p peers) *AdminService
NewAdminService creates a new admin grpc service.
func (AdminService) CheckpointStream ¶ added in v1.0.0
func (a AdminService) CheckpointStream( req *pb.CheckpointStreamRequest, stream pb.AdminService_CheckpointStreamServer, ) error
func (AdminService) EventsStream ¶ added in v1.0.0
func (a AdminService) EventsStream(req *pb.EventStreamRequest, stream pb.AdminService_EventsStreamServer) error
func (AdminService) PeerInfoStream ¶ added in v1.1.2
func (a AdminService) PeerInfoStream(_ *emptypb.Empty, stream pb.AdminService_PeerInfoStreamServer) error
func (AdminService) Recover ¶ added in v1.0.0
func (a AdminService) Recover(ctx context.Context, _ *pb.RecoverRequest) (*emptypb.Empty, error)
func (AdminService) RegisterHandlerService ¶ added in v1.3.0
func (s AdminService) RegisterHandlerService(mux *runtime.ServeMux) error
func (AdminService) RegisterService ¶ added in v1.0.0
func (a AdminService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (AdminService) String ¶ added in v1.3.0
func (a AdminService) String() string
String returns the name of this service.
type Config ¶ added in v1.0.0
type Config struct { PublicServices []Service PublicListener string `mapstructure:"grpc-public-listener"` PrivateServices []Service PrivateListener string `mapstructure:"grpc-private-listener"` TLSServices []Service TLSListener string `mapstructure:"grpc-tls-listener"` TLSCACert string `mapstructure:"grpc-tls-ca-cert"` TLSCert string `mapstructure:"grpc-tls-cert"` TLSKey string `mapstructure:"grpc-tls-key"` GrpcSendMsgSize int `mapstructure:"grpc-send-msg-size"` GrpcRecvMsgSize int `mapstructure:"grpc-recv-msg-size"` JSONListener string `mapstructure:"grpc-json-listener"` SmesherStreamInterval time.Duration }
func DefaultConfig ¶ added in v1.0.0
func DefaultConfig() Config
DefaultConfig defines the default configuration options for api.
func DefaultTestConfig ¶ added in v1.0.0
func DefaultTestConfig() Config
DefaultTestConfig returns the default config for tests.
type DebugService ¶ added in v0.1.16
type DebugService struct {
// contains filtered or unexported fields
}
DebugService exposes global state data, output from the STF.
func NewDebugService ¶ added in v0.1.16
func NewDebugService(db *sql.Database, conState conservativeState, host networkInfo, oracle oracle) *DebugService
NewDebugService creates a new grpc service using config data.
func (DebugService) Accounts ¶ added in v0.1.16
func (d DebugService) Accounts(ctx context.Context, in *pb.AccountsRequest) (*pb.AccountsResponse, error)
Accounts returns current counter and balance for all accounts.
func (DebugService) ActiveSet ¶ added in v1.0.0
func (d DebugService) ActiveSet(ctx context.Context, req *pb.ActiveSetRequest) (*pb.ActiveSetResponse, error)
ActiveSet query provides hare active set for the specified epoch.
func (DebugService) NetworkInfo ¶ added in v1.0.0
func (d DebugService) NetworkInfo(ctx context.Context, _ *emptypb.Empty) (*pb.NetworkInfoResponse, error)
NetworkInfo query provides NetworkInfoResponse.
func (DebugService) ProposalsStream ¶ added in v1.0.0
func (d DebugService) ProposalsStream(_ *emptypb.Empty, stream pb.DebugService_ProposalsStreamServer) error
ProposalsStream streams all proposals confirmed by hare.
func (DebugService) RegisterHandlerService ¶ added in v1.3.0
func (s DebugService) RegisterHandlerService(mux *runtime.ServeMux) error
func (DebugService) RegisterService ¶ added in v0.1.16
func (d DebugService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (DebugService) String ¶ added in v1.3.0
func (d DebugService) String() string
String returns the name of this service.
type GlobalStateService ¶
type GlobalStateService struct {
// contains filtered or unexported fields
}
GlobalStateService exposes global state data, output from the STF.
func NewGlobalStateService ¶
func NewGlobalStateService(msh meshAPI, conState conservativeState) *GlobalStateService
NewGlobalStateService creates a new grpc service using config data.
func (GlobalStateService) Account ¶
func (s GlobalStateService) Account(ctx context.Context, in *pb.AccountRequest) (*pb.AccountResponse, error)
Account returns current and projected counter and balance for one account.
func (GlobalStateService) AccountDataQuery ¶
func (s GlobalStateService) AccountDataQuery( ctx context.Context, in *pb.AccountDataQueryRequest, ) (*pb.AccountDataQueryResponse, error)
AccountDataQuery returns historical account data such as rewards and receipts.
func (GlobalStateService) AccountDataStream ¶
func (s GlobalStateService) AccountDataStream( in *pb.AccountDataStreamRequest, stream pb.GlobalStateService_AccountDataStreamServer, ) error
AccountDataStream exposes a stream of account-related data.
func (GlobalStateService) AppEventStream ¶
func (s GlobalStateService) AppEventStream( *pb.AppEventStreamRequest, pb.GlobalStateService_AppEventStreamServer, ) error
AppEventStream exposes a stream of emitted app events.
func (GlobalStateService) GlobalStateHash ¶
func (s GlobalStateService) GlobalStateHash( context.Context, *pb.GlobalStateHashRequest, ) (*pb.GlobalStateHashResponse, error)
GlobalStateHash returns the latest layer and its computed global state hash.
func (GlobalStateService) GlobalStateStream ¶
func (s GlobalStateService) GlobalStateStream( in *pb.GlobalStateStreamRequest, stream pb.GlobalStateService_GlobalStateStreamServer, ) error
GlobalStateStream exposes a stream of global data data items: rewards, receipts, account info, global state hash.
func (GlobalStateService) RegisterHandlerService ¶ added in v1.3.0
func (s GlobalStateService) RegisterHandlerService(mux *runtime.ServeMux) error
func (GlobalStateService) RegisterService ¶
func (s GlobalStateService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (GlobalStateService) SmesherDataQuery ¶
func (s GlobalStateService) SmesherDataQuery( _ context.Context, in *pb.SmesherDataQueryRequest, ) (*pb.SmesherDataQueryResponse, error)
SmesherDataQuery returns historical info on smesher rewards.
func (GlobalStateService) SmesherRewardStream ¶
func (s GlobalStateService) SmesherRewardStream( in *pb.SmesherRewardStreamRequest, stream pb.GlobalStateService_SmesherRewardStreamServer, ) error
SmesherRewardStream exposes a stream of smesher rewards.
func (GlobalStateService) String ¶ added in v1.3.0
func (s GlobalStateService) String() string
String returns the name of the service.
type JSONHTTPServer ¶
type JSONHTTPServer struct { // BoundAddress contains the address that the server bound to, useful if // the server uses a dynamic port. It is set during startup and can be // safely accessed after Start has completed (I.E. the returned channel has // been waited on) BoundAddress string // contains filtered or unexported fields }
JSONHTTPServer is a JSON http server providing the Spacemesh API. It is implemented using a grpc-gateway. See https://github.com/grpc-ecosystem/grpc-gateway .
func NewJSONHTTPServer ¶
func NewJSONHTTPServer(listener string, lg *zap.Logger) *JSONHTTPServer
NewJSONHTTPServer creates a new json http server.
func (*JSONHTTPServer) Shutdown ¶ added in v1.0.0
func (s *JSONHTTPServer) Shutdown(ctx context.Context) error
Shutdown stops the server.
func (*JSONHTTPServer) StartService ¶
func (s *JSONHTTPServer) StartService( ctx context.Context, services ...ServiceAPI, ) error
StartService starts the json api server and listens for status (started, stopped).
type MeshService ¶
type MeshService struct {
// contains filtered or unexported fields
}
MeshService exposes mesh data such as accounts, blocks, and transactions.
func NewMeshService ¶
func NewMeshService( cdb *datastore.CachedDB, msh meshAPI, cstate conservativeState, genTime genesisTimeAPI, layersPerEpoch uint32, genesisID types.Hash20, layerDuration time.Duration, layerAvgSize, txsPerProposal uint32, ) *MeshService
NewMeshService creates a new service using config data.
func (MeshService) AccountMeshDataQuery ¶
func (s MeshService) AccountMeshDataQuery( ctx context.Context, in *pb.AccountMeshDataQueryRequest, ) (*pb.AccountMeshDataQueryResponse, error)
AccountMeshDataQuery returns account data.
func (MeshService) AccountMeshDataStream ¶
func (s MeshService) AccountMeshDataStream( in *pb.AccountMeshDataStreamRequest, stream pb.MeshService_AccountMeshDataStreamServer, ) error
AccountMeshDataStream exposes a stream of transactions and activations for an account.
func (MeshService) CurrentEpoch ¶
func (s MeshService) CurrentEpoch(context.Context, *pb.CurrentEpochRequest) (*pb.CurrentEpochResponse, error)
CurrentEpoch returns the current epoch number.
func (MeshService) CurrentLayer ¶
func (s MeshService) CurrentLayer(context.Context, *pb.CurrentLayerRequest) (*pb.CurrentLayerResponse, error)
CurrentLayer returns the current layer number.
func (MeshService) EpochNumLayers ¶
func (s MeshService) EpochNumLayers(context.Context, *pb.EpochNumLayersRequest) (*pb.EpochNumLayersResponse, error)
EpochNumLayers returns the number of layers per epoch (a network parameter).
func (MeshService) EpochStream ¶ added in v1.0.0
func (s MeshService) EpochStream(req *pb.EpochStreamRequest, stream pb.MeshService_EpochStreamServer) error
func (MeshService) GenesisID ¶ added in v1.0.0
func (s MeshService) GenesisID(context.Context, *pb.GenesisIDRequest) (*pb.GenesisIDResponse, error)
GenesisID returns the network ID.
func (MeshService) GenesisTime ¶
func (s MeshService) GenesisTime(context.Context, *pb.GenesisTimeRequest) (*pb.GenesisTimeResponse, error)
GenesisTime returns the network genesis time as UNIX time.
func (MeshService) LayerDuration ¶
func (s MeshService) LayerDuration(context.Context, *pb.LayerDurationRequest) (*pb.LayerDurationResponse, error)
LayerDuration returns the layer duration in seconds (a network parameter).
func (MeshService) LayerStream ¶
func (s MeshService) LayerStream(_ *pb.LayerStreamRequest, stream pb.MeshService_LayerStreamServer) error
LayerStream exposes a stream of all mesh data per layer.
func (MeshService) LayersQuery ¶
func (s MeshService) LayersQuery(ctx context.Context, in *pb.LayersQueryRequest) (*pb.LayersQueryResponse, error)
LayersQuery returns all mesh data, layer by layer.
func (MeshService) MalfeasanceQuery ¶ added in v1.1.0
func (s MeshService) MalfeasanceQuery( ctx context.Context, req *pb.MalfeasanceRequest, ) (*pb.MalfeasanceResponse, error)
func (MeshService) MalfeasanceStream ¶ added in v1.1.0
func (s MeshService) MalfeasanceStream( req *pb.MalfeasanceStreamRequest, stream pb.MeshService_MalfeasanceStreamServer, ) error
func (MeshService) MaxTransactionsPerSecond ¶
func (s MeshService) MaxTransactionsPerSecond( context.Context, *pb.MaxTransactionsPerSecondRequest, ) (*pb.MaxTransactionsPerSecondResponse, error)
MaxTransactionsPerSecond returns the max number of tx per sec (a network parameter).
func (MeshService) RegisterHandlerService ¶ added in v1.3.0
func (s MeshService) RegisterHandlerService(mux *runtime.ServeMux) error
func (MeshService) RegisterService ¶
func (s MeshService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (MeshService) String ¶ added in v1.3.0
func (s MeshService) String() string
String returns the name of this service.
type MockatxProvider ¶ added in v1.0.0
type MockatxProvider struct {
// contains filtered or unexported fields
}
MockatxProvider is a mock of atxProvider interface.
func NewMockatxProvider ¶ added in v1.0.0
func NewMockatxProvider(ctrl *gomock.Controller) *MockatxProvider
NewMockatxProvider creates a new mock instance.
func (*MockatxProvider) EXPECT ¶ added in v1.0.0
func (m *MockatxProvider) EXPECT() *MockatxProviderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockatxProvider) GetFullAtx ¶ added in v1.0.0
func (m *MockatxProvider) GetFullAtx(id types.ATXID) (*types.VerifiedActivationTx, error)
GetFullAtx mocks base method.
func (*MockatxProvider) GetMalfeasanceProof ¶ added in v1.1.0
func (m *MockatxProvider) GetMalfeasanceProof(id types.NodeID) (*types.MalfeasanceProof, error)
GetMalfeasanceProof mocks base method.
func (*MockatxProvider) MaxHeightAtx ¶ added in v1.0.0
func (m *MockatxProvider) MaxHeightAtx() (types.ATXID, error)
MaxHeightAtx mocks base method.
type MockatxProviderMockRecorder ¶ added in v1.0.0
type MockatxProviderMockRecorder struct {
// contains filtered or unexported fields
}
MockatxProviderMockRecorder is the mock recorder for MockatxProvider.
func (*MockatxProviderMockRecorder) GetFullAtx ¶ added in v1.0.0
func (mr *MockatxProviderMockRecorder) GetFullAtx(id any) *atxProviderGetFullAtxCall
GetFullAtx indicates an expected call of GetFullAtx.
func (*MockatxProviderMockRecorder) GetMalfeasanceProof ¶ added in v1.1.0
func (mr *MockatxProviderMockRecorder) GetMalfeasanceProof(id any) *atxProviderGetMalfeasanceProofCall
GetMalfeasanceProof indicates an expected call of GetMalfeasanceProof.
func (*MockatxProviderMockRecorder) MaxHeightAtx ¶ added in v1.0.0
func (mr *MockatxProviderMockRecorder) MaxHeightAtx() *atxProviderMaxHeightAtxCall
MaxHeightAtx indicates an expected call of MaxHeightAtx.
type MockconservativeState ¶ added in v1.0.0
type MockconservativeState struct {
// contains filtered or unexported fields
}
MockconservativeState is a mock of conservativeState interface.
func NewMockconservativeState ¶ added in v1.0.0
func NewMockconservativeState(ctrl *gomock.Controller) *MockconservativeState
NewMockconservativeState creates a new mock instance.
func (*MockconservativeState) EXPECT ¶ added in v1.0.0
func (m *MockconservativeState) EXPECT() *MockconservativeStateMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockconservativeState) GetAllAccounts ¶ added in v1.0.0
func (m *MockconservativeState) GetAllAccounts() ([]*types.Account, error)
GetAllAccounts mocks base method.
func (*MockconservativeState) GetBalance ¶ added in v1.0.0
func (m *MockconservativeState) GetBalance(arg0 types.Address) (uint64, error)
GetBalance mocks base method.
func (*MockconservativeState) GetLayerStateRoot ¶ added in v1.0.0
GetLayerStateRoot mocks base method.
func (*MockconservativeState) GetMeshTransaction ¶ added in v1.0.0
func (m *MockconservativeState) GetMeshTransaction(arg0 types.TransactionID) (*types.MeshTransaction, error)
GetMeshTransaction mocks base method.
func (*MockconservativeState) GetMeshTransactions ¶ added in v1.0.0
func (m *MockconservativeState) GetMeshTransactions(arg0 []types.TransactionID) ([]*types.MeshTransaction, map[types.TransactionID]struct{})
GetMeshTransactions mocks base method.
func (*MockconservativeState) GetProjection ¶ added in v1.0.0
func (m *MockconservativeState) GetProjection(arg0 types.Address) (uint64, uint64)
GetProjection mocks base method.
func (*MockconservativeState) GetStateRoot ¶ added in v1.0.0
func (m *MockconservativeState) GetStateRoot() (types.Hash32, error)
GetStateRoot mocks base method.
func (*MockconservativeState) GetTransactionsByAddress ¶ added in v1.0.0
func (m *MockconservativeState) GetTransactionsByAddress(arg0, arg1 types.LayerID, arg2 types.Address) ([]*types.MeshTransaction, error)
GetTransactionsByAddress mocks base method.
func (*MockconservativeState) Validation ¶ added in v1.0.0
func (m *MockconservativeState) Validation(raw types.RawTx) system.ValidationRequest
Validation mocks base method.
type MockconservativeStateMockRecorder ¶ added in v1.0.0
type MockconservativeStateMockRecorder struct {
// contains filtered or unexported fields
}
MockconservativeStateMockRecorder is the mock recorder for MockconservativeState.
func (*MockconservativeStateMockRecorder) GetAllAccounts ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetAllAccounts() *conservativeStateGetAllAccountsCall
GetAllAccounts indicates an expected call of GetAllAccounts.
func (*MockconservativeStateMockRecorder) GetBalance ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetBalance(arg0 any) *conservativeStateGetBalanceCall
GetBalance indicates an expected call of GetBalance.
func (*MockconservativeStateMockRecorder) GetLayerStateRoot ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetLayerStateRoot(arg0 any) *conservativeStateGetLayerStateRootCall
GetLayerStateRoot indicates an expected call of GetLayerStateRoot.
func (*MockconservativeStateMockRecorder) GetMeshTransaction ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetMeshTransaction(arg0 any) *conservativeStateGetMeshTransactionCall
GetMeshTransaction indicates an expected call of GetMeshTransaction.
func (*MockconservativeStateMockRecorder) GetMeshTransactions ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetMeshTransactions(arg0 any) *conservativeStateGetMeshTransactionsCall
GetMeshTransactions indicates an expected call of GetMeshTransactions.
func (*MockconservativeStateMockRecorder) GetNonce ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetNonce(arg0 any) *conservativeStateGetNonceCall
GetNonce indicates an expected call of GetNonce.
func (*MockconservativeStateMockRecorder) GetProjection ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetProjection(arg0 any) *conservativeStateGetProjectionCall
GetProjection indicates an expected call of GetProjection.
func (*MockconservativeStateMockRecorder) GetStateRoot ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetStateRoot() *conservativeStateGetStateRootCall
GetStateRoot indicates an expected call of GetStateRoot.
func (*MockconservativeStateMockRecorder) GetTransactionsByAddress ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) GetTransactionsByAddress(arg0, arg1, arg2 any) *conservativeStateGetTransactionsByAddressCall
GetTransactionsByAddress indicates an expected call of GetTransactionsByAddress.
func (*MockconservativeStateMockRecorder) Validation ¶ added in v1.0.0
func (mr *MockconservativeStateMockRecorder) Validation(raw any) *conservativeStateValidationCall
Validation indicates an expected call of Validation.
type MockgenesisTimeAPI ¶ added in v1.0.0
type MockgenesisTimeAPI struct {
// contains filtered or unexported fields
}
MockgenesisTimeAPI is a mock of genesisTimeAPI interface.
func NewMockgenesisTimeAPI ¶ added in v1.0.0
func NewMockgenesisTimeAPI(ctrl *gomock.Controller) *MockgenesisTimeAPI
NewMockgenesisTimeAPI creates a new mock instance.
func (*MockgenesisTimeAPI) CurrentLayer ¶ added in v1.0.0
func (m *MockgenesisTimeAPI) CurrentLayer() types.LayerID
CurrentLayer mocks base method.
func (*MockgenesisTimeAPI) EXPECT ¶ added in v1.0.0
func (m *MockgenesisTimeAPI) EXPECT() *MockgenesisTimeAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockgenesisTimeAPI) GenesisTime ¶ added in v1.0.0
func (m *MockgenesisTimeAPI) GenesisTime() time.Time
GenesisTime mocks base method.
type MockgenesisTimeAPIMockRecorder ¶ added in v1.0.0
type MockgenesisTimeAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockgenesisTimeAPIMockRecorder is the mock recorder for MockgenesisTimeAPI.
func (*MockgenesisTimeAPIMockRecorder) CurrentLayer ¶ added in v1.0.0
func (mr *MockgenesisTimeAPIMockRecorder) CurrentLayer() *genesisTimeAPICurrentLayerCall
CurrentLayer indicates an expected call of CurrentLayer.
func (*MockgenesisTimeAPIMockRecorder) GenesisTime ¶ added in v1.0.0
func (mr *MockgenesisTimeAPIMockRecorder) GenesisTime() *genesisTimeAPIGenesisTimeCall
GenesisTime indicates an expected call of GenesisTime.
type MockmeshAPI ¶ added in v1.0.0
type MockmeshAPI struct {
// contains filtered or unexported fields
}
MockmeshAPI is a mock of meshAPI interface.
func NewMockmeshAPI ¶ added in v1.0.0
func NewMockmeshAPI(ctrl *gomock.Controller) *MockmeshAPI
NewMockmeshAPI creates a new mock instance.
func (*MockmeshAPI) EXPECT ¶ added in v1.0.0
func (m *MockmeshAPI) EXPECT() *MockmeshAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockmeshAPI) GetATXs ¶ added in v1.0.0
func (m *MockmeshAPI) GetATXs(arg0 context.Context, arg1 []types.ATXID) (map[types.ATXID]*types.VerifiedActivationTx, []types.ATXID)
GetATXs mocks base method.
func (*MockmeshAPI) GetLayerVerified ¶ added in v1.3.3
GetLayerVerified mocks base method.
func (*MockmeshAPI) GetRewardsByCoinbase ¶ added in v1.3.0
GetRewardsByCoinbase mocks base method.
func (*MockmeshAPI) GetRewardsBySmesherId ¶ added in v1.3.0
GetRewardsBySmesherId mocks base method.
func (*MockmeshAPI) LatestLayer ¶ added in v1.0.0
func (m *MockmeshAPI) LatestLayer() types.LayerID
LatestLayer mocks base method.
func (*MockmeshAPI) LatestLayerInState ¶ added in v1.0.0
func (m *MockmeshAPI) LatestLayerInState() types.LayerID
LatestLayerInState mocks base method.
func (*MockmeshAPI) ProcessedLayer ¶ added in v1.0.0
func (m *MockmeshAPI) ProcessedLayer() types.LayerID
ProcessedLayer mocks base method.
type MockmeshAPIMockRecorder ¶ added in v1.0.0
type MockmeshAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockmeshAPIMockRecorder is the mock recorder for MockmeshAPI.
func (*MockmeshAPIMockRecorder) GetATXs ¶ added in v1.0.0
func (mr *MockmeshAPIMockRecorder) GetATXs(arg0, arg1 any) *meshAPIGetATXsCall
GetATXs indicates an expected call of GetATXs.
func (*MockmeshAPIMockRecorder) GetLayer ¶ added in v1.0.0
func (mr *MockmeshAPIMockRecorder) GetLayer(arg0 any) *meshAPIGetLayerCall
GetLayer indicates an expected call of GetLayer.
func (*MockmeshAPIMockRecorder) GetLayerVerified ¶ added in v1.3.3
func (mr *MockmeshAPIMockRecorder) GetLayerVerified(arg0 any) *meshAPIGetLayerVerifiedCall
GetLayerVerified indicates an expected call of GetLayerVerified.
func (*MockmeshAPIMockRecorder) GetRewardsByCoinbase ¶ added in v1.3.0
func (mr *MockmeshAPIMockRecorder) GetRewardsByCoinbase(arg0 any) *meshAPIGetRewardsByCoinbaseCall
GetRewardsByCoinbase indicates an expected call of GetRewardsByCoinbase.
func (*MockmeshAPIMockRecorder) GetRewardsBySmesherId ¶ added in v1.3.0
func (mr *MockmeshAPIMockRecorder) GetRewardsBySmesherId(id any) *meshAPIGetRewardsBySmesherIdCall
GetRewardsBySmesherId indicates an expected call of GetRewardsBySmesherId.
func (*MockmeshAPIMockRecorder) LatestLayer ¶ added in v1.0.0
func (mr *MockmeshAPIMockRecorder) LatestLayer() *meshAPILatestLayerCall
LatestLayer indicates an expected call of LatestLayer.
func (*MockmeshAPIMockRecorder) LatestLayerInState ¶ added in v1.0.0
func (mr *MockmeshAPIMockRecorder) LatestLayerInState() *meshAPILatestLayerInStateCall
LatestLayerInState indicates an expected call of LatestLayerInState.
func (*MockmeshAPIMockRecorder) MeshHash ¶ added in v1.0.0
func (mr *MockmeshAPIMockRecorder) MeshHash(arg0 any) *meshAPIMeshHashCall
MeshHash indicates an expected call of MeshHash.
func (*MockmeshAPIMockRecorder) ProcessedLayer ¶ added in v1.0.0
func (mr *MockmeshAPIMockRecorder) ProcessedLayer() *meshAPIProcessedLayerCall
ProcessedLayer indicates an expected call of ProcessedLayer.
type MocknetworkInfo ¶ added in v1.3.0
type MocknetworkInfo struct {
// contains filtered or unexported fields
}
MocknetworkInfo is a mock of networkInfo interface.
func NewMocknetworkInfo ¶ added in v1.3.0
func NewMocknetworkInfo(ctrl *gomock.Controller) *MocknetworkInfo
NewMocknetworkInfo creates a new mock instance.
func (*MocknetworkInfo) DHTServerEnabled ¶ added in v1.3.0
func (m *MocknetworkInfo) DHTServerEnabled() bool
DHTServerEnabled mocks base method.
func (*MocknetworkInfo) EXPECT ¶ added in v1.3.0
func (m *MocknetworkInfo) EXPECT() *MocknetworkInfoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocknetworkInfo) ID ¶ added in v1.3.0
func (m *MocknetworkInfo) ID() p2p.Peer
ID mocks base method.
func (*MocknetworkInfo) KnownAddresses ¶ added in v1.3.0
func (m *MocknetworkInfo) KnownAddresses() []multiaddr.Multiaddr
KnownAddresses mocks base method.
func (*MocknetworkInfo) ListenAddresses ¶ added in v1.3.0
func (m *MocknetworkInfo) ListenAddresses() []multiaddr.Multiaddr
ListenAddresses mocks base method.
func (*MocknetworkInfo) NATDeviceType ¶ added in v1.3.0
func (m *MocknetworkInfo) NATDeviceType() (network.NATDeviceType, network.NATDeviceType)
NATDeviceType mocks base method.
func (*MocknetworkInfo) Reachability ¶ added in v1.3.0
func (m *MocknetworkInfo) Reachability() network.Reachability
Reachability mocks base method.
type MocknetworkInfoMockRecorder ¶ added in v1.3.0
type MocknetworkInfoMockRecorder struct {
// contains filtered or unexported fields
}
MocknetworkInfoMockRecorder is the mock recorder for MocknetworkInfo.
func (*MocknetworkInfoMockRecorder) DHTServerEnabled ¶ added in v1.3.0
func (mr *MocknetworkInfoMockRecorder) DHTServerEnabled() *networkInfoDHTServerEnabledCall
DHTServerEnabled indicates an expected call of DHTServerEnabled.
func (*MocknetworkInfoMockRecorder) ID ¶ added in v1.3.0
func (mr *MocknetworkInfoMockRecorder) ID() *networkInfoIDCall
ID indicates an expected call of ID.
func (*MocknetworkInfoMockRecorder) KnownAddresses ¶ added in v1.3.0
func (mr *MocknetworkInfoMockRecorder) KnownAddresses() *networkInfoKnownAddressesCall
KnownAddresses indicates an expected call of KnownAddresses.
func (*MocknetworkInfoMockRecorder) ListenAddresses ¶ added in v1.3.0
func (mr *MocknetworkInfoMockRecorder) ListenAddresses() *networkInfoListenAddressesCall
ListenAddresses indicates an expected call of ListenAddresses.
func (*MocknetworkInfoMockRecorder) NATDeviceType ¶ added in v1.3.0
func (mr *MocknetworkInfoMockRecorder) NATDeviceType() *networkInfoNATDeviceTypeCall
NATDeviceType indicates an expected call of NATDeviceType.
func (*MocknetworkInfoMockRecorder) Reachability ¶ added in v1.3.0
func (mr *MocknetworkInfoMockRecorder) Reachability() *networkInfoReachabilityCall
Reachability indicates an expected call of Reachability.
type Mockoracle ¶ added in v1.0.0
type Mockoracle struct {
// contains filtered or unexported fields
}
Mockoracle is a mock of oracle interface.
func NewMockoracle ¶ added in v1.0.0
func NewMockoracle(ctrl *gomock.Controller) *Mockoracle
NewMockoracle creates a new mock instance.
func (*Mockoracle) EXPECT ¶ added in v1.0.0
func (m *Mockoracle) EXPECT() *MockoracleMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockoracleMockRecorder ¶ added in v1.0.0
type MockoracleMockRecorder struct {
// contains filtered or unexported fields
}
MockoracleMockRecorder is the mock recorder for Mockoracle.
func (*MockoracleMockRecorder) ActiveSet ¶ added in v1.0.0
func (mr *MockoracleMockRecorder) ActiveSet(arg0, arg1 any) *oracleActiveSetCall
ActiveSet indicates an expected call of ActiveSet.
type MockpeerCounter ¶ added in v1.0.0
type MockpeerCounter struct {
// contains filtered or unexported fields
}
MockpeerCounter is a mock of peerCounter interface.
func NewMockpeerCounter ¶ added in v1.0.0
func NewMockpeerCounter(ctrl *gomock.Controller) *MockpeerCounter
NewMockpeerCounter creates a new mock instance.
func (*MockpeerCounter) EXPECT ¶ added in v1.0.0
func (m *MockpeerCounter) EXPECT() *MockpeerCounterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpeerCounter) PeerCount ¶ added in v1.0.0
func (m *MockpeerCounter) PeerCount() uint64
PeerCount mocks base method.
type MockpeerCounterMockRecorder ¶ added in v1.0.0
type MockpeerCounterMockRecorder struct {
// contains filtered or unexported fields
}
MockpeerCounterMockRecorder is the mock recorder for MockpeerCounter.
func (*MockpeerCounterMockRecorder) PeerCount ¶ added in v1.0.0
func (mr *MockpeerCounterMockRecorder) PeerCount() *peerCounterPeerCountCall
PeerCount indicates an expected call of PeerCount.
type Mockpeers ¶ added in v1.1.2
type Mockpeers struct {
// contains filtered or unexported fields
}
Mockpeers is a mock of peers interface.
func NewMockpeers ¶ added in v1.1.2
func NewMockpeers(ctrl *gomock.Controller) *Mockpeers
NewMockpeers creates a new mock instance.
func (*Mockpeers) ConnectedPeerInfo ¶ added in v1.1.2
ConnectedPeerInfo mocks base method.
func (*Mockpeers) EXPECT ¶ added in v1.1.2
func (m *Mockpeers) EXPECT() *MockpeersMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockpeersMockRecorder ¶ added in v1.1.2
type MockpeersMockRecorder struct {
// contains filtered or unexported fields
}
MockpeersMockRecorder is the mock recorder for Mockpeers.
func (*MockpeersMockRecorder) ConnectedPeerInfo ¶ added in v1.1.2
func (mr *MockpeersMockRecorder) ConnectedPeerInfo(arg0 any) *peersConnectedPeerInfoCall
ConnectedPeerInfo indicates an expected call of ConnectedPeerInfo.
func (*MockpeersMockRecorder) GetPeers ¶ added in v1.1.2
func (mr *MockpeersMockRecorder) GetPeers() *peersGetPeersCall
GetPeers indicates an expected call of GetPeers.
type MockpostSupervisor ¶ added in v1.3.0
type MockpostSupervisor struct {
// contains filtered or unexported fields
}
MockpostSupervisor is a mock of postSupervisor interface.
func NewMockpostSupervisor ¶ added in v1.3.0
func NewMockpostSupervisor(ctrl *gomock.Controller) *MockpostSupervisor
NewMockpostSupervisor creates a new mock instance.
func (*MockpostSupervisor) Benchmark ¶ added in v1.3.0
func (m *MockpostSupervisor) Benchmark(p activation.PostSetupProvider) (int, error)
Benchmark mocks base method.
func (*MockpostSupervisor) Config ¶ added in v1.3.0
func (m *MockpostSupervisor) Config() activation.PostConfig
Config mocks base method.
func (*MockpostSupervisor) EXPECT ¶ added in v1.3.0
func (m *MockpostSupervisor) EXPECT() *MockpostSupervisorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockpostSupervisor) Providers ¶ added in v1.3.0
func (m *MockpostSupervisor) Providers() ([]activation.PostSetupProvider, error)
Providers mocks base method.
func (*MockpostSupervisor) Start ¶ added in v1.3.0
func (m *MockpostSupervisor) Start(opts activation.PostSetupOpts) error
Start mocks base method.
func (*MockpostSupervisor) Status ¶ added in v1.3.0
func (m *MockpostSupervisor) Status() *activation.PostSetupStatus
Status mocks base method.
func (*MockpostSupervisor) Stop ¶ added in v1.3.0
func (m *MockpostSupervisor) Stop(deleteFiles bool) error
Stop mocks base method.
type MockpostSupervisorMockRecorder ¶ added in v1.3.0
type MockpostSupervisorMockRecorder struct {
// contains filtered or unexported fields
}
MockpostSupervisorMockRecorder is the mock recorder for MockpostSupervisor.
func (*MockpostSupervisorMockRecorder) Benchmark ¶ added in v1.3.0
func (mr *MockpostSupervisorMockRecorder) Benchmark(p any) *postSupervisorBenchmarkCall
Benchmark indicates an expected call of Benchmark.
func (*MockpostSupervisorMockRecorder) Config ¶ added in v1.3.0
func (mr *MockpostSupervisorMockRecorder) Config() *postSupervisorConfigCall
Config indicates an expected call of Config.
func (*MockpostSupervisorMockRecorder) Providers ¶ added in v1.3.0
func (mr *MockpostSupervisorMockRecorder) Providers() *postSupervisorProvidersCall
Providers indicates an expected call of Providers.
func (*MockpostSupervisorMockRecorder) Start ¶ added in v1.3.0
func (mr *MockpostSupervisorMockRecorder) Start(opts any) *postSupervisorStartCall
Start indicates an expected call of Start.
func (*MockpostSupervisorMockRecorder) Status ¶ added in v1.3.0
func (mr *MockpostSupervisorMockRecorder) Status() *postSupervisorStatusCall
Status indicates an expected call of Status.
func (*MockpostSupervisorMockRecorder) Stop ¶ added in v1.3.0
func (mr *MockpostSupervisorMockRecorder) Stop(deleteFiles any) *postSupervisorStopCall
Stop indicates an expected call of Stop.
type Mocksyncer ¶ added in v1.0.0
type Mocksyncer struct {
// contains filtered or unexported fields
}
Mocksyncer is a mock of syncer interface.
func NewMocksyncer ¶ added in v1.0.0
func NewMocksyncer(ctrl *gomock.Controller) *Mocksyncer
NewMocksyncer creates a new mock instance.
func (*Mocksyncer) EXPECT ¶ added in v1.0.0
func (m *Mocksyncer) EXPECT() *MocksyncerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocksyncerMockRecorder ¶ added in v1.0.0
type MocksyncerMockRecorder struct {
// contains filtered or unexported fields
}
MocksyncerMockRecorder is the mock recorder for Mocksyncer.
func (*MocksyncerMockRecorder) IsSynced ¶ added in v1.0.0
func (mr *MocksyncerMockRecorder) IsSynced(arg0 any) *syncerIsSyncedCall
IsSynced indicates an expected call of IsSynced.
type MocktxValidator ¶ added in v1.0.0
type MocktxValidator struct {
// contains filtered or unexported fields
}
MocktxValidator is a mock of txValidator interface.
func NewMocktxValidator ¶ added in v1.0.0
func NewMocktxValidator(ctrl *gomock.Controller) *MocktxValidator
NewMocktxValidator creates a new mock instance.
func (*MocktxValidator) EXPECT ¶ added in v1.0.0
func (m *MocktxValidator) EXPECT() *MocktxValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocktxValidator) VerifyAndCacheTx ¶ added in v1.0.0
func (m *MocktxValidator) VerifyAndCacheTx(arg0 context.Context, arg1 []byte) error
VerifyAndCacheTx mocks base method.
type MocktxValidatorMockRecorder ¶ added in v1.0.0
type MocktxValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MocktxValidatorMockRecorder is the mock recorder for MocktxValidator.
func (*MocktxValidatorMockRecorder) VerifyAndCacheTx ¶ added in v1.0.0
func (mr *MocktxValidatorMockRecorder) VerifyAndCacheTx(arg0, arg1 any) *txValidatorVerifyAndCacheTxCall
VerifyAndCacheTx indicates an expected call of VerifyAndCacheTx.
type NodeService ¶
type NodeService struct {
// contains filtered or unexported fields
}
NodeService is a grpc server that provides the NodeService, which exposes node-related data such as node status, software version, errors, etc. It can also be used to start the sync process, or to shut down the node.
func NewNodeService ¶
func NewNodeService( peers peerCounter, msh meshAPI, genTime genesisTimeAPI, syncer syncer, appVersion string, appCommit string, ) *NodeService
NewNodeService creates a new grpc service using config data.
func (NodeService) Build ¶
func (s NodeService) Build(context.Context, *emptypb.Empty) (*pb.BuildResponse, error)
Build returns the build of the node software.
func (NodeService) Echo ¶
func (s NodeService) Echo(_ context.Context, in *pb.EchoRequest) (*pb.EchoResponse, error)
Echo returns the response for an echo api request. It's used for E2E tests.
func (NodeService) ErrorStream ¶
func (s NodeService) ErrorStream(_ *pb.ErrorStreamRequest, stream pb.NodeService_ErrorStreamServer) error
ErrorStream exposes a stream of node errors.
func (NodeService) NodeInfo ¶ added in v1.0.0
func (s NodeService) NodeInfo(context.Context, *emptypb.Empty) (*pb.NodeInfoResponse, error)
func (NodeService) RegisterHandlerService ¶ added in v1.3.0
func (s NodeService) RegisterHandlerService(mux *runtime.ServeMux) error
func (NodeService) RegisterService ¶
func (s NodeService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (NodeService) Status ¶
func (s NodeService) Status(ctx context.Context, _ *pb.StatusRequest) (*pb.StatusResponse, error)
Status returns a status object providing information about the connected peers, sync status, current and verified layer.
func (NodeService) StatusStream ¶
func (s NodeService) StatusStream(_ *pb.StatusStreamRequest, stream pb.NodeService_StatusStreamServer) error
StatusStream exposes a stream of node status updates.
func (NodeService) String ¶ added in v1.3.0
func (s NodeService) String() string
String returns the name of this service.
func (NodeService) Version ¶
func (s NodeService) Version(context.Context, *emptypb.Empty) (*pb.VersionResponse, error)
Version returns the version of the node software as a semver string.
type PostService ¶ added in v1.3.0
type PostService struct {
// contains filtered or unexported fields
}
PostService is a grpc server that PoST nodes can connect to in order to register. The bidirectional stream established between the node and the PoST node can be used to send challenges and receive proofs.
func NewPostService ¶ added in v1.3.0
func NewPostService(log *zap.Logger) *PostService
NewPostService creates a new grpc service using config data.
func (*PostService) Client ¶ added in v1.3.0
func (s *PostService) Client(nodeId types.NodeID) (activation.PostClient, error)
func (*PostService) Register ¶ added in v1.3.0
func (s *PostService) Register(stream pb.PostService_RegisterServer) error
Register is called by the PoST service to connect with the node. It creates a bidirectional stream that is kept open until either side closes it. The other functions on this service are called by services of the node to send requests to the PoST node and receive responses.
func (*PostService) RegisterHandlerService ¶ added in v1.3.0
func (s *PostService) RegisterHandlerService(mux *runtime.ServeMux) error
func (*PostService) RegisterService ¶ added in v1.3.0
func (s *PostService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (*PostService) String ¶ added in v1.3.0
func (s *PostService) String() string
String returns the name of this service.
type Server ¶
type Server struct { // BoundAddress contains the address that the server bound to, useful if // the server uses a dynamic port. It is set during startup and can be // safely accessed after Start has completed (I.E. the returned channel has // been waited on) BoundAddress string GrpcServer *grpc.Server // contains filtered or unexported fields }
Server is a very basic grpc server.
func New ¶ added in v1.0.0
New creates and returns a new Server listening on the given address. The server is configured with the given logger and config. Additional grpc options can be passed.
func NewPrivate ¶ added in v1.3.0
NewPrivate creates new Server listening on the PrivateListener address with the given logger and config. Services passed in the svc slice are registered with the server.
func NewPublic ¶ added in v1.3.0
NewPublic creates a new Server listening on the PublicListener address with the given logger and config. Services passed in the svc slice are registered with the server.
type ServiceAPI ¶
type ServiceAPI interface { RegisterService(*grpc.Server) RegisterHandlerService(*runtime.ServeMux) error String() string }
ServiceAPI allows individual grpc services to register the grpc server.
type SmesherService ¶
type SmesherService struct {
// contains filtered or unexported fields
}
SmesherService exposes endpoints to manage smeshing.
func NewSmesherService ¶
func NewSmesherService( smeshing activation.SmeshingProvider, postSupervisor postSupervisor, streamInterval time.Duration, postOpts activation.PostSetupOpts, ) *SmesherService
NewSmesherService creates a new grpc service using config data.
func (SmesherService) Coinbase ¶
func (s SmesherService) Coinbase(context.Context, *emptypb.Empty) (*pb.CoinbaseResponse, error)
Coinbase returns the current coinbase setting of this node.
func (SmesherService) EstimatedRewards ¶ added in v0.1.16
func (s SmesherService) EstimatedRewards( context.Context, *pb.EstimatedRewardsRequest, ) (*pb.EstimatedRewardsResponse, error)
EstimatedRewards returns estimated smeshing rewards over the next epoch.
func (SmesherService) IsSmeshing ¶
func (s SmesherService) IsSmeshing(context.Context, *emptypb.Empty) (*pb.IsSmeshingResponse, error)
IsSmeshing reports whether the node is smeshing.
func (SmesherService) MinGas ¶
func (s SmesherService) MinGas(context.Context, *emptypb.Empty) (*pb.MinGasResponse, error)
MinGas returns the current mingas setting of this node.
func (SmesherService) PostConfig ¶ added in v1.0.0
func (s SmesherService) PostConfig(context.Context, *emptypb.Empty) (*pb.PostConfigResponse, error)
PostConfig returns the Post protocol config.
func (SmesherService) PostSetupProviders ¶ added in v1.0.0
func (s SmesherService) PostSetupProviders( ctx context.Context, in *pb.PostSetupProvidersRequest, ) (*pb.PostSetupProvidersResponse, error)
PostSetupComputeProviders returns a list of available Post setup compute providers.
func (SmesherService) PostSetupStatus ¶ added in v1.0.0
func (s SmesherService) PostSetupStatus(ctx context.Context, _ *emptypb.Empty) (*pb.PostSetupStatusResponse, error)
PostSetupStatus returns post data status.
func (SmesherService) PostSetupStatusStream ¶ added in v1.0.0
func (s SmesherService) PostSetupStatusStream( _ *emptypb.Empty, stream pb.SmesherService_PostSetupStatusStreamServer, ) error
PostSetupStatusStream exposes a stream of status updates during post setup.
func (SmesherService) RegisterHandlerService ¶ added in v1.3.0
func (s SmesherService) RegisterHandlerService(mux *runtime.ServeMux) error
func (SmesherService) RegisterService ¶
func (s SmesherService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (SmesherService) SetCoinbase ¶
func (s SmesherService) SetCoinbase(_ context.Context, in *pb.SetCoinbaseRequest) (*pb.SetCoinbaseResponse, error)
SetCoinbase sets the current coinbase setting of this node.
func (SmesherService) SetMinGas ¶
func (s SmesherService) SetMinGas(context.Context, *pb.SetMinGasRequest) (*pb.SetMinGasResponse, error)
SetMinGas sets the mingas setting of this node.
func (SmesherService) SmesherID ¶
func (s SmesherService) SmesherID(context.Context, *emptypb.Empty) (*pb.SmesherIDResponse, error)
SmesherID returns the smesher ID of this node.
func (SmesherService) StartSmeshing ¶
func (s SmesherService) StartSmeshing( ctx context.Context, in *pb.StartSmeshingRequest, ) (*pb.StartSmeshingResponse, error)
StartSmeshing requests that the node begin smeshing.
func (SmesherService) StopSmeshing ¶
func (s SmesherService) StopSmeshing( ctx context.Context, in *pb.StopSmeshingRequest, ) (*pb.StopSmeshingResponse, error)
StopSmeshing requests that the node stop smeshing.
func (SmesherService) String ¶ added in v1.3.0
func (s SmesherService) String() string
String returns the name of this service.
type TransactionService ¶
type TransactionService struct {
// contains filtered or unexported fields
}
TransactionService exposes transaction data, and a submit tx endpoint.
func NewTransactionService ¶
func NewTransactionService( db *sql.Database, publisher pubsub.Publisher, msh meshAPI, conState conservativeState, syncer syncer, txHandler txValidator, ) *TransactionService
NewTransactionService creates a new grpc service using config data.
func (TransactionService) ParseTransaction ¶ added in v1.0.0
func (s TransactionService) ParseTransaction( ctx context.Context, in *pb.ParseTransactionRequest, ) (*pb.ParseTransactionResponse, error)
func (TransactionService) RegisterHandlerService ¶ added in v1.3.0
func (s TransactionService) RegisterHandlerService(mux *runtime.ServeMux) error
func (TransactionService) RegisterService ¶
func (s TransactionService) RegisterService(server *grpc.Server)
RegisterService registers this service with a grpc server instance.
func (TransactionService) StreamResults ¶ added in v1.0.0
func (s TransactionService) StreamResults( in *pb.TransactionResultsRequest, stream pb.TransactionService_StreamResultsServer, ) error
StreamResults allows to query historical results and subscribe to live data using the same filter.
func (TransactionService) String ¶ added in v1.3.0
func (s TransactionService) String() string
String returns the name of this service.
func (TransactionService) SubmitTransaction ¶
func (s TransactionService) SubmitTransaction( ctx context.Context, in *pb.SubmitTransactionRequest, ) (*pb.SubmitTransactionResponse, error)
SubmitTransaction allows a new tx to be submitted.
func (TransactionService) TransactionsState ¶
func (s TransactionService) TransactionsState( _ context.Context, in *pb.TransactionsStateRequest, ) (*pb.TransactionsStateResponse, error)
TransactionsState returns current tx data for one or more txs.
func (TransactionService) TransactionsStateStream ¶
func (s TransactionService) TransactionsStateStream( in *pb.TransactionsStateStreamRequest, stream pb.TransactionService_TransactionsStateStreamServer, ) error
TransactionsStateStream exposes a stream of tx data.