# psycure69/kronocore architecture

> Architecture diagram of the GitHub repository psycure69/kronocore, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/psycure69/kronocore
- Repository: https://github.com/psycure69/kronocore

## Overview

Bitcoin Core is a full node for the Bitcoin peer-to-peer network, with an optional wallet and graphical interface. Its principal workflow is to connect to peers, download blocks and transactions, validate them, and maintain local chain state. The graph also shows the wallet/UI and RPC surfaces and the cryptographic and storage layers beneath the node. README statements support the principal workflow; several internal links are dashed because their call paths were not shown in the sampled source.

Main entry points: [`src/bitcoind.cpp`](https://github.com/psycure69/kronocore/blob/kronc-main/src/bitcoind.cpp) (Bitcoin daemon), [`src/node/chainstate.cpp`](https://github.com/psycure69/kronocore/blob/kronc-main/src/node/chainstate.cpp) (Chain state), [`src/consensus/tx_verify.cpp`](https://github.com/psycure69/kronocore/blob/kronc-main/src/consensus/tx_verify.cpp) (Block and transaction checks), [`src/net_processing.cpp`](https://github.com/psycure69/kronocore/blob/kronc-main/src/net_processing.cpp) (Peer networking)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Node runtime"]
  node_daemon["Bitcoin daemon<br/>[bitcoind.cpp]"]
  node_p2p["Peer networking<br/>[net_processing.cpp]"]
  node_kernel["Kernel interfaces<br/>[bitcoinkernel.cpp]"]
end

subgraph group_validation["Chain validation"]
  node_chainstate["Chain state<br/>[chainstate.cpp]"]
  node_consensus["Block and transaction checks<br/>[tx_verify.cpp]"]
  node_blockstore[("Block storage<br/>[blockstorage.cpp]")]
  node_mempool["Transaction mempool<br/>[txmempool.cpp]"]
  node_indexes[("Chain indexes<br/>[base.cpp]")]
  node_script["Script validation<br/>[interpreter.cpp]"]
end

subgraph group_interfaces["User interfaces"]
  node_wallet["Wallet<br/>[context.h]"]
  node_gui["Graphical interface<br/>[bitcoingui.cpp]"]
  node_rpc["RPC service<br/>[server.cpp]"]
  node_cli["Command-line client<br/>[bitcoin-cli.cpp]"]
end

subgraph group_internals["Storage and cryptography"]
  node_leveldb[("LevelDB engine")]
  node_crypto["Cryptographic primitives"]
end

node_user(("User"))
node_peers(("Bitcoin peers"))

node_user -->|"runs node"| node_daemon
node_daemon -->|"connects to"| node_peers
node_peers -.->|"send blocks"| node_p2p
node_p2p -->|"downloads data"| node_chainstate
node_chainstate -.->|"validates blocks"| node_consensus
node_chainstate -.->|"stores blocks"| node_blockstore
node_chainstate -.->|"tracks transactions"| node_mempool
node_consensus -.->|"checks scripts"| node_script
node_chainstate -.->|"updates indexes"| node_indexes
node_daemon -->|"includes wallet"| node_wallet
node_user -->|"uses interface"| node_gui
node_gui -.->|"uses wallet"| node_wallet
node_daemon -.->|"serves RPC"| node_rpc
node_cli -.->|"sends requests"| node_rpc
node_daemon -.->|"uses kernel"| node_kernel
node_blockstore -.->|"uses database"| node_leveldb
node_consensus -.->|"uses cryptography"| node_crypto

click node_daemon "https://github.com/psycure69/kronocore/blob/kronc-main/src/bitcoind.cpp"
click node_p2p "https://github.com/psycure69/kronocore/blob/kronc-main/src/net_processing.cpp"
click node_chainstate "https://github.com/psycure69/kronocore/blob/kronc-main/src/node/chainstate.cpp"
click node_consensus "https://github.com/psycure69/kronocore/blob/kronc-main/src/consensus/tx_verify.cpp"
click node_blockstore "https://github.com/psycure69/kronocore/blob/kronc-main/src/node/blockstorage.cpp"
click node_mempool "https://github.com/psycure69/kronocore/blob/kronc-main/src/txmempool.cpp"
click node_wallet "https://github.com/psycure69/kronocore/blob/kronc-main/src/wallet/context.h"
click node_gui "https://github.com/psycure69/kronocore/blob/kronc-main/src/qt/bitcoingui.cpp"
click node_rpc "https://github.com/psycure69/kronocore/blob/kronc-main/src/rpc/server.cpp"
click node_cli "https://github.com/psycure69/kronocore/blob/kronc-main/src/bitcoin-cli.cpp"
click node_kernel "https://github.com/psycure69/kronocore/blob/kronc-main/src/kernel/bitcoinkernel.cpp"
click node_indexes "https://github.com/psycure69/kronocore/blob/kronc-main/src/index/base.cpp"
click node_leveldb "https://github.com/psycure69/kronocore/tree/kronc-main/src/leveldb"
click node_crypto "https://github.com/psycure69/kronocore/tree/kronc-main/src/secp256k1"
click node_script "https://github.com/psycure69/kronocore/blob/kronc-main/src/script/interpreter.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_daemon,node_p2p,node_kernel,node_user toneBlue
class node_chainstate,node_consensus,node_blockstore,node_mempool,node_indexes,node_script toneAmber
class node_wallet,node_gui,node_rpc,node_cli toneMint
class node_leveldb,node_crypto toneRose
class node_peers toneIndigo
```

## Components

### Node runtime

- [Bitcoin daemon](https://github.com/psycure69/kronocore/blob/kronc-main/src/bitcoind.cpp): `src/bitcoind.cpp`
- [Peer networking](https://github.com/psycure69/kronocore/blob/kronc-main/src/net_processing.cpp): `src/net_processing.cpp`
- [Kernel interfaces](https://github.com/psycure69/kronocore/blob/kronc-main/src/kernel/bitcoinkernel.cpp): `src/kernel/bitcoinkernel.cpp`

### Chain validation

- [Chain state](https://github.com/psycure69/kronocore/blob/kronc-main/src/node/chainstate.cpp): `src/node/chainstate.cpp`
- [Block and transaction checks](https://github.com/psycure69/kronocore/blob/kronc-main/src/consensus/tx_verify.cpp): `src/consensus/tx_verify.cpp`
- [Block storage](https://github.com/psycure69/kronocore/blob/kronc-main/src/node/blockstorage.cpp): `src/node/blockstorage.cpp`
- [Transaction mempool](https://github.com/psycure69/kronocore/blob/kronc-main/src/txmempool.cpp): `src/txmempool.cpp`
- [Chain indexes](https://github.com/psycure69/kronocore/blob/kronc-main/src/index/base.cpp): `src/index/base.cpp`
- [Script validation](https://github.com/psycure69/kronocore/blob/kronc-main/src/script/interpreter.cpp): `src/script/interpreter.cpp`

### User interfaces

- [Wallet](https://github.com/psycure69/kronocore/blob/kronc-main/src/wallet/context.h): `src/wallet/context.h`
- [Graphical interface](https://github.com/psycure69/kronocore/blob/kronc-main/src/qt/bitcoingui.cpp): `src/qt/bitcoingui.cpp`
- [RPC service](https://github.com/psycure69/kronocore/blob/kronc-main/src/rpc/server.cpp): `src/rpc/server.cpp`
- [Command-line client](https://github.com/psycure69/kronocore/blob/kronc-main/src/bitcoin-cli.cpp): `src/bitcoin-cli.cpp`

### Storage and cryptography

- [LevelDB engine](https://github.com/psycure69/kronocore/tree/kronc-main/src/leveldb): `src/leveldb`
- [Cryptographic primitives](https://github.com/psycure69/kronocore/tree/kronc-main/src/secp256k1): `src/secp256k1`

### Other components

- **User**
- **Bitcoin peers**

## Connections

- User → Bitcoin daemon: runs node (evidence: `README.md`)
- Bitcoin daemon → Bitcoin peers: connects to (evidence: `README.md`)
- Bitcoin peers → Peer networking: send blocks
- Peer networking → Chain state: downloads data (evidence: `README.md`)
- Chain state → Block and transaction checks: validates blocks
- Chain state → Block storage: stores blocks
- Chain state → Transaction mempool: tracks transactions
- Block and transaction checks → Script validation: checks scripts
- Chain state → Chain indexes: updates indexes
- Bitcoin daemon → Wallet: includes wallet (evidence: `README.md`)
- User → Graphical interface: uses interface (evidence: `README.md`)
- Graphical interface → Wallet: uses wallet
- Bitcoin daemon → RPC service: serves RPC
- Command-line client → RPC service: sends requests
- Bitcoin daemon → Kernel interfaces: uses kernel
- Block storage → LevelDB engine: uses database
- Block and transaction checks → Cryptographic primitives: uses cryptography
