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 smart contract execution
- Client connectivity for wallets and applications
- Pluggable storage backends (Badger, SQLite, PostgreSQL, GCS, S3)
- Peer governance with dynamic peer selection and topology support
- Chain rollback support for handling forks with automatic state restoration
Note: On Windows systems, named pipes are used instead of Unix sockets for node-to-client communication.
Dingo supports configuration via both a YAML config file (dingo.yaml) and uses environment
variables to modify its own behavior.
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:
This behavior can be changed via the following environment variables:
CARDANO_BIND_ADDR- IP address to bind for listening (default:
0.0.0.0)
- IP address to bind for listening (default:
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
- Full path to the Cardano node configuration (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
- A directory which contains the ledger database files (default:
CARDANO_INTERSECT_TIP- Ignore prior chain history and start from current position (default:
false) - This is experimental and will likely break... use with caution
- Ignore prior chain history and start from current position (default:
CARDANO_METRICS_PORT- TCP port to bind for listening for Prometheus metrics (default:
12798)
- TCP port to bind for listening for Prometheus metrics (default:
CARDANO_NETWORK- Named Cardano network (default:
preview)
- Named Cardano network (default:
CARDANO_PRIVATE_BIND_ADDR- IP address to bind for listening for Ouroboros NtC (default:
127.0.0.1)
- IP address to bind for listening for Ouroboros NtC (default:
CARDANO_PRIVATE_PORT- TCP port to bind for listening for Ouroboros NtC (default:
3002)
- TCP port to bind for listening for Ouroboros NtC (default:
CARDANO_RELAY_PORT- TCP port to bind for listening for Ouroboros NtN (default:
3001)
- TCP port to bind for listening for Ouroboros NtN (default:
CARDANO_SOCKET_PATH- UNIX socket path for listening (default:
dingo.socket) - This socket speaks Ouroboros NtC and is used by client software
- UNIX socket path for listening (default:
CARDANO_TOPOLOGY- Full path to the Cardano node topology (default: "")
CARDANO_UTXORPC_PORT- TCP port to bind for listening for UTxO RPC (default:
9090)
- TCP port to bind for listening for UTxO RPC (default:
TLS_CERT_FILE_PATH- SSL certificate to use, requiresTLS_KEY_FILE_PATH(default: empty)TLS_KEY_FILE_PATH- SSL certificate key to use (default: empty)
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.
Blob Storage Plugins:
badger- BadgerDB local key-value store (default)gcs- Google Cloud Storage blob stores3- AWS S3 blob store
Metadata Storage Plugins:
sqlite- SQLite relational database (default)postgres- PostgreSQL relational database
Plugins can be selected via command-line flags, environment variables, or configuration file:
# Command line
./dingo --blob gcs --metadata sqlite
# Environment variables
DINGO_DATABASE_BLOB_PLUGIN=gcs
DINGO_DATABASE_METADATA_PLUGIN=sqlite
# Configuration file (dingo.yaml)
database:
blob:
plugin: "gcs"
metadata:
plugin: "sqlite"Each plugin supports specific configuration options. See dingo.yaml.example for detailed configuration examples.
BadgerDB Options:
data-dir- Directory for database filesblock-cache-size- Block cache size in bytesindex-cache-size- Index cache size in bytesgc- Enable garbage collection
Google Cloud Storage Options:
bucket- GCS bucket nameproject-id- Google Cloud project IDprefix- Path prefix within bucket
AWS S3 Options:
bucket- S3 bucket nameregion- AWS regionprefix- Path prefix within bucketaccess-key-id- AWS access key ID (optional - uses default credential chain if not provided)secret-access-key- AWS secret access key (optional - uses default credential chain if not provided)
SQLite Options:
data-dir- Path to SQLite database file
PostgreSQL Options:
host- PostgreSQL server hostnameport- PostgreSQL server portusername- Database userpassword- Database passworddatabase- Database name
You can see all available plugins and their descriptions:
./dingo listFor information on developing custom storage plugins, see PLUGIN_DEVELOPMENT.md.
Running on mainnet (:sweat_smile:):
CARDANO_NETWORK=mainnet CARDANO_CONFIG=path/to/cardano/configs/mainnet/config.json ./dingoNote: you can find cardano configuration files at https://github.com/blinklabs-io/docker-cardano-configs/tree/main/config
Dingo will drop a dingo.socket file which can be used by other clients, such
as cardano-cli or software like adder or kupo. This has only had limited
testing, so success/failure reports are very welcome and encouraged!
- 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
- Inbound connections
- Node-to-node
- Ledger
- Blocks
- Block storage
- Chain selection (density comparison, VRF tie-breaker, ChainForkEvent)
- UTxO tracking
- Protocol parameters
- Genesis validation
- Certificates
- Pool registration
- Stake registration/delegation
- Account registration checks
- Governance
- Transaction validation
- Phase 1 validation
- UTxO rules
- Witnesses
- Block body
- Certificates
- Delegation/pools
- Governance
- Phase 2 validation
- Smart contracts
- Phase 1 validation
- Blocks
- Mempool
- Accept transactions from local clients
- Distribute transactions to other nodes
- Validation of transaction on add
- Consumer tracking
- Transaction purging on chain update
- Database Recovery
- Chain rollback support (SQLite and PostgreSQL plugins)
- State restoration on rollback
- WAL mode for crash recovery
- Automatic rollback on transaction error
- Plutus Validation
- Plutus V3 smart contract validation
- Plutus V1/V2 smart contract validation
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.
This requires Go 1.23 or better is installed. You also need make.
# Build
make
# Run
./dingoYou can also run the code without building a binary, first
go run ./cmd/dingo/
