A Substrate-based blockchain that handles node registration, smart contract management, billing, and consensus for decentralized infrastructure operations. It records the canonical state of nodes, deployments, and token transactions across the network.
Ledger Chain is a purpose-built blockchain that serves as the coordination and settlement layer for a decentralized grid of compute, storage, and network resources. It maintains registries of nodes, farms, and twins; manages smart contracts between users and node operators; handles billing based on resource consumption; and provides a governance mechanism for network evolution. The chain also supports cross-chain transfers with Bitcoin, Binance Smart Chain, and Stellar.
- Substrate node — The core blockchain node implementation based on
substrate-node-templatenode— Application for participating in the blockchain networkruntime— Runtime crate specifying pallets and their configurationpallets— Custom runtime modules (DAO, KV store, smart contract, grid registry, TFT bridge, TFT price oracle, validator management, burning)support— Shared types and configuration used across the runtime, pallets, and nodetests— Integration testschainspecs— Genesis specifications for dev, QA, test, and main networkscharts— Kubernetes deployment charts
- Bridge — Background service for cross-chain transfers between Ledger Chain TFT and Stellar TFT
- Clients — Language-specific libraries for interacting with Ledger Chain
tfchain-client-js— JavaScript clienttfchain-client-rs— Rust client (in progress)tfchain-client-go— Go client
- Activation service — Account activation service for new users
- Tools — Development and testing utilities, including a fork-off-substrate tool for runtime migration testing
- Scripts — JavaScript utilities for event subscription and chain interaction
- Documentation — Development, production, and architecture documentation
Ledger Chain is the ledger and coordination layer of the infrastructure stack. It is the source of truth for:
- Node registry — Which nodes exist, their capabilities, and their operational status
- Farm registry — Collections of nodes operated by independent providers
- Smart contracts — Agreements between users and nodes for resource allocation
- Billing — Periodic billing based on actual resource consumption
- Governance — On-chain proposals and voting for protocol changes
Nodes run ZOS / Zero-OS and report their state to the chain. Users interact with the chain to create contracts, and the chain ensures that node operators are compensated for the resources they provide.
ZOS, also known as Zero-OS, is the operating system layer used to run and manage nodes. It provides the low-level runtime environment for workloads, networking, storage, and automation. Nodes running ZOS register themselves on Ledger Chain and receive deployment instructions through the chain.
This technology is used within the ThreeFold ecosystem and was first deployed on the ThreeFold Grid. The component itself is designed as reusable infrastructure technology and should be understood by its technical function first, independent of any specific deployment.
This repository is owned and maintained by TF-Tech NV, a Belgian company responsible for the development and maintenance of this technology.
The Ledger Chain runtime is built using FRAME and consists of pallets from Substrate and custom pallets in pallets/.
- System — Core functionality all other pallets depend on
- Utility — Derivative accounts and batched calls
- Balances — TFT token balance tracking
- Timestamp — On-chain notion of time
- Transaction Payment — Pre-dispatch transaction fee computation
- Scheduler — Dispatch scheduling at specified block numbers or periods
- Session — Session key management and rotation
- Aura — Aura consensus with offline reporting
- Grandpa — GRANDPA finality authority set management
- Authorship — Block author tracking
- Collective — Collective dispatch from member sets
- Membership — Membership control for account ID sets
- pallet-dao — On-chain governance by stakeholders
- pallet-kvstore — Key-value data storage for network participants
- pallet-runtime-upgrade — Configurable-origin wrapper for
set_codeextrinsics - pallet-smart-contract — Creation, billing, and deletion of smart contracts
- pallet-tfgrid — Registry for nodes, farms, and twins
- pallet-tft-bridge — Bridging between Ledger Chain TFT and Stellar TFT
- pallet-tft-price — TFT price oracle
- substrate-validator-set — Authority addition and removal
- pallet-validator — Validator management (deprecated)
- pallet-burning — TFT burning (deprecated)
See docs for more information on how to work with Ledger Chain.
See bridge for more information on the bridge between Ledger Chain TFT and Stellar TFT.
See scripts for more information on how to use the scripts.
-
Development network
- Polkadot UI: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/tfchain.dev.grid.tf#/explorer
- WebSocket:
wss://tfchain.dev.grid.tf
-
QA testing network
- Polkadot UI: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/tfchain.qa.grid.tf#/explorer
- WebSocket:
wss://tfchain.qa.grid.tf
-
Test network
- Polkadot UI: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/tfchain.test.grid.tf#/explorer
- WebSocket:
wss://tfchain.test.grid.tf
-
Production network
- Polkadot UI: https://polkadot.js.org/apps/?rpc=wss%3A%2F%2F/tfchain.grid.tf#/explorer
- WebSocket:
wss://tfchain.grid.tf
This repository uses conventional commits.
See releases for more information on how to create or validate a release.
This project is licensed under the Apache License 2.0 — see the LICENSE file for details. Copyright (c) TFTech NV.