Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EvPrefix = "0"
prefixes used in KV store to separate rollkit data from execution environment data (if the same data base is reused)
Functions ¶
func Retry ¶
Retry attempts to execute the provided function up to the specified number of tries, with a delay between attempts. It returns nil if the function succeeds, or the last error encountered if all attempts fail.
Parameters:
- tries: The maximum number of attempts to make
- durationBetweenAttempts: The duration to wait between attempts
- fn: The function to retry, which returns an error on failure
Returns:
- error: nil if the function succeeds, or the last error encountered
Types ¶
type FullNode ¶
type FullNode struct {
service.BaseService
Store store.Store
// contains filtered or unexported fields
}
FullNode represents a client node in Rollkit network. It connects all the components and orchestrates their work.
func (*FullNode) GetGenesis ¶
func (n *FullNode) GetGenesis() genesispkg.Genesis
GetGenesis returns entire genesis doc.
func (*FullNode) GetGenesisChunks ¶
GetGenesisChunks returns chunked version of genesis.
type LightNode ¶
type LightNode struct {
service.BaseService
P2P *p2p.Client
Store store.Store
// contains filtered or unexported fields
}
LightNode is a chain node that only needs the header service
type MetricsProvider ¶
MetricsProvider returns a consensus, p2p and mempool Metrics.
func DefaultMetricsProvider ¶
func DefaultMetricsProvider(config *config.InstrumentationConfig) MetricsProvider
DefaultMetricsProvider returns Metrics build using Prometheus client library if Prometheus is enabled. Otherwise, it returns no-op Metrics.
type MockTester ¶
type MockTester struct {
}
MockTester is a mock testing.T
func (MockTester) Errorf ¶
func (m MockTester) Errorf(format string, args ...any)
Errorf is used to log an error to the test logger
func (MockTester) FailNow ¶
func (m MockTester) FailNow()
FailNow is used to fail the test immediately
func (MockTester) Logf ¶
func (m MockTester) Logf(format string, args ...any)
Logf is used to log a message to the test logger
type Node ¶
Node is the interface for an application node
func NewNode ¶
func NewNode( conf config.Config, exec coreexecutor.Executor, sequencer coresequencer.Sequencer, da coreda.DA, signer signer.Signer, p2pClient *p2p.Client, genesis genesis.Genesis, database ds.Batching, metricsProvider MetricsProvider, logger zerolog.Logger, nodeOptions NodeOptions, ) (Node, error)
NewNode returns a new Full or Light Node based on the config This is the entry point for composing a node, when compiling a node, you need to provide an executor Example executors can be found in apps/
type NodeOptions ¶
type NodeOptions struct {
BlockOptions block.BlockOptions
}