Skip to content

Architecture Overview

This page describes Ashen’s testnet architecture. For component details, see:

┌─────────────────────────────────────────────────────────┐
│ TESTNET ARCHITECTURE │
└─────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────┐
│ CONSENSUS LAYER │
│ │
│ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Validator 0 │ │ Validator 1 │ │ Validator 2 │ │
│ │ (PRUNING) │ │ (PRUNING) │ │ [ARCHIVE] │ │
│ │ │ │ │ │ │ │
│ │ P2P: :4040 │◄──►│ P2P: :4041 │◄──►│ P2P: :4042 │ │
│ │ Metrics: :3031 │ │ Metrics: :3032 │ │ Metrics: :3033 │ │
│ │ │ │ │ │ │ │
│ │ ┌───────────┐ │ │ ┌───────────┐ │ │ ┌───────────┐ │ │
│ │ │ 3 epochs │ │ │ │ 3 epochs │ │ │ │ FULL │ │ │
│ │ │ of state │ │ │ │ of state │ │ │ │ HISTORY │ │ │
│ │ └───────────┘ │ │ └───────────┘ │ │ └───────────┘ │ │
│ └────────┬────────┘ └────────┬────────┘ └────────┬────────┘ │
│ │ │ │ │
│ └──────────────────────┼──────────────────────┘ │
│ │ │
│ BLS Threshold Signing │
│ DKG Key Refresh │
│ Simplex Consensus │
└───────────────────────────────────┼───────────────────────────────────────────────────┘
│ shares data dir
┌───────────────────────────────────────────────────────────────────────────────────────┐
│ RPC LAYER │
│ │
│ ┌─────────────────────┐ │
│ │ RPC Server │ │
│ │ :3030 │ │
│ │ │ │
│ │ • Full /v2/rpc │ │
│ │ • Historical queries│ │
│ │ • tx_submit │ │
│ │ • WebSocket subs │ │
│ └──────────┬──────────┘ │
│ │ │
└───────────────────────────────────────┼────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────────────────────────────┐
│ CLIENTS │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ ashen │ │ dApps │ │ Explorer │ │ Wallets │ │
│ │ CLI │ │ │ │ │ │ │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
│ │
└────────────────────────────────────────────────────────────────────────────────────────┘
Transactions: Client ──► RPC ──► Mempool ──► Leader Validator ──► Block
Blocks: Leader ──► P2P Broadcast ──► All Validators ──► Finality Proof
Queries: Client ──► RPC ──► Archive Validator State ──► Response

Pruning Validators (0, 1):

  • Directorytestnet-local/
    • Directorynode-X/
      • genesis.json
      • Directoryblocks/ pruned
      • Directorystate/ 3 epochs only
      • Directoryconsensus/

Archive Validator (2):

  • Directorytestnet-local/
    • Directorynode-2/
      • genesis.json
      • Directoryblocks/ full history
      • Directorystate/ full history
      • Directoryconsensus/
RoleModeStorageRPCConsensus
Pruning Validator--validator --prune-keep-epochs NLimitedMetrics onlyYes
Archive Validator--validator --archive-modeFullMetrics onlyYes
RPC Servernode rpcSharedFullNo
Follower (planned)--followerConfigurableFullNo
  1. Generate keys and peers.yaml (first time only)

    Terminal window
    just testnet-local-generate
  2. Run testnet - 2 pruning + 1 archive validator + RPC

    Terminal window
    just testnet-local-run
  3. Custom configuration (optional)

    Terminal window
    just testnet-local-run N_VALIDATORS=5 PRUNE_KEEP_EPOCHS=5
ServicePort
RPC Server3030
Validator 0 Metrics3031
Validator 1 Metrics3032
Validator 2 Metrics3033
Validator 0 P2P4040
Validator 1 P2P4041
Validator 2 P2P4042