Bitcoin Forum
May 26, 2024, 08:11:46 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Core 0.21.0 online transaction, wont get created in the pool, SOLVED,PARTIALLY  (Read 250 times)
hemzer (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 7


View Profile
May 06, 2021, 11:20:38 PM
 #21

Thanks for the detailed info. yes I sort of figured this path...but your info is helpful and clear to me as guide for my reamaining keys. Thanks so much for the effort and time, very much appreciated.

what format are pvt keys starting with

0014

I want to sweep these remain keys with some balance in them..but still cant get these out of core wallet in a transaction.
I want to sweep them into electrum but can find what format are they?
Perhaps a worked example will help demonstrate things slightly easier... when you do the dumpwallet in Bitcoin Core, you will receive a text file that looks something like this at the top:
Code:
# Wallet dump created by Bitcoin v0.21.0
# * Created on 2021-05-06T20:36:15Z
# * Best block at time of backup was 0 (000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f),
#   mined on 2009-01-03T18:15:05Z

# extended private masterkey: xprv9s21ZrQH143K3sXtTbREX6etUygbEAdZvbAcf9G893efunoDMEfYdrQDjmkGTqWMkj3CShGj2KFSDy4KnQLfsuZj3hQNuii7j3ykNVEb4i7

KysRpRgfFZxfnMWFAhzhXGH65fnFLvp3iJ5is2NX8qsftWWogVHd 2021-04-17T03:53:24Z reserve=1 # addr=bc1qqrp39satjv7ypx49q03437r4kwsnxpqr94p738 hdkeypath=m/0'/0'/290'
KwDuVUDeS7F1HMRYiFwz7k1zquLsqwgTg4Ywu97PgUidD15er7v8 2021-04-17T03:53:24Z reserve=1 # addr=bc1qq9sw3zz03lslr83v5jt02r3hhm8vmx7zqkgxcz hdkeypath=m/0'/0'/713'
L1Z6nLWgLUeLJZXdepwBptiBppxDaNMszB4dSWvkPTXkTDo3N1or 2021-04-17T03:53:24Z reserve=1 # addr=bc1qq8x6ym7mwdjphqh6ae8yj8qw0z9875n8mrl9tq hdkeypath=m/0'/0'/672'
...

and then about halfway down the file... the format will change to something like this:
Code:
...
L3dchw79ZyrPxvi85ujnrE3MQJzP4VCk4qrLQGqepHvAeFCXzUAv 2021-05-02T00:34:58Z reserve=1 # addr=bc1qu3e3xacqe0kjzrtq2p7jxtw9q83vlqvwctlpgt hdkeypath=m/0'/0'/1004'

0014b8661d5cc456b8e540600ffa8e51c6fffae4126f 0 script=1 # addr=31hGNmRu2vPRBK39BVKGCkJHasxUrKDe6i
0014213df6e25c0eb07482e378390ac71ac32e5fbcd3 0 script=1 # addr=31iV72rvQP68j7Fw5bC1HfiktEqyEWSdVe
00143a891a3850f0e1191e65b9807e13b88593cef356 0 script=1 # addr=31iyv6J7MrNBgpEAqQjpxLtdz64CyYqHow
0014071d27b5d13ba1526cfcad6cd5f8ab9767242c3a 0 script=1 # addr=31jX71XANGb63uK4JA2WCt3PomJn6GLppc
0014b6bec2d025a2f09d062b1eedabb914f764e07b11 0 script=1 # addr=31mqVD6fnpUp822H4cuizDNxWhWPYbim8j
0014110d9569de104f68802ab915a570c365baf3db9c 0 script=1 # addr=31nf63rr8NJY9gQUxjk89uJU5qkEpzsmwe
00143307bd876ac38e9f496b75bb55dfcf79a36efdc7 0 script=1 # addr=31pBvcAgFLocUotrjNoMnYsoLAGDyfJFf4
0014fb27c6b8e0fd067d94875edb9aab9caa1c1ce992 0 script=1 # addr=31pWZCNLZSXgEaRAZZMaFDXoagje9o3UNF
...


The 0014 "keys" are not actually keys, as nc50lc noted, they are redeem scripts for your "P2SH" addresses... And, for the purposes of importing to Electrum, they are not required. The standard WIF private keys in the top half are all that you need to shift to Electrum:

So, as I'm sure you're aware... you use the "Import Bitcoin address or private keys" option:



If you click the "info" button, it will give you some guidance as to which "prefix" you need to use with the WIF private key to generate the address you require:



as you can see... to generate:
- the old style legacy addresses ("1"-type), you use p2pkh
- Nested Segwit ("3"-type), you use p2wpkh-p2sh
- Native Segwit ("bc1"-type), you use p2wpkh


So, you can either create separate wallets for each type:
=>


=>


Or, you can just create one wallet with all the different types in it:
=>


NOTE: I didn't import the old school legacy (p2pkh) addresses simply because I was in a rush Tongue
hemzer (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 7


View Profile
May 12, 2021, 04:43:06 PM
 #22


OK, thanks, trying to locat the pvt key for my address in the ouput dumpwallet file gets me only a line with this redeem script
starting with

0014..............

So where is the pvt key in the dump file for the address?




-snip-
I clearly remember not having this issue in earlier versions.
 Any idea where I Can download the older releases?
Here: https://bitcoincore.org/en/releases/

what format are pvt keys starting with

0014
Those aren't private keys but mostly likely "redeem scripts" of your P2SH addresses.
If you're going to sweep to Electrum, pasting the private key of the address with p2wpkh-p2sh: before the key should work.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 13, 2021, 02:41:38 AM
Last edit: November 14, 2023, 11:49:50 PM by HCP
 #23

OK, thanks, trying to locat the pvt key for my address in the ouput dumpwallet file gets me only a line with this redeem script
starting with

0014..............

So where is the pvt key in the dump file for the address?
It's likely one of the private keys in the first part of the dumpwallet... which (unfortunately) is likely to be displayed with a "bc1" address... So it won't be immediately obvious which one it actually is. Undecided

So, you can try and use the dumpprivkey command to dump that one specific key:
Code:
dumpprivkey BITCOIN_ADDRESS_GOES_HERE



Or, if that fails, your only real option then is to import ALL of them into Electrum. Undecided

Just use all of the "WIF" keys in the top part... and import them into "Electrum" using the 'p2wpkh-p2sh:' prefix. So, from my previous post... while the WIF keys are output in the dumpwallet output with "bc1" addresses:
Code:
KysRpRgfFZxfnMWFAhzhXGH65fnFLvp3iJ5is2NX8qsftWWogVHd 2021-04-17T03:53:24Z reserve=1 # addr=bc1qqrp39satjv7ypx49q03437r4kwsnxpqr94p738 hdkeypath=m/0'/0'/290'
KwDuVUDeS7F1HMRYiFwz7k1zquLsqwgTg4Ywu97PgUidD15er7v8 2021-04-17T03:53:24Z reserve=1 # addr=bc1qq9sw3zz03lslr83v5jt02r3hhm8vmx7zqkgxcz hdkeypath=m/0'/0'/713'
L1Z6nLWgLUeLJZXdepwBptiBppxDaNMszB4dSWvkPTXkTDo3N1or 2021-04-17T03:53:24Z reserve=1 # addr=bc1qq8x6ym7mwdjphqh6ae8yj8qw0z9875n8mrl9tq hdkeypath=m/0'/0'/672'


I can still import those WIF private keys using the "p2wpkh-p2sh:" prefix like this:
Code:
p2wpkh-p2sh:KysRpRgfFZxfnMWFAhzhXGH65fnFLvp3iJ5is2NX8qsftWWogVHd
p2wpkh-p2sh:KwDuVUDeS7F1HMRYiFwz7k1zquLsqwgTg4Ywu97PgUidD15er7v8
p2wpkh-p2sh:L1Z6nLWgLUeLJZXdepwBptiBppxDaNMszB4dSWvkPTXkTDo3N1or



And Electrum will generate them as "3-type" addresses:



█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
hemzer (OP)
Jr. Member
*
Offline Offline

Activity: 43
Merit: 7


View Profile
May 13, 2021, 03:07:02 PM
Last edit: May 13, 2021, 06:20:36 PM by hemzer
 #24

I did the command

dumpprivkey BITCOIN_ADDRESS_GOES_HERE

and it worked to give me a private key which I could the use to sweep into electrum. All is good. Thank you very much. Appreciate it.


..but.... from my experimentation the problem is...

1. You will never be able to send a transaction in bitcoin core -qt if this type of address exists. It just wont get into the mempool. Is this a bug?

2. Also you will never be able to create a unsigned send transaction for the same address from an electrum watch only wallet. Is this a bug?


Have you experienced this before?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
May 14, 2021, 06:20:52 AM
 #25

I did the command
dumpprivkey BITCOIN_ADDRESS_GOES_HERE
and it worked to give me a private key which I could the use to sweep into electrum. All is good. Thank you very much. Appreciate it.
Excellent... glad that you got that sorted.


..but.... from my experimentation the problem is...

1. You will never be able to send a transaction in bitcoin core -qt if this type of address exists. It just wont get into the mempool. Is this a bug?
I don't think so... I've got a mix of legacy, nested and native segwit addresses in my Bitcoin Core wallet... and I don't have any issues sending/receiving transactions.

Given the issues you have had, it seems like your wallet was, for whatever reason, just not synced correctly. Huh It seems like the wallet.dat had not been updated to reflect the fact that the "3-type" address had been "used" and had received funds. In my experiments, as soon as the "3-type" address was used as a "receive" address, it was listed in both the top section of the dumpwallet output (with the WIF keys) and in the bottom section of the output (with the 0014 redeem scripts).

I'm not sure why your output only had it in the bottom section... I can only assume that the wallet had not been rescanned correctly. Huh



2. Also you will never be able to create a unsigned send transaction for the same address from an electrum watch only wallet. Is this a bug?
As far as I'm aware you should be able to do this... I have just created an unsigned transaction in an Electrum watching only wallet that contains a funded "nested segwit" imported address (ie. "3-type" address) and I was able to sign it in an Electrum that had the private key for that address...

Unless you mean you were trying to create an unsigned transaction from Electrum and sign it in Bitcoin Core? Huh But even that should work now that Electrum is generating unsigned transactions in PSBT (Partially Signed Bitcoin Transaction) format.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Pages: « 1 [2]  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!