How addaddition/addition works
ADDITION is a C++20 Layer 1 blockchain node, with wallet clients and optional token, privacy, contract, and proof-of-useful-work features. The main operator workflow configures and starts the daemon, which loads chain state and exposes RPC; wallet clients issue commands through RPC to query balances or send transactions. The graph also preserves documented consensus, mining, networking, and product branches. Edges are limited to relationships visible in excerpts or explicitly described in the README; several unsampled subsystems are shown without speculative wiring.
Main entry points: additiond_main.cpp Daemon startup · contract_engine.cpp Contract engine · chain.cpp Chain and blocks · WalletRPCClient.swift Wallet RPC client
Components 23
Node and consensus
- Daemon startup
apps/additiond_main.cpp - Network config
src/config.cpp - Chain and blocks
src/chain.cpp - Block model
src/block.cpp - Peer consensus
src/consensus_engine.cpp - Transaction pool
src/mempool.cpp - Mining
src/miner.cpp - Peer networking
src/p2p.cpp - Persistent state
src/state_store.cpp
RPC and wallets
- Node RPC
src/rpc_server.cpp - Network RPC
src/rpc_network_server.cpp - Wallet engine
src/wallet.cpp - Wallet keys
src/wallet_keys.cpp - iOS wallet session
ios/AdditionWallet/AdditionWallet/WalletSession.swift - Wallet RPC client
ios/AdditionWallet/AdditionWallet/Client/WalletRPCClient.swift - Text RPC transport
ios/AdditionWallet/AdditionWallet/Client/TextRPCClient.swift
Ledger features
- Tokens and NFTs
src/token_engine.cpp - Contract engine
src/contract_engine.cpp - Privacy pool
src/privacy.cpp - Cryptography
src/crypto.cpp
Useful work
- PoUW compute
src/pouw_compute.cpp - PoUW storage
src/pouw_storage.cpp
Other components
- Node operator
Connections 16
- Node operator → Daemon startup: starts
README.md - Daemon startup → Network config: configures
apps/additiond_main.cpp - Daemon startup → Chain and blocks: initializes
apps/additiond_main.cpp - Daemon startup → Transaction pool: initializes
apps/additiond_main.cpp - Daemon startup → Mining: initializes
apps/additiond_main.cpp - Daemon startup → Peer consensus: initializes
apps/additiond_main.cpp - Daemon startup → Persistent state: loads and saves
apps/additiond_main.cpp - Daemon startup → Node RPC: starts local
apps/additiond_main.cpp - Daemon startup → Network RPC: starts optional
apps/additiond_main.cpp - Daemon startup → Peer networking: initializes
apps/additiond_main.cpp - Chain and blocks → Block model: uses
- iOS wallet session → Wallet RPC client: calls
ios/AdditionWallet/AdditionWallet/WalletSession.swift - Wallet RPC client → Text RPC transport: calls
ios/AdditionWallet/AdditionWallet/Client/WalletRPCClient.swift - Contract engine → Tokens and NFTs: queries
src/contract_engine.cpp - Contract engine → Privacy pool: calls
src/contract_engine.cpp - PoUW storage → Cryptography: hashes challenges
src/pouw_storage.cpp