Bitcoin Forum
November 14, 2024, 04:45:10 AM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is it possible to move P2PK coins using Bitcoin Core v.20.1 ?  (Read 190 times)
Belisarius (OP)
Jr. Member
*
Offline Offline

Activity: 51
Merit: 33


View Profile
October 26, 2020, 01:47:35 PM
Last edit: October 27, 2020, 02:38:13 AM by Belisarius
 #1

Imagine you are not a Coder, just a random guy who mined Bitcoin in the first weeks of 2009 with Hal Finney and Satoshi.

At this time, Bitcoin was just an interesting project but with no real value for you. After some months, you stop, leave mom house basement and do something interesting with your life.
Now you are back (who care why) and you want to restart your good old computer. What is this software ? Bitcoin 0.1.5 ? Everything comeback to your mind. You check the price for a BTC : $13K!
Of course, Bitcoin Core 0.1.5 don't work and you quickly download the last version (0.20.1).

Now, the fiction is over and I have a question : after reading "#16725 Don’t show addresses or P2PK in decoderawtransaction" on this page https://bitcoin.org/en/release/v0.19.0.1#rpc-and-other-apis
Is it still possible to see old Bitcoin in your wallet and possibly move them into a Segwit wallet? All this without using the console command or manipulating the source code ?
Creating a watch-only wallet with Satoshi genesis block address gave me a total of 18,xx BTC in place of 68,xx.
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
October 26, 2020, 01:52:21 PM
 #2

Yes because the bitcoin Satoshi mined aren't spend able. So he only has 18.xx spend able from thst address.

I think you should be able to put your wallet file in and let it sync with core. I don't think the update wallet/upgrade wallet commands are currently necessary for an update (they weren't at least). What's the harm in trying it with yours? You'll notice it pretty quickly if the funds do or don't load even on a slow computer.

The inputs include the input txid, public key and vout (metadata) you have all these so I think it should still be compatible.
Belisarius (OP)
Jr. Member
*
Offline Offline

Activity: 51
Merit: 33


View Profile
October 26, 2020, 05:07:19 PM
 #3

Yes because the bitcoin Satoshi mined aren't spend able. So he only has 18.xx spend able from thst address.

I think you should be able to put your wallet file in and let it sync with core. I don't think the update wallet/upgrade wallet commands are currently necessary for an update (they weren't at least). What's the harm in trying it with yours? You'll notice it pretty quickly if the funds do or don't load even on a slow computer.

The inputs include the input txid, public key and vout (metadata) you have all these so I think it should still be compatible.

As I said, this is fiction, an example, "what if".

I did some test in watch-only and no p2pk coins are visible. My question is : it is possible to see and move old p2pk coins with Bitcoin Core post 0.19.0 ? Or an early miner will only find his old wallets falsely empty ?
Csmiami
Copper Member
Legendary
*
Offline Offline

Activity: 1652
Merit: 1325


I'm sometimes known as "miniadmin"


View Profile WWW
October 26, 2020, 11:14:46 PM
 #4

Or an early miner will only find his old wallets falsely empty ?

If I've understood everything correctly (that'd be close to a miracle, lol), early miners didn't mine any genesis block. They did mine spendable Bitcoins, so there should be no issue with how the wallet software sees them. There would also be no issue in recovering those coins/moving them to a new wallet. The software doesn't "see" those 50BTC because they cannot be spent

achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
October 26, 2020, 11:37:22 PM
Merited by Belisarius (1)
 #5

Now, the fiction is over and I have a question : after reading "#16725 Don’t show addresses or P2PK in decoderawtransaction" on this page https://bitcoin.org/en/release/v0.19.0.1#rpc-and-other-apis
Is it still possible to see old Bitcoin in your wallet and possibly move them into a Segwit wallet? All this without using the console command or manipulating the source code ?
Yes. The PR you refer to only changes display to the user for a particular RPC command. It does not effect wallet functionality.

Creating a watch-only wallet with Satoshi genesis block address gave me a total of 18,xx BTC in place of 68,xx.
There are 2 problems with that.

The first is that the genesis coinbase output is not spendable. It is not in the UTXO set. The wallet knows this special case so the rescan will not scan the genesis block.

The second is that importing an address will not give you the pubkey necessary for a P2PK output as those scripts don't have addresses. To add P2PK outputs as watchonly, you will need to import the public key directly.

Belisarius (OP)
Jr. Member
*
Offline Offline

Activity: 51
Merit: 33


View Profile
October 27, 2020, 02:17:27 AM
Last edit: October 27, 2020, 02:33:31 AM by Belisarius
 #6

Or an early miner will only find his old wallets falsely empty ?

If I've understood everything correctly (that'd be close to a miracle, lol), early miners didn't mine any genesis block. They did mine spendable Bitcoins, so there should be no issue with how the wallet software sees them. There would also be no issue in recovering those coins/moving them to a new wallet. The software doesn't "see" those 50BTC because they cannot be spent

Talking about the genesis block wasn't a good idea because peoples are focusing on it. I'm talking about any p2pk coins. I did some test adding the address of the 10 BTC sent by Satoshi to Hal and I can't see them in watch-only.

The fictional part of my first message wasn't a good idea too (because of my broken english  Undecided).  Let's try another time. If John Doe mined 1 block (not genesis) of 50 p2pk coins in 2009, using Bitcoin Core 0.1.5, can he see them correctly inside his wallet (with the correct amount) on Bitcoin Core 0.20.1 ?

@achow101: Thx for the answer. So if I understand correctly, the coins (non genesis) are invisible because of the missing address of the p2pk script. But there is no difference inside a wallet. Am I right?
achow101
Moderator
Legendary
*
Offline Offline

Activity: 3542
Merit: 6886


Just writing some code


View Profile WWW
October 27, 2020, 03:11:13 AM
 #7

@achow101: Thx for the answer. So if I understand correctly, the coins (non genesis) are invisible because of the missing address of the p2pk script. But there is no difference inside a wallet. Am I right?
Yes.

pooya87
Legendary
*
Offline Offline

Activity: 3640
Merit: 11032


Crypto Swap Exchange


View Profile
October 27, 2020, 04:26:18 AM
 #8

testing things like this are very easy. all it takes is for you to run bitcoin core in testnet mode (there should be a shortcut in your start menu called Bitcoin Core (testnet)), create a wallet there and send some coins to a P2PK output then try spending those outputs. keep in mind that it requires syncing and current size is 23 GB.

if you don't know how to send coins to P2PK (faucets don't accept it) just post your testnet pubkey here and i'll send you some.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Pages: [1]
  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!