backend: replace BIP69 with random sorting for tx inputs/outputs
This commit refactors the sorting mechanism for transaction inputs and outputs. It replaces the existing BIP69 lexicographical sorting with a randomized sorting approach.
BIP69, or "Lexicographic Order of Transaction Inputs and Outputs," was initially proposed to enhance privacy and mitigate blockchain fingerprinting. However, due to its limited adoption and effectiveness, it has been replaced by random shuffling of inputs and outputs, offering improved privacy benefits.
also please add a note to CHANGELOG.md :smile:
tACK!
Would be nice to have a test, but I don't think there is a good way to check that the ins and outs are actually shuffled. wdyt @benma ?
test would be nice, and you can do it by using a local rand.Rand object which is initialized with a constant seed in tests.
@Beerosagos @benma I made some updates:
- updated the
ShuffleTxInputsAndOutputsso it uses therand.Randobject and added unit test - kept it exported as it is used in the test file
- updated changelog file and commit message PTAL
also please add a note to CHANGELOG.md 😄
@strmci also this ^
@benma
- as we discussed, I created a separate file
maketx_internal_test.goto keep the function unexported - CHANGELOG.md was already updated
PTAL