Skip to content

Conversation

PastaPastaPasta
Copy link
Member

No description provided.

laanwj and others added 4 commits May 13, 2020 21:41
1df206f Disallow using addresses in createmultisig (Andrew Chow)

Pull request description:

  This PR should be the last part of bitcoin#7965.

  This PR makes createmultisig only accept public keys and marks the old functionality of accepting addresses as deprecated.

  It also splits `_createmultisig_redeemscript` into two functions, `_createmultisig_getpubkeys` and `_createmultisig_getaddr_pubkeys`. `_createmultisig_getpubkeys` retrieves public keys from the RPC parameters and `_createmultisig_getaddr_pubkeys` retrieves addresses' public keys from the wallet. `_createmultisig_getaddr_pubkeys` requires the wallet and is only used by `addwitnessaddress` (except when `createmultisig` is used in deprecated mode).

  `addwitnessaddress`'s API is also changed. Instead of returning just an address, it now returns the same thing as `createmultisig`: a JSON object with two fields, address and redeemscript.

Tree-SHA512: a5796e41935ad5e47d8165ff996a8b20d5112b5fc1a06a6d3c7f5513c13e7628a4fd37ec30fde05d8b15abfed51bc250710140f6834b13f64d0a0e47a3817969
Signed-off-by: pasta <pasta@dashboost.org>
Signed-off-by: pasta <pasta@dashboost.org>
Signed-off-by: pasta <pasta@dashboost.org>
Copy link

@xdustinface xdustinface left a comment

Choose a reason for hiding this comment

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

ACK if dashified

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
@PastaPastaPasta
Copy link
Member Author

Done 👍

@PastaPastaPasta PastaPastaPasta added this to the 16 milestone May 14, 2020
@PastaPastaPasta PastaPastaPasta changed the title Backport 11415 Merge bitcoin#11415: [RPC] Disallow using addresses in createmultisig May 14, 2020
@PastaPastaPasta PastaPastaPasta changed the title Merge bitcoin#11415: [RPC] Disallow using addresses in createmultisig Merge bitcoin#11415: [RPC] Disallow using addresses in createmultisig May 14, 2020
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK

@PastaPastaPasta PastaPastaPasta added the RPC Some notable changes to RPC params/behaviour/descriptions label May 14, 2020
@UdjinM6 UdjinM6 merged commit 0b3c3e8 into dashpay:develop May 15, 2020
@PastaPastaPasta PastaPastaPasta deleted the backport-11415 branch May 15, 2020 16:40
gades pushed a commit to cosanta/cosanta-core that referenced this pull request Feb 23, 2022
…dashpay#3482)

* Merge bitcoin#11415: [RPC] Disallow using addresses in createmultisig

1df206f Disallow using addresses in createmultisig (Andrew Chow)

Pull request description:

  This PR should be the last part of bitcoin#7965.

  This PR makes createmultisig only accept public keys and marks the old functionality of accepting addresses as deprecated.

  It also splits `_createmultisig_redeemscript` into two functions, `_createmultisig_getpubkeys` and `_createmultisig_getaddr_pubkeys`. `_createmultisig_getpubkeys` retrieves public keys from the RPC parameters and `_createmultisig_getaddr_pubkeys` retrieves addresses' public keys from the wallet. `_createmultisig_getaddr_pubkeys` requires the wallet and is only used by `addwitnessaddress` (except when `createmultisig` is used in deprecated mode).

  `addwitnessaddress`'s API is also changed. Instead of returning just an address, it now returns the same thing as `createmultisig`: a JSON object with two fields, address and redeemscript.

Tree-SHA512: a5796e41935ad5e47d8165ff996a8b20d5112b5fc1a06a6d3c7f5513c13e7628a4fd37ec30fde05d8b15abfed51bc250710140f6834b13f64d0a0e47a3817969

* fix backport

Signed-off-by: pasta <pasta@dashboost.org>

* fix backport

Signed-off-by: pasta <pasta@dashboost.org>

* fix backport

Signed-off-by: pasta <pasta@dashboost.org>

* Dashify

Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>

Co-authored-by: Wladimir J. van der Laan <laanwj@gmail.com>
Co-authored-by: dustinface <35775977+xdustinface@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RPC Some notable changes to RPC params/behaviour/descriptions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants