How litecoin-project/litecoin works
Litecoin Core is full-node software for operating a peer-to-peer digital currency, with wallet and command-line/RPC interfaces as user entry points. The principal workflow is creating or submitting a transaction, validating it against consensus rules, and propagating it through the network; nodes also maintain chain state, support mining, and expose wallet and chain data. The tree documents an additional Mimblewimble Extension Block (MWEB) implementation. Most runtime files were not sampled, so uncertain connections are dashed and have no evidence path.
Main entry points: validation.cpp Block Processing · txmempool.cpp Transaction Pool · server.cpp RPC Service · miner.cpp Block Mining
Components 26
User Interfaces
- Wallet
src/wallet - RPC Service
src/rpc/server.cpp - CLI Client
src/bitcoin-cli.cpp - Desktop GUI
src/qt/bitcoingui.cpp
Node Operations
- Node Startup
src/init.cpp - P2P Network
src/net_processing.cpp - Transaction Pool
src/txmempool.cpp - Transaction Policy
src/policy/policy.cpp - Block Mining
src/miner.cpp
Chain and Storage
- Consensus Validation
src/consensus/tx_verify.cpp - Chain State
src/coins.cpp - Block Processing
src/validation.cpp - Block Storage
src/flatfile.cpp - Chain Indexes
src/index - Cryptography
src/secp256k1-zkp/include/secp256k1.h
MWEB
- MWEB Node
src/mweb/mweb_node.cpp - MWEB Wallet
src/mweb/mweb_wallet.cpp - MWEB Transactions
src/mweb/mweb_transact.cpp - MWEB Storage
src/mweb/mweb_db.h - MWEB Block Builder
src/libmw/src/node/BlockBuilder.cpp - MWEB Validation
src/libmw/src/node/BlockValidator.cpp - MWEB Wallet Builder
src/libmw/src/wallet/TxBuilder.cpp - MWEB Database API
src/libmw/src/db/common/Database.h - Serialized DB Entry
src/libmw/src/db/common/DBEntry.h - DB Transaction
src/libmw/src/db/common/DBTransaction.h
Other components
- User
Connections 28
- User → Wallet: creates payments
- User → Desktop GUI: uses
- User → CLI Client: invokes
- CLI Client → RPC Service: requests
- Desktop GUI → Wallet: manages
- Desktop GUI → RPC Service: requests
- Node Startup → P2P Network: starts
- Wallet → RPC Service: submits
- RPC Service → Transaction Pool: dispatches
- P2P Network → Transaction Pool: relays transactions
- Transaction Pool → Transaction Policy: checks policy
- Transaction Pool → Consensus Validation: validates
- Consensus Validation → Cryptography: verifies signatures
- P2P Network → Block Processing: delivers blocks
- Block Processing → Consensus Validation: validates blocks
- Block Processing → Chain State: updates
- Block Processing → Block Storage: persists blocks
- Block Processing → Chain Indexes: updates indexes
- Block Mining → Chain State: reads chain state
- Block Mining → Transaction Pool: selects transactions
- Block Mining → Block Processing: builds blocks
- MWEB Wallet → MWEB Transactions: constructs
- MWEB Wallet → MWEB Wallet Builder: builds transactions
- MWEB Node → MWEB Block Builder: builds blocks
- MWEB Node → MWEB Validation: validates
- MWEB Node → MWEB Storage: persists data
- MWEB Database API → Serialized DB Entry: creates entries
src/libmw/src/db/common/Database.h - MWEB Database API → DB Transaction: delegates writes
src/libmw/src/db/common/Database.h