Commit 820e37c
committed
Private sharechain identity: --chain-id, --chain-prefix, --no-persist
Add chain identity to THE metadata for private sharechain support:
metadata[8-11] = chain_id (0 = public p2pool network)
metadata[12-15] = chain_prefix (P2P magic, 0 = default for coin)
New CLI flags:
--chain-id ID Private chain identifier (hex, e.g. DEADBEEF)
--chain-prefix PFX P2P magic prefix (4 hex bytes)
--no-persist Create genesis share immediately (for new chains)
Chain identity is embedded in every found block's THE metadata,
allowing blockchain scanners to distinguish between:
- Public p2pool network (chain_id=0)
- Private mining pools (chain_id=nonzero)
- Multiple private chains (different chain_ids)
TheCheckpoint now stores chain_id_val and chain_prefix_val alongside
sharechain state for checkpoint attribution.
TheMetadata layout updated:
[0] version
[1-4] sharechain_height
[5-6] miner_count
[7] hashrate_class
[8-11] chain_id (NEW)
[12-15] chain_prefix (NEW, was pool_aps)
[16-17] share_period
[18-19] verified_length1 parent fd11df9 commit 820e37c
3 files changed
Lines changed: 44 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
223 | 231 | | |
224 | 232 | | |
225 | 233 | | |
| |||
378 | 386 | | |
379 | 387 | | |
380 | 388 | | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
381 | 394 | | |
382 | 395 | | |
383 | 396 | | |
| |||
635 | 648 | | |
636 | 649 | | |
637 | 650 | | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
638 | 663 | | |
639 | 664 | | |
640 | 665 | | |
| |||
1249 | 1274 | | |
1250 | 1275 | | |
1251 | 1276 | | |
1252 | | - | |
| 1277 | + | |
1253 | 1278 | | |
1254 | 1279 | | |
1255 | 1280 | | |
| |||
1259 | 1284 | | |
1260 | 1285 | | |
1261 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
1262 | 1289 | | |
1263 | 1290 | | |
1264 | 1291 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
70 | 74 | | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | | - | |
74 | 79 | | |
75 | 80 | | |
76 | 81 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
100 | 105 | | |
101 | 106 | | |
102 | 107 | | |
| |||
107 | 112 | | |
108 | 113 | | |
109 | 114 | | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
114 | 119 | | |
115 | 120 | | |
116 | 121 | | |
| |||
0 commit comments