How darkrenaissance/darkfi works
DarkFi is an anonymous Layer 1 blockchain and application ecosystem. The main user workflow is a wallet constructing or managing a transaction, submitting it to a full node, and having the node validate and persist blockchain state; the README documents these roles, while the precise wallet-to-node RPC wiring is not shown in the sampled source. The repository also includes P2P networking, private contracts and ZK execution, event-graph services, an IRC daemon, and a graphical app. Unsampled subsystems are included where README or the source index establishes their importance; unverified links are dashed.
Main entry points: src/main.rs Full node · src/main.rs CLI wallet · mod.rs P2P networking · src/main.rs Graphical app
Components 25
Wallet and app
- CLI wallet
bin/drk/src/main.rs - Graphical app
bin/app/src/main.rs - App node integration
bin/app/src/app/node.rs - Graphics and favicon
bin/app/src/gfx/favico.rs
Node and chain
- Full node
bin/darkfid/src/main.rs - JSON-RPC server
src/rpc/server.rs - Transaction validation
src/validator/verification.rs - Consensus and PoW
src/validator/consensus.rs - Mining PoW
src/validator/pow.rs - Blockchain storage
src/blockchain/mod.rs
Privacy and contracts
- Wallet contract APIs
src/sdk/python/src/contract - Money contract
src/contract/money/src/entrypoint.rs - DAO contract
src/contract/dao/src/entrypoint - ZK virtual machine
src/zk/vm.rs - Event graph
src/event_graph/mod.rs - Event protocols
src/event_graph/proto.rs - RLN privacy
src/event_graph/rln.rs
Network and services
- P2P networking
src/net/mod.rs - Network channels
src/net/channel.rs - Peer hosts
src/net/hosts.rs - DHT service
src/dht/mod.rs - P2P IRC daemon
bin/darkirc/src/main.rs - Geode storage
src/geode/file_sequence.rs - Tau service RPC
bin/tau/taud/src/jsonrpc.rs
Other components
- Wallet user
Connections 23
- Wallet user → CLI wallet: uses
README.md - CLI wallet → Full node: submits transactions
- CLI wallet → Blockchain storage: scans balances
README.md - CLI wallet → Wallet contract APIs: uses contract APIs
README.md - Full node → Transaction validation: validates transactions
README.md - Full node → P2P networking: connects to network
README.md - Full node → Mining PoW: mines blocks
README.md - Transaction validation → Consensus and PoW: checks consensus
- Transaction validation → Blockchain storage: reads and writes
- Consensus and PoW → Mining PoW: uses PoW
- Full node → JSON-RPC server: serves RPC
- Wallet contract APIs → Money contract: builds transactions
- Wallet contract APIs → DAO contract: builds transactions
- Money contract → ZK virtual machine: executes privately
- DAO contract → ZK virtual machine: executes privately
- Event graph → Event protocols: uses protocols
src/event_graph/mod.rs - Event graph → RLN privacy: uses RLN
src/event_graph/mod.rs - P2P networking → Network channels: dispatches messages
src/net/mod.rs - P2P networking → Peer hosts: tracks peers
src/net/mod.rs - P2P networking → DHT service: supports discovery
- Wallet user → Graphical app: uses
- Graphical app → App node integration: integrates node
bin/app/src/main.rs - Graphical app → Graphics and favicon: renders interface