This document provides a high-level overview of the Akash Network Node repository, which contains the reference implementation of the Akash Protocol—a decentralized cloud computing marketplace. The repository includes a Cosmos SDK-based blockchain node (akash binary) that implements both the consensus layer and the marketplace exchange where tenants (users needing compute resources) can lease workloads from providers (suppliers with compute capacity).
This overview covers the system architecture, core components, and how they interact. For detailed information about specific subsystems:
Sources: README.md1-54 app/app.go77-102
The Akash Network Node is structured as a multi-layered system built on the Cosmos SDK framework. The architecture consists of:
Architecture: AkashApp and Module Structure
The AkashApp struct in app/app.go92-102 extends baseapp.BaseApp and contains the AppKeepers structure that holds all module keepers. Modules are organized through the module.Manager which orchestrates initialization, block processing, and genesis operations.
Sources: app/app.go92-102 app/types/app.go88-136 app/config.go29-72
Technology Stack Overview
The codebase is written in Go and leverages the Cosmos SDK framework for blockchain functionality. CometBFT (formerly Tendermint) provides Byzantine Fault Tolerant consensus. The build system uses Make for local development and GoReleaser for multi-platform releases.
Sources: README.md55-94 app/app.go3-75 app/types/app.go3-80
The central component is the AkashApp struct, which implements the Cosmos SDK Application interface:
Application Initialization Flow
The NewApp() function in app/app.go105-262 orchestrates the complete application setup:
module.Manager which controls execution orderSources: app/app.go105-262 app/types/app.go200-476
The application is composed of two module categories:
| Module Category | Purpose | Key Modules | Store Keys |
|---|---|---|---|
| Cosmos SDK Modules | Standard blockchain functionality | auth, bank, staking, gov, distribution, slashing, evidence, IBC | Defined in Cosmos SDK |
| Akash Modules | Marketplace functionality | escrow, deployment, market, provider, audit, cert, take | app/types/app.go532-542 |
Module Interaction Pattern
The Akash modules implement a marketplace workflow:
x/deployment): Manages workload definitions and deployment lifecyclex/market): Handles orders, bids, and lease creationx/provider): Maintains provider registry and attributesx/escrow): Manages financial accounts and payment settlementx/take): Handles fee distributionSources: app/types/app.go88-121 app/types/app.go409-452 app/app_configure.go36-46
The application processes blocks through a defined sequence of hooks:
Block Processing Order
The module execution order is critical for correct state transitions:
Sources: app/app.go190-399 app/app_configure.go48-82
The codebase follows standard Go and Cosmos SDK conventions:
akash-network/node/
├── app/ # Application initialization and configuration
│ ├── app.go # AkashApp struct and NewApp()
│ ├── types/ # AppKeepers and shared types
│ └── sim_test.go # Simulation tests
├── x/ # Akash-specific modules
│ ├── audit/ # Provider auditing
│ ├── cert/ # Certificate management
│ ├── deployment/ # Deployment definitions
│ ├── escrow/ # Payment escrow
│ ├── market/ # Order/bid/lease marketplace
│ ├── provider/ # Provider registry
│ └── take/ # Fee management
├── cmd/ # Binary entry points
├── client/ # Client libraries and CLI
├── testutil/ # Testing utilities
├── upgrades/ # Network upgrade handlers
├── Makefile # Build system
├── .goreleaser.yaml # Release configuration
└── go.mod # Dependency management
Key Directories
app/: Contains the AkashApp implementation and keeper initialization app/app.go1-534x/: Custom Cosmos SDK modules implementing marketplace logiccmd/: Command-line interface entry pointupgrades/: Version-specific upgrade handlers for network upgradesSources: README.md88-111 app/app.go1-10 app/types/app.go1-586
Deployment Model
The Akash Network operates as a public blockchain with multiple node types:
All nodes run the akash binary produced by the build system. The main chain is akashnet-2 (mainnet).
Sources: README.md26-48 README.md55-64
The application defines special module accounts with specific permissions:
| Module Account | Permissions | Purpose |
|---|---|---|
fee_collector | None | Collects transaction fees |
escrow | None | Holds deployment escrow funds |
distribution | None | Distributes staking rewards |
mint | Minter | Creates new tokens for inflation |
bonded_pool | Burner, Staking | Holds bonded stake |
not_bonded_pool | Burner, Staking | Holds unbonding stake |
gov | Burner | Governance proposal deposits |
transfer | Minter, Burner | IBC token transfers |
Module Account Configuration
Module accounts are defined in app/mac.go13-33 and initialized during keeper setup. The escrow module account is specific to Akash and holds tenant deployment funds.
Sources: app/mac.go1-34 app/types/app.go415-422
The GenesisState type aggregates all module genesis states:
Genesis Operations
The genesis initialization order is defined in app/app_configure.go54-82 to ensure proper dependency resolution.
Sources: app/app.go346-357 app/export.go1-348 app/app_configure.go48-82
The Akash network uses the akash prefix for addresses:
Account Address: akash1...
Validator Address: akashvaloper1...
Consensus Address: akashvalcons1...
Defined in app/types/app.go82-84 as AccountAddressPrefix = "akash".
Each module registers store keys for state persistence:
Sources: app/types/app.go82-84 app/types/app.go508-552
The repository includes comprehensive testing infrastructure:
| Test Type | Purpose | File Reference |
|---|---|---|
| Unit Tests | Module-level functionality | Throughout x/*/ |
| Integration Tests | Cross-module interactions | testutil/ |
| Simulation Tests | Randomized state transitions | app/sim_test.go1-524 |
| Import/Export | State consistency validation | app/sim_test.go143-383 |
| Determinism | Consensus reproducibility | app/sim_test.go458-523 |
The simulation framework exercises the entire state machine with random operations to verify correctness and determinism—critical for blockchain consensus.
Sources: app/sim_test.go1-524 README.md88-111
The Akash Network Node repository implements a complete decentralized cloud computing marketplace as a Cosmos SDK blockchain. The AkashApp extends the base Cosmos SDK application with seven custom modules that orchestrate the deployment marketplace: tenants create deployments, providers bid on orders, and the escrow system manages payments. The codebase follows Cosmos SDK conventions with clear separation between standard blockchain functionality and marketplace-specific logic.
For deeper understanding of specific subsystems, refer to the subsequent wiki pages covering build system (#2), development environment (#3), core application details (#4), and individual modules (#6).
Sources: README.md1-111 app/app.go1-534 app/types/app.go1-586
Refresh this wiki
This wiki was recently refreshed. Please wait 4 days to refresh again.