Page MenuHomePhabricator

wallet: drop anti-fee-sniping feature, set locktime = 0
ClosedPublic

Authored by PiRK on Jan 25 2023, 08:59.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCf9ee62b17ab3: wallet: drop anti-fee-sniping feature, set locktime = 0
Summary

Post-consensus mitigates fee-sniping, so we don't need to set a locktime to the current block height when creating a wallet transaction.

This reduces the wallet fingerprintability, as light wallets don't have access to the current block height and cannot set the locktime.

The plan is to disable this feature by default also in Electrum ABC (but keep the option to do it for the sake of splitting coins).

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Jan 25 2023, 08:59
Fabien requested changes to this revision.Jan 25 2023, 10:30
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/wallet/spend.cpp
611 ↗(On Diff #37721)

You should really had a comment explaining why 0 is the chosen value with a bit of history: why the previous mitigations are no longer relevant and the benefit no longer taking over the privacy decrease. More or less what's is in the summary.

test/functional/wallet_create_tx.py
35 ↗(On Diff #37721)

Please keep some tests for the current behavior otherwise nothing will break upon change of this value and we will never remember why the value was chosen to begin with. Let's quote Antony and not create a Chesterton’s Fence situation :)

This revision now requires changes to proceed.Jan 25 2023, 10:30

restore the functional test, add comments about why the feature is now disabled.

src/wallet/spend.cpp
614 ↗(On Diff #37722)

Please explain that locktime=0 is the easiest solution for the light wallets that have no access to the current block height and so is the best option for privacy.

explain that locktime = 0 is the easiest choice for light wallets

This revision is now accepted and ready to land.Jan 25 2023, 13:05