Documentation
¶
Index ¶
- type Config
- type ConfigOptionFunc
- func WithActivePeersQuotas(topologyQuota, gossipQuota, ledgerQuota int) ConfigOptionFunc
- func WithBarkBaseUrl(baseUrl string) ConfigOptionFunc
- func WithBarkPort(port uint) ConfigOptionFunc
- func WithBarkSecurityWindow(window uint64) ConfigOptionFunc
- func WithBindAddr(addr string) ConfigOptionFunc
- func WithBlobPlugin(plugin string) ConfigOptionFunc
- func WithBlockProducer(enabled bool) ConfigOptionFunc
- func WithBlockfrostPort(port uint) ConfigOptionFunc
- func WithCardanoNodeConfig(cardanoNodeConfig *cardano.CardanoNodeConfig) ConfigOptionFunc
- func WithChainsyncMaxClients(maxClients int) ConfigOptionFunc
- func WithChainsyncStallTimeout(timeout time.Duration) ConfigOptionFunc
- func WithDatabasePath(dataDir string) ConfigOptionFunc
- func WithDatabaseWorkerPoolConfig(cfg ledger.DatabaseWorkerPoolConfig) ConfigOptionFunc
- func WithEvictionWatermark(watermark float64) ConfigOptionFunc
- func WithForgeStaleGapThresholdSlots(slots uint64) ConfigOptionFunc
- func WithForgeSyncToleranceSlots(slots uint64) ConfigOptionFunc
- func WithIntersectPoints(points []ocommon.Point) ConfigOptionFunc
- func WithIntersectTip(intersectTip bool) ConfigOptionFunc
- func WithListeners(listeners ...ListenerConfig) ConfigOptionFunc
- func WithLogger(logger *slog.Logger) ConfigOptionFunc
- func WithMempoolCapacity(capacity int64) ConfigOptionFunc
- func WithMeshPort(port uint) ConfigOptionFunc
- func WithMetadataPlugin(plugin string) ConfigOptionFunc
- func WithNetwork(network string) ConfigOptionFunc
- func WithNetworkMagic(networkMagic uint32) ConfigOptionFunc
- func WithOutboundSourcePort(port uint) ConfigOptionFunc
- func WithPeerSharing(peerSharing bool) ConfigOptionFunc
- func WithPeerTargets(targetKnown, targetEstablished, targetActive int) ConfigOptionFunc
- func WithPrometheusRegistry(registry prometheus.Registerer) ConfigOptionFunc
- func WithRejectionWatermark(watermark float64) ConfigOptionFunc
- func WithRunMode(mode string) ConfigOptionFunc
- func WithShelleyKESKey(path string) ConfigOptionFunc
- func WithShelleyOperationalCertificate(path string) ConfigOptionFunc
- func WithShelleyVRFKey(path string) ConfigOptionFunc
- func WithShutdownTimeout(timeout time.Duration) ConfigOptionFunc
- func WithStorageMode(mode StorageMode) ConfigOptionFunc
- func WithTopologyConfig(topologyConfig *topology.TopologyConfig) ConfigOptionFunc
- func WithTracing(tracing bool) ConfigOptionFunc
- func WithTracingStdout(stdout bool) ConfigOptionFunc
- func WithUtxorpcPort(port uint) ConfigOptionFunc
- func WithUtxorpcTlsCertFilePath(path string) ConfigOptionFunc
- func WithUtxorpcTlsKeyFilePath(path string) ConfigOptionFunc
- func WithValidateHistorical(validate bool) ConfigOptionFunc
- type ListenerConfig
- type Node
- type StorageMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
DatabaseWorkerPoolConfig ledger.DatabaseWorkerPoolConfig
// contains filtered or unexported fields
}
func NewConfig ¶
func NewConfig(opts ...ConfigOptionFunc) Config
NewConfig creates a new dingo config with the specified options
type ConfigOptionFunc ¶
type ConfigOptionFunc func(*Config)
ConfigOptionFunc is a type that represents functions that modify the Connection config
func WithActivePeersQuotas ¶ added in v0.21.0
func WithActivePeersQuotas( topologyQuota, gossipQuota, ledgerQuota int, ) ConfigOptionFunc
WithActivePeersQuotas specifies the per-source quotas for active peers. Use 0 to use the default quota, or a negative value to disable enforcement. Default quotas: topology=3, gossip=12, ledger=5
func WithBarkBaseUrl ¶ added in v0.22.0
func WithBarkBaseUrl(baseUrl string) ConfigOptionFunc
func WithBarkPort ¶ added in v0.22.0
func WithBarkPort(port uint) ConfigOptionFunc
func WithBarkSecurityWindow ¶ added in v0.22.0
func WithBarkSecurityWindow(window uint64) ConfigOptionFunc
func WithBindAddr ¶ added in v0.22.0
func WithBindAddr(addr string) ConfigOptionFunc
WithBindAddr specifies the IP address used for API listeners (Blockfrost, Mesh, UTxO RPC). The default is "0.0.0.0" (all interfaces).
func WithBlobPlugin ¶ added in v0.21.0
func WithBlobPlugin(plugin string) ConfigOptionFunc
WithBlobPlugin specifies the blob storage plugin to use.
func WithBlockProducer ¶ added in v0.22.0
func WithBlockProducer(enabled bool) ConfigOptionFunc
WithBlockProducer enables block production mode (CARDANO_BLOCK_PRODUCER). When enabled, the node will attempt to produce blocks using the configured credentials.
func WithBlockfrostPort ¶ added in v0.22.0
func WithBlockfrostPort(port uint) ConfigOptionFunc
WithBlockfrostPort specifies the port for the Blockfrost-compatible REST API server. The server binds to the node's bindAddr on this port. 0 disables the server (default).
func WithCardanoNodeConfig ¶
func WithCardanoNodeConfig( cardanoNodeConfig *cardano.CardanoNodeConfig, ) ConfigOptionFunc
WithCardanoNodeConfig specifies the CardanoNodeConfig object to use. This is mostly used for loading genesis config files referenced by the dingo config
func WithChainsyncMaxClients ¶ added in v0.22.0
func WithChainsyncMaxClients( maxClients int, ) ConfigOptionFunc
WithChainsyncMaxClients specifies the maximum number of concurrent chainsync client connections. Default is 3.
func WithChainsyncStallTimeout ¶ added in v0.22.0
func WithChainsyncStallTimeout( timeout time.Duration, ) ConfigOptionFunc
WithChainsyncStallTimeout specifies the duration after which a chainsync client with no activity is considered stalled. Default is 30 seconds.
func WithDatabasePath ¶
func WithDatabasePath(dataDir string) ConfigOptionFunc
WithDatabasePath specifies the persistent data directory to use. The default is to store everything in memory
func WithDatabaseWorkerPoolConfig ¶ added in v0.20.0
func WithDatabaseWorkerPoolConfig( cfg ledger.DatabaseWorkerPoolConfig, ) ConfigOptionFunc
WithDatabaseWorkerPoolConfig specifies the database worker pool configuration
func WithEvictionWatermark ¶ added in v0.22.0
func WithEvictionWatermark( watermark float64, ) ConfigOptionFunc
WithEvictionWatermark sets the mempool eviction watermark as a fraction of capacity (0.0-1.0). When a new TX would push the mempool past this fraction, oldest TXs are evicted to make room. Default is 0.90 (90%).
func WithForgeStaleGapThresholdSlots ¶ added in v0.22.0
func WithForgeStaleGapThresholdSlots(slots uint64) ConfigOptionFunc
WithForgeStaleGapThresholdSlots sets the slot gap threshold for stale database warnings. Use 0 to fall back to the built-in default.
func WithForgeSyncToleranceSlots ¶ added in v0.22.0
func WithForgeSyncToleranceSlots(slots uint64) ConfigOptionFunc
WithForgeSyncToleranceSlots sets the slot gap tolerated before forging is skipped. Use 0 to fall back to the built-in default.
func WithIntersectPoints ¶
func WithIntersectPoints(points []ocommon.Point) ConfigOptionFunc
WithIntersectPoints specifies intersect point(s) for the initial chainsync. The default is to start at chain genesis
func WithIntersectTip ¶
func WithIntersectTip(intersectTip bool) ConfigOptionFunc
WithIntersectTip specifies whether to start the initial chainsync at the current tip. The default is to start at chain genesis
func WithListeners ¶
func WithListeners(listeners ...ListenerConfig) ConfigOptionFunc
WithListeners specifies the listener config(s) to use
func WithLogger ¶
func WithLogger(logger *slog.Logger) ConfigOptionFunc
WithLogger specifies the logger to use. This defaults to discarding log output
func WithMempoolCapacity ¶ added in v0.13.0
func WithMempoolCapacity(capacity int64) ConfigOptionFunc
WithMempoolCapacity sets the mempool capacity (in bytes)
func WithMeshPort ¶ added in v0.22.0
func WithMeshPort(port uint) ConfigOptionFunc
WithMeshPort specifies the port for the Mesh (Coinbase Rosetta) compatible REST API server. The server binds to the node's bindAddr on this port. 0 disables the server (default).
func WithMetadataPlugin ¶ added in v0.21.0
func WithMetadataPlugin(plugin string) ConfigOptionFunc
WithMetadataPlugin specifies the metadata storage plugin to use.
func WithNetwork ¶
func WithNetwork(network string) ConfigOptionFunc
WithNetwork specifies the named network to operate on. This will automatically set the appropriate network magic value
func WithNetworkMagic ¶
func WithNetworkMagic(networkMagic uint32) ConfigOptionFunc
WithNetworkMagic specifies the network magic value to use. This will override any named network specified
func WithOutboundSourcePort ¶
func WithOutboundSourcePort(port uint) ConfigOptionFunc
WithOutboundSourcePort specifies the source port to use for outbound connections. This defaults to dynamic source ports
func WithPeerSharing ¶
func WithPeerSharing(peerSharing bool) ConfigOptionFunc
WithPeerSharing specifies whether to enable peer sharing. This is disabled by default
func WithPeerTargets ¶ added in v0.21.0
func WithPeerTargets( targetKnown, targetEstablished, targetActive int, ) ConfigOptionFunc
WithPeerTargets specifies the target number of peers in each state. Use 0 to use the default target, or -1 for unlimited. Default targets: known=150, established=50, active=20
func WithPrometheusRegistry ¶
func WithPrometheusRegistry(registry prometheus.Registerer) ConfigOptionFunc
WithPrometheusRegistry specifies a prometheus.Registerer instance to add metrics to. In most cases, prometheus.DefaultRegistry would be a good choice to get metrics working
func WithRejectionWatermark ¶ added in v0.22.0
func WithRejectionWatermark( watermark float64, ) ConfigOptionFunc
WithRejectionWatermark sets the mempool rejection watermark as a fraction of capacity (0.0-1.0). New TXs are rejected when the mempool would exceed this fraction even after eviction. Default is 0.95 (95%).
func WithRunMode ¶ added in v0.21.0
func WithRunMode(mode string) ConfigOptionFunc
WithRunMode sets the operational mode ("serve", "load", or "dev"). "dev" mode enables development behaviors (forge blocks, disable outbound).
func WithShelleyKESKey ¶ added in v0.22.0
func WithShelleyKESKey(path string) ConfigOptionFunc
WithShelleyKESKey specifies the path to the KES signing key file (CARDANO_SHELLEY_KES_KEY). Required for block production.
func WithShelleyOperationalCertificate ¶ added in v0.22.0
func WithShelleyOperationalCertificate(path string) ConfigOptionFunc
WithShelleyOperationalCertificate specifies the path to the operational certificate file (CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE). Required for block production.
func WithShelleyVRFKey ¶ added in v0.22.0
func WithShelleyVRFKey(path string) ConfigOptionFunc
WithShelleyVRFKey specifies the path to the VRF signing key file (CARDANO_SHELLEY_VRF_KEY). Required for block production.
func WithShutdownTimeout ¶ added in v0.18.0
func WithShutdownTimeout(timeout time.Duration) ConfigOptionFunc
WithShutdownTimeout specifies the timeout for graceful shutdown. The default is 30 seconds
func WithStorageMode ¶ added in v0.22.0
func WithStorageMode(mode StorageMode) ConfigOptionFunc
WithStorageMode specifies the storage mode. StorageModeCore stores only consensus data; StorageModeAPI adds full transaction metadata for API queries.
func WithTopologyConfig ¶
func WithTopologyConfig( topologyConfig *topology.TopologyConfig, ) ConfigOptionFunc
WithTopologyConfig specifies a topology.TopologyConfig to use for outbound peers
func WithTracing ¶
func WithTracing(tracing bool) ConfigOptionFunc
WithTracing enables tracing. By default, spans are submitted to a HTTP(s) endpoint using OTLP. This can be configured using the OTEL_EXPORTER_OTLP_* env vars documented in the README for go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp
func WithTracingStdout ¶
func WithTracingStdout(stdout bool) ConfigOptionFunc
WithTracingStdout enables tracing output to stdout. This also requires tracing to enabled separately. This is mostly useful for debugging
func WithUtxorpcPort ¶ added in v0.2.2
func WithUtxorpcPort(port uint) ConfigOptionFunc
WithUtxorpcPort specifies the port to use for the gRPC API listener. 0 disables the server (default)
func WithUtxorpcTlsCertFilePath ¶ added in v0.3.2
func WithUtxorpcTlsCertFilePath(path string) ConfigOptionFunc
WithUtxorpcTlsCertFilePath specifies the path to the TLS certificate for the gRPC API listener. This defaults to empty
func WithUtxorpcTlsKeyFilePath ¶ added in v0.3.2
func WithUtxorpcTlsKeyFilePath(path string) ConfigOptionFunc
WithUtxorpcTlsKeyFilePath specifies the path to the TLS key for the gRPC API listener. This defaults to empty
func WithValidateHistorical ¶ added in v0.17.0
func WithValidateHistorical(validate bool) ConfigOptionFunc
WithValidateHistorical specifies whether to validate all historical blocks during ledger processing
type ListenerConfig ¶
type ListenerConfig = connmanager.ListenerConfig
type StorageMode ¶ added in v0.22.0
type StorageMode string
StorageMode controls how much data the metadata store persists.
const ( // StorageModeCore stores only consensus and chain state data. // Witnesses, scripts, datums, redeemers, and tx metadata CBOR // are skipped. Suitable for block producers with no APIs. StorageModeCore StorageMode = "core" // StorageModeAPI stores everything needed for API queries // (blockfrost, utxorpc, mesh) in addition to core data. StorageModeAPI StorageMode = "api" )
func (StorageMode) IsAPI ¶ added in v0.22.0
func (m StorageMode) IsAPI() bool
IsAPI returns true if the storage mode includes API data.
func (StorageMode) Valid ¶ added in v0.22.0
func (m StorageMode) Valid() bool
Valid returns true if the storage mode is a recognized value.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
dingo
command
|
|
|
config
|
|
|
plugin/metadata/importutil
Package importutil provides shared helpers for metadata import operations across all database backends (sqlite, postgres, mysql).
|
Package importutil provides shared helpers for metadata import operations across all database backends (sqlite, postgres, mysql). |
|
internal
|
|
|
test/conformance
Package conformance provides a DingoStateManager that implements the ouroboros-mock conformance.StateManager interface using dingo's database and ledger packages with an in-memory SQLite database.
|
Package conformance provides a DingoStateManager that implements the ouroboros-mock conformance.StateManager interface using dingo's database and ledger packages with an in-memory SQLite database. |
|
test/testutil
Package testutil provides common test helper utilities for the Dingo project.
|
Package testutil provides common test helper utilities for the Dingo project. |
|
Package keystore provides key management for Cardano stake pool operators.
|
Package keystore provides key management for Cardano stake pool operators. |
|
forging
Package forging contains types and utilities for block production.
|
Package forging contains types and utilities for block production. |
|
leader
Package leader provides Ouroboros Praos leader election functionality for block production.
|
Package leader provides Ouroboros Praos leader election functionality for block production. |
|
snapshot
Package snapshot provides stake snapshot management for Ouroboros Praos leader election.
|
Package snapshot provides stake snapshot management for Ouroboros Praos leader election. |