Commit 8699490
committed
Fix merged PPLNS hash: remove desired_weight cap from compute_merged_payout_hash
Multiple interrelated fixes for c2pool↔p2pool V36 consensus:
1. merged_payout_hash: walk VERIFIED chain only (not raw chain) to exclude
c2pool's own unverified shares from the weight computation. Defer check
until verified depth >= CHAIN_LENGTH to avoid bootstrap false positives.
2. desired_target: pass MAX_TARGET instead of block difficulty to
compute_share_target(). Block difficulty made shares 2634x too hard.
The [pre_target3//30, pre_target3] clipping provides the correct range.
3. Bootstrap share target: use hardest (lowest target) bits from received
peer shares instead of MAX_TARGET during bootstrap. Prevents flooding
the network with easy shares when joining an existing chain.
4. Add /miner_thresholds API endpoint: returns minimum viable hashrate,
minimum payout per share, pool hashrate, and DUST range for dashboard.
5. Remove single-address merged coinbase fallback (submitauxblock path) —
always use multi-address PPLNS block builder.1 parent 341af1c commit 8699490
5 files changed
Lines changed: 245 additions & 39 deletions
File tree
- src
- c2pool
- merged
- core
- impl/ltc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2056 | 2056 | | |
2057 | 2057 | | |
2058 | 2058 | | |
2059 | | - | |
2060 | | - | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
2061 | 2065 | | |
2062 | 2066 | | |
2063 | 2067 | | |
| |||
2125 | 2129 | | |
2126 | 2130 | | |
2127 | 2131 | | |
2128 | | - | |
| 2132 | + | |
2129 | 2133 | | |
2130 | 2134 | | |
2131 | 2135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
784 | | - | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
793 | 777 | | |
794 | 778 | | |
795 | 779 | | |
| |||
799 | 783 | | |
800 | 784 | | |
801 | 785 | | |
802 | | - | |
| 786 | + | |
803 | 787 | | |
804 | 788 | | |
805 | | - | |
806 | 789 | | |
807 | 790 | | |
808 | 791 | | |
809 | 792 | | |
810 | 793 | | |
811 | 794 | | |
812 | 795 | | |
813 | | - | |
814 | | - | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
815 | 800 | | |
816 | 801 | | |
817 | 802 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
| 270 | + | |
269 | 271 | | |
270 | 272 | | |
271 | 273 | | |
| |||
2387 | 2389 | | |
2388 | 2390 | | |
2389 | 2391 | | |
| 2392 | + | |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
| 2396 | + | |
| 2397 | + | |
| 2398 | + | |
| 2399 | + | |
| 2400 | + | |
| 2401 | + | |
| 2402 | + | |
| 2403 | + | |
| 2404 | + | |
| 2405 | + | |
| 2406 | + | |
| 2407 | + | |
| 2408 | + | |
| 2409 | + | |
| 2410 | + | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
| 2447 | + | |
| 2448 | + | |
| 2449 | + | |
2390 | 2450 | | |
2391 | 2451 | | |
2392 | 2452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
171 | 172 | | |
172 | 173 | | |
173 | 174 | | |
| |||
0 commit comments