diff --git a/prototype/README.md b/prototype/README.md new file mode 100644 index 0000000..d878e81 --- /dev/null +++ b/prototype/README.md @@ -0,0 +1,53 @@ +# Prototype Python Miner + +Questa cartella contiene la versione Python originale del miner. + +## Contenuto + +- `launcher.py`: orchestrazione multiprocesso e dashboard hashrate +- `main.py`: ciclo mining single worker +- `miner.py`: loop PoW SHA-256 +- `block_builder.py`: coinbase, merkle root, header, serializzazione blocco +- `rpc.py`: helper RPC verso Bitcoin Core +- `utils.py`: utility comuni (target, hash, watchdog) +- `config.py.example`: template configurazione +- `requirements.txt`: dipendenze Python + +## Setup + +```bash +cd prototype +python -m venv .venv +source .venv/bin/activate +pip install -r requirements.txt +``` + +## Configurazione + +1. Crea `config.py` partendo dal template: + +```bash +cp config.py.example config.py +``` + +2. Modifica `config.py` con i parametri RPC/wallet del tuo nodo. + +## Esecuzione + +Mining parallelo (consigliato): + +```bash +python launcher.py +``` + +Con numero processi esplicito: + +```bash +python launcher.py -n 4 +``` + +Single worker: + +```bash +python main.py +``` diff --git a/block_builder.py b/prototype/block_builder.py similarity index 100% rename from block_builder.py rename to prototype/block_builder.py diff --git a/config.py.example b/prototype/config.py.example similarity index 100% rename from config.py.example rename to prototype/config.py.example diff --git a/launcher.py b/prototype/launcher.py similarity index 100% rename from launcher.py rename to prototype/launcher.py diff --git a/main.py b/prototype/main.py similarity index 100% rename from main.py rename to prototype/main.py diff --git a/miner.py b/prototype/miner.py similarity index 100% rename from miner.py rename to prototype/miner.py diff --git a/requirements.txt b/prototype/requirements.txt similarity index 100% rename from requirements.txt rename to prototype/requirements.txt diff --git a/rpc.py b/prototype/rpc.py similarity index 100% rename from rpc.py rename to prototype/rpc.py diff --git a/utils.py b/prototype/utils.py similarity index 100% rename from utils.py rename to prototype/utils.py