Skip to content

Conversation

@maflcko
Copy link
Member

@maflcko maflcko commented Sep 5, 2017

Fixes #11137
Closes #11184 (which was accidentally opened against 0.15 branch)

@maflcko maflcko added this to the 0.15.1 milestone Sep 5, 2017
@laanwj
Copy link
Member

laanwj commented Sep 5, 2017

Thanks. utACK

@maflcko maflcko merged commit a1ea1cf into bitcoin:master Sep 5, 2017
maflcko pushed a commit that referenced this pull request Sep 5, 2017
a1ea1cf qt: Use IsMine to validate custom change address (Chris Moore)

Pull request description:

  Fixes #11137
  Closes #11184 (which was accidentally opened against 0.15 branch)

Tree-SHA512: a20a59b4f36c1471a9c84bcc7c69048576d1f413104c299a7ed9ba221f28eddf93d727fca2926420ea5d0dd9aba582924f26a5acd44d995039b7202c73eb53bc
@maflcko maflcko deleted the Mf1708-qtIsMine branch September 5, 2017 23:10
cculianu pushed a commit to cculianu/bitcoin-abc that referenced this pull request Sep 21, 2017
Summary: Port of bitcoin/bitcoin#11247

Test Plan: As part of next diff

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D539
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 3, 2017
(cherry picked from commit c41224d)

Github-Pull: bitcoin#11247
Rebased-From: a1ea1cf
ptschip pushed a commit to ptschip/bitcoin that referenced this pull request Dec 27, 2017
Summary: Port of bitcoin#11247

Test Plan: As part of next diff

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D539
gandrewstone pushed a commit to BitcoinUnlimited/BitcoinUnlimited that referenced this pull request Jan 4, 2018
* Introduce wrappers around CBitcoinAddress

Summary:
This patch removes the need for the intermediary Base58 type
CBitcoinAddress, by providing {Encode,Decode,IsValid}Destination
function that directly operate on the conversion between strings
and CTxDestination.

This is a port of bitcoin/bitcoin#11117

Depends on D539

Test Plan: make check, rpc tests, manual QT testing

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D540

* qt: Use IsMine to validate custom change address

Summary: Port of bitcoin/bitcoin#11247

Test Plan: As part of next diff

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D539

* Cashaddr decoding the raw data and checksum

Summary:
This is split from D544 plus implement a candidate BCH code of degree 8 for it. The BCH code can detect up to 6 errors over the typical length of an address and up to 8 errors in a row.

This is intended to serve as a base to get the new address format started.

Test Plan: Added unittests.

Reviewers: #bitcoin_abc, dagurval

Reviewed By: #bitcoin_abc, dagurval

Subscribers: dagurval

Differential Revision: https://reviews.bitcoinabc.org/D576

* Add cashaddr prefix to chainparams

Summary: This is extarcted from D544 .

Test Plan: \o/

Reviewers: #bitcoin_abc, dagurval

Reviewed By: #bitcoin_abc, dagurval

Differential Revision: https://reviews.bitcoinabc.org/D610

* Use standard prefix in cashaddr tests

Summary: As per title.

Test Plan:
  make check

Reviewers: dagurval, schancel, #bitcoin_abc

Reviewed By: schancel, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D620

* Move uint160S to header

Summary: Make these functions reusable.

Test Plan: None

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D631

* Support for encoding addresses using cashaddr.

Summary: Depends on D631

Test Plan: Added unittests.

Reviewers: #bitcoin_abc, schancel, deadalnix

Reviewed By: #bitcoin_abc, schancel, deadalnix

Subscribers: deadalnix, schancel

Differential Revision: https://reviews.bitcoinabc.org/D623

* remove accidental text in chainparams.h

* Add an utility to convert string of bits from base 2^N to 2^M .

Summary:
This is extracted from D544 .

based on code from Pieter Wuille.

Test Plan: Added unit tests.

Reviewers: dagurval, #bitcoin_abc, tomtomtom7

Reviewed By: dagurval, #bitcoin_abc, tomtomtom7

Differential Revision: https://reviews.bitcoinabc.org/D572

* Split the decoding of cashaddr in a pure decode step + a Destination creation step

Summary: This allows for much more in depth testing, even for destination we don't have support for.

Test Plan: Added a bunch of unittests.

Reviewers: dagurval, schancel, freetrader, #bitcoin_abc

Reviewed By: dagurval, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D652

* format for base58

* Enable decoding and optional encoding of cashaddr

Summary:
Wraps both cashaddr and base58 addresses into EncodeDestination and
DecodeDestination.

Test Plan: Added unittest

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D660

* Fix compiler issues

BITCOIN_CONFIG_H is already being used and also fixed
a linker error.

* Added DummyConfig

Summary: Implementation of Config with dummy values. Subclassing this simplifies creating config objects in unittests.

Test Plan: make check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D685

* Add flag to enable dst encoding using cashaddr

Summary:
Adds option -usecashaddr to enable encoding using cashaddr. Defaults to
false.

RPC tests always use the new cashaddr format.

Test Plan: make check, rpc tests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D695

* Make DummyAddress support cashaddr

Summary: Depends on D685

Test Plan: Added unittest.

Reviewers: #bitcoin_abc, freetrader

Reviewed By: #bitcoin_abc, freetrader

Differential Revision: https://reviews.bitcoinabc.org/D553

* Remove unnecessary declarations in config.h

* Qt: Add "Copy URI" to payment request context menu

* bitcoin URI to bitcoincash URI

Summary: Defined const URI_SCHEME in GUIUtil namespace, and updated associated usage of the bitcoin scheme to use this URI_SCHEME constant.

Test Plan:
* Manually checking the GUI and other portions of the client for bitcoin -> bitcoincash change.
* Run GUI Tests

Reviewers: deadalnix, zquestz, O1 Bitcoin ABC, #bitcoin_abc, CCulianu, freetrader

Reviewed By: deadalnix, zquestz, O1 Bitcoin ABC, #bitcoin_abc, CCulianu, freetrader

Subscribers: dgenr8, zander, freetrader, CCulianu

Tags: #bitcoin_abc

Maniphest Tasks: T88

Differential Revision: https://reviews.bitcoinabc.org/D466

* Use bch prefix in cashaddr

Summary: Reflects changes in bitcoincashorg/spec#31

Test Plan: make check

Reviewers: #bitcoin_abc, Mengerian, schancel

Reviewed By: #bitcoin_abc, Mengerian, schancel

Differential Revision: https://reviews.bitcoinabc.org/D682

* Make Config more available in Qt

Test Plan: ran qt client

Reviewers: #bitcoin_abc, deadalnix, schancel

Reviewed By: #bitcoin_abc, deadalnix, schancel

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D708

* Support cashaddr in Qt input validation

Summary: This makes Qt address input fields accept cash addresses.

Test Plan: added unittest, manual test

Reviewers: #bitcoin_abc, deadalnix, freetrader

Reviewed By: #bitcoin_abc, deadalnix, freetrader

Subscribers: freetrader, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D552

* Remove redundant code in cashaddr tests

Summary: As per title. It's doing the same computation twice.

Test Plan:
  make check

Reviewers: dagurval, schancel, #bitcoin_abc

Reviewed By: schancel, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D746

* Fix cashaddrenc_tests/check_size

Summary: Fix the construction logic for check_size test.

Test Plan: make check

Reviewers: deadalnix, dagurval, freetrader, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D762

* Support cashaddr in parse/format URI

Summary: Depends on D708

Test Plan: added tests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D709

* Encode destination using Base58 in WalletDB

Summary:
Previously destinations were encoded with EncodeDestination, which
depends on user configuration. WalletDB needs consistent encoding.

Base58 encoding is used for backward compatibility.

Tests for Purpose, Name and DestData in CWalletDB

Test Plan: added tests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D745

* Accept multiple schemes in parseBitcoinURI

Test Plan: qt unittests

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D769

* Encode cashaddr size properly in version bit.

Summary: Encode the hash size in the version bit

Test Plan: make -j8 src/test/test_bitcoin && src/test/test_bitcoin --run_test='cashaddrenc_tests/*'

Reviewers: deadalnix, freetrader, dagurval, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D761

* Fix walletdb_tests on windows

Summary:
Windows is a bit more restrictive when it comes to files not properly closed and alike. This caused an error in the cleanup after running hte test (the DB files were kept open and couldn't be deleted).

This ensure that the DB is closed properly after use. The use of MockDB ensure that files shared accross DB instance such as db.log do get mamaged in memory instead of on disk.

Test Plan:
Cross compile windows binaries, then

  wine src/test/test_bitcoin.exe -t walletdb_tests

Reviewers: schancel, #bitcoin_abc

Reviewed By: schancel, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D791

* Modify QR code to fit cashaddr

Summary:
This bumps the size of the QR code and also decreases the font size when
using cashaddr.

The encoded address is displayed as text in the QR code image. This allows
for the longer cashaddr to fit in the image.

Test Plan: Create a request using QT client on mainnet. Tested on Ubuntu.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D802

* Introduce bitcoinUriScheme

Summary: Adds support for the new uri schemes introduced by cashaddr.

Test Plan: Added tests

Reviewers: deadalnix, schancel, kyuupichan, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D797

* Support parsing cashaddr from command line

Summary:
This makes the client support parsing cashaddr encoded addresses for all networks.

Depends on D797

Test Plan:
  ./bitcoin-qt "bitcoincash:mz8DUu5atAfNEBNeQHrpdGkfWZ9vmk3Q13?amount=42.00000000&label=test1&message=a%20message"

Ensure that the client boot in testnet mode and the proper sent is prefilled.

  ./bitcoin-qt "bitcoincash:1F6MqpCw3f8JRErcZMYjkFLBzpFvvjobZZ?amount=42.00000000&label=mainnet1&message=a%20message"

Ensure the client boots in mainnet and the sent form is prefilled.

  ./bitcoin-qt "bchtest:qp5dzwdct8xcpec62z799rdfpylxftsl6v0trfz2m9?amount=42.00000000&label=cashtest2&message=a%20message" "bitcoincash:mz8DUu5atAfNEBNeQHrpdGkfWZ9vmk3Q13?amount=42.00000000&label=test1&message=a%20message"

Ensure that the client start on testnet and fill up the sent form properly.

  ./bitcoin-qt "bitcoincash:qrc5xvnqwv3esj8hs5w85gh3xjwgnnjfvv3ll6wmdu?amount=42.00000000&label=test3&message=a%20message" "bitcoincash:1F6MqpCw3f8JRErcZMYjkFLBzpFvvjobZZ?amount=42.00000000&label=mainnet1&message=a%20message"

dito

  ./bitcoin-qt "bchreg:qrxvv8fpv42wvlls6z4mp9qvrs3kar2pau5tssl8xd?amount=42.00000000&label=cashtest1&message=a%20message"

Start in regtest mode.

Reviewers: #bitcoin_abc, dagurval, schancel

Reviewed By: #bitcoin_abc, schancel

Subscribers: schancel, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D583

* Use user configured encoding in receive request

Summary:
The address associated with a receive request is encoded using the
configuration of the client at the time. This can be either base58 or
cashaddr.

When displaying an existing receive request, display with the currently
configured encoding.

Test Plan:
- Added test.
- Create two requests, one running with -usecashaddr and one without.
- Start client with and without -usercashaddr, observe that requests are displayed correct.

Reviewers: #bitcoin_abc, dagurval

Reviewed By: #bitcoin_abc, dagurval

Subscribers: deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D801

* Allow cashaddr's prefix to be implicit

Summary: This makes for a much more pleasant UX.

Test Plan:
Added unittests.

In addition, try to send coin on testnet using both cashaddr with and without prefix and legacy addresses, with and without the `-usecashaddr` flag.

Reviewers: schancel, dagurval, #bitcoin_abc, Mengerian

Reviewed By: schancel, #bitcoin_abc, Mengerian

Subscribers: Mengerian

Differential Revision: https://reviews.bitcoinabc.org/D839

* Activate cashaddr on Jan, 14

Summary: This activate cashaddr by default on Jan, 14. The flag `-usecashaddr` can still be used to select manually which format is desired.

Test Plan: Run bitcoin-qt and check usecashaddr is disabled by default.

Reviewers: dagurval, schancel, Mengerian, #bitcoin_abc

Reviewed By: schancel, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D840

* Fix formatting

* Do not delete config.h on clean

Summary: When building in tree, make clean deletes src/config.h .

Test Plan:
Make a build in tree, run

  make clean

Checks that config.h is still there.

Reviewers: freetrader, #bitcoin_abc

Reviewed By: freetrader, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D39

* fix QT crash on startup

also fix crash when clicking on request payment button

* Fix for freeze address not showing up in receiverequest dialog

* Remove reference to bitcoin-abc in /depends/README.md

* Fix release-notes.md

* Retain original logic in MutateTxAddOutScript

rather than check for vStrInputParts == 3 we want to use
> 2 in the event that the string ever has 4 parts.

* Replace appropriate coment that was accidentally deleted

* Fix two translations - add missing %1

* Add new files to formatted-files list

* Remove release notes not related to cashaddr

* Format cashaddrenc.cpp/h

* Remove rpm/bitcoin.spec

This is not part of the cashaddr PR and was carried over
accidentally from the ABC client.
codablock pushed a commit to codablock/dash that referenced this pull request Sep 25, 2019
a1ea1cf qt: Use IsMine to validate custom change address (Chris Moore)

Pull request description:

  Fixes bitcoin#11137
  Closes bitcoin#11184 (which was accidentally opened against 0.15 branch)

Tree-SHA512: a20a59b4f36c1471a9c84bcc7c69048576d1f413104c299a7ed9ba221f28eddf93d727fca2926420ea5d0dd9aba582924f26a5acd44d995039b7202c73eb53bc
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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.

Coin Control doesn't recognize my segwit address as a valid change address

3 participants