Quickstart
Get a local environment running with Docker in a few commands.
Architecture overview
Understand the hierarchical DAG consensus model and module layout.
What is Tessellation?
Tessellation is the node software powering the Constellation Network — a public DAG-based blockchain that supports parallel metagraph execution. Each metagraph runs its own L1 consensus, producing blocks that flow upward through Currency L0 and into the Global L0 for final global state commitment.Hierarchical architecture
The network is organized into three layers:| Layer | Module | Role |
|---|---|---|
| Layer 1 — Metagraph | dag-l1, currency-l1 | Block creation and per-metagraph consensus |
| Currency Layer 0 | currency-l0 | Aggregates L1 blocks into currency snapshots |
| Global Layer 0 | dag-l0 | Aggregates all currency snapshots into global snapshots |
Key modules
shared
Core data structures (
Transaction, Block, GlobalSnapshot, GlobalIncrementalSnapshot), cryptography, Kryo and JSON serialization, and Merkle Patricia Trie state proofs.node-shared
P2P networking, multi-phase consensus FSM, anti-entropy gossip protocol, cluster management, and peer authentication middleware.
dag-l0
Global Layer 0 validator. Aggregates all metagraph state channels, distributes rewards (classic and delegated), and manages trust scoring via EigenTrust, DATT, and Self-Avoiding Walk.
dag-l1
Layer 1 validator for metagraph block creation. Runs a block consensus round every 5 seconds when transactions are available and forwards accepted blocks to L0.
currency-l0 / currency-l1
Currency-specific metagraph logic extending
dag-l0 and dag-l1 with extension points for custom rewards, transaction validators, and data application hooks.sdk
Stable API facade for external metagraph developers. Add as a
provided-scope dependency to access all Tessellation functionality without bundling internals.kernel
Category theory abstractions using Droste recursion schemes. Provides the
Cell hylomorphism container used by dag-l0’s event processing pipeline.keytool / wallet
CLI tools for key management (PKCS12 keystores), wallet operations, transaction signing, delegated staking, and token locks.
Tech stack
| Library | Version | Purpose |
|---|---|---|
| Scala | 2.13.18 | Primary language |
| Java | 21 | Runtime — enforced at build time |
| Cats Effect | 3 | Async IO and resource lifecycle |
| FS2 | — | Streaming with backpressure |
| HTTP4s (Ember) | — | HTTP server and client |
| Circe | — | JSON serialization with Brotli compression |
| BouncyCastle | — | ECDSA cryptography |
| Weaver | — | Testing framework (Cats Effect–based) |
| Refined types | — | Compile-time validation (PosLong, NonNegLong) |
Java 21 is enforced at build time via an
initialize assertion in build.sbt. Running SBT with any other Java version will immediately fail with a descriptive error.Key design patterns
Tessellation uses a consistent set of functional programming patterns across all modules:- Tagless final — effect type
F[_]throughout, withIOat the application boundary - Resource-based lifecycle —
Resource[IO, A]for all services and storages - Refined types —
PosLong,NonNegLong, and other refined wrappers for compile-time guarantees - Newtype wrappers — zero-cost type safety for domain concepts
- Monocle optics — immutable data transformation via lenses
- Droste recursion schemes — hylomorphisms in the L0 event processing pipeline
- Kleisli composition — handler chains in the gossip and HTTP layers
Naming conventions
All modules follow consistent naming so you can navigate the codebase predictably:| Suffix | Role |
|---|---|
*Storage | Data access layer |
*Service | Business logic |
*Client | HTTP client |
*Routes | HTTP endpoints |
*Daemon | Background processes |
*Program | High-level orchestration |
