Rust Core Contributor
This guide covers contributing to Cardano's core protocol in Rust: through Amaru (a full node implementation), Pallas (protocol primitives), Dolos (data node), and related projects.
Before reading further, make sure you have read the Cardano Blueprint. The same protocol the Haskell node implements is what you are implementing in Rust: the Blueprint explains it without assuming any particular language or codebase.
Choose Your Focus
The key decision is which layer of the stack you want to work on:
| Goal | Start here |
|---|---|
| Protocol primitives: CBOR encoding, mini-protocols, ledger types | Pallas |
| Full Rust Cardano node: consensus, ledger, networking | Amaru |
| Chain data access and indexing at the node level | Dolos |
| Event streaming pipelines from the chain | Oura |
| Off-chain transaction building in Rust | Whisky |
How these projects relate:
Pallas (protocol primitives: CBOR, mini-protocols, ledger types)
├── Dolos (data node built on Pallas)
├── Amaru (full node: uses Pallas primitives)
└── Oura (event pipeline built on Pallas)
Start with Pallas if you are new to the Cardano protocol. Its primitives are the shared foundation: once you understand CBOR encoding, the UTxO model in Rust types, and the mini-protocol framing, contributing to Amaru or Dolos becomes significantly easier.
Environment Setup
The Rust path has a much simpler setup than the Haskell path: no Nix required for most projects.
# Install the Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Clone and build Pallas (the starting point)
git clone https://github.com/txpipe/pallas
cd pallas
cargo build
Amaru may require additional system dependencies for its storage backends: check the repo's README for current setup instructions.
Progression: Starting with Pallas
Pallas is the most accessible entry point. Its crates are well-documented and independently useful:
- Clone the repo and run
cargo build: it just works - Read the
pallas-primitivescrate: this is the Cardano data model in Rust (blocks, transactions, UTxOs) - Read the
pallas-networkcrate: the mini-protocol implementation - Find a good first issue in the codec, network, or traverse modules
- Open a PR: review cycles are typically days, not weeks
Progression: Contributing to Amaru
Amaru is a full, from-scratch Rust implementation of a Cardano node: consensus, ledger rules, and networking. It implements the same formal specifications as the Haskell node, making it both a conformance testing target and a core protocol contribution.
- Read the Cardano Blueprint: essential before reading Amaru's code
- Read the Amaru repository: understand how it decomposes the node into ledger, consensus, and network stages
- Read the relevant formal spec for the area you want to contribute to: ledger rules: Shelley/Conway spec; consensus: Ouroboros Praos paper (same ground truth as the Haskell path)
- Get Pallas familiarity first: Amaru builds on Pallas types extensively
- Find a good first issue: ledger rule implementations and test coverage are the most accessible areas
- Conformance testing between Amaru and the Haskell node is high-value work that requires understanding the specs but not Haskell fluency: this is a strong first contribution area
Amaru implements the same formal specifications as the Haskell node. Any work on Amaru's ledger or consensus logic requires reading the same specs as the Haskell path: the Rust path does not skip that step.
The Formal Specifications
These apply to the Rust path just as much as Haskell:
| Document | What it specifies |
|---|---|
| Shelley Ledger Formal Spec | The foundational ledger rules using small-step semantics (STS) |
| Conway Ledger Spec | CIP-1694 governance, DRep ratification, committee logic |
| Ouroboros papers | The family of consensus protocol proofs (Classic, BFT, Praos, Genesis) |
Intersect-Funded Rust Projects
Several Rust projects are officially funded under Intersect's POSM Maintainer Retainer programme:
| Repository | Maintained by | What it does | Issues |
|---|---|---|---|
| Amaru | Pragma | Full Rust Cardano node: consensus, ledger, networking | Good first issues |
| Pallas | TxPipe | Protocol primitives: CBOR, mini-protocols, ledger types | Good first issues |
| Dolos | TxPipe | Lightweight data node built on Pallas | Issues |
| Oura [MR] | TxPipe | Event streaming pipeline from the chain | Issues |
| Whisky [MR] | Sidan Lab | Off-chain transaction building in Rust | Issues |
For a searchable directory of Rust tools in the Cardano ecosystem (Dolos, Oura, Pallas, Whisky and others), see the Cardano Builder Tools directory.
Back to Core Protocol Contributor: or see Haskell or Go.