Skip to content

Backport Thunder 0.15.0 - #40

Merged
Ash-L2L merged 12 commits into
masterfrom
2026-06-26-backport-thunder-0.15.0
Jun 29, 2026
Merged

Backport Thunder 0.15.0#40
Ash-L2L merged 12 commits into
masterfrom
2026-06-26-backport-thunder-0.15.0

Conversation

@Ash-L2L

@Ash-L2L Ash-L2L commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

fumin and others added 12 commits June 26, 2026 23:04
Avoid generating and writing a new wallet address to LMDB every time the GUI application starts up, which could lead to performance degradation. Instead, reuse the last generated address on initialization, and only generate a new address on user demand (via explicit 'generate' button).
`AggregatedWithdrawal`'s `Ord` impl is not a valid total order: it returns
`Greater` if any of `main_fee`, `value`, or `main_address` is greater (an OR of
`>`), which violates antisymmetry and transitivity.

`collect_withdrawal_bundle` aggregates withdrawals into a `HashMap`, takes
`into_values()` (iteration order is randomized per process) and `sort_by_key`s
with that comparator. Because the comparator is non-transitive the sorted order
depends on the input order, and nothing canonicalizes it before the bundle's
outputs are hashed into the m6id (`compute_txid`). Two honest nodes with the
identical UTXO set can therefore compute different m6ids for the same withdrawal
bundle, then disagree on the on-chain M6 and diverge.

Replace the comparator with a real total order (lexicographic over
`(main_fee, value, main_address)`) so the sorted bundle is canonical regardless
of `HashMap` iteration order.
@Ash-L2L
Ash-L2L merged commit 163df73 into master Jun 29, 2026
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants