Commit c31add5
authored
dash(underfill): port near-empty-template guard to DASH embedded GBT + KAT (#724)
* dash: port LTC/DOGE block-underfill guard to embedded GBT path
Port the 'near-empty template on a non-empty mempool' guard from
ltc/doge template_builder.hpp into dash build_embedded_workdata()
(the DASH embedded template path), for the mining-hotel deployment.
- Same cross-coin pins as LTC/DOGE: UNDERFILL_MIN_FILL_BYTES /
UNDERFILL_BACKLOG_SLACK = 50 kB (legacy p2pool near-empty floor).
- Trip condition factored into a pure predicate
underfill_guard_trips(selected, mempool_bytes, known_fees) so the
KAT pins the exact boolean without a log scraper.
- selected_bytes accumulated from SelectedTx.base_size (DASH has no
witness; base_size IS the wire size the mempool byte cap counts).
- Log-only (WARNING, [GBT-EMB] UNDERFILL) exactly like LTC/DOGE:
never mutates the template; masternode burn/payee projection and
the dashd submitblock fallback path are untouched.
- SAFE-ADDITIVE trailing seam bool* underfill_tripped = nullptr
(matches the existing curtime/version seam style); every existing
caller is byte-for-byte unchanged.
- test_dash_underfill_guard.cpp: predicate boundary KATs (empty
mempool never trips, fee-unknown backlog never trips, strict
slack boundary) + build wiring KATs (fee-known backlog rejected by
the stale-input window trips; drained small pool and empty pool do
not; DASH payment projection asserted unchanged when tripped;
default-seam call identical field-for-field).
* ci(build): add test_dash_underfill_guard to build.yml --target allowlists
Registered in test/CMakeLists.txt but absent from the Linux x86_64 and
ASan --target lists, so it showed ***Not Run and failed those two lanes.
Add it next to test_dash_embedded_gbt in both lists, mirroring the
test_stratum_hotel_interim fix.
---------
Co-authored-by: frstrtr <frstrtr@users.noreply.github.com>1 parent f14e254 commit c31add5
4 files changed
Lines changed: 419 additions & 3 deletions
File tree
- .github/workflows
- src/impl/dash/coin
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | | - | |
| 275 | + | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
55 | 85 | | |
56 | 86 | | |
57 | 87 | | |
| |||
73 | 103 | | |
74 | 104 | | |
75 | 105 | | |
76 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
77 | 113 | | |
78 | 114 | | |
79 | 115 | | |
| |||
104 | 140 | | |
105 | 141 | | |
106 | 142 | | |
| 143 | + | |
107 | 144 | | |
| 145 | + | |
108 | 146 | | |
109 | 147 | | |
110 | 148 | | |
111 | 149 | | |
112 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
113 | 176 | | |
114 | 177 | | |
115 | 178 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
507 | 524 | | |
508 | 525 | | |
509 | 526 | | |
| |||
0 commit comments