0
I don't understand the differents between listaddressgroupings and getnewaddress
For example, I have a local blockchain ( regtest ) with 0 Block.
I create 101 block (generate 101)
I can see with listaddressgroupings this output
[
[
[
"mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8",
50.00000000
]
]
]
What address is it?
If dump the priv key dumpprivkey mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8
I have this result MVA_PRIVATEKEY
ok, If I search this privkey in dumpwallet test.txt that key in associate to this address
MVA_PRIVATEKEY 2019-01-19T10:26:19Z change=1 # addr=2NAoHv7kDBhHND7YHcQKuDS8wCbEz87xLrv hdkeypath=m/0'/0'/0'
Why is not mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8 ?
Now I want create a new address getnewaddress =>
2NCGuG2v4RbaAKsZp1RQJ2ZpDM6WtW79Mu3
Why this address begin with 2 and not with m or n ? its pk is different from mvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8
If I create another 101 block, I have a new address in listaddressgroupings
anytime I create a new block, I have a new address in listaddressgroupings
thanks for your reply. I am little confusion.
listaddressgroupingsgive the wallet aftergeneratecommand. But these wallets are different fromdumpwallet. Where Can I see all address from generate? because withdumpwallethelp I can readDumps all wallet keys in a human-readable format to a server-side file., but I can't find the address generate after mine block. These address have same Master priv key? – monkeyUser – 2019-01-21T20:38:53.680The private keys for addresses that are used by
generateare in thedumpwalletoutput. They just aren't shown in the same form aslistaddressgroupingsbecause of the way that Bitcoin core stores addresses internally. The addresses fromgeneratearen't actually addresses and are not stored as addresses. But their keys are stored, and that's what matters. When you usedumpwallet, the address form for those keys are not found, so it defaults to outputting it as the current default address type which is P2SH segwit. – Andrew Chow – 2019-01-22T00:12:11.727thanks again for your reply.
The addresses from generate aren't actually addresses and are not stored as addresses.Not address because miss some hash o check like base58check or what? for example If I create a transaction withMVA_PRIVATEKEYwith which Public key check my signature? withmvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8or`2NCGuG2v4RbaAKsZp1RQJ2ZpDM6WtW79Mu3Thanks – monkeyUser – 2019-01-22T08:20:25.703
MVA_PRIVATEKEYhas only one public key. That public key corresponds to different addresses. When hashed with hash160 and base58 check encoded with version number 111, you getmvAH7VsxifvQdEZ46Rdt2oN3nB5BzaPqS8. When hashed with hash160, built into a segwit script, that script hashed with hash160, and then base58 check encoded with version number 196, you get2NCGuG2v4RbaAKsZp1RQJ2ZpDM6WtW79Mu3. It's the same public key in both, just different addresses representing different output scripts. – Andrew Chow – 2019-01-22T16:35:23.567However,
generatedoes not use either of those output scripts in the block it mined. It uses a P2PK script which has no address. – Andrew Chow – 2019-01-22T16:36:05.613