Documentation ¶
Index ¶
- Variables
- type FullClient
- func (c *FullClient) ABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)
- func (c *FullClient) ABCIQuery(ctx context.Context, path string, data cmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (c *FullClient) ABCIQueryWithOptions(ctx context.Context, path string, data cmbytes.HexBytes, ...) (*ctypes.ResultABCIQuery, error)
- func (c *FullClient) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error)
- func (c *FullClient) BlockByHash(ctx context.Context, hash []byte) (*ctypes.ResultBlock, error)
- func (c *FullClient) BlockResults(ctx context.Context, height *int64) (*ctypes.ResultBlockResults, error)
- func (c *FullClient) BlockSearch(ctx context.Context, query string, page, perPage *int, orderBy string) (*ctypes.ResultBlockSearch, error)
- func (c *FullClient) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
- func (c *FullClient) BroadcastEvidence(ctx context.Context, evidence cmtypes.Evidence) (*ctypes.ResultBroadcastEvidence, error)
- func (c *FullClient) BroadcastTxAsync(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *FullClient) BroadcastTxCommit(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (c *FullClient) BroadcastTxSync(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *FullClient) CheckTx(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultCheckTx, error)
- func (c *FullClient) Commit(ctx context.Context, height *int64) (*ctypes.ResultCommit, error)
- func (c *FullClient) ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error)
- func (c *FullClient) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusState, error)
- func (c *FullClient) DumpConsensusState(ctx context.Context) (*ctypes.ResultDumpConsensusState, error)
- func (c *FullClient) Genesis(_ context.Context) (*ctypes.ResultGenesis, error)
- func (c *FullClient) GenesisChunked(context context.Context, id uint) (*ctypes.ResultGenesisChunk, error)
- func (c *FullClient) Header(ctx context.Context, height *int64) (*ctypes.ResultHeader, error)
- func (c *FullClient) HeaderByHash(ctx context.Context, hash cmbytes.HexBytes) (*ctypes.ResultHeader, error)
- func (c *FullClient) Health(ctx context.Context) (*ctypes.ResultHealth, error)
- func (c *FullClient) NetInfo(ctx context.Context) (*ctypes.ResultNetInfo, error)
- func (c *FullClient) NumUnconfirmedTxs(ctx context.Context) (*ctypes.ResultUnconfirmedTxs, error)
- func (c *FullClient) Status(ctx context.Context) (*ctypes.ResultStatus, error)
- func (c *FullClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
- func (c *FullClient) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)
- func (c *FullClient) TxSearch(ctx context.Context, query string, prove bool, pagePtr, perPagePtr *int, ...) (*ctypes.ResultTxSearch, error)
- func (c *FullClient) UnconfirmedTxs(ctx context.Context, limitPtr *int) (*ctypes.ResultUnconfirmedTxs, error)
- func (c *FullClient) Unsubscribe(ctx context.Context, subscriber, query string) error
- func (c *FullClient) Validators(ctx context.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error)
- type FullNode
- func (n *FullNode) AppClient() proxy.AppConns
- func (n *FullNode) Cancel()
- func (n *FullNode) EventBus() *cmtypes.EventBus
- func (n *FullNode) GetClient() rpcclient.Client
- func (n *FullNode) GetGenesis() *cmtypes.GenesisDoc
- func (n *FullNode) GetGenesisChunks() ([]string, error)
- func (n *FullNode) GetLogger() log.Logger
- func (n *FullNode) OnReset() error
- func (n *FullNode) OnStart() error
- func (n *FullNode) OnStop()
- func (n *FullNode) SetLogger(logger log.Logger)
- type LightClient
- func (c *LightClient) ABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)
- func (c *LightClient) ABCIQuery(ctx context.Context, path string, data cmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (c *LightClient) ABCIQueryWithOptions(ctx context.Context, path string, data cmbytes.HexBytes, ...) (*ctypes.ResultABCIQuery, error)
- func (c *LightClient) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error)
- func (c *LightClient) BlockByHash(ctx context.Context, hash []byte) (*ctypes.ResultBlock, error)
- func (c *LightClient) BlockResults(ctx context.Context, height *int64) (*ctypes.ResultBlockResults, error)
- func (c *LightClient) BlockSearch(ctx context.Context, query string, page, perPage *int, orderBy string) (*ctypes.ResultBlockSearch, error)
- func (c *LightClient) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
- func (c *LightClient) BroadcastEvidence(ctx context.Context, evidence types.Evidence) (*ctypes.ResultBroadcastEvidence, error)
- func (c *LightClient) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *LightClient) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (c *LightClient) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *LightClient) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
- func (c *LightClient) Commit(ctx context.Context, height *int64) (*ctypes.ResultCommit, error)
- func (c *LightClient) ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error)
- func (c *LightClient) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusState, error)
- func (c *LightClient) DumpConsensusState(ctx context.Context) (*ctypes.ResultDumpConsensusState, error)
- func (c *LightClient) Genesis(_ context.Context) (*ctypes.ResultGenesis, error)
- func (c *LightClient) GenesisChunked(context context.Context, id uint) (*ctypes.ResultGenesisChunk, error)
- func (c *LightClient) Header(ctx context.Context, height *int64) (*ctypes.ResultHeader, error)
- func (c *LightClient) HeaderByHash(ctx context.Context, hash cmbytes.HexBytes) (*ctypes.ResultHeader, error)
- func (c *LightClient) Health(ctx context.Context) (*ctypes.ResultHealth, error)
- func (c *LightClient) NetInfo(ctx context.Context) (*ctypes.ResultNetInfo, error)
- func (c *LightClient) NumUnconfirmedTxs(ctx context.Context) (*ctypes.ResultUnconfirmedTxs, error)
- func (c *LightClient) Status(ctx context.Context) (*ctypes.ResultStatus, error)
- func (c *LightClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
- func (c *LightClient) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)
- func (c *LightClient) TxSearch(ctx context.Context, query string, prove bool, pagePtr, perPagePtr *int, ...) (*ctypes.ResultTxSearch, error)
- func (c *LightClient) UnconfirmedTxs(ctx context.Context, limitPtr *int) (*ctypes.ResultUnconfirmedTxs, error)
- func (c *LightClient) Unsubscribe(ctx context.Context, subscriber, query string) error
- func (c *LightClient) Validators(ctx context.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error)
- type LightNode
- type MetricsProvider
- type MockTester
- type Node
- type Source
Constants ¶
This section is empty.
Variables ¶
var ( // ErrConsensusStateNotAvailable is returned because Rollkit doesn't use Tendermint consensus. ErrConsensusStateNotAvailable = errors.New("consensus state not available in Rollkit") )
Functions ¶
This section is empty.
Types ¶
type FullClient ¶
FullClient implements tendermint RPC client interface.
This is the type that is used in communication between cosmos-sdk app and Rollkit.
func NewFullClient ¶
func NewFullClient(node *FullNode) *FullClient
NewFullClient returns Client working with given node.
func (*FullClient) ABCIInfo ¶
func (c *FullClient) ABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)
ABCIInfo returns basic information about application state.
func (*FullClient) ABCIQuery ¶
func (c *FullClient) ABCIQuery(ctx context.Context, path string, data cmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
ABCIQuery queries for data from application.
func (*FullClient) ABCIQueryWithOptions ¶
func (c *FullClient) ABCIQueryWithOptions(ctx context.Context, path string, data cmbytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error)
ABCIQueryWithOptions queries for data from application.
func (*FullClient) Block ¶
func (c *FullClient) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error)
Block method returns BlockID and block itself for given height.
If height is nil, it returns information about last known block.
func (*FullClient) BlockByHash ¶
func (c *FullClient) BlockByHash(ctx context.Context, hash []byte) (*ctypes.ResultBlock, error)
BlockByHash returns BlockID and block itself for given hash.
func (*FullClient) BlockResults ¶
func (c *FullClient) BlockResults(ctx context.Context, height *int64) (*ctypes.ResultBlockResults, error)
BlockResults returns information about transactions, events and updates of validator set and consensus params.
func (*FullClient) BlockSearch ¶
func (c *FullClient) BlockSearch(ctx context.Context, query string, page, perPage *int, orderBy string) (*ctypes.ResultBlockSearch, error)
BlockSearch defines a method to search for a paginated set of blocks by BeginBlock and EndBlock event search criteria.
func (*FullClient) BlockchainInfo ¶
func (c *FullClient) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
BlockchainInfo returns ABCI block meta information for given height range.
func (*FullClient) BroadcastEvidence ¶
func (c *FullClient) BroadcastEvidence(ctx context.Context, evidence cmtypes.Evidence) (*ctypes.ResultBroadcastEvidence, error)
BroadcastEvidence is not yet implemented.
func (*FullClient) BroadcastTxAsync ¶
func (c *FullClient) BroadcastTxAsync(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultBroadcastTx, error)
BroadcastTxAsync returns right away, with no response. Does not wait for CheckTx nor DeliverTx results. More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async
func (*FullClient) BroadcastTxCommit ¶
func (c *FullClient) BroadcastTxCommit(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultBroadcastTxCommit, error)
BroadcastTxCommit returns with the responses from CheckTx and DeliverTx. More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit
func (*FullClient) BroadcastTxSync ¶
func (c *FullClient) BroadcastTxSync(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultBroadcastTx, error)
BroadcastTxSync returns with the response from CheckTx. Does not wait for DeliverTx result. More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync
func (*FullClient) CheckTx ¶
func (c *FullClient) CheckTx(ctx context.Context, tx cmtypes.Tx) (*ctypes.ResultCheckTx, error)
CheckTx executes a new transaction against the application to determine its validity.
If valid, the tx is automatically added to the mempool.
func (*FullClient) Commit ¶
func (c *FullClient) Commit(ctx context.Context, height *int64) (*ctypes.ResultCommit, error)
Commit returns signed header (aka commit) at given height.
func (*FullClient) ConsensusParams ¶
func (c *FullClient) ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error)
ConsensusParams returns consensus params at given height.
func (*FullClient) ConsensusState ¶
func (c *FullClient) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusState, error)
ConsensusState always returns error as there is no consensus state in Rollkit.
func (*FullClient) DumpConsensusState ¶
func (c *FullClient) DumpConsensusState(ctx context.Context) (*ctypes.ResultDumpConsensusState, error)
DumpConsensusState always returns error as there is no consensus state in Rollkit.
func (*FullClient) Genesis ¶
func (c *FullClient) Genesis(_ context.Context) (*ctypes.ResultGenesis, error)
Genesis returns entire genesis.
func (*FullClient) GenesisChunked ¶
func (c *FullClient) GenesisChunked(context context.Context, id uint) (*ctypes.ResultGenesisChunk, error)
GenesisChunked returns given chunk of genesis.
func (*FullClient) Header ¶ added in v0.10.0
func (c *FullClient) Header(ctx context.Context, height *int64) (*ctypes.ResultHeader, error)
Header returns a cometbft ResultsHeader for the FullClient
func (*FullClient) HeaderByHash ¶ added in v0.10.0
func (c *FullClient) HeaderByHash(ctx context.Context, hash cmbytes.HexBytes) (*ctypes.ResultHeader, error)
HeaderByHash loads the block for the provided hash and returns the header
func (*FullClient) Health ¶
func (c *FullClient) Health(ctx context.Context) (*ctypes.ResultHealth, error)
Health endpoint returns empty value. It can be used to monitor service availability.
func (*FullClient) NetInfo ¶
func (c *FullClient) NetInfo(ctx context.Context) (*ctypes.ResultNetInfo, error)
NetInfo returns basic information about client P2P connections.
func (*FullClient) NumUnconfirmedTxs ¶
func (c *FullClient) NumUnconfirmedTxs(ctx context.Context) (*ctypes.ResultUnconfirmedTxs, error)
NumUnconfirmedTxs returns information about transactions in mempool.
func (*FullClient) Status ¶
func (c *FullClient) Status(ctx context.Context) (*ctypes.ResultStatus, error)
Status returns detailed information about current status of the node.
func (*FullClient) Subscribe ¶
func (c *FullClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
Subscribe subscribe given subscriber to a query.
func (*FullClient) TxSearch ¶
func (c *FullClient) TxSearch(ctx context.Context, query string, prove bool, pagePtr, perPagePtr *int, orderBy string) (*ctypes.ResultTxSearch, error)
TxSearch returns detailed information about transactions matching query.
func (*FullClient) UnconfirmedTxs ¶
func (c *FullClient) UnconfirmedTxs(ctx context.Context, limitPtr *int) (*ctypes.ResultUnconfirmedTxs, error)
UnconfirmedTxs returns transactions in mempool.
func (*FullClient) Unsubscribe ¶
func (c *FullClient) Unsubscribe(ctx context.Context, subscriber, query string) error
Unsubscribe unsubscribes given subscriber from a query.
func (*FullClient) Validators ¶
func (c *FullClient) Validators(ctx context.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error)
Validators returns paginated list of validators at given height.
type FullNode ¶
type FullNode struct { service.BaseService // TODO(tzdybal): consider extracting "mempool reactor" Mempool mempool.Mempool Store store.Store // Preserves cometBFT compatibility TxIndexer txindex.TxIndexer BlockIndexer indexer.BlockIndexer IndexerService *txindex.IndexerService // contains filtered or unexported fields }
FullNode represents a client node in Rollkit network. It connects all the components and orchestrates their work.
func (*FullNode) AppClient ¶
AppClient returns ABCI proxy connections to communicate with application.
func (*FullNode) Cancel ¶ added in v0.10.7
func (n *FullNode) Cancel()
Cancel calls the underlying context's cancel function.
func (*FullNode) GetGenesis ¶
func (n *FullNode) GetGenesis() *cmtypes.GenesisDoc
GetGenesis returns entire genesis doc.
func (*FullNode) GetGenesisChunks ¶
GetGenesisChunks returns chunked version of genesis.
func (*FullNode) OnStop ¶
func (n *FullNode) OnStop()
OnStop is a part of Service interface.
p2pClient and sync services stop first, ceasing network activities. Then rest of services are halted. Context is cancelled to signal goroutines managed by thread manager to stop. Store is closed last because it's used by other services/goroutines.
type LightClient ¶
LightClient is a Client interface for the LightNode
func NewLightClient ¶
func NewLightClient(node *LightNode) *LightClient
NewLightClient returns a new LightClient for the LightNode
func (*LightClient) ABCIInfo ¶
func (c *LightClient) ABCIInfo(ctx context.Context) (*ctypes.ResultABCIInfo, error)
ABCIInfo returns basic information about application state.
func (*LightClient) ABCIQuery ¶
func (c *LightClient) ABCIQuery(ctx context.Context, path string, data cmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
ABCIQuery queries for data from application.
func (*LightClient) ABCIQueryWithOptions ¶
func (c *LightClient) ABCIQueryWithOptions(ctx context.Context, path string, data cmbytes.HexBytes, opts rpcclient.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error)
ABCIQueryWithOptions queries for data from application.
func (*LightClient) Block ¶
func (c *LightClient) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error)
Block method returns BlockID and block itself for given height.
If height is nil, it returns information about last known block.
func (*LightClient) BlockByHash ¶
func (c *LightClient) BlockByHash(ctx context.Context, hash []byte) (*ctypes.ResultBlock, error)
BlockByHash returns BlockID and block itself for given hash.
func (*LightClient) BlockResults ¶
func (c *LightClient) BlockResults(ctx context.Context, height *int64) (*ctypes.ResultBlockResults, error)
BlockResults returns information about transactions, events and updates of validator set and consensus params.
func (*LightClient) BlockSearch ¶
func (c *LightClient) BlockSearch(ctx context.Context, query string, page, perPage *int, orderBy string) (*ctypes.ResultBlockSearch, error)
BlockSearch defines a method to search for a paginated set of blocks by BeginBlock and EndBlock event search criteria.
func (*LightClient) BlockchainInfo ¶
func (c *LightClient) BlockchainInfo(ctx context.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error)
BlockchainInfo returns ABCI block meta information for given height range.
func (*LightClient) BroadcastEvidence ¶
func (c *LightClient) BroadcastEvidence(ctx context.Context, evidence types.Evidence) (*ctypes.ResultBroadcastEvidence, error)
BroadcastEvidence is not yet implemented.
func (*LightClient) BroadcastTxAsync ¶
func (c *LightClient) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
BroadcastTxAsync returns right away, with no response. Does not wait for CheckTx nor DeliverTx results. More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async
func (*LightClient) BroadcastTxCommit ¶
func (c *LightClient) BroadcastTxCommit(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error)
BroadcastTxCommit returns with the responses from CheckTx and DeliverTx. More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit
func (*LightClient) BroadcastTxSync ¶
func (c *LightClient) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
BroadcastTxSync returns with the response from CheckTx. Does not wait for DeliverTx result. More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync
func (*LightClient) CheckTx ¶
func (c *LightClient) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
CheckTx executes a new transaction against the application to determine its validity.
If valid, the tx is automatically added to the mempool.
func (*LightClient) Commit ¶
func (c *LightClient) Commit(ctx context.Context, height *int64) (*ctypes.ResultCommit, error)
Commit returns signed header (aka commit) at given height.
func (*LightClient) ConsensusParams ¶
func (c *LightClient) ConsensusParams(ctx context.Context, height *int64) (*ctypes.ResultConsensusParams, error)
ConsensusParams returns consensus params at given height.
Currently, consensus params changes are not supported and this method returns params as defined in genesis.
func (*LightClient) ConsensusState ¶
func (c *LightClient) ConsensusState(ctx context.Context) (*ctypes.ResultConsensusState, error)
ConsensusState always returns error as there is no consensus state in Rollkit.
func (*LightClient) DumpConsensusState ¶
func (c *LightClient) DumpConsensusState(ctx context.Context) (*ctypes.ResultDumpConsensusState, error)
DumpConsensusState always returns error as there is no consensus state in Rollkit.
func (*LightClient) Genesis ¶
func (c *LightClient) Genesis(_ context.Context) (*ctypes.ResultGenesis, error)
Genesis returns entire genesis.
func (*LightClient) GenesisChunked ¶
func (c *LightClient) GenesisChunked(context context.Context, id uint) (*ctypes.ResultGenesisChunk, error)
GenesisChunked returns given chunk of genesis.
func (*LightClient) Header ¶ added in v0.10.0
func (c *LightClient) Header(ctx context.Context, height *int64) (*ctypes.ResultHeader, error)
Header satisfies the client interface but is not implemented
func (*LightClient) HeaderByHash ¶ added in v0.10.0
func (c *LightClient) HeaderByHash(ctx context.Context, hash cmbytes.HexBytes) (*ctypes.ResultHeader, error)
HeaderByHash satisfies the client interface but is not implemented
func (*LightClient) Health ¶
func (c *LightClient) Health(ctx context.Context) (*ctypes.ResultHealth, error)
Health endpoint returns empty value. It can be used to monitor service availability.
func (*LightClient) NetInfo ¶
func (c *LightClient) NetInfo(ctx context.Context) (*ctypes.ResultNetInfo, error)
NetInfo returns basic information about client P2P connections.
func (*LightClient) NumUnconfirmedTxs ¶
func (c *LightClient) NumUnconfirmedTxs(ctx context.Context) (*ctypes.ResultUnconfirmedTxs, error)
NumUnconfirmedTxs returns information about transactions in mempool.
func (*LightClient) Status ¶
func (c *LightClient) Status(ctx context.Context) (*ctypes.ResultStatus, error)
Status returns detailed information about current status of the node.
func (*LightClient) Subscribe ¶
func (c *LightClient) Subscribe(ctx context.Context, subscriber, query string, outCapacity ...int) (out <-chan ctypes.ResultEvent, err error)
Subscribe subscribe given subscriber to a query.
func (*LightClient) TxSearch ¶
func (c *LightClient) TxSearch(ctx context.Context, query string, prove bool, pagePtr, perPagePtr *int, orderBy string) (*ctypes.ResultTxSearch, error)
TxSearch returns detailed information about transactions matching query.
func (*LightClient) UnconfirmedTxs ¶
func (c *LightClient) UnconfirmedTxs(ctx context.Context, limitPtr *int) (*ctypes.ResultUnconfirmedTxs, error)
UnconfirmedTxs returns transactions in mempool.
func (*LightClient) Unsubscribe ¶
func (c *LightClient) Unsubscribe(ctx context.Context, subscriber, query string) error
Unsubscribe unsubscribes given subscriber from a query.
func (*LightClient) Validators ¶
func (c *LightClient) Validators(ctx context.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error)
Validators returns paginated list of validators at given height.
type LightNode ¶
type LightNode struct { service.BaseService P2P *p2p.Client // contains filtered or unexported fields }
LightNode is a rollup node that only needs the header service
func (*LightNode) Cancel ¶ added in v0.10.7
func (n *LightNode) Cancel()
Cancel calls the underlying context's cancel function.
type MetricsProvider ¶ added in v0.11.19
type MetricsProvider func(chainID string) (*block.Metrics, *p2p.Metrics, *mempool.Metrics, *state.Metrics, *proxy.Metrics)
MetricsProvider returns a consensus, p2p and mempool Metrics.
func DefaultMetricsProvider ¶ added in v0.11.19
func DefaultMetricsProvider(config *cmcfg.InstrumentationConfig) MetricsProvider
DefaultMetricsProvider returns Metrics build using Prometheus client library if Prometheus is enabled. Otherwise, it returns no-op Metrics.
type MockTester ¶ added in v0.9.0
type MockTester struct {
// contains filtered or unexported fields
}
MockTester is a mock testing.T
func (MockTester) Errorf ¶ added in v0.9.0
func (m MockTester) Errorf(format string, args ...interface{})
Errorf is used to log an error to the test logger
func (MockTester) FailNow ¶ added in v0.9.0
func (m MockTester) FailNow()
FailNow is used to fail the test immediately
func (MockTester) Logf ¶ added in v0.9.0
func (m MockTester) Logf(format string, args ...interface{})
Logf is used to log a message to the test logger
type Node ¶
type Node interface { Start() error GetClient() rpcclient.Client Stop() error IsRunning() bool Cancel() }
Node is the interface for a rollup node
func NewNode ¶
func NewNode( ctx context.Context, conf config.NodeConfig, p2pKey crypto.PrivKey, signingKey crypto.PrivKey, appClient proxy.ClientCreator, genesis *cmtypes.GenesisDoc, metricsProvider MetricsProvider, logger log.Logger, ) (Node, error)
NewNode returns a new Full or Light Node based on the config