Skip to main content

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:

GoalStart here
Protocol primitives: CBOR encoding, mini-protocols, ledger typesPallas
Full Rust Cardano node: consensus, ledger, networkingAmaru
Chain data access and indexing at the node levelDolos
Event streaming pipelines from the chainOura
Off-chain transaction building in RustWhisky

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:

  1. Clone the repo and run cargo build: it just works
  2. Read the pallas-primitives crate: this is the Cardano data model in Rust (blocks, transactions, UTxOs)
  3. Read the pallas-network crate: the mini-protocol implementation
  4. Find a good first issue in the codec, network, or traverse modules
  5. 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.

  1. Read the Cardano Blueprint: essential before reading Amaru's code
  2. Read the Amaru repository: understand how it decomposes the node into ledger, consensus, and network stages
  3. 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)
  4. Get Pallas familiarity first: Amaru builds on Pallas types extensively
  5. Find a good first issue: ledger rule implementations and test coverage are the most accessible areas
  6. 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:

DocumentWhat it specifies
Shelley Ledger Formal SpecThe foundational ledger rules using small-step semantics (STS)
Conway Ledger SpecCIP-1694 governance, DRep ratification, committee logic
Ouroboros papersThe 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:

RepositoryMaintained byWhat it doesIssues
AmaruPragmaFull Rust Cardano node: consensus, ledger, networkingGood first issues
PallasTxPipeProtocol primitives: CBOR, mini-protocols, ledger typesGood first issues
DolosTxPipeLightweight data node built on PallasIssues
Oura [MR]TxPipeEvent streaming pipeline from the chainIssues
Whisky [MR]Sidan LabOff-chain transaction building in RustIssues

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.