Commit d5ddb71
authored
bch(share): port canonical 60% work-weighted version-switch boundary; drop 95% flat-count punish (#326)
Replace the non-canonical 95%-flat-count should_punish_version gate in
share_check with the canonical 60% PPLNS-work-weighted boundary switch
(p2pool data.py check() 1396-1414), matching the BTC F10/(b) port and the
LTC/DGB removals. Add ShareTracker::get_desired_version_weights — per-
desired-version WORK tally (idx->work), mirroring get_desired_version_counts
(data.py:2651) — NOT a flat share count.
A version BOUNDARY (share.version != parent.version) is valid only when the
new version holds >= 60% of weighted desired-version support in the window
[CHAIN_LENGTH*9/10, CHAIN_LENGTH] behind the parent; one-step downgrade is
allowed (AutoRatchet deactivation), larger jumps rejected. Couples the accept
gate to the work-weighted mint guard so an activated node cannot mint a
boundary share its peers reject. BCH-fenced (src/impl/bch only); standalone
SHA256d parent, no aux dimension. v36-native bucket-2 standardization.
Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>1 parent 164331b commit d5ddb71
2 files changed
Lines changed: 85 additions & 16 deletions
File tree
- src/impl/bch
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1722 | 1722 | | |
1723 | 1723 | | |
1724 | 1724 | | |
1725 | | - | |
1726 | | - | |
1727 | | - | |
1728 | | - | |
1729 | | - | |
1730 | | - | |
1731 | | - | |
1732 | | - | |
1733 | | - | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
| 1731 | + | |
| 1732 | + | |
| 1733 | + | |
| 1734 | + | |
| 1735 | + | |
| 1736 | + | |
| 1737 | + | |
| 1738 | + | |
| 1739 | + | |
1734 | 1740 | | |
1735 | | - | |
| 1741 | + | |
1736 | 1742 | | |
1737 | 1743 | | |
1738 | 1744 | | |
1739 | 1745 | | |
| 1746 | + | |
1740 | 1747 | | |
1741 | | - | |
1742 | | - | |
| 1748 | + | |
| 1749 | + | |
1743 | 1750 | | |
1744 | | - | |
1745 | | - | |
| 1751 | + | |
1746 | 1752 | | |
1747 | | - | |
1748 | | - | |
| 1753 | + | |
1749 | 1754 | | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
| 1772 | + | |
| 1773 | + | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
1750 | 1791 | | |
1751 | 1792 | | |
1752 | 1793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
686 | 686 | | |
687 | 687 | | |
688 | 688 | | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
689 | 717 | | |
690 | 718 | | |
691 | 719 | | |
0 commit comments