Skip to content

Commit 974cacc

Browse files
authored
docs: add mining guide, video script, and P2P protocol docs (#1917)
1 parent 9ea6ef5 commit 974cacc

3 files changed

Lines changed: 112 additions & 0 deletions

File tree

docs/MASTERING_THE_MINER.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# ⛏️ Mastering the RustChain Miner: Hardware Fingerprints & Dual-Mining v2.0
2+
3+
RustChain isn't just another Proof-of-Work (PoW) coin. It uses **RIP-PoA (Hardware Fingerprint Attestation + Serial Binding)** to ensure that one CPU equals one vote, preventing large-scale farm domination.
4+
5+
This guide covers how to set up and optimize the **Linux Ryzen Miner (v2.0)** for maximum efficiency.
6+
7+
---
8+
9+
## 🏗️ 1. The Core Architecture
10+
The miner is built on Python 3 but interacts directly with the Linux kernel via `/sys/class/dmi/` to bind your mining identity to your hardware serial number.
11+
12+
### Hardware Binding
13+
The miner attempts to fetch your serial from:
14+
1. `/sys/class/dmi/id/product_serial`
15+
2. `/sys/class/dmi/id/board_serial`
16+
3. Fallback: `/etc/machine-id` (First 16 characters)
17+
18+
**Tip:** If you are running in a VM, the serial might return `None`. For maximum yield, run on **Bare Metal** to pass the RIP-PoA attestation.
19+
20+
---
21+
22+
## 🛡️ 2. RIP-PoA Fingerprint Checks
23+
To mine on the mainnet, your machine must pass **6 hardware fingerprint checks**. These include:
24+
- **DMI Table Validation:** Ensures the BIOS info matches the CPU architecture.
25+
- **Cache Latency Check:** Detects virtualization or "noisy neighbor" environments.
26+
- **Instruction Set Verifier:** Confirms the presence of required AVX/AES-NI extensions.
27+
28+
If these checks fail, your attestation will be invalid, and your blocks will be rejected by the node.
29+
30+
---
31+
32+
## ⚡ 3. Dual-Mining with Warthog (Sidecar)
33+
The v2.0 miner includes the **WarthogSidecar**. This allows you to mine RustChain (CPU) and Warthog (GPU/CPU) simultaneously without context-switching overhead.
34+
35+
### Configuration
36+
Pass these flags to the `LocalMiner` class or your CLI wrapper:
37+
- `wart_address`: Your Warthog wallet address.
38+
- `wart_pool`: The stratum URL for your preferred Warthog pool.
39+
- `bzminer_path`: Path to your BZminer binary.
40+
41+
---
42+
43+
## 🚀 4. Optimization Tips
44+
- **Python Warnings:** The miner ignores `Unverified HTTPS` warnings for self-signed node certificates. This is normal but ensure your `NODE_URL` is set to `https://rustchain.org`.
45+
- **Entropy Management:** The miner tracks `last_entropy` to ensure your PoW isn't being "pre-calculated" on a different machine.
46+
- **Log Leveling:** Use `color_logs.py` (if available) to visually distinguish between `[FINGERPRINT]` passes and `[PoW]` shares.
47+
48+
---
49+
50+
*Written by RematNOC - Contributing to the RustChain Ecosystem.*

docs/MINER_VIDEO_SCRIPT.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# 🎥 RUSTCHAIN MINER EXPLAINER: 60-Second Script
2+
3+
**Objective:** Explain RIP-PoA and set-up in under a minute for the content bounty.
4+
5+
---
6+
7+
## [0:00-0:10] Intro
8+
**Visual:** High-tech "RustChain" logo with an animated CPU icon.
9+
**Audio:** "RustChain is redefining decentralized mining. Forget massive server farms—RustChain uses RIP-PoA to give every CPU one vote."
10+
11+
## [0:10-0:25] The Tech (RIP-PoA)
12+
**Visual:** Diagram showing a CPU serial number being "locked" to a block.
13+
**Audio:** "Our miner binds your identity directly to your hardware serial number. By verifying your DMI table and cache latency, we ensure one person equals one vote."
14+
15+
## [0:25-0:40] Dual-Mining
16+
**Visual:** Split screen: RustChain (CPU) and Warthog (GPU).
17+
**Audio:** "Maximize your hardware. The v2.0 miner includes the Warthog Sidecar, allowing you to dual-mine RustChain and Warthog simultaneously with zero performance loss."
18+
19+
## [0:40-0:55] Set-up
20+
**Visual:** Terminal showing: `python3 rustchain_linux_miner.py --wallet [address]`
21+
**Audio:** "Setup is instant on Linux and Mac. Just point it to your wallet, pass the six fingerprint checks, and start securing the network today."
22+
23+
## [0:55-1:00] Outro
24+
**Visual:** "rustchain.org" URL and social links.
25+
**Audio:** "RustChain. The hardware-bound future of mining. Join the Flamekeepers at rustchain.org."

docs/NODE_P2P_PROTOCOL.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# 🌐 Understanding the RustChain Node: P2P Gossip & Block Production
2+
3+
The RustChain node is the heart of the network. It manages the ledger, validates miner attestations, and syncs blocks via a custom **P2P Gossip Protocol**.
4+
5+
---
6+
7+
## 🤝 1. The P2P Handshake
8+
When a node starts, it connects to seed nodes and performs a handshake.
9+
- **Identity:** Every node has a unique `node_id`.
10+
- **Version Check:** Nodes will only peer with others running compatible protocol versions (current: v2.x).
11+
- **Gossip Mechanism:** When a new block is produced, it is "gossiped" to all connected peers, who then validate and relay it to their own neighbors.
12+
13+
---
14+
15+
## 🧱 2. Block Production & Validation
16+
Unlike standard PoW where any hash wins, RustChain requires:
17+
1. **Valid PoW Hash:** Meeting the current network difficulty.
18+
2. **Valid Hardware Attestation:** The block must include the miner's hardware serial and fingerprint data.
19+
3. **Serial Binding Check:** The node verifies that this serial hasn't already submitted a block in the current 600-second window.
20+
21+
---
22+
23+
## 🔄 3. State Migration & ROM Clustering
24+
RustChain uses a unique **ROM Clustering** server for identity management.
25+
- **Migration:** When the protocol upgrades (e.g., from v1 to v2), the `rustchain_migration.py` script handles the state transition of wallets and hardware bindings.
26+
- **Fingerprint DB:** A central (or clustered) database stores historical fingerprint data to prevent "fingerprint spoofing" across the network.
27+
28+
---
29+
30+
## 🛡️ 4. Transaction Handling
31+
The `rustchain_tx_handler.py` manages the mempool.
32+
- **Validation:** Transactions are checked for double-spending and signature validity before being added to the next block candidate.
33+
- **Round Robin:** In some versions (RIP-200), a Round Robin 1CPU1Vote mechanism is used to further decentralize the block production among active miners.
34+
35+
---
36+
37+
*Written by RematNOC - Building a decentralized future with RustChain.*

0 commit comments

Comments
 (0)