Skip to content

Conversation

instagibbs
Copy link
Member

@instagibbs instagibbs commented Nov 27, 2019

This plugs the privacy leak detailed at #17605, at least for the single-key case.

@instagibbs
Copy link
Member Author

cc @kallewoof since you designed the first iteration

@achow101
Copy link
Member

achow101 commented Dec 6, 2019

Concept ACK

Tests please :)

@kallewoof
Copy link
Contributor

Concept ACK

Copy link
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK on patching this in the interim before descriptor wallets arrive. Edit: Code review, built, ran tests, tested manually.

@instagibbs
Copy link
Member Author

Pushed test, updated logic to fix test failure.

Removed a function that resulted in a used footgun.

Copy link
Contributor

@kallewoof kallewoof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@promag promag mentioned this pull request Dec 23, 2019
@fjahr
Copy link
Contributor

fjahr commented Dec 24, 2019

ACK 9f7eea5

Reviewed code and tested locally.

@DrahtBot
Copy link
Contributor

DrahtBot commented Dec 29, 2019

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #17889 (wallet: Improve CWallet:MarkDestinationsDirty by promag)
  • #17843 (wallet: Reset reused transactions cache by fjahr)
  • #17838 (test: test the >10 UTXO case for output groups by kallewoof)
  • #17824 (wallet: Improve coin selection for destination groups >10 by fjahr)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

Copy link
Member

@achow101 achow101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 9f7eea5

@@ -193,7 +198,7 @@ def test_fund_send_fund_send(self):
'''
self.log.info("Test fund send fund send")

fundaddr = self.nodes[1].getnewaddress()
fundaddr = self.nodes[1].getnewaddress(label="", address_type="legacy")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: label isn't needed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be, once address type default is changed, no?

luke-jr pushed a commit to bitcoinknots/bitcoin that referenced this pull request Jan 5, 2020
Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK.

@@ -2927,7 +2927,7 @@ static UniValue listunspent(const JSONRPCRequest& request)
CTxDestination address;
const CScript& scriptPubKey = out.tx->tx->vout[out.i].scriptPubKey;
bool fValidAddress = ExtractDestination(scriptPubKey, address);
bool reused = avoid_reuse && pwallet->IsUsedDestination(address);
bool reused = avoid_reuse && pwallet->IsUsedDestination(out.tx->GetHash(), out.i);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, you could move this line after L2932 - no point in calling IsUsedDestination if this address doesn't matter.

@fanquake fanquake requested a review from meshcollider January 6, 2020 00:02
Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review ACK 0950245

meshcollider added a commit that referenced this pull request Jan 7, 2020
…ress

0950245 IsUsedDestination should count any known single-key address (Gregory Sanders)

Pull request description:

  This plugs the privacy leak detailed at #17605, at least for the single-key case.

ACKs for top commit:
  meshcollider:
    Code Review ACK 0950245

Tree-SHA512: e1d68281675f05072b3087171cba1df9416a69c9ccf70c72e8555e55eadda2d0fd339e5a894e3a3438ff94b9e3827fb19b8b701faade70c08756b19ff157ee0c
@meshcollider meshcollider merged commit 0950245 into bitcoin:master Jan 7, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Jan 8, 2020
…key address

0950245 IsUsedDestination should count any known single-key address (Gregory Sanders)

Pull request description:

  This plugs the privacy leak detailed at bitcoin#17605, at least for the single-key case.

ACKs for top commit:
  meshcollider:
    Code Review ACK 0950245

Tree-SHA512: e1d68281675f05072b3087171cba1df9416a69c9ccf70c72e8555e55eadda2d0fd339e5a894e3a3438ff94b9e3827fb19b8b701faade70c08756b19ff157ee0c
promag pushed a commit to promag/bitcoin that referenced this pull request Jan 14, 2020
@fanquake
Copy link
Member

Being backported in 17792.

promag pushed a commit to promag/bitcoin that referenced this pull request Jan 14, 2020
laanwj added a commit that referenced this pull request Jan 16, 2020
…d for ScriptHash

6dd59d2 Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation (Gregory Sanders)
4b8f1e9 IsUsedDestination shouldn't use key id as script id for ScriptHash (Gregory Sanders)

Pull request description:

  Regression introduced in #17621 which causes p2sh-segwit addresses to be erroneously missed.

  Tests are only failing in 0.19 branch, likely because that release still uses p2sh-segwit addresses rather than bech32 by default.

  I'll devise a test case to catch this going forward.

ACKs for top commit:
  achow101:
    ACK 6dd59d2
  MarcoFalke:
    ACK 6dd59d2
  meshcollider:
    Code review ACK 6dd59d2

Tree-SHA512: b3e0f320c97b8c1f814cc386840240cbde2761fee9711617b713d3f75a4a5dce2dff2df573d80873df42a1f4b74e816ab8552a573fa1d62c344997fbb6af9950
laanwj added a commit that referenced this pull request Jan 20, 2020
cd67b1d Use correct C++11 header for std::swap() (Hennadii Stepanov)
b8101fb Fix comparison function signature (Hennadii Stepanov)
eac4907 Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation (Gregory Sanders)
e2c45d8 IsUsedDestination shouldn't use key id as script id for ScriptHash (Gregory Sanders)
a5489c9 IsUsedDestination should count any known single-key address (Gregory Sanders)
88729d8 Fix issue with conflicted mempool tx in listsinceblock (Adam Jonas)
eafcea7 gui: Fix duplicate wallet showing up (João Barbosa)
7e66d04 Drop signal CClientUIInterface::LoadWallet (Russell Yanofsky)
179d55f zmq: Fix due to invalid argument and multiple notifiers (João Barbosa)

Pull request description:

  Backports
   - #16963
   - #17445
   - #17258
   - #17621
   - #17924
   - #17634

ACKs for top commit:
  laanwj:
    ACK cd67b1d, checked that I got more or less the same result (including conflict resolution) backporting these commits

Tree-SHA512: 645786267cfb10a01a56f7cfd91ddead5f1475df5714595ae480237e04d40c5cfb7460b40532279cacd83e4b775a4ace68a258ec2184b8ad0e997a690a9245e5
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Mar 13, 2020
[0.19] Backports bitcoin#17858
Unbreak build with Boost 1.72.0 bitcoin#17654
cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice bitcoin#17687
rpc: require second argument only for scantxoutset start action bitcoin#17728
wallet: Fix origfee return for bumpfee with feerate arg bitcoin#17643
test: fix "bitcoind already running" warnings on macOS bitcoin#17488
net: Log to net category for exceptions in ProcessMessages bitcoin#17762
Updates to appveyor config for VS2019 and Qt5.9.8 + msvc project fixes bitcoin#17364
Appveyor improvement - text file for vcpkg package list bitcoin#17416
Update msvc build for Visual Studio 2019 v16.4 bitcoin#17736
scripts: fix symbol-check & security-check argument passing bitcoin#17857
qt: Periodic translations update for 0.19 branch
IsUsedDestination should count any known single-key address bitcoin#17621
init: Stop indexes on shutdown after ChainStateFlushed callback. bitcoin#17897
qt: Translations update pre-rc1
wallet: Reset reused transactions cache bitcoin#17843
Squashed 'src/univalue/' changes from 7890db9..98261b1
0.19: Update univalue subtree bitcoin#18100
qt: Pre-rc2 translations update
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Mar 13, 2020
[0.19] Backports bitcoin#17858
Unbreak build with Boost 1.72.0 bitcoin#17654
cli: fix Fatal LevelDB error when specifying -blockfilterindex=basic twice bitcoin#17687
rpc: require second argument only for scantxoutset start action bitcoin#17728
wallet: Fix origfee return for bumpfee with feerate arg bitcoin#17643
test: fix "bitcoind already running" warnings on macOS bitcoin#17488
net: Log to net category for exceptions in ProcessMessages bitcoin#17762
Updates to appveyor config for VS2019 and Qt5.9.8 + msvc project fixes bitcoin#17364
Appveyor improvement - text file for vcpkg package list bitcoin#17416
Update msvc build for Visual Studio 2019 v16.4 bitcoin#17736
scripts: fix symbol-check & security-check argument passing bitcoin#17857
qt: Periodic translations update for 0.19 branch
IsUsedDestination should count any known single-key address bitcoin#17621
init: Stop indexes on shutdown after ChainStateFlushed callback. bitcoin#17897
qt: Translations update pre-rc1
wallet: Reset reused transactions cache bitcoin#17843
Squashed 'src/univalue/' changes from 7890db9..98261b1
0.19: Update univalue subtree bitcoin#18100
qt: Pre-rc2 translations update
[0.19] Further 0.19 backports bitcoin#18218
build: don't embed a build-id when building libdmg-hfsplus bitcoin#18004
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Sep 22, 2020
Summary: This is a backport of Core [[bitcoin/bitcoin#17621 | PR17621]]

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D7528
jasonbcox pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Oct 7, 2020
…t id for ScriptHash

Summary:
6dd59d2e491bc11ab26498668543e65440a3a931 Don't allow implementers to think ScriptHash(Witness*()) results in nesting computation (Gregory Sanders)
4b8f1e989f3b969dc628b0801d5c31ebd373719c IsUsedDestination shouldn't use key id as script id for ScriptHash (Gregory Sanders)

Pull request description:

  Regression introduced in bitcoin/bitcoin#17621 which causes p2sh-segwit addresses to be erroneously missed.

  Tests are only failing in 0.19 branch, likely because that release still uses p2sh-segwit addresses rather than bech32 by default.

  I'll devise a test case to catch this going forward.

---

Backport of Core [[bitcoin/bitcoin#17924 | PR17924]]

Test Plan:
  ninja all check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D7800
sidhujag pushed a commit to syscoin-core/syscoin that referenced this pull request Nov 10, 2020
…key address

0950245 IsUsedDestination should count any known single-key address (Gregory Sanders)

Pull request description:

  This plugs the privacy leak detailed at bitcoin#17605, at least for the single-key case.

ACKs for top commit:
  meshcollider:
    Code Review ACK 0950245

Tree-SHA512: e1d68281675f05072b3087171cba1df9416a69c9ccf70c72e8555e55eadda2d0fd339e5a894e3a3438ff94b9e3827fb19b8b701faade70c08756b19ff157ee0c
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants