Enable various p2sh-p2wpkh functionality #11089
pull luke-jr wants to merge 5 commits into bitcoin:master from luke-jr:p2shp2wpkhstuff changing 6 files +50 −2-
luke-jr commented at 4:33 pm on August 18, 2017: memberA subset of #9017
-
in src/base58.cpp:289 in 83c37fd1ea outdated
280@@ -281,6 +281,15 @@ bool CBitcoinAddress::GetKeyID(CKeyID& keyID) const 281 return true; 282 } 283 284+bool CBitcoinAddress::GetScriptID(CScriptID& scriptID) const 285+{ 286+ if (!IsValid() || vchVersion != Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS)) { 287+ return false; 288+ } 289+ memcpy(scriptID.begin(), &vchData[0], 20);
meshcollider commented at 1:07 am on August 19, 2017:Prefer vchData.data() over &vchData[0]meshcollider commented at 1:19 am on August 19, 2017: contributorfanquake added the label Wallet on Aug 20, 2017luke-jr force-pushed on Aug 21, 2017instagibbs commented at 3:36 pm on August 21, 2017: memberAdd function to retrieve nested p2sh witness program keyhash from keystore 98f6455628Enable pubkey lookup for p2sh-p2wpkh in validateaddress 84d4fba710Add CBitcoinAddress::GetScriptID 17350fe417Enable dumpprivkey for p2sh-p2wpkh b4008bca7dAccept p2sh-p2wpkh addr in createmultisig_redeemScript 0c4572c375luke-jr force-pushed on Aug 21, 2017in src/base58.cpp:286 in 0c4572c375
280@@ -281,6 +281,15 @@ bool CBitcoinAddress::GetKeyID(CKeyID& keyID) const 281 return true; 282 } 283 284+bool CBitcoinAddress::GetScriptID(CScriptID& scriptID) const 285+{ 286+ if (!IsValid() || vchVersion != Params().Base58Prefix(CChainParams::SCRIPT_ADDRESS)) {
jimpo commented at 7:27 pm on August 23, 2017:nit: Useif (!IsScript())
laanwj added this to the milestone 0.15.1 on Aug 23, 2017laanwj commented at 7:53 pm on August 23, 2017: memberAdded 0.15.1 milestoneluke-jr commented at 8:01 pm on August 23, 2017: memberIMO it’s a 0.16 thing.IMO segwit-interim-release ought to have been called 0.16, but apparently it’s 0.15.1. I don’t mind in that case.laanwj added the label Needs backport on Aug 23, 2017instagibbs commented at 7:16 pm on September 7, 2017: memberneeds rebaselaanwj added this to the "Blockers" column in a project
sipa commented at 8:54 pm on September 24, 2017: memberThis needs a rebase after CBitcoinAddress was removed in #11117. However, this will become much easier after #11167, as then native witness destinations can be used.
Also, I’m not convinced that dumpprivkey for (p2sh or not) segwit addresses is the right approach, as you can’t expect importprivkey to work for those.
laanwj removed this from the "Blockers" column in a project
MarcoFalke commented at 10:31 am on October 4, 2017: memberNeeds rebaseMarcoFalke removed the label Needs backport on Nov 9, 2017MarcoFalke removed this from the milestone 0.15.2 on Nov 9, 2017MarcoFalke commented at 7:45 pm on November 9, 2017: memberRemoving from backportjonasschnelli referenced this in commit d889c036cd on Jan 11, 2018luke-jr commented at 6:18 am on March 2, 2018: memberI don’t know how to rebase this.luke-jr closed this on Mar 2, 2018
sipa commented at 3:22 pm on March 2, 2018: memberIsn’t all the functionality in this PR merged through other patches? If something isn’t, I’d like to know.instagibbs commented at 3:27 pm on March 2, 2018: memberI believe so.
On Fri, Mar 2, 2018, 11:23 AM Pieter Wuille notifications@github.com wrote:
Isn’t all the functionality in this PR merged through other patches? If something isn’t, I’d like to know.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bitcoin/bitcoin/pull/11089#issuecomment-369950468, or mute the thread https://github.com/notifications/unsubscribe-auth/AFgC06R5bdjd25ARJGFe0TpQ6HouALGXks5taWQCgaJpZM4O7x6X .
luke-jr commented at 4:17 pm on March 2, 2018: memberThis had 4 changes:
- “pubkey” from DescribeAddressVisitor acting on a P2SH-wrapped Segwit address - This seems to be handled recursively or something now (although I don’t see logic to prevent P2SH-within-P2SH, but that’d be an unrelated bug)
- validateaddress RPC gets metadata for 1-prefix addresses from witness addresses using it (if I’m reading the code correctly) - I don’t see this in the 0.16 code, but it seems like a bad idea anyway.
- _createmultisig_redeemScript looked up full pubkey from Segwit addresses - Seems to be correctly handled in a very different way now.
- dumpprivkey from witness address - Seems to be correctly handled in a different way now.
meshcollider deleted a comment on Nov 12, 2018meshcollider deleted a comment on Nov 12, 2018MarcoFalke locked this on Sep 8, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
More mirrored repositories can be found on mirror.b10c.me