dingo

package module
v0.70.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 74 Imported by: 0

README ¶

Dingo

Dingo Logo
GitHub Go Report Card Go Reference Discord

⚠️ WARNING: Dingo is under heavy active development and is not yet ready for production use. It should only be used on testnets (preview, preprod) and devnets. Do not use Dingo on mainnet with real funds.

A high-performance Cardano blockchain node implementation in Go by Blink Labs. Dingo provides:

  • Full chain synchronization and validation via Ouroboros consensus protocol
  • UTxO tracking with 41 UTXO validation rules and Plutus V1/V2/V3 smart contract execution
  • Block production with VRF leader election and stake snapshots
  • Multi-peer chain selection with density comparison and VRF tie-breaking
  • Client connectivity for wallets and applications
  • Pluggable storage backends (Badger, SQLite, GCS, S3, PostgreSQL, MySQL)
  • Tiered storage modes ("core" for consensus, "api" for full indexing)
  • Peer governance with dynamic peer selection, ledger peers, and topology support
  • Chain rollback support for handling forks with automatic state restoration
  • Fast bootstrapping via built-in Mithril client
  • Optional Midnight event indexing and MidnightState gRPC service
  • Multiple external interfaces: general-purpose APIs (UTxO RPC, Blockfrost-compatible REST, Mesh/Rosetta) plus Bark for Dingo-to-Dingo C2 and archive services

Note: On Windows systems, named pipes are used instead of Unix sockets for node-to-client communication.

dingo screenshot

Documentation

Start with the Dingo documentation index. It maps the versioned documentation in this repository, the package comments exposed by go doc, and the public operator guides at docs.blinklabs.io.

For code-level questions, use the Go code reference to find package doc.go files and commands that render documentation from the exact revision checked out. Automated tools can also use the public LLM documentation index or the focused Cardano nodes and operations set.

Running

Dingo supports configuration via a YAML config file (dingo.yaml), environment variables, and command-line flags. Priority: CLI flags > environment variables > YAML config > defaults.

A sample configuration file is provided at dingo.yaml.example. You can copy and edit this file to configure Dingo for your local or production environment.

Environment Variables

The following environment variables modify Dingo's behavior:

  • CARDANO_BIND_ADDR
    • IP address to bind for listening (default: 0.0.0.0)
  • CARDANO_CONFIG
    • Full path to the Cardano node configuration (default: ./config/cardano/preview/config.json)
    • Use your own configuration files for different networks
    • Genesis configuration files are read from the same directory by default
  • CARDANO_DATABASE_PATH
    • A directory which contains the ledger database files (default: .dingo)
    • This is the location for persistent data storage for the ledger
  • CARDANO_INTERSECT_TIP
    • Ignore prior chain history and start from current position (default: false)
    • This is experimental and will likely break... use with caution
  • CARDANO_METRICS_PORT
    • TCP port to bind for listening for Prometheus metrics (default: 12798)
  • CARDANO_NETWORK
    • Named Cardano network (default: preview)
  • CARDANO_PRIVATE_BIND_ADDR
    • IP address to bind for listening for Ouroboros NtC (default: 127.0.0.1)
  • CARDANO_PRIVATE_PORT
    • TCP port to bind for listening for Ouroboros NtC (default: 3002)
  • CARDANO_RELAY_PORT
    • TCP port to bind for listening for Ouroboros NtN (default: 3001)
  • CARDANO_SOCKET_PATH
    • UNIX socket path for listening (default: dingo.socket)
    • This socket speaks Ouroboros NtC and is used by client software
  • CARDANO_TOPOLOGY
    • Full path to the Cardano node topology (default: "")
  • DINGO_PLUGINS_API_UTXORPC_CONFIG_PORT
    • TCP port to bind for listening for UTxO RPC (default: 9090)
    • Compatibility alias: DINGO_UTXORPC_PORT
  • DINGO_PLUGINS_API_BLOCKFROST_CONFIG_PORT
    • TCP port for the Blockfrost-compatible REST API (default: 3000)
    • Compatibility alias: DINGO_BLOCKFROST_PORT
  • DINGO_PLUGINS_API_MESH_CONFIG_PORT
    • TCP port for the Mesh (Coinbase Rosetta) API (default: 8080)
    • Compatibility alias: DINGO_MESH_PORT
  • DINGO_BARK_PORT
    • TCP port for the Bark block archive API (default: 0, disabled)
  • DINGO_BARK_BASE_URL
    • Base URL of a remote Bark archive node used for archive fallback (default: empty, disabled)
  • DINGO_BARK_BLOCK_DOWNLOAD_HOSTS
    • Comma-separated HTTPS hostnames additionally allowed for Bark-supplied block download URLs. The allowlist always includes the DINGO_BARK_BASE_URL hostname.
  • DINGO_BARK_CLIENT_CA_FILE_PATH
    • PEM CA bundle used to authenticate every Bark DatabaseService caller.
  • DINGO_BARK_OPERATOR_CERTIFICATE_FINGERPRINTS
    • Comma-separated SHA-256 client certificate fingerprints authorized for destructive Bark DatabaseService RPCs.
  • DINGO_DEBUG_BIND_ADDR
    • IP address to bind for unauthenticated pprof endpoints (default: 127.0.0.1)
    • This is independent of the public and private node bind addresses; set a wildcard address only when an external network control protects it
  • DINGO_DEBUG_PORT
    • TCP port for pprof endpoints (default: 0, disabled)
  • DINGO_HISTORY_EXPIRY_ENABLED
    • Enable local expiry of immutable block CBOR older than the ledger stability window (default: false)
  • DINGO_HISTORY_EXPIRY_FREQUENCY
    • How often a history-expiry node scans for old local blocks (default: 1h)
  • DINGO_STORAGE_MODE
    • Storage mode: core (default) or api
    • core stores only consensus data (UTxOs, certs, pools, protocol params)
    • api additionally stores witnesses, scripts, datums, redeemers, and tx metadata
    • API servers (Blockfrost, UTxO RPC, Mesh) require api mode
  • DINGO_RUN_MODE
    • Application-wide operational mode for a bare dingo invocation: serve (default), load, dev, or leios
    • Explicit subcommands select their own effective operation; for example, dingo sync runs in sync mode regardless of the configured value
    • Relay, producer, storage, API, and validation settings do not select a run mode
  • DINGO_START_ERA
    • Experimental startup era override. Set to dijkstra only for Dijkstra/Leios test networks; leave empty to follow genesis protocol version.
  • DINGO_LOGGING_FORMAT
    • Log output format: text (default, human-readable) or json (machine-parseable, for ELK/Loki ingestion)
  • DINGO_LOGGING_LEVEL
    • Minimum log level: debug, info (default), warn, or error (the --debug flag overrides this to debug)
  • DINGO_MIDNIGHT_ENABLED
    • Enable Midnight indexing in API storage mode (default: false)
  • DINGO_MIDNIGHT_SERVER_ENABLED
    • Independently enable the Midnight gRPC server in API storage mode (default: false)
  • DINGO_MIDNIGHT_REFLECTION_ENABLED
    • Enable gRPC reflection on the Midnight server; requires the server (default: false)
  • DINGO_MIDNIGHT_ALLOW_INSECURE_REMOTE
    • Permit a plaintext Midnight listener on a wildcard, hostname, or concrete non-loopback address (default: false)
  • DINGO_MIDNIGHT_HOST
    • Midnight gRPC listen address (default: 127.0.0.1)
  • DINGO_MIDNIGHT_PORT
    • Midnight gRPC listen port; must be non-zero when the server is enabled (default: 50051)
  • TLS_CERT_FILE_PATH - TLS certificate used directly by an enabled Midnight gRPC listener and as the built-in UTxO RPC compatibility default; requires TLS_KEY_FILE_PATH (default: empty)
  • TLS_KEY_FILE_PATH - matching TLS private key for those listeners (default: empty)
Block Production (SPO Mode)

To run Dingo as a stake pool operator producing blocks:

  • CARDANO_BLOCK_PRODUCER - Enable block production (default: false)
  • CARDANO_SHELLEY_VRF_KEY - Path to VRF signing key file
  • CARDANO_SHELLEY_KES_KEY - Path to KES signing key file
  • CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE - Path to operational certificate file

Dingo block production is exercised by the all-Dingo DevNet and has produced blocks on preview and preprod. Current releases do not support mainnet operation.

Quick Start
# Preview network (default)
./dingo

# Preprod
CARDANO_NETWORK=preprod ./dingo

# Or with explicit config path
CARDANO_NETWORK=preprod CARDANO_CONFIG=path/to/preprod/config.json ./dingo

Dingo creates a dingo.socket file that speaks Ouroboros node-to-client and is compatible with cardano-cli, adder, kupo, and other Cardano client tools.

Cardano configuration files are bundled in the Docker image. For local builds, you can find them at docker-cardano-configs.

Docker

# Run on preview (default)
docker run -p 3001:3001 ghcr.io/blinklabs-io/dingo

# Run on preprod with persistent storage
docker run -p 3001:3001 \
  -e CARDANO_NETWORK=preprod \
  -v dingo-data:/data/db \
  -v dingo-ipc:/ipc \
  ghcr.io/blinklabs-io/dingo

The image is based on Debian bookworm-slim and includes cardano-cli, nview, and txtop. Mithril snapshot support is built into dingo natively (dingo mithril sync). The Dockerfile sets CARDANO_DATABASE_PATH=/data/db and CARDANO_SOCKET_PATH=/ipc/dingo.socket, overriding the local defaults of .dingo and dingo.socket — the volume mounts above map to these container paths.

Port Service Default
3001 Ouroboros NtN (node-to-node) Enabled
3002 Ouroboros NtC over TCP Enabled
12798 Prometheus metrics Enabled
3000 Blockfrost REST API Disabled
8080 Mesh (Rosetta) REST API Disabled
9090 UTxO RPC (gRPC) Disabled
50051 Midnight state (gRPC) Disabled
— Bark archive (gRPC) Disabled (example when enabled: 9091)
— pprof debug endpoints Disabled (DINGO_DEBUG_PORT=0; loopback when enabled)

Storage Modes

Dingo has two storage modes commonly used in three node configurations:

Node configuration Settings Current behavior
Relay storageMode: core, blockProducer: false Validates and follows the chain, participates in NtN/NtC, relays blocks and transactions, and stores consensus state without API history
Block producer storageMode: core, blockProducer: true plus VRF/KES/opcert paths Includes the relay behavior, leader election, block forging, forged-block self-validation, and block diffusion
Data/API node storageMode: api, blockProducer: false Stores consensus state plus transaction, witness, script, datum, redeemer, governance, and metadata history; starts configured Blockfrost, Mesh, and UTxO RPC providers

core is the default and smallest storage/runtime surface. The producer profile adds forging and key operations to it. API mode adds historical indexing and query services; it is not a separate consensus implementation.

# Relay or block producer (default)
./dingo

# API node
DINGO_STORAGE_MODE=api ./dingo

Or in dingo.yaml:

storageMode: "api"

API Servers and Bark

Dingo includes three general-purpose external APIs, an Acropolis-compatible Midnight state service, and Bark. UTxO RPC, Blockfrost, and Mesh are client-facing APIs and require storageMode: "api". Their built-in providers are registered with the instance-owned plugin host, start on their provider defaults in API mode, and can be configured independently under plugins.api. Set an individual port to 0 to disable that interface.

Midnight indexing and serving are separate opt-ins. midnight.enabled starts the indexer, while midnight.serverEnabled starts the gRPC listener for rows already present in the Midnight tables; either may be enabled independently in API storage mode. The listener defaults to 127.0.0.1:50051. Reflection is available only with midnight.reflectionEnabled. Plaintext wildcard, hostname, and concrete non-loopback binds are rejected unless midnight.allowInsecureRemote is set; configuring both tlsCertFilePath and tlsKeyFilePath permits a remote TLS listener. Dingo does not add authentication to this Acropolis-compatible service.

Bark is Dingo's own Dingo-to-Dingo archive protocol rather than an application API. It is configured separately with barkPort and barkBaseUrl.

For public client access, place the API listeners behind a reverse proxy or API gateway — that remains fully supported. In addition, UTxO RPC, Blockfrost, and Mesh share one in-process TLS/authentication surface, so an operator can also secure any subset of them without a proxy in front.

The shorter DINGO_UTXORPC_PORT, DINGO_BLOCKFROST_PORT, and DINGO_MESH_PORT names remain supported for compatibility. If both a compatibility name and its plugin-form name are set, the plugin-form value takes precedence.

Interface Port Env Var Default Protocol Role
UTxO RPC DINGO_PLUGINS_API_UTXORPC_CONFIG_PORT 9090 gRPC General-purpose client API (v1alpha and v1beta)
Blockfrost DINGO_PLUGINS_API_BLOCKFROST_CONFIG_PORT 3000 REST General-purpose client API
Mesh (Rosetta) DINGO_PLUGINS_API_MESH_CONFIG_PORT 8080 REST General-purpose client API
Midnight DINGO_MIDNIGHT_PORT 50051 (server off) gRPC Acropolis-compatible Midnight state API
Bark DINGO_BARK_PORT disabled Connect/gRPC Dingo-to-Dingo C2/archive protocol
# Enable Blockfrost API on port 3100 and UTxO RPC on port 9090
DINGO_STORAGE_MODE=api \
  DINGO_PLUGINS_API_BLOCKFROST_CONFIG_PORT=3100 \
  DINGO_PLUGINS_API_UTXORPC_CONFIG_PORT=9090 \
  ./dingo

Or in dingo.yaml:

storageMode: "api"
plugins:
  api:
    blockfrost: {provider: builtin, config: {port: 3100}}
    utxorpc: {provider: builtin, config: {port: 9090}}
API TLS and Authentication

api.tls/api.auth set a shared default TLS and authentication policy for every selected plugins.api.* provider (Blockfrost, Mesh, UTxO RPC). Each field resolves independently: plugins.api.<name>.config.tls/config.auth overrides any field for that provider only, and an explicit mode: disabled at the provider level turns off an inherited policy rather than merely leaving it unset. The default everywhere is disabled, so an existing reverse-proxy/no-auth deployment is unaffected on upgrade.

api:
  tls:
    mode: server
    certFilePath: /run/secrets/api.crt
    keyFilePath: /run/secrets/api.key
  auth:
    mode: token
    tokenFilePath: /run/secrets/api-token

plugins:
  api:
    # Inherits TLS and auth from api.tls/api.auth above unchanged.
    utxorpc:
      provider: builtin
      config:
        port: 9090
    # Explicitly opts out of the inherited token auth (e.g. this listener
    # sits behind its own gateway that already authenticates callers).
    mesh:
      provider: builtin
      config:
        port: 8080
        auth:
          mode: disabled
    # Overrides just the certificate/key for this provider; the inherited
    # api.tls.mode ("server") still applies.
    blockfrost:
      provider: builtin
      config:
        port: 3000
        tls:
          certFilePath: /run/secrets/blockfrost.crt
          keyFilePath: /run/secrets/blockfrost.key

Credential locations:

  • HTTP (Blockfrost, Mesh, UTxO RPC's own REST/JSON access): send Authorization: Bearer <token>. Blockfrost also accepts its own project_id: <token> header as an alias for the same shared token — real Blockfrost clients already send their API key that way, so auth.mode: token secures Blockfrost against both header styles from one configured token.
  • Connect/gRPC (UTxO RPC): send the identical Authorization: Bearer <token> request header; every Connect/gRPC handler UTxO RPC serves, including health checking and reflection, requires it once auth is enabled.
  • Liveness/readiness probes. This is deliberate, not an oversight: once auth.mode: token is set for a provider, every route it serves requires the credential, with no separate unauthenticated allowlist for health checking — Blockfrost's GET /health and UTxO RPC's grpc.health.v1.Health/Check are no exception, matching how every other route on that listener behaves. A container-orchestrator probe (e.g. a Kubernetes liveness/readiness check) that cannot attach the shared credential will therefore fail once auth is enabled. Configure the probe to send the same Authorization: Bearer <token> header the rest of your clients use (most probe mechanisms support a custom header/exec command), or point liveness/readiness checks at a plain TCP connect to the listener port instead of the HTTP/gRPC health route, or run the probe against an unauthenticated in-cluster path (e.g. a mode: disabled provider carrying only observability traffic) rather than the public listener.
  • A missing or invalid credential fails closed: 401 over HTTP, Unauthenticated over Connect/gRPC. A browser's CORS preflight (OPTIONS) never needs a credential — browsers never attach Authorization to one — but every other request, including a non-preflight OPTIONS, still authenticates normally.
  • A partial certFilePath/keyFilePath pair (only one set) fails validation at startup, before any listener binds, with an error naming the full config path (e.g. plugins.api.blockfrost.config.tls).
  • Tokens and certificate/key file contents are never written to logs, error messages, or effective-config output — only file paths and mode names are.

The pre-existing root tlsCertFilePath/tlsKeyFilePath fields remain a supported compatibility input with two consumers. The Midnight gRPC server uses the pair directly when explicitly enabled. UTxO RPC merges it as the lowest-priority policy, field by field, alongside the shared api.tls default and its own tls config — not as an all-or-nothing fallback that applies only when both newer scopes are completely unset. For example, if shared api.tls sets only mode: server with no certFilePath/keyFilePath, UTxO RPC still inherits the two paths from the legacy root settings. The root pair is not promoted onto Blockfrost or Mesh, since doing so would silently switch a previously plaintext listener to TLS on upgrade. bindAddr and corsAllowedOrigins are unrelated to this policy and remain root-level settings shared by all listeners (bindAddr is also used by the relay/NtN listener, not just the APIs).

Archive And History Expiry Nodes

Dingo can expire immutable block CBOR from a local blob store once blocks are older than the ledger-derived stability window. This History Expiry mode is a valid standalone operational mode: without an archive fallback, reads for expired blocks return a clear history-expired error. When paired with Bark, expired or missing historical block reads can be transparently served from a remote archive node.

An archive node uses a signed-URL-capable blob plugin (s3 or gcs) and enables Bark with barkPort. Bark answers Dingo-to-Dingo archive requests by returning a signed object-storage URL plus block metadata. Badger is valid for a normal local blob store, but it does not provide signed URLs and should not be used as the Bark archive backend.

For local source builds, the s3 and gcs blob plugins require -tags dingo_extra_plugins or make build. Official release binaries include the extra plugin tag.

storageMode: "core"
plugins:
  storage:
    blob:
      provider: s3
      config:
        bucket: "dingo-archive"
        region: "us-east-1"
        prefix: "preview"
barkPort: 9091

A history-expiry node keeps its normal local blob store and enables historyExpiry. Dingo expires blocks older than the ledger-derived stability window while keeping local indexes and metadata, so reads fail explicitly as expired history unless an archive wrapper can serve them.

storageMode: "core"
plugins:
  storage:
    blob:
      provider: badger
      config: {}
historyExpiry:
  enabled: true
  frequency: 1h

Add barkBaseUrl when expired historical reads should fall back to a Bark archive:

barkBaseUrl: "http://archive.example.internal:9091"
barkBlockDownloadHosts:
  - "dingo-archive.s3.us-east-1.amazonaws.com"

Bark archive RPC may use the configured barkBaseUrl, but the block download URLs returned by that service must be HTTPS, must not contain credentials, and must match either the barkBaseUrl hostname or barkBlockDownloadHosts.

The runnable demonstration in internal/test/archive-demo/ brings up an S3 compatible Minio archive node, a local Badger history-expiry node, and an end-to-end BlockFetch check through Bark.

Deployment Patterns

Relay node (consensus only, no APIs):

./dingo

API / data node (full indexing, one or more APIs):

DINGO_STORAGE_MODE=api DINGO_PLUGINS_API_BLOCKFROST_CONFIG_PORT=3100 ./dingo

Archive node (cloud object storage plus Bark archive service):

DINGO_PLUGINS_STORAGE_BLOB_PROVIDER=s3 DINGO_BARK_PORT=9091 ./dingo

History-expiry node (local storage plus a remote Bark archive):

DINGO_HISTORY_EXPIRY_ENABLED=true \
DINGO_BARK_BASE_URL=http://archive.example.internal:9091 ./dingo

Block producer (consensus only, with SPO keys):

CARDANO_BLOCK_PRODUCER=true \
  CARDANO_SHELLEY_VRF_KEY=/keys/vrf.skey \
  CARDANO_SHELLEY_KES_KEY=/keys/kes.skey \
  CARDANO_SHELLEY_OPERATIONAL_CERTIFICATE=/keys/opcert.cert \
  ./dingo

When storageMode=core, the Badger blob store defaults to mmap-only settings: block-cache-size=0, index-cache-size=0, and compression=false. When storageMode=api, the default Badger profile is block-cache-size=268435456, index-cache-size=0, and compression=true. The plugins.storage.blob.config Badger settings (YAML or the matching DINGO_PLUGINS_STORAGE_BLOB_CONFIG_* environment variables) override those defaults only when explicitly set.

See dingo.yaml.example for the full set of configuration options.

Fast Bootstrapping with Mithril

Instead of syncing from genesis (which can take days on mainnet), you can bootstrap Dingo using a Mithril snapshot. Dingo has a built-in Mithril client that handles download, extraction, and import automatically. This is the fastest way to get a node running.

# Bootstrap from Mithril and start syncing
./dingo -n preview sync --mithril

# Then start the node
./dingo -n preview serve

Or use the subcommand form for more control:

# List available snapshots
./dingo -n preview mithril list

# Show snapshot details
./dingo -n preview mithril show <hash>

# Download and import
./dingo -n preview mithril sync

The Docker entrypoint manages both a first-run or resumed Mithril sync and the subsequent serve process as direct children. It forwards SIGINT and SIGTERM to whichever child is active, waits for that child to finish, and returns the child's exit status instead of masking an interrupted bootstrap as success.

The default v2 backend restores incremental per-immutable-file archives only after checking the genesis-rooted certificate chain, certified Merkle root, and each immutable-file digest. It also requires the ancillary archive: its ledger-state and in-progress immutable files are checked against the manifest separately signed by the ancillary key. That signature authenticates that payload; it is not a stake certificate and does not validate the volatile blocks after the certified immutable point.

The legacy v1 full-snapshot backend is available for inspection and unverified library workflows, but it cannot be used for a verified fast bootstrap because it has no signed ancillary-state boundary. The mithril list and mithril show subcommands follow the configured backend.

This imports:

  • All blocks from genesis (stored in blob store for serving peers)
  • Current UTxO set, stake accounts, pool registrations, DRep registrations
  • Stake snapshots (mark/set/go) for leader election
  • Protocol parameters, governance state, treasury/reserves
  • Complete epoch history for slot-to-time calculations

Individual transaction records, certificate history, witness/script/datum storage, and governance vote records for blocks before the snapshot are not stored by the snapshot itself. In core mode these are not needed — consensus, block production, and serving blocks to peers work without them, and new blocks processed after bootstrap will have full metadata. In api mode, dingo mithril sync automatically runs a backfill step after loading the snapshot to populate this historical data, so API servers (Blockfrost, UTxO RPC, Mesh) have complete records from genesis.

Replay and bootstrap behavior

Dingo supports two working startup paths:

  • A normal chain sync builds ledger and database state from downloaded blocks. The default configuration validates historical blocks from origin and fails closed when required ledger/UTxO state is missing. Operators intentionally using a non-genesis intersection without complete pre-intersect state must explicitly set validateHistorical: false and strictUtxoValidation: false.
  • Mithril sync verifies the certificate chain and snapshot artifact, imports the separately ancillary-key-signed ledger state, stores certified immutable blocks, and strictly processes the gap between the imported state and immutable tip. Normal strict validation resumes at the imported point for the gap and all subsequently received network data. In API mode it then backfills historical query records before the APIs are used.

Performance (preview network, ~4M blocks):

Phase core mode api mode
Download snapshot (~2.6 GB) ~1-2 min ~1-2 min
Extract + download ancillary ~1 min ~1 min
Import ledger state (UTxOs, accounts, pools, DReps, epochs) ~12 min ~12 min
Load blocks into blob store ~36 min ~36 min
Backfill historical metadata — ~varies
Total ~50 min ~50 min + backfill
Observed Mithril Bootstrap Timings

The following timings were measured during profiled core-mode validation runs on 2026-08-26 and 2026-08-28, from bootstrap start through completion:

Network Snapshot ready Bootstrap complete
mainnet 41m 51s 9h 10m 56s
preprod 4m 07s 37m 56s
preview 12m 11s 46m 22s

Mainnet's total includes its index rebuild; subsequent restarts reused the completed database rather than repeating the bootstrap.

A profiled Preview api-mode run completed snapshot bootstrap and historical metadata backfill with these timings:

Phase Duration
Mithril snapshot bootstrap 39m 13s
Historical metadata backfill 19h 57m 46s
Post-backfill index finalization ~16m 30s
Total through bootstrap completion ~20h 53m 19s

The finalization phase is approximate; the total is the end-to-end measurement and should not be reconstructed by summing the rounded phase durations.

The API-mode measurement was taken on 2026-08-30/31 against approximately 4.6M Preview blocks. The backfill processed 6.86M transactions at roughly 64 blocks per second.

The Preview API path was also measured in a profiled run on 2026-08-31/09-01 using the SQLite bulk-load pragmas and a temporary Mithril artifact cache. It completed in 7h 36m 07s end-to-end, including the historical metadata backfill (24,547s) and deferred index rebuild (16m). The earlier Preview API baseline was approximately 20h 53m, so this run used 63.6% less elapsed time. The approximately 30 GB Mithril cache is temporary and can be removed after the snapshot is imported. Peak bootstrap space was approximately 76 GB while the cache was present (46 GB database plus 30 GB cache); after cleanup, the database requires approximately 46 GB and a fresh bootstrap needs approximately 61 GB for the database plus the 15 GB snapshot.

Disk Space Requirements

Bootstrapping requires temporary disk space for both the downloaded snapshot and the Dingo database:

Network Snapshot Size Dingo DB Total Needed
mainnet ~180 GB ~200+ GB ~400 GB
preprod ~60 GB ~80 GB ~150 GB
preview ~15 GB ~25 GB ~50 GB
preview (API mode) ~15 GB ~46 GB ~61 GB minimum (~76 GB peak during bootstrap)

These are approximate values that grow over time. The snapshot can be deleted after import, but you need sufficient space for both during the load process.

Database Maintenance

dingo database provides offline snapshot, restore, and truncate operations. Each subcommand operates directly against the configured data directory and must not be run while a dingo node process has that directory open. All three honor SIGINT and SIGTERM so an interrupt unwinds cleanly instead of leaving a partial result behind.

# Capture a point-in-time snapshot. --dir must not already exist.
./dingo database snapshot --dir /backups/dingo-preview-2026-08-05

# Restore the configured data directory from a snapshot directory.
./dingo database restore /backups/dingo-preview-2026-08-05

# Rewind to a target point. Pass exactly one of --slot, --hash, --block-number.
./dingo database truncate --slot 12345678

Truncate makes the target block the new chain tip and removes every block and metadata row added after it. Unlike a normal chain rollback it does not reject a target beyond the security parameter, because it exists for disaster-recovery scenarios (see CIP-0135) where the chain must be rewound further than Ouroboros Praos allows. The resulting database is resync-ready from the target point.

The same operations are also exposed remotely through Bark's DatabaseService. Every DatabaseService RPC requires a client certificate verified against barkClientCaFilePath; destructive RPCs also require the certificate's SHA-256 fingerprint in barkOperatorCertificateFingerprints. Bark's read-only ArchiveService remains public on the same listener, so expose the Bark port only to the intended network.

Database Plugins

Dingo supports pluggable storage backends for both blob storage (blocks, transactions) and metadata storage. This allows you to choose the best storage solution for your use case.

Available Plugins

For local source builds, badger, sqlite, the default mempool, and all three built-in API providers are always available. GCS and S3 require -tags dingo_extra_plugins or an official release binary. The same tag adds the operational PostgreSQL and MySQL metadata providers, backed by the shared database/sql store and v1alpha1 schema.

Blob Storage Plugins:

  • badger - BadgerDB local key-value store (default)
  • gcs - Google Cloud Storage blob store
  • s3 - AWS S3 blob store

Metadata Storage Plugins:

  • sqlite - SQLite relational database (default)
  • postgres - PostgreSQL metadata store (requires dingo_extra_plugins)
  • mysql - MySQL metadata store (requires dingo_extra_plugins)

Mempool Plugins:

  • fifo - First-in, first-out transaction pool (default)
  • dag - Dependency-graph transaction pool that makes transaction dependencies explicit. Ledger validation remains the source of truth for both providers; the DAG backend changes ordering and selection, not validation.

API Plugins:

  • blockfrost - Blockfrost-compatible REST API
  • mesh - Mesh (Coinbase Rosetta) REST API
  • utxorpc - UTxO RPC gRPC API (serves both v1alpha and v1beta)
Plugin Selection

Plugins can be selected via command-line flags, environment variables, or configuration file:

# Command line
./dingo --blob gcs --metadata sqlite

# Environment variables
DINGO_PLUGINS_STORAGE_BLOB_PROVIDER=gcs
DINGO_PLUGINS_STORAGE_METADATA_PROVIDER=sqlite

# Configuration file (dingo.yaml)
plugins:
  storage:
    blob:
      provider: gcs
      config:
        bucket: my-cardano-blocks
    metadata:
      provider: sqlite
      config: {}
Plugin Configuration

Each capability has exactly one selected provider. Provider configuration is strictly decoded; unknown fields fail startup. Generic environment variables flatten the capability and config path, for example DINGO_PLUGINS_MEMPOOL_CONFIG_CAPACITY and DINGO_PLUGINS_API_UTXORPC_CONFIG_PORT. See dingo.yaml.example.

CARDANO_DATABASE_PATH (or databasePath / --data-dir) remains a shortcut that supplies the data directory to both local storage providers. Set dataDir on either local provider when blob and metadata storage need separate paths; the provider value overrides the shared shortcut.

BadgerDB Options:

  • dataDir - Badger data directory (defaults to the shared database path)
  • blockCacheSize - Block cache size in bytes
  • indexCacheSize - Index cache size in bytes
  • compression - Enable ZSTD compression
  • gc - Enable garbage collection

Leave mode-sensitive Badger settings unset to use storage-mode defaults.

Google Cloud Storage Options:

  • bucket - GCS bucket name

AWS S3 Options:

  • endpoint - Optional custom S3-compatible endpoint
  • bucket - S3 bucket name
  • region - AWS region
  • prefix - Path prefix within bucket
  • timeout - Request timeout

S3 credentials use the standard AWS credential chain.

SQLite Options:

  • dataDir - SQLite data directory (defaults to the shared database path)
  • maxConnections - Maximum connection count

Reserved PostgreSQL Options:

  • host - PostgreSQL server hostname
  • port - PostgreSQL server port
  • user - Database user
  • password - Database password
  • database - Database name
  • sslMode - PostgreSQL SSL mode
  • timeZone - PostgreSQL time zone (default: UTC)
  • dsn - Full PostgreSQL DSN (overrides the individual connection fields)
  • poolMaxOpenConns - Maximum open connections (default: 100)
  • poolMaxIdleConns - Maximum idle connections (default: 10)
  • poolConnMaxLifetime - Maximum connection lifetime (default: 1h)

Reserved MySQL Options:

  • host - MySQL server hostname
  • port - MySQL server port
  • user - Database user
  • password - Database password
  • database - Database name
  • sslMode - MySQL TLS mode (mapped to tls in the DSN)
  • timeZone - MySQL time zone location (default: UTC)
  • dsn - Full MySQL DSN (overrides other options when set)
  • poolMaxOpenConns - Maximum open connections (default: 100)
  • poolMaxIdleConns - Maximum idle connections (default: 10)
  • poolConnMaxLifetime - Maximum connection lifetime (default: 1h)
Migrating From Pre-Plugin Configuration

The plugin platform replaces the earlier per-plugin CLI flags and environment variables for storage, mempool, and API ports with the plugins.* config tree (YAML), the generic DINGO_PLUGINS_* environment scheme, and the provider selector flags. Every removed setting has an equivalent below; values are unchanged, only where they are set has moved.

Removed setting New equivalent
--mempool-capacity, CARDANO_MEMPOOL_CAPACITY plugins.mempool.config.capacity / DINGO_PLUGINS_MEMPOOL_CONFIG_CAPACITY
--eviction-watermark, DINGO_MEMPOOL_EVICTION_WATERMARK plugins.mempool.config.evictionWatermark / DINGO_PLUGINS_MEMPOOL_CONFIG_EVICTION_WATERMARK
--rejection-watermark, DINGO_MEMPOOL_REJECTION_WATERMARK plugins.mempool.config.rejectionWatermark / DINGO_PLUGINS_MEMPOOL_CONFIG_REJECTION_WATERMARK
DINGO_DATABASE_BLOB_PLUGIN --blob, plugins.storage.blob.provider, or DINGO_PLUGINS_STORAGE_BLOB_PROVIDER
DINGO_DATABASE_METADATA_PLUGIN --metadata, plugins.storage.metadata.provider, or DINGO_PLUGINS_STORAGE_METADATA_PROVIDER
--blob-badger-*, DINGO_DATABASE_BLOB_BADGER_* plugins.storage.blob.config.* / DINGO_PLUGINS_STORAGE_BLOB_CONFIG_*
--metadata-sqlite-*, DINGO_DATABASE_METADATA_SQLITE_* plugins.storage.metadata.config.* / DINGO_PLUGINS_STORAGE_METADATA_CONFIG_*
MYSQL_* MySQL connection aliases (-tags dingo_extra_plugins) plugins.storage.metadata.config.* / DINGO_PLUGINS_STORAGE_METADATA_CONFIG_*
--utxorpc-port, --blockfrost-port, --mesh-port plugins.api.<name>.config.port / DINGO_PLUGINS_API_<NAME>_CONFIG_PORT

Provider config fields use lowerCamelCase in YAML; the environment form uppercases them with underscore separators (dataDir becomes ..._CONFIG_DATA_DIR). The pre-plugin API port variables DINGO_UTXORPC_PORT, DINGO_BLOCKFROST_PORT, and DINGO_MESH_PORT still work as compatibility aliases, and setting an API port to 0 disables that server.

Listing Available Plugins

You can see all available plugins and their descriptions:

./dingo list

Plugin Development

For information on developing custom storage plugins, see database/plugin/PLUGIN_DEVELOPMENT.md.

Features

This checklist is a compact map of implemented feature areas. The package tests, conformance suite, DevNet, and public-network evidence provide the detailed validation record.

  • Network
    • UTxO RPC
    • Ouroboros
      • Node-to-node
        • ChainSync
        • BlockFetch
        • TxSubmission2
      • Node-to-client
        • ChainSync
        • LocalTxMonitor
        • LocalTxSubmission
        • LocalStateQuery
      • Peer governor
        • Topology config
        • Peer churn (full PeerChurnEvent with gossip/public root churn, bootstrap events)
        • Ledger peers
        • Peer sharing
        • Denied peers tracking
      • Connection manager
        • Inbound connections
          • Node-to-client over TCP
          • Node-to-client over UNIX socket
          • Node-to-node over TCP
        • Outbound connections
          • Node-to-node over TCP
  • Ledger
    • Blocks
      • Block storage
      • Chain selection (density comparison, VRF tie-breaker, ChainForkEvent)
    • UTxO tracking
    • Protocol parameters
    • Genesis validation
    • Block header validation (VRF/KES/OpCert cryptographic verification)
    • Certificates
      • Pool registration
      • Stake registration/delegation
      • Account registration checks
      • DRep registration
      • Governance
    • Transaction validation
      • Phase 1 validation
        • UTxO rules
        • Fee validation (full fee calculation with script costs)
        • Transaction size and ExUnit budget validation
        • Witnesses
        • Block body
        • Certificates
        • Delegation/pools
        • Governance
      • Phase 2 validation
        • Plutus V1 smart contract execution
        • Plutus V2 smart contract execution
        • Plutus V3 smart contract execution
  • Block production
    • VRF leader election with stake snapshots
    • Block forging with KES/OpCert signing
    • Slot battle detection
  • Mempool
    • Accept transactions from local clients
    • Distribute transactions to other nodes
    • Validation of transaction on add
    • Consumer tracking
    • Transaction purging on chain update
    • Watermark-based eviction and rejection
    • Selectable backend: FIFO (default) or DAG
  • Database Recovery
    • Chain rollback support
    • State restoration on rollback
    • WAL mode for crash recovery
    • Automatic rollback on transaction error
    • Cross-store commit fence with durable blob sync and commit timestamps
    • Partial-commit and blob-only timestamp divergence detection
    • Startup chain/ledger tip reconciliation and orphaned-blob cleanup
    • Recovery ordering ahead of history expiry
  • Database Lifecycle
    • Offline snapshot, restore, and truncate (dingo database)
    • Remote operation through the Bark DatabaseService
  • Stake Snapshots
    • Mark/Set/Go rotation at epoch boundaries
    • Genesis snapshot capture
  • API Servers
    • UTxO RPC (gRPC), serving v1alpha and v1beta
    • WIP Blockfrost-compatible REST API (required endpoint families are implemented; compatibility hardening and reward parity are ongoing)
    • Mesh (Coinbase Rosetta) API
    • Optional Midnight event indexer and MidnightState gRPC service
  • Mithril Bootstrap
    • Built-in Mithril client
    • Ledger state import (UTxOs, accounts, pools, DReps, epochs)
    • Block loading from ImmutableDB

Additional planned features can be found in our issue tracker and project boards.

Catalyst Fund 12 - Go Node (Dingo)
Catalyst Fund 13 - Archive Node

Check the issue tracker for known issues. Due to rapid development, bugs happen especially as there is functionality which has not yet been developed.

Development / Building

This requires Go 1.26 or later. You also need make.

The default target formats and builds. It does not run tests; use make test for those.

# Format and build (default target)
make

# Build only
make build

# Run
./dingo

# Run without building a binary
go run ./cmd/dingo/

make build builds every command under cmd/: the dingo node itself and koios-parity, which compares Dingo ledger state against Koios for a given network and epoch.

Metadata storage uses typed database/sql code generated by sqlc from sqlc.yaml. Regenerate it with make sql after changing a query, and make sql-check fails when the checked-in output is stale.

Testing
make test                                    # All tests with race detection
go test -v -race -run TestName ./package/    # Single test
make bench                                   # Benchmarks
make bench-mempool                           # Compare FIFO and DAG mempools
make docs-parity                             # Docs agree with go.mod, Makefile, compose
make sql-check                               # Generated sqlc output is current
Profiling
# Load testdata with CPU and memory profiling
make test-load-profile

# Analyze
go tool pprof cpu.prof
go tool pprof mem.prof

# Enable live pprof on loopback for serve or Mithril sync
DINGO_DEBUG_PORT=6060 ./dingo
go tool pprof http://127.0.0.1:6060/debug/pprof/heap

The live pprof server has no authentication or TLS. Its dedicated debugBindAddr defaults to 127.0.0.1 even when bindAddr or privateBindAddr uses a wildcard. External exposure therefore requires an explicit --debug-bind-addr, DINGO_DEBUG_BIND_ADDR, or debugBindAddr override and should be protected by a firewall or equivalent network policy.

DevNet

The default DevNet runs a private all-Dingo Cardano network: three Dingo block producers, one Dingo relay, and txpump. It validates Dingo-to-Dingo consensus, block diffusion, liveness, mempool behavior, and Dingo-only features.

Pass --conformance to run Dingo beside cardano-node for compatibility and reference-conformance testing.

Architecture

The default Docker Compose profile contains:

Container Role Host Port
dingo-1 Dingo block producer (pool 1) 3010
dingo-2 Dingo block producer (pool 2) 3013
dingo-3 Dingo block producer (pool 3) 3014
dingo-relay Dingo relay (no block production) 3015
txpump-dingo Submits transactions into Dingo's mempool —

The opt-in conformance profile contains dingo-producer, cardano-producer, cardano-relay, and txpump. A configurator init container generates fresh pool keys and genesis files for either profile.

Prerequisites
  • Docker with the Compose plugin (docker compose)
  • Go 1.26+
Running the Automated Tests

The test suite builds the Dingo Docker image, starts all containers, waits for health checks, and runs Linux-only Go integration tests tagged with //go:build linux && devnet. Conformance-only scenarios additionally require devnet_conformance, while Dingo-only scenarios require !devnet_conformance:

cd internal/test/devnet/

# Run the all-Dingo suite
./run-tests.sh

# Run Dingo beside cardano-node
./run-tests.sh --conformance

# Run a specific test
./run-tests.sh -run TestBasicBlockForging

# Keep containers running after tests pass (for inspection)
./run-tests.sh --keep-up

Override host ports if needed:

DEVNET_DINGO_PORT=4010 DEVNET_CARDANO_PORT=4011 DEVNET_RELAY_PORT=4012 ./run-tests.sh
Running the DevNet Manually

For longer-running manual tests (soak testing, observing behavior over multiple epochs, debugging):

cd internal/test/devnet/

# Start all containers
./start.sh

# Watch logs
docker compose -f docker-compose.yml logs -f

# Watch a specific node
docker compose -f docker-compose.yml logs -f dingo-1

# Stop and clean up
./stop.sh

Containers remain running until you stop them. The DevNet parameters (in testnet.yaml) use 1-second slots and 500-slot epochs (~8 minutes per epoch) with activeSlotsCoeff=0.4 and securityParam (k)=40, so you can observe epoch transitions, leader election, and stake snapshot rotation relatively quickly.

See internal/test/devnet/README.md for full details on the harness, configurator, available test scenarios, and port/address overrides.

Local DevNet (Without Docker)

For quick iteration without Docker, devmode.sh runs Dingo directly against a local devnet genesis. It resets state and updates genesis timestamps on each run:

# Run in devnet mode
./devmode.sh

# With debug logging
DEBUG=true ./devmode.sh

This stores state in .devnet/ and uses genesis configs from config/cardano/devnet/. It runs a single Dingo node (no cardano-node counterpart), which is useful for testing startup, block production, and transaction submission in isolation.

The bundled devnet parameters track Yaci DevKit's default local cluster, so a dApp developer moving between the two sees the same chain shape: 1-second slots with activeSlotsCoeff=1.0, so the single producer forges a block every slot, and a 600-slot (10-minute) epoch. securityParam (k)=100 follows Yaci's derivation, which sizes k so the randomness stabilisation window is a fraction of the epoch rather than a multiple of it. Byron k=60 keeps a Byron epoch (10k slots) at the same 600 slots, with a 1-second Byron slot.

These same files ship in the release image as /opt/cardano/config/devnet (from docker-cardano-configs) and are what downstream tooling copies to generate a single-node devnet.

Documentation ¶

Overview ¶

Package dingo implements a Cardano blockchain node.

It composes ledger validation, chain synchronization and selection, networking, block production, storage, and optional API services into a single Node. A Node owns its configuration, event bus, and plugin host; providers are registered explicitly during composition.

Index ¶

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. This is primarily for programmatic use (library API).

func NewConfigFromInternal ¶ added in v0.69.0

func NewConfigFromInternal(
	cfg *internalconfig.Config,
	logger *slog.Logger,
	cardanoCfg *cardano.CardanoNodeConfig,
	topoCfg *topology.TopologyConfig,
	promRegistry prometheus.Registerer,
) (Config, error)

NewConfigFromInternal creates a Config from an already-loaded internal configuration, along with runtime-only dependencies (logger, cardano config, topology). This is the main path for the dingo CLI and node startup, eliminating manual field-by-field mapping.

func (*Config) API ¶ added in v0.70.0

func (c *Config) API() internalconfig.APIConfig

API returns the shared api.tls/api.auth policy defaults applied to every selected plugins.api.* provider. See WithAPIConfig.

func (*Config) APIConfig ¶ added in v0.70.0

func (c *Config) APIConfig() internalconfig.APIConfig

APIConfig returns the shared api.tls/api.auth policy defaults applied to every selected plugins.api.* provider unless overridden. See WithAPIConfig and ARCHITECTURE.md's "API security" section.

func (*Config) ActivePeersGossipQuota ¶ added in v0.69.0

func (c *Config) ActivePeersGossipQuota() int

ActivePeersGossipQuota returns the per-source quota for gossip peers.

func (*Config) ActivePeersLedgerQuota ¶ added in v0.69.0

func (c *Config) ActivePeersLedgerQuota() int

ActivePeersLedgerQuota returns the per-source quota for ledger peers.

func (*Config) ActivePeersTopologyQuota ¶ added in v0.69.0

func (c *Config) ActivePeersTopologyQuota() int

ActivePeersTopologyQuota returns the per-source quota for topology peers.

func (*Config) BackfillBatchSize ¶ added in v0.69.0

func (c *Config) BackfillBatchSize() int

BackfillBatchSize returns the batch size for database backfill operations.

func (*Config) BarkBaseUrl ¶ added in v0.69.0

func (c *Config) BarkBaseUrl() string

BarkBaseUrl returns the base URL for the Bark service.

func (*Config) BarkBlockDownloadHosts ¶ added in v0.69.0

func (c *Config) BarkBlockDownloadHosts() []string

BarkBlockDownloadHosts returns the list of allowed hosts for block downloads via Bark.

func (*Config) BarkOperatorCertificateFingerprints ¶ added in v0.70.2

func (c *Config) BarkOperatorCertificateFingerprints() []string

BarkOperatorCertificateFingerprints returns the SHA-256 client certificate fingerprints authorized to invoke destructive Bark DatabaseService RPCs.

func (*Config) BarkPort ¶ added in v0.69.0

func (c *Config) BarkPort() uint

BarkPort returns the Bark API port. 0 disables the server.

func (*Config) BindAddr ¶ added in v0.69.0

func (c *Config) BindAddr() string

BindAddr returns the IP address for API listeners.

func (*Config) BlobPlugin ¶ added in v0.69.0

func (c *Config) BlobPlugin() string

BlobPlugin returns the configured blob storage plugin name.

func (*Config) BlockProducer ¶ added in v0.69.0

func (c *Config) BlockProducer() bool

BlockProducer returns whether block production mode is enabled.

func (*Config) BlockfrostPort ¶ added in v0.69.0

func (c *Config) BlockfrostPort() uint

BlockfrostPort returns the Blockfrost API port. 0 disables the server.

func (*Config) CORSAllowedOrigins ¶ added in v0.69.0

func (c *Config) CORSAllowedOrigins() []string

CORSAllowedOrigins returns the CORS allowed origins list.

func (*Config) Cache ¶ added in v0.69.0

func (c *Config) Cache() internalconfig.CacheConfig

Cache returns the cache configuration.

func (*Config) CardanoConfig ¶ added in v0.69.0

func (c *Config) CardanoConfig() string

CardanoConfig returns the path to the cardano-node config JSON file.

func (*Config) CardanoNodeConfig ¶ added in v0.69.0

func (c *Config) CardanoNodeConfig() *cardano.CardanoNodeConfig

CardanoNodeConfig returns the loaded Cardano node configuration.

func (*Config) Chainsync ¶ added in v0.69.0

func (c *Config) Chainsync() internalconfig.ChainsyncConfig

Chainsync returns the chainsync configuration.

func (*Config) ChainsyncStallTimeoutDuration ¶ added in v0.69.0

func (c *Config) ChainsyncStallTimeoutDuration() time.Duration

ChainsyncStallTimeoutDuration returns the parsed chainsync stall timeout.

func (*Config) DatabasePath ¶ added in v0.69.0

func (c *Config) DatabasePath() string

DatabasePath returns the persistent data directory path.

func (*Config) DatabaseQueueSize ¶ added in v0.69.0

func (c *Config) DatabaseQueueSize() int

DatabaseQueueSize returns the database task queue size.

func (*Config) DatabaseWorkers ¶ added in v0.69.0

func (c *Config) DatabaseWorkers() int

DatabaseWorkers returns the number of database worker goroutines.

func (*Config) DebugPort ¶ added in v0.69.0

func (c *Config) DebugPort() uint

DebugPort returns the pprof debug endpoint port. 0 disables the endpoint.

func (*Config) EvictionWatermark ¶ added in v0.69.0

func (c *Config) EvictionWatermark() float64

EvictionWatermark returns the mempool eviction watermark (0.0-1.0).

func (*Config) ForgeStaleGapThresholdSlots ¶ added in v0.69.0

func (c *Config) ForgeStaleGapThresholdSlots() uint64

ForgeStaleGapThresholdSlots returns the stale gap threshold for warnings.

func (*Config) ForgeSyncToleranceSlots ¶ added in v0.69.0

func (c *Config) ForgeSyncToleranceSlots() uint64

ForgeSyncToleranceSlots returns the sync tolerance for block forging.

func (*Config) GenesisBootstrap ¶ added in v0.69.0

func (c *Config) GenesisBootstrap() internalconfig.GenesisBootstrapConfig

GenesisBootstrap returns the Genesis bootstrap configuration.

func (*Config) HistoryExpiry ¶ added in v0.69.0

func (c *Config) HistoryExpiry() internalconfig.HistoryExpiryConfig

HistoryExpiry returns the history expiry configuration.

func (*Config) ImmutableDbPath ¶ added in v0.69.0

func (c *Config) ImmutableDbPath() string

ImmutableDbPath returns the path to an external ImmutableDB for load mode.

func (*Config) InactivityTimeout ¶ added in v0.69.0

func (c *Config) InactivityTimeout() time.Duration

InactivityTimeout returns the hot peer inactivity timeout.

func (*Config) InboundCooldown ¶ added in v0.69.0

func (c *Config) InboundCooldown() time.Duration

InboundCooldown returns the cooldown period after inbound demotion.

func (*Config) InboundDuplexOnlyForHot ¶ added in v0.69.0

func (c *Config) InboundDuplexOnlyForHot() bool

InboundDuplexOnlyForHot returns whether duplex is required for hot inbound.

func (*Config) InboundHotQuota ¶ added in v0.69.0

func (c *Config) InboundHotQuota() int

InboundHotQuota returns the inbound hot peer quota.

func (*Config) InboundHotScoreThreshold ¶ added in v0.69.0

func (c *Config) InboundHotScoreThreshold() float64

InboundHotScoreThreshold returns the score threshold for inbound hot promotion.

func (*Config) InboundMinTenure ¶ added in v0.69.0

func (c *Config) InboundMinTenure() time.Duration

InboundMinTenure returns the minimum tenure before inbound promotion.

func (*Config) InboundPruneAfter ¶ added in v0.69.0

func (c *Config) InboundPruneAfter() time.Duration

InboundPruneAfter returns the duration before pruning idle inbound connections.

func (*Config) InboundWarmTarget ¶ added in v0.69.0

func (c *Config) InboundWarmTarget() int

InboundWarmTarget returns the inbound warm peer target.

func (*Config) IntersectPoints ¶ added in v0.69.0

func (c *Config) IntersectPoints() []ocommon.Point

IntersectPoints returns the intersect points for chainsync.

func (*Config) IntersectTip ¶ added in v0.69.0

func (c *Config) IntersectTip() bool

IntersectTip returns whether to start chainsync at the current chain tip.

func (*Config) LedgerCatchupTimeout ¶ added in v0.69.0

func (c *Config) LedgerCatchupTimeout() string

LedgerCatchupTimeout returns the maximum wait time for ledger catchup.

func (*Config) LedgerPeerTarget ¶ added in v0.69.0

func (c *Config) LedgerPeerTarget() int

LedgerPeerTarget returns the target number of ledger peers.

func (*Config) LeiosPipelineTiming ¶ added in v0.69.0

func (c *Config) LeiosPipelineTiming() *leios.PipelineTiming

LeiosPipelineTiming returns the Leios pipeline timing configuration.

func (*Config) LeiosVoteSigningKeyFile ¶ added in v0.69.0

func (c *Config) LeiosVoteSigningKeyFile() string

LeiosVoteSigningKeyFile returns the path to the Leios vote signing key.

func (*Config) Listeners ¶ added in v0.69.0

func (c *Config) Listeners() []ListenerConfig

Listeners returns the configured listener configurations.

func (*Config) Logger ¶ added in v0.69.0

func (c *Config) Logger() *slog.Logger

Logger returns the configured logger instance.

func (*Config) Logging ¶ added in v0.69.0

func (c *Config) Logging() internalconfig.LoggingConfig

Logging returns the logging configuration.

func (*Config) MaxConnectionsPerIP ¶ added in v0.69.0

func (c *Config) MaxConnectionsPerIP() int

MaxConnectionsPerIP returns the max concurrent inbound connections per IP.

func (*Config) MaxInboundConns ¶ added in v0.69.0

func (c *Config) MaxInboundConns() int

MaxInboundConns returns the maximum total inbound connections.

func (*Config) MaxKESEvolutions ¶ added in v0.69.0

func (c *Config) MaxKESEvolutions() uint64

MaxKESEvolutions returns the maximum number of KES key evolutions.

func (*Config) MempoolCapacity ¶ added in v0.69.0

func (c *Config) MempoolCapacity() int64

MempoolCapacity returns the mempool capacity in bytes.

func (*Config) MeshPort ¶ added in v0.69.0

func (c *Config) MeshPort() uint

MeshPort returns the Mesh (Rosetta) API port. 0 disables the server.

func (*Config) MetadataPlugin ¶ added in v0.69.0

func (c *Config) MetadataPlugin() string

MetadataPlugin returns the configured metadata storage plugin name.

func (*Config) MetricsPort ¶ added in v0.69.0

func (c *Config) MetricsPort() uint

MetricsPort returns the Prometheus metrics endpoint port.

func (*Config) Midnight ¶ added in v0.69.0

func (c *Config) Midnight() internalconfig.MidnightConfig

Midnight returns the Midnight indexer configuration.

func (*Config) MinHotPeers ¶ added in v0.69.0

func (c *Config) MinHotPeers() int

MinHotPeers returns the minimum hot peers before aggressive promotion.

func (*Config) Mithril ¶ added in v0.69.0

func (c *Config) Mithril() internalconfig.MithrilConfig

Mithril returns the Mithril bootstrap configuration.

func (*Config) Network ¶ added in v0.69.0

func (c *Config) Network() string

Network returns the configured network name.

func (*Config) NetworkMagic ¶ added in v0.69.0

func (c *Config) NetworkMagic() uint32

NetworkMagic returns the configured network magic value.

func (*Config) OffchainMetadata ¶ added in v0.69.0

func (c *Config) OffchainMetadata() internalconfig.OffchainMetadataConfig

OffchainMetadata returns the off-chain metadata fetcher configuration.

func (*Config) PeerSharing ¶ added in v0.69.0

func (c *Config) PeerSharing() *bool

PeerSharing returns the peer sharing configuration.

func (*Config) PrivateBindAddr ¶ added in v0.69.0

func (c *Config) PrivateBindAddr() string

PrivateBindAddr returns the IP address for the private NtC listener.

func (*Config) PrivatePort ¶ added in v0.69.0

func (c *Config) PrivatePort() uint

PrivatePort returns the port for the private NtC listener.

func (*Config) PrometheusRegistry ¶ added in v0.69.0

func (c *Config) PrometheusRegistry() prometheus.Registerer

PrometheusRegistry returns the Prometheus registry for metrics.

func (*Config) ReconcileInterval ¶ added in v0.69.0

func (c *Config) ReconcileInterval() time.Duration

ReconcileInterval returns the peer governor reconciliation interval.

func (*Config) RejectionWatermark ¶ added in v0.69.0

func (c *Config) RejectionWatermark() float64

RejectionWatermark returns the mempool rejection watermark (0.0-1.0).

func (*Config) RelayPort ¶ added in v0.69.0

func (c *Config) RelayPort() uint

RelayPort returns the source port for outbound connections.

func (*Config) RunMode ¶ added in v0.69.0

func (c *Config) RunMode() internalconfig.RunMode

RunMode returns the operational mode (serve, load, dev, or leios).

func (*Config) SetStorageMode ¶ added in v0.69.0

func (c *Config) SetStorageMode(mode string)

SetStorageMode updates the storage mode. This is used during validation when a mode-specific default must be applied.

func (*Config) SetTargetNumberOfActivePeers ¶ added in v0.69.0

func (c *Config) SetTargetNumberOfActivePeers(n int)

SetTargetNumberOfActivePeers updates the active peers target. This is used when applying cardano-node config fallbacks.

func (*Config) SetTargetNumberOfEstablishedPeers ¶ added in v0.69.0

func (c *Config) SetTargetNumberOfEstablishedPeers(n int)

SetTargetNumberOfEstablishedPeers updates the established peers target. This is used when applying cardano-node config fallbacks.

func (*Config) SetTargetNumberOfKnownPeers ¶ added in v0.69.0

func (c *Config) SetTargetNumberOfKnownPeers(n int)

SetTargetNumberOfKnownPeers updates the known peers target. This is used when applying cardano-node config fallbacks.

func (*Config) ShelleyKESKey ¶ added in v0.69.0

func (c *Config) ShelleyKESKey() string

ShelleyKESKey returns the path to the KES signing key file.

func (*Config) ShelleyOperationalCertificate ¶ added in v0.69.0

func (c *Config) ShelleyOperationalCertificate() string

ShelleyOperationalCertificate returns the path to the operational certificate.

func (*Config) ShelleyVRFKey ¶ added in v0.69.0

func (c *Config) ShelleyVRFKey() string

ShelleyVRFKey returns the path to the VRF signing key file.

func (*Config) ShutdownTimeout ¶ added in v0.69.0

func (c *Config) ShutdownTimeout() string

ShutdownTimeout returns the graceful shutdown timeout as a string duration.

func (*Config) ShutdownTimeoutDuration ¶ added in v0.69.0

func (c *Config) ShutdownTimeoutDuration() (time.Duration, error)

ShutdownTimeoutDuration parses the configured graceful shutdown timeout.

func (*Config) SlotsPerKESPeriod ¶ added in v0.69.0

func (c *Config) SlotsPerKESPeriod() uint64

SlotsPerKESPeriod returns the number of slots per KES period.

func (*Config) SocketPath ¶ added in v0.69.0

func (c *Config) SocketPath() string

SocketPath returns the path to the UNIX domain socket for local client API.

func (*Config) StartEra ¶ added in v0.69.0

func (c *Config) StartEra() internalconfig.StartEra

StartEra returns the experimental direct startup era.

func (*Config) StorageMode ¶ added in v0.69.0

func (c *Config) StorageMode() string

StorageMode returns the storage mode (core or api).

func (*Config) StorageModeEnum ¶ added in v0.69.0

func (c *Config) StorageModeEnum() StorageMode

StorageModeEnum returns the storage mode as the typed StorageMode.

func (*Config) StrictUtxoValidation ¶ added in v0.69.0

func (c *Config) StrictUtxoValidation() bool

StrictUtxoValidation returns whether to error out when a consumed UTxO cannot be found.

func (*Config) TargetNumberOfActivePeers ¶ added in v0.69.0

func (c *Config) TargetNumberOfActivePeers() int

TargetNumberOfActivePeers returns the target number of active peers.

func (*Config) TargetNumberOfEstablishedPeers ¶ added in v0.69.0

func (c *Config) TargetNumberOfEstablishedPeers() int

TargetNumberOfEstablishedPeers returns the target number of established peers.

func (*Config) TargetNumberOfKnownPeers ¶ added in v0.69.0

func (c *Config) TargetNumberOfKnownPeers() int

TargetNumberOfKnownPeers returns the target number of known peers.

func (*Config) TargetNumberOfRootPeers ¶ added in v0.70.1

func (c *Config) TargetNumberOfRootPeers() int

TargetNumberOfRootPeers returns the target number of root peers.

func (*Config) TlsCertFilePath ¶ added in v0.69.0

func (c *Config) TlsCertFilePath() string

TlsCertFilePath returns the path to the TLS certificate for gRPC APIs.

func (*Config) TlsKeyFilePath ¶ added in v0.69.0

func (c *Config) TlsKeyFilePath() string

TlsKeyFilePath returns the path to the TLS key for gRPC APIs.

func (*Config) TokenRegistry ¶ added in v0.70.1

func (c *Config) TokenRegistry() internalconfig.TokenRegistryConfig

TokenRegistry returns the CIP-26 token registry sync configuration.

func (*Config) Topology ¶ added in v0.69.0

func (c *Config) Topology() string

Topology returns the topology file path.

func (*Config) TopologyConfig ¶ added in v0.69.0

func (c *Config) TopologyConfig() *topology.TopologyConfig

TopologyConfig returns the loaded topology configuration.

func (*Config) Tracing ¶ added in v0.69.0

func (c *Config) Tracing() bool

Tracing returns whether OpenTelemetry tracing is enabled.

func (*Config) TracingStdout ¶ added in v0.69.0

func (c *Config) TracingStdout() bool

TracingStdout returns whether tracing output goes to stdout.

func (*Config) UtxorpcPort ¶ added in v0.69.0

func (c *Config) UtxorpcPort() uint

UtxorpcPort returns the UTxO RPC gRPC API port. 0 disables the server.

func (*Config) ValidateForgedBlock ¶ added in v0.69.0

func (c *Config) ValidateForgedBlock() bool

ValidateForgedBlock returns whether to self-validate forged blocks.

func (*Config) ValidateHistorical ¶ added in v0.69.0

func (c *Config) ValidateHistorical() bool

ValidateHistorical returns whether to validate all historical blocks.

type ConfigOptionFunc ¶

type ConfigOptionFunc func(*Config)

ConfigOptionFunc is a type that represents functions that modify the Connection config

func WithAPIConfig ¶ added in v0.70.0

func WithAPIConfig(cfg internalconfig.APIConfig) ConfigOptionFunc

WithAPIConfig sets the shared api.tls/api.auth policy applied to every selected plugins.api.* provider (Blockfrost, Mesh, UTxORPC) unless that provider's own plugins.api.<name>.config.tls/auth overrides a field. See internal/apiconfig and ARCHITECTURE.md's "API security" section.

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=20, gossip=20, ledger=20

func WithBarkBaseUrl ¶ added in v0.22.0

func WithBarkBaseUrl(baseUrl string) ConfigOptionFunc

func WithBarkBlockDownloadHosts ¶ added in v0.61.2

func WithBarkBlockDownloadHosts(hosts []string) ConfigOptionFunc

func WithBarkClientCAFilePath ¶ added in v0.69.0

func WithBarkClientCAFilePath(path string) ConfigOptionFunc

WithBarkClientCAFilePath sets the PEM CA bundle Bark uses to authenticate every DatabaseService caller. Destructive methods additionally require an allowlisted fingerprint set by WithBarkOperatorCertificateFingerprints.

func WithBarkHost ¶ added in v0.69.0

func WithBarkHost(host string) ConfigOptionFunc

WithBarkHost sets the interface Bark binds to. Empty leaves it to node.go's own safe-default logic (loopback-only when the database lifecycle service is mounted, all interfaces otherwise) rather than forcing a value here.

func WithBarkOperatorCertificateFingerprints ¶ added in v0.70.2

func WithBarkOperatorCertificateFingerprints(
	fingerprints []string,
) ConfigOptionFunc

WithBarkOperatorCertificateFingerprints sets the SHA-256 client certificate fingerprints authorized to invoke destructive DatabaseService RPCs.

func WithBarkPort ¶ added in v0.22.0

func WithBarkPort(port uint) 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 WithBootstrapPromotionMinDiversityGroups ¶ added in v0.37.0

func WithBootstrapPromotionMinDiversityGroups(n int) ConfigOptionFunc

WithBootstrapPromotionMinDiversityGroups sets the minimum number of bootstrap-time peer diversity groups to prefer before falling back to pure score ordering. Non-positive values use the peer-governor default.

func WithCORSAllowedOrigins ¶ added in v0.50.0

func WithCORSAllowedOrigins(origins []string) ConfigOptionFunc

WithCORSAllowedOrigins configures browser CORS access for public API servers. Use []string{"*"} to allow any origin, or an empty list to disable CORS headers.

func WithCacheConfig ¶ added in v0.29.0

func WithCacheConfig(
	blockLRU, hotUtxo, hotTx int,
	hotTxMaxBytes int64,
) ConfigOptionFunc

WithCacheConfig sets the CBOR cache sizes for block LRU, hot UTxO, and hot TX caches.

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 WithChainsyncHeaderStrategy ¶ added in v0.55.0

func WithChainsyncHeaderStrategy(
	strategy chainsync.HeaderSyncStrategy,
) ConfigOptionFunc

WithChainsyncHeaderStrategy selects how headers from multiple eligible chainsync peers drive ledger ingress. The default is chainsync.HeaderSyncStrategyPrimary (single active peer with failover).

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 2 minutes.

func WithDatabaseLifecycle ¶ added in v0.69.0

func WithDatabaseLifecycle(
	cfg internalconfig.DatabaseLifecycleConfig,
) ConfigOptionFunc

WithDatabaseLifecycle specifies configuration for automatic epoch-boundary database snapshots (see dblifecycle.Manager).

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 WithDelegatorInactivity ¶ added in v0.67.0

func WithDelegatorInactivity(enabled bool, epochs uint64) ConfigOptionFunc

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. A value of 0 disables eviction. Default is 0.

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 WithFullPotRewards ¶ added in v0.67.0

func WithFullPotRewards(enabled bool) ConfigOptionFunc

func WithGenesisBootstrap ¶ added in v0.37.0

func WithGenesisBootstrap(enabled bool) ConfigOptionFunc

WithGenesisBootstrap enables Genesis-mode chain selection during from-origin bootstrap. Genesis mode automatically exits once the local tip is within the configured Genesis window of the best known peer tip.

func WithGenesisCorroborationPeers ¶ added in v0.67.0

func WithGenesisCorroborationPeers(peers int) ConfigOptionFunc

func WithGenesisWindowSlots ¶ added in v0.37.0

func WithGenesisWindowSlots(slots uint64) ConfigOptionFunc

WithGenesisWindowSlots overrides the Genesis density comparison window. A zero value lets the node derive the window from Shelley genesis parameters using 3k/f.

func WithHistoryExpiry ¶ added in v0.52.0

func WithHistoryExpiry(cfg HistoryExpiryConfig) ConfigOptionFunc

WithHistoryExpiry configures local immutable block history expiry.

func WithInactivityTimeout ¶ added in v0.26.0

func WithInactivityTimeout(d time.Duration) ConfigOptionFunc

WithInactivityTimeout specifies how long a hot peer can be inactive before being demoted to warm. Non-positive values are ignored. Default: 10m.

func WithInboundPeerGovernance ¶ added in v0.37.0

func WithInboundPeerGovernance(
	warmTarget int,
	hotQuota int,
	minTenure time.Duration,
	hotScoreThreshold float64,
	pruneAfter time.Duration,
	duplexOnlyForHot bool,
	cooldown time.Duration,
) ConfigOptionFunc

WithInboundPeerGovernance specifies explicit inbound peer governance budget and phase-1 policy fields. Non-positive values use peer governor defaults.

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 WithKoiosParity ¶ added in v0.69.0

func WithKoiosParity(cfg KoiosParityConfig) ConfigOptionFunc

WithKoiosParity configures the optional in-process Koios reward-parity observer (dingo #3098). See KoiosParityConfig's doc comment. This is how a library caller (or internal/node's composition of a real dingo.yaml/env config) enables live-driven parity validation for the node Run() starts — the one-off validation run and a normal sync share the same process and authoritative state path rather than requiring a second, separately synced Dingo instance.

func WithLedgerPeerTarget ¶ added in v0.31.0

func WithLedgerPeerTarget(n int) ConfigOptionFunc

WithLedgerPeerTarget specifies the target number of known ledger peers. Discovery will add peers only until this target is reached. Negative values disable ledger peer discovery, 0 uses defaultLedgerPeerTarget, and positive values use that target. Default: 20.

func WithLeiosPipelineTiming ¶ added in v0.54.0

func WithLeiosPipelineTiming(timing leios.PipelineTiming) ConfigOptionFunc

WithLeiosPipelineTiming overrides the provisional Leios pipeline stage timing windows. CIP-0164 has not finalized these parameters, so they are kept off-chain and overridable here rather than as protocol parameters. When unset, leios.DefaultPipelineTiming applies. Experimental, leios runMode only.

func WithLeiosVoteSigningKeyFile ¶ added in v0.53.0

func WithLeiosVoteSigningKeyFile(path string) ConfigOptionFunc

WithLeiosVoteSigningKeyFile specifies the path to a hex-encoded BLS12-381 Leios vote signing key (DINGO_LEIOS_VOTE_SIGNING_KEY_FILE). When set on a block producer whose pool is a Leios committee member, the node emits votes for endorser blocks. Experimental, leios runMode only.

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 WithMaxConnectionsPerIP ¶ added in v0.26.0

func WithMaxConnectionsPerIP(n int) ConfigOptionFunc

WithMaxConnectionsPerIP specifies the maximum number of concurrent inbound connections from a single IP. Non-positive values are ignored. Default: 5.

func WithMaxInboundConns ¶ added in v0.26.0

func WithMaxInboundConns(n int) ConfigOptionFunc

WithMaxInboundConns specifies the maximum number of inbound connections. Non-positive values are ignored. Default: 100.

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 WithMidnightConfig ¶ added in v0.55.0

func WithMidnightConfig(cfg MidnightConfig) ConfigOptionFunc

WithMidnightConfig configures the Midnight indexer and optional gRPC API.

func WithMinHotPeers ¶ added in v0.26.0

func WithMinHotPeers(n int) ConfigOptionFunc

WithMinHotPeers specifies the minimum number of hot peers before aggressive promotion is triggered. Non-positive values are ignored. Default: 10.

func WithMinPoolMargin ¶ added in v0.67.0

func WithMinPoolMargin(v uint) ConfigOptionFunc

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 WithOffchainMetadataConfig ¶ added in v0.54.0

func WithOffchainMetadataConfig(cfg OffchainMetadataConfig) ConfigOptionFunc

WithOffchainMetadataConfig configures the API-mode off-chain metadata fetcher. Zero values use the fetcher's internal defaults.

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 WithPledgeLeverage ¶ added in v0.67.0

func WithPledgeLeverage(enabled bool, v uint) ConfigOptionFunc

func WithPluginSelection ¶ added in v0.68.0

func WithPluginSelection(
	capability hostplugin.Capability,
	selection hostplugin.Selection,
) ConfigOptionFunc

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 WithReconcileInterval ¶ added in v0.26.0

func WithReconcileInterval(d time.Duration) ConfigOptionFunc

WithReconcileInterval specifies how often the peer governor runs its reconciliation loop. Non-positive values are ignored. Default: 5m.

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. Default is 1.0.

func WithRootPeerTarget ¶ added in v0.70.1

func WithRootPeerTarget(targetRoot int) ConfigOptionFunc

WithRootPeerTarget specifies the target number of root peers from topology. Use 0 to use the default target, or -1 for unlimited.

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 WithStartEra ¶ added in v0.51.0

func WithStartEra(startEra string) ConfigOptionFunc

WithStartEra sets the experimental direct startup era. Empty uses the genesis protocol version; "dijkstra" starts directly in the Dijkstra era.

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 WithStrictUtxoValidation ¶ added in v0.61.2

func WithStrictUtxoValidation(strict bool) ConfigOptionFunc

WithStrictUtxoValidation specifies whether an unrecoverable consumed UTxO past the recorded Mithril sync boundary is a hard error rather than a silently skipped condition. See database.Config.StrictUtxoValidation.

func WithTokenRegistryConfig ¶ added in v0.70.1

func WithTokenRegistryConfig(cfg TokenRegistryConfig) ConfigOptionFunc

WithTokenRegistryConfig configures the API-mode CIP-26 token registry sync. Zero values use the syncer's internal defaults.

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 WithUnsafeFullPotRewardsOnStandardNetworks ¶ added in v0.67.0

func WithUnsafeFullPotRewardsOnStandardNetworks(enabled bool) ConfigOptionFunc

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 WithValidateForgedBlock ¶ added in v0.58.0

func WithValidateForgedBlock(enabled bool) ConfigOptionFunc

WithValidateForgedBlock enables self-validation of locally-forged blocks before they are adopted onto the chain and diffused to peers. When enabled, the forger runs VRF/KES header crypto, body-hash consistency, and per-tx ledger validation on each forged block. A failing block is dropped without being adopted or diffused. Disabled by default.

func WithValidateHistorical ¶ added in v0.17.0

func WithValidateHistorical(validate bool) ConfigOptionFunc

WithValidateHistorical specifies whether to validate all historical blocks during ledger processing

type HistoryExpiryConfig ¶ added in v0.52.0

type HistoryExpiryConfig struct {
	Enabled   bool
	Frequency time.Duration
}

HistoryExpiryConfig controls local expiry of immutable block history.

type KoiosParityConfig ¶ added in v0.69.0

type KoiosParityConfig struct {
	// Enabled subscribes the observer to epoch.transition when true.
	Enabled bool
	// Network is the Koios network to validate against ("preview" or
	// "preprod"). Empty defaults to this Config's own Network.
	Network string
	// CachePath is the Koios reference cache.db path. Empty defaults to
	// {DatabasePath}/.koios/cache.db.
	CachePath string
	// APIKey is the Koios Bearer token for higher-rate-limit access.
	APIKey string
	// Strict stops/cancels the node on the first Koios/tool error or exact
	// parity mismatch rather than logging it and continuing normal
	// operation.
	Strict bool
	// GraceHours is the window after an epoch closes during which a missing
	// Dingo-side row is treated as reference/sync lag rather than a
	// failure. 0 selects the default (24).
	GraceHours int
	// Accounts additionally runs #3097's per-account exact-parity fetch+check
	// phase for every epoch the observer processes, alongside the existing
	// epoch-aggregate/pool phases. A nil pointer defaults to true — see
	// internalconfig.DefaultKoiosParityConfig — since a plain bool's zero
	// value (false) can't be distinguished from an explicit opt-out. Pass a
	// pointer to false to disable account-level checking explicitly.
	Accounts *bool
	// AccountChunkSize/AccountChunkMaxBytes (dingo #3099) bound each
	// /account_reward_history request issued by the Accounts phase above, by
	// both address count and encoded body size. 0 for either selects the
	// package default. Unused when Accounts resolves to false.
	AccountChunkSize     int
	AccountChunkMaxBytes int
}

KoiosParityConfig controls the optional in-process Koios reward-parity observer (dingo #3098). When Enabled, Run() subscribes an observer to the node's own EventBus (event.EpochTransitionEventType) that validates each newly closed epoch's committed reward state directly against Koios reference data as the node advances — see internal/koiosparity and ARCHITECTURE.md's "Koios Parity Tracker" section. This is a one-off validation aid, not a permanent subsystem; leave Enabled false for normal node operation.

type ListenerConfig ¶

type ListenerConfig = connmanager.ListenerConfig

type MidnightConfig ¶ added in v0.55.0

type MidnightConfig struct {
	Enabled             bool
	ServerEnabled       bool
	ReflectionEnabled   bool
	AllowInsecureRemote bool
	Port                uint
	Host                string

	CNightPolicyID              string
	CNightAssetName             string
	MappingValidatorAddress     string
	AuthTokenPolicyID           string
	AuthTokenAssetName          string
	CommitteeCandidateAddress   string
	TechnicalCommitteeAddress   string
	TechnicalCommitteePolicyID  string
	CouncilAddress              string
	CouncilPolicyID             string
	PermissionedCandidatePolicy string
}

MidnightConfig controls the Midnight indexer and optional gRPC listener. Indexing is only active when Enabled is true AND Dingo is running in API storage mode -- both are required, since the indexer depends on the api-mode indexes to function. ServerEnabled independently opts into the listener so persisted Midnight data can be served without running the indexer. Reflection and non-loopback plaintext exposure are separate, default-off decisions.

type Node ¶

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

func New ¶

func New(cfg Config) (*Node, error)

func (*Node) Restore ¶ added in v0.69.0

func (n *Node) Restore(
	ctx context.Context,
	snapshotDir string,
) (lifecycle.Manifest, error)

Restore replaces this running node's database with the snapshot at snapshotDir, quiescing and reinitializing every storage-dependent subsystem in-process (see this file's package comment for exactly what stays running and what gets rebuilt). The node is quiesced and its storage handles are closed first, because external providers cannot be reset while the node holds their connections. Restore then checks manifest compatibility, validates the complete archives and, for external providers, captures rollback copies before replacing either configured target. An incompatible snapshot is therefore rejected after the quiesce, not before it.

A bad snapshot is rejected with both original stores intact. A failure after a live external reset automatically restores the original metadata and blob pair before this method resumes the node. An incomplete automatic rollback, unconfirmed storage drain, unrecoverable local directory swap, or reinitialization failure brings the node down (n.cancel()) for a supervised restart.

func (*Node) Run ¶

func (n *Node) Run(ctx context.Context) (runErr error)

func (*Node) Snapshot ¶ added in v0.69.0

func (n *Node) Snapshot(
	ctx context.Context,
	destDir string,
	name string,
	description string,
) (lifecycle.Manifest, error)

Snapshot captures a point-in-time backup of this running node's own database into destDir, which must not already exist. Unlike Restore/Truncate, this does not quiesce anything — Database.PauseCommits (see database/lifecycle.Snapshot) is enough to keep the blob and metadata backups consistent while the node keeps forging/syncing/ serving normally. It takes snapshotMu, not liveLifecycleMu, both to serialize against a concurrent Restore/Truncate closing n.db out from under it (Restore/Truncate take snapshotMu too, alongside their own liveLifecycleMu) and to match the bark DatabaseService's "only one operation at a time" invariant — see snapshotMu's own doc comment (node.go) for why a long-running Snapshot must not also hold liveLifecycleMu: that would block background readers like the chainsync recycler tick, which only need liveLifecycleMu to know whether n.ledgerState/n.chainsyncState are mid-rebuild, for a Snapshot that never touches either field. name/description label the snapshot (pass "" for either to leave it unlabeled) — see lifecycle.SnapshotToCloud's doc comment for why labeling must happen before any cloud mirroring.

func (*Node) Stop ¶

func (n *Node) Stop() error

func (*Node) Truncate ¶ added in v0.69.0

func (n *Node) Truncate(
	ctx context.Context,
	target dblifecycle.TruncateTarget,
) (uint64, error)

Truncate reverts this running node's database to target, per database/lifecycle.Truncate, quiescing and reinitializing every storage-dependent subsystem in-process. See Restore's doc comment for the availability and failure-mode caveats, which apply identically here, with one difference: a failure that occurred entirely during read-only target validation — a bad/out-of-range target, a target before the Mithril trust boundary, or a cancellation landing before any delete began (lifecycle.ErrTruncateNotStarted) — is known to have touched nothing on disk, so the node resumes normally on it instead of being torn down. A failure during or after the actual bulk delete still brings the node down: DeleteBlocksAfter batches its deletes (see database/lifecycle/blob_bulk_delete.go) rather than wrapping the whole truncate in one transaction, so a truncate spanning more than one batch can leave a partially-truncated, inconsistent database if interrupted mid-delete — recovering from that safely is not implemented today. Returns the number of blocks removed.

type OffchainMetadataConfig ¶ added in v0.54.0

type OffchainMetadataConfig struct {
	HTTPClient            *http.Client
	Interval              time.Duration
	RequestTimeout        time.Duration
	UserAgent             string
	IPFSGatewayURL        string
	BatchSize             int
	MaxBytes              int64
	AllowPrivateAddresses bool
}

OffchainMetadataConfig controls API-mode off-chain metadata fetching. Zero values use the internal fetcher defaults.

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.

type TokenRegistryConfig ¶ added in v0.70.1

type TokenRegistryConfig struct {
	HTTPClient            *http.Client
	SourceURL             string
	UserAgent             string
	Interval              time.Duration
	RequestTimeout        time.Duration
	MaxBytes              int64
	MaxEntryBytes         int64
	Enabled               bool
	StoreLogos            bool
	AllowPrivateAddresses bool
}

TokenRegistryConfig controls the API-mode CIP-26 token registry sync, which populates the `metadata` field of GET /assets/{asset}. Zero values use the internal syncer defaults. Disabled unless Enabled is set: the mainnet registry is a roughly 240MB download.

Directories ¶

Path Synopsis
api
utxorpc
Package utxorpc implements Dingo's UTxO RPC server, serving the utxorpc.v1alpha and utxorpc.v1beta gRPC APIs defined by the UTxO RPC spec.
Package utxorpc implements Dingo's UTxO RPC server, serving the utxorpc.v1alpha and utxorpc.v1beta gRPC APIs defined by the UTxO RPC spec.
Package chain manages Dingo's blockchain state: the primary chain, any alternate (candidate) chains, fork detection, and rollback orchestration.
Package chain manages Dingo's blockchain state: the primary chain, any alternate (candidate) chains, fork detection, and rollback orchestration.
Package chainselection implements multi-peer chain selection.
Package chainselection implements multi-peer chain selection.
Package chainsync tracks the state of Dingo's block-synchronization sessions with connected peers.
Package chainsync tracks the state of Dingo's block-synchronization sessions with connected peers.
cmd
dingo command
koios-parity command
koios-parity validates Dingo's closed-epoch reward state against Koios reference data on preview and preprod networks.
koios-parity validates Dingo's closed-epoch reward state against Koios reference data on preview and preprod networks.
config
Package connmanager owns the lifecycle of network connections between Dingo and its peers and clients.
Package connmanager owns the lifecycle of network connections between Dingo and its peers and clients.
consensus
praos
Package praos contains pure Praos chain-selection primitives: the select view projected from a Shelley-family block header, VRF output extraction, and the equal-length tiebreaker comparison functions that mirror ouroboros-consensus' PraosTiebreakerView and preferCandidate logic.
Package praos contains pure Praos chain-selection primitives: the select view projected from a Shelley-family block header, VRF output extraction, and the equal-length tiebreaker comparison functions that mirror ouroboros-consensus' PraosTiebreakerView and preferCandidate logic.
Package database is Dingo's storage abstraction.
Package database is Dingo's storage abstraction.
dbinfo
Package dbinfo records, in a small JSON sidecar file beside a dingo data directory, which metadata plugin produced the database it belongs to.
Package dbinfo records, in a small JSON sidecar file beside a dingo data directory, which metadata plugin produced the database it belongs to.
lifecycle
Package lifecycle implements database snapshot, restore, and truncate operations shared by the offline CLI and (later) a live-node code path.
Package lifecycle implements database snapshot, restore, and truncate operations shared by the offline CLI and (later) a live-node code path.
nodesettings
Package nodesettings holds the policy for settings that are persisted on first start and enforced on every subsequent start.
Package nodesettings holds the policy for settings that are persisted on first start and enforced on every subsequent start.
plugin/blob/internal/blobbackup
Package blobbackup implements the shared backup/restore stream format used by cloud blob store plugins (s3, gcs) that have no native point-in-time snapshot primitive of their own -- a plain length-prefixed key/value stream produced by walking the store's existing Get/Set/NewIterator interface, distinct from badger's own native Backup/Load format.
Package blobbackup implements the shared backup/restore stream format used by cloud blob store plugins (s3, gcs) that have no native point-in-time snapshot primitive of their own -- a plain length-prefixed key/value stream produced by walking the store's existing Get/Set/NewIterator interface, distinct from badger's own native Backup/Load format.
plugin/blob/internal/compensate
Package compensate provides a disk-spooled compensation log for cloud blob transactions.
Package compensate provides a disk-spooled compensation log for cloud blob transactions.
plugin/metadata/deferred
Package deferred holds the bulk-load deferred-index manifest.
Package deferred holds the bulk-load deferred-index manifest.
plugin/metadata/internal/utxocond
Package utxocond builds fixed-shape "(tx_id = ? AND output_idx = ?)" OR-list conditions for the UTxO block-apply UPDATEs (consume, collateral, reference inputs) used by the shared metadata store.
Package utxocond builds fixed-shape "(tx_id = ? AND output_idx = ?)" OR-list conditions for the UTxO block-apply UPDATEs (consume, collateral, reference inputs) used by the shared metadata store.
plugin/metadata/sqlstore
Package sqlstore contains the shared database/sql metadata store.
Package sqlstore contains the shared database/sql metadata store.
plugin/metadata/sqlstore/migrations
Package migrations implements offline, forward-only metadata upgrades.
Package migrations implements offline, forward-only metadata upgrades.
Package event provides Dingo's EventBus: an in-process publish/ subscribe primitive that lets components communicate without holding references to each other.
Package event provides Dingo's EventBus: an in-process publish/ subscribe primitive that lets components communicate without holding references to each other.
internal
apiauth
Package apiauth is the single credential-verification implementation shared by every built-in API provider (Blockfrost, Mesh, UTxORPC).
Package apiauth is the single credential-verification implementation shared by every built-in API provider (Blockfrost, Mesh, UTxORPC).
apiconfig
Package apiconfig defines the TLS and authentication configuration surface shared by every built-in API provider (Blockfrost, Mesh, UTxORPC): a top-level `api.tls`/`api.auth` default policy that each provider's own `plugins.api.<name>.config.tls`/`config.auth` can override field by field.
Package apiconfig defines the TLS and authentication configuration surface shared by every built-in API provider (Blockfrost, Mesh, UTxORPC): a top-level `api.tls`/`api.auth` default policy that each provider's own `plugins.api.<name>.config.tls`/`config.auth` can override field by field.
apilistener
Package apilistener owns the start/stop protocol shared by Dingo's HTTP API servers (api/blockfrost, api/mesh, api/utxorpc).
Package apilistener owns the start/stop protocol shared by Dingo's HTTP API servers (api/blockfrost, api/mesh, api/utxorpc).
benchci
Package benchci implements CI benchmark regression detection for Dingo's weekly benchmark workflow (blinklabs-io/dingo#1895).
Package benchci implements CI benchmark regression detection for Dingo's weekly benchmark workflow (blinklabs-io/dingo#1895).
benchci/cmd/benchcheck command
Command benchcheck compares two `go test -bench` result files (produced by `make bench-ci`) via internal/benchci and writes a markdown regression report.
Command benchcheck compares two `go test -bench` result files (produced by `make bench-ci`) via internal/benchci and writes a markdown regression report.
chainsyncrecycler
Package chainsyncrecycler detects stalled chainsync clients and recycles truly stuck connections.
Package chainsyncrecycler detects stalled chainsync clients and recycles truly stuck connections.
dblifecycle
Package dblifecycle is the single entry point the CLI (and, in a later phase, a gRPC surface) calls to perform database snapshot, restore, and truncate operations, so both front ends run exactly the same code path.
Package dblifecycle is the single entry point the CLI (and, in a later phase, a gRPC surface) calls to perform database snapshot, restore, and truncate operations, so both front ends run exactly the same code path.
fsyncdir
Package fsyncdir syncs a directory's own entries (a new or renamed file appearing in it) to disk, so that change is durable across a crash, not just the changed file's own content -- a file's own fsync does not guarantee its directory entry is persisted.
Package fsyncdir syncs a directory's own entries (a new or renamed file appearing in it) to disk, so that change is durable across a crash, not just the changed file's own content -- a file's own fsync does not guarantee its directory entry is persisted.
plugins
Package plugins contains application-composition registration for all providers compiled into this binary.
Package plugins contains application-composition registration for all providers compiled into this binary.
settingsresolve
Package settingsresolve lets a data directory's already-persisted node settings supply the effective value for any override-eligible gate an operator left at its built-in default, before the rest of configuration resolution runs.
Package settingsresolve lets a data directory's already-persisted node settings supply the effective value for any override-eligible gate an operator left at its built-in default, before the rest of configuration resolution runs.
test/conformance
Package conformance provides a DingoStateManager that implements the ouroboros-mock conformance.StateManager interface using dingo's ledger state models.
Package conformance provides a DingoStateManager that implements the ouroboros-mock conformance.StateManager interface using dingo's ledger state models.
test/dbtest
Package dbtest composes storage providers for tests that need a real database without putting provider construction back into package database.
Package dbtest composes storage providers for tests that need a real database without putting provider construction back into package database.
test/devnet
Package devnet provides a test harness for running integration tests against a private Cardano DevNet consisting of Dingo and cardano-node instances connected via Docker Compose.
Package devnet provides a test harness for running integration tests against a private Cardano DevNet consisting of Dingo and cardano-node instances connected via Docker Compose.
test/fixtures
Package fixtures contains small, valid protocol fixtures for Dingo tests.
Package fixtures contains small, valid protocol fixtures for Dingo tests.
test/storagetest
Package storagetest is a shared conformance suite for blob.BlobStore and metadata.MetadataStore implementations.
Package storagetest is a shared conformance suite for blob.BlobStore and metadata.MetadataStore implementations.
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.
Package ledger owns Dingo's consensus-critical state: the UTxO set, protocol parameters, stake distribution, certificates, governance actions, epoch/nonce bookkeeping, and Plutus script execution.
Package ledger owns Dingo's consensus-critical state: the UTxO set, protocol parameters, stake distribution, certificates, governance actions, epoch/nonce bookkeeping, and Plutus script execution.
forging
Package forging contains types and utilities for block production.
Package forging contains types and utilities for block production.
hardfork
Package hardfork provides the HardFork Combinator primitives used by the ledger to reason about multi-era chain time, epoch, and slot conversions.
Package hardfork provides the HardFork Combinator primitives used by the ledger to reason about multi-era chain time, epoch, and slot conversions.
leader
Package leader provides Ouroboros Praos leader election functionality for block production.
Package leader provides Ouroboros Praos leader election functionality for block production.
leios
Package leios implements the CIP-0164 stake-truncated voting committee, stake-quorum vote tallying, and endorser-block certificate construction and validation.
Package leios implements the CIP-0164 stake-truncated voting committee, stake-quorum vote tallying, and endorser-block certificate construction and validation.
rewards
Package rewards implements the Shelley stake-pool reward calculation.
Package rewards implements the Shelley stake-pool reward calculation.
snapshot
Package snapshot provides stake snapshot management for Ouroboros Praos leader election.
Package snapshot provides stake snapshot management for Ouroboros Praos leader election.
Package mempool implements Dingo's transaction pool.
Package mempool implements Dingo's transaction pool.
indexer
Package indexer subscribes to ledger block events and indexes Midnight-relevant transactions (cNIGHT creates/spends, mapping-validator registrations/deregistrations, Technical Committee / Council governance datums, Ariadne permissioned-candidate parameters, and committee-candidate UTxO snapshots) into the database.
Package indexer subscribes to ledger block events and indexes Midnight-relevant transactions (cNIGHT creates/spends, mapping-validator registrations/deregistrations, Technical Committee / Council governance datums, Ariadne permissioned-candidate parameters, and committee-candidate UTxO snapshots) into the database.
server
Package server runs the MidnightState gRPC service.
Package server runs the MidnightState gRPC service.
Package ouroboros hosts Dingo's handlers for the Ouroboros mini- protocols: chainsync, blockfetch, txsubmission, keepalive, peer-sharing, handshake, and the Leios prototype protocols (LeiosFetch, LeiosNotify) when enabled.
Package ouroboros hosts Dingo's handlers for the Ouroboros mini- protocols: chainsync, blockfetch, txsubmission, keepalive, peer-sharing, handshake, and the Leios prototype protocols (LeiosFetch, LeiosNotify) when enabled.
Package peergov implements Dingo's peer governance: it decides who the node connects to, how many peers to maintain in each tier, and when to churn inactive peers out of the active set.
Package peergov implements Dingo's peer governance: it decides who the node connects to, how many peers to maintain in each tier, and when to churn inactive peers out of the active set.
Package plugin provides the instance-owned host for compiled-in Dingo plugins.
Package plugin provides the instance-owned host for compiled-in Dingo plugins.

Jump to

Keyboard shortcuts

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