Commit ae3bb52
committed
dgb(phase-b): delegate get_desired_version_{weights,counts} into tally SSOT
Rewire ShareTracker::get_desired_version_weights() (the CONSENSUS 60%-by-work
version-switch gate input) and its flat-count diagnostic sibling
get_desired_version_counts() to delegate the per-version accumulation into the
desired_version_tally SSOT introduced in #429 (accumulate_version_weights /
accumulate_version_counts). The chain-walk and the lookbehind clamp stay inline
in ShareTracker (the clamp is the separate chain_walk_window SSOT); only the map
accumulation moves. Shares with an absent ShareIndex are skipped exactly as
before, so the resulting map is byte-identical.
Value-identity is proven NON-CIRCULARLY by a new KAT
(DesiredVersionTallyDelegationByteIdentity) over chains of 2/4/8 shares whose
expected maps are derived from first principles (production
chain::target_to_average_attempts over the input bits, plus a hand-counted flat
tally) rather than from the SSOT under test, plus a lookbehind-clamp check; and
by the pre-existing real-chain weight tests (DesiredVersionWeightsByAttempts,
WeightWalkValueInvarianceBattery, AutoRatchet*) which now route through the
delegated accessor and remain green.
Stacked on #429 (dgb/desired-version-tally-ssot).1 parent 1094551 commit ae3bb52
2 files changed
Lines changed: 106 additions & 14 deletions
File tree
- src/impl/dgb
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
2107 | 2108 | | |
2108 | 2109 | | |
2109 | 2110 | | |
2110 | | - | |
| 2111 | + | |
| 2112 | + | |
| 2113 | + | |
| 2114 | + | |
| 2115 | + | |
2111 | 2116 | | |
2112 | | - | |
| 2117 | + | |
2113 | 2118 | | |
2114 | 2119 | | |
2115 | 2120 | | |
2116 | | - | |
| 2121 | + | |
2117 | 2122 | | |
2118 | | - | |
2119 | | - | |
| 2123 | + | |
| 2124 | + | |
2120 | 2125 | | |
2121 | 2126 | | |
2122 | 2127 | | |
2123 | | - | |
| 2128 | + | |
2124 | 2129 | | |
2125 | | - | |
| 2130 | + | |
2126 | 2131 | | |
2127 | 2132 | | |
2128 | 2133 | | |
| |||
2142 | 2147 | | |
2143 | 2148 | | |
2144 | 2149 | | |
2145 | | - | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
2146 | 2156 | | |
2147 | | - | |
| 2157 | + | |
2148 | 2158 | | |
2149 | 2159 | | |
2150 | 2160 | | |
2151 | | - | |
| 2161 | + | |
2152 | 2162 | | |
2153 | | - | |
2154 | | - | |
| 2163 | + | |
| 2164 | + | |
2155 | 2165 | | |
2156 | 2166 | | |
2157 | 2167 | | |
2158 | 2168 | | |
2159 | 2169 | | |
2160 | | - | |
| 2170 | + | |
2161 | 2171 | | |
2162 | | - | |
| 2172 | + | |
2163 | 2173 | | |
2164 | 2174 | | |
2165 | 2175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
864 | 864 | | |
865 | 865 | | |
866 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
| 890 | + | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
867 | 949 | | |
868 | 950 | | |
869 | 951 | | |
| |||
0 commit comments