chore(prototype): move legacy python miner into prototype folder with usage docs
This commit is contained in:
53
prototype/README.md
Normal file
53
prototype/README.md
Normal file
@@ -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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user