Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wallet, GUI: Warn when sending to already-used Bitcoin addresses #15987

Open
wants to merge 12 commits into
base: master
from

Conversation

@luke-jr
Copy link
Member

commented May 8, 2019

  • An in-memory bloom filter is used to detect potential address reuse, avoiding wasting unnecessary memory with large wallets.
  • Entering a used address in the GUI Send tab makes the field turn yellow.
  • Sending to a used address from the GUI prompts with detailed information about prior usage, as well as a note about best practices to avoid address reuse.
  • (I also fixed GUIUtil::dateTimeStr to not overflow with 64-bit timestamps.)
@gmaxwell

This comment has been minimized.

Copy link
Contributor

commented May 8, 2019

Meta-concept-ack! we should absolutely do something like this (I haven't looked at the specifics of what this does yet)

const QString label_and_address = rcp.label.isEmpty() ? rcp.address : (rcp.label + " (" + rcp.address + ")");
reuse_question.append("<br />");
if (rcp_prior_usage_info.num_txs == 1) {
//: %1 is an amount (eg, "1 BTC"); %2 is a Bitcoin address and its label; %3 is a date (eg, "2019-05-08")

This comment has been minimized.

Copy link
@luke-jr

luke-jr May 8, 2019

Author Member

Note: //: is how Qt lets us add notes for translators. (I'm not sure if it survives to Transifex?)

@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented May 8, 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:

  • #16966 (ui: make send a wizard by Sjors)
  • #16964 (gui: Change sendcoins dialogue Yes to Send by instagibbs)
  • #16944 (gui: create PSBT with watch-only wallet by Sjors)
  • #16710 (build: Enable -Wsuggest-override if available by hebasto)
  • #15845 (wallet: Fast rescan with BIP157 block filters by MarcoFalke)
  • #14942 (wallet: Make scan / abort status private to CWallet by Empact)

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.

@bitcoin bitcoin deleted a comment from Rockstarrecords11 May 9, 2019
@bitcoin bitcoin deleted a comment from Rockstarrecords11 May 9, 2019
@meshcollider

This comment has been minimized.

Copy link
Member

commented May 9, 2019

Concept ACK

This addresses #3266 I assume

@luke-jr

This comment has been minimized.

Copy link
Member Author

commented May 9, 2019

It doesn't take into consideration all the ideas/advice (even my own!) on #3266, but yes, it implements the general idea I think.

@jonasschnelli

This comment has been minimized.

Copy link
Member

commented May 9, 2019

Concept ACK

1 similar comment
@hebasto

This comment has been minimized.

Copy link
Member

commented May 9, 2019

Concept ACK

src/wallet/wallet.cpp Outdated Show resolved Hide resolved
@promag

This comment has been minimized.

Copy link
Member

commented Jun 12, 2019

Concept ACK, didn't see the code but maybe you could split RPC changes to other PR?

@Sjors

This comment has been minimized.

Copy link
Member

commented Aug 15, 2019

Concept ACK, but agree with @promag on splitting getaddressinfo into a seperate PR, so we can review that and the bloom filter stuff first.

When I enter a duplicate address the field becomes yellow as expected, but when I also enter an absurdly high amount, it no longer shows the "insufficient balance error", but instead ignores the amount I entered and falls back to the previous amount. Also use_txids was empty for me with the same address in getaddressinfo. (I tried this on a rebased branch, so maybe I broke it myself)

@luke-jr luke-jr changed the title Wallet, GUI: Warn when sending to already-used Bitcoin addresses (also RPC: include such information in getaddressinfo) Wallet, GUI: Warn when sending to already-used Bitcoin addresses Aug 29, 2019
@luke-jr luke-jr force-pushed the luke-jr:wallet_no_reuse branch from 3a6d7ce to c37f306 Aug 29, 2019
@luke-jr

This comment has been minimized.

Copy link
Member Author

commented Aug 29, 2019

Rebased, fixed issues, and moved RPC change to a new rpc_gai_txids branch that can be PR'd after this.

@DrahtBot DrahtBot removed the Needs rebase label Aug 29, 2019
@luke-jr luke-jr force-pushed the luke-jr:wallet_no_reuse branch from c37f306 to a2d7aec Sep 1, 2019
luke-jr added 3 commits May 8, 2019
- Dialog icon can be changed
- Both buttons can be replaced with other standard buttons
- "Yes" button can be renamed
@luke-jr luke-jr force-pushed the luke-jr:wallet_no_reuse branch from 65c3c70 to 545af21 Sep 1, 2019
@instagibbs

This comment has been minimized.

Copy link
Member

commented Sep 13, 2019

concept ACK

@laanwj laanwj added the Feature label Sep 30, 2019
@DrahtBot

This comment has been minimized.

Copy link
Contributor

commented Oct 2, 2019

Needs rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.