Commit c5758ca
committed
Merge #7349: fix: deduplicate QRINFO base blocks
470ec0e refactor: clarify QRINFO base-block sorting (PastaClaw)
9f30867 fix: scope QRINFO base-block dedupe to non-legacy construction (PastaClaw)
e34105f fix: deduplicate QRINFO base blocks (PastaClaw)
Pull request description:
## Issue being fixed or feature implemented
QRINFO request handling accepts caller-provided base block hashes and carries the
validated block indexes through quorum rotation response construction. Repeated
base hashes do not add useful information, so this change canonicalizes those
base indexes before the builder phases use them.
Provenance: thepastaclaw/tracker#1450
## What was done?
- Sort validated QRINFO base block indexes by height for both construction
paths.
- Remove duplicate base block index pointers before response construction.
- Add focused unit coverage for repeated base block selection behavior.
- Add RPC functional coverage showing repeated base hashes produce the same
result as a single base hash.
## How Has This Been Tested?
Environment: macOS arm64, local Dash Core worktree based on `upstream/develop`.
Commands run:
- `git diff --check upstream/develop..HEAD` — passed
- `make -C src -j$(sysctl -n hw.ncpu) test/test_dash` — passed earlier in this
worktree before the final Python-only test addition
- `src/test/test_dash --run_test=llmq_snapshot_tests/get_last_base_block_hash_repeated_base_blocks_test`
— passed
- `test/functional/feature_llmq_rotation.py` — skipped locally because this
worktree was configured with `--disable-wallet`
- `code-review dashpay/dash upstream/develop fix/qrinfo-dedupe-base-hashes ...`
— passed with recommendation: ship
Also checked:
- `gh api repos/dashpay/dash --jq '.default_branch'` — `develop`
- Open PR search for duplicate QRINFO/baseBlockHashes dedupe work — no duplicate
open PR found
## Breaking Changes
None expected.
## Checklist:
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have added or updated relevant unit/integration/functional/e2e tests
- [ ] I have made corresponding changes to the documentation
- [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
ACKs for top commit:
UdjinM6:
utACK 470ec0e
PastaPastaPasta:
utACK 470ec0e
Tree-SHA512: e160f2d5ee0019854a9721d357ecd7d59b5b2294a264668862ab52686fc530c468cdd0dd5cba56958d640cb631f15356b28e5b5cd8db24e00c496278657de60e3 files changed
Lines changed: 63 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | | - | |
78 | | - | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
80 | 88 | | |
81 | 89 | | |
82 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
176 | 177 | | |
177 | 178 | | |
178 | 179 | | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
179 | 228 | | |
180 | 229 | | |
181 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
234 | 237 | | |
235 | 238 | | |
236 | 239 | | |
| |||
0 commit comments