BTCPrivate / BitcoinPrivate-legacy

Bitcoin Private is a Bitcoin and Zclassic fork which uses ZK-SNARK technology for privacy and fungibility.
Other
283 stars 132 forks source link

Where are the BTC UTXOs? #144

Closed Ayms closed 6 years ago

Ayms commented 6 years ago

See https://bitcointalk.org/index.php?topic=2675257.msg31712647#msg31712647

Some examples...

Nothing appear in your explorer and while trying to move former BTC coins with https://github.com/Ayms/bitcoin-transactions people get "An error occured: 16: bad-txns-vin-empty. Code:-26" which basically means that the corresponding inputs do not exist

grzegorzszczecin commented 6 years ago

@Ayms how did you obtain your TX inputs? Note that BTCP is not a "real" fork of the bitcoin blockchain. You can locate your TX ID on the BTCP chain with their block explorer (https://explorer.btcprivate.org/), however you need to convert your addresses:

For P2PKH addresses, the corresponding BTCP address start with "b1" (Base58Check version 0x1325) For P2SH addresses, the corresponding BTCP address start with "bx" (Base58Check version 0x13af)

grzegorzszczecin commented 6 years ago

@Ayms see also @ymgve's address converter script, https://github.com/ymgve/bitcoin_fork_claimer/blob/master/convert_address.py

Ayms commented 6 years ago

@grzegorzszczecin

how did you obtain your TX inputs?

Some that I know (not mine, especially the one with a big amount of BTCs)

Note that BTCP is not a "real" fork of the bitcoin blockchain

No, BTCP is a real fork of BTC, then you should find your BTC coins there, but we don't currently

however you need to convert your addresses

Yes, thanks, it's trivial, see also https://github.com/Ayms/bitcoin-wallets

ymgve commented 6 years ago

No, BTCP is a real fork of BTC, then you should find your BTC coins there, but we don't currently

It is not a real fork. It does not contain the BTC blocks from the genesis block up until the fork block.

Instead, the creators have manually funded all BTC addresses at the fork height. This means all TXIDs on the normal BTC blockchain are invalid in the BTCP blockchain, and you have to track down your TXIDs related to your address manually in their block explorer.

Ayms commented 6 years ago

It is not a real fork. It does not contain the BTC blocks from the genesis block up until the fork block.

Let's not play with words, they have remined all the utxos in their blockchain, so of course you don't have the same blocks but same BTC tx ids should be there, and they are not

Instead, the creators have manually funded all BTC addresses at the fork height. This means all TXIDs on the normal BTC blockchain are invalid in the BTCP blockchain, and you have to track down your TXIDs related to your address manually in their block explorer.

Do you mean that they did the same than "United Bitcoin and the God mode or The robbery of the century" https://gist.github.com/Ayms/86309b48084087a82634615d209f8b26

Certainly not, amateurism can't do this

@ymgve Do you have an example of BTC coins there?

grzegorzszczecin commented 6 years ago

@Ayms no, absolutely not. You won't find the same "BTC tx ids".

The "BTC tx id" is just the double-SHA256 hash of the serialized TX. Only the UTXOs at the time of the fork are re-mined in the BTCP blockchain in the form of coinbase transactions created out of thin air. These TX obviously will not retain the original TX id. Like I said, the only way to track them down is to look up in the block explorer (or if you have your own node, look up the address in your UTXO set)

ymgve commented 6 years ago

Here's my address on the BTC blockchain: https://blockchain.info/address/1HDW5sy8trGE8mEKUtNacLPGCx1WRtebnp

Here's my address on the BTCP blockchain: https://explorer.btcprivate.org/address/b1Lghm4p8e1JLG3YtS2oZCqMwqDiahRhSkQ

Both of these addresses are the same, encoding the hash160 'b1df48437bc20058305dc266c4216afa5ba63fd1' (You can use http://lenschulwitz.com/base58 and see for yourself)

See how all the coins in the BTCP blockchain says "No Inputs (Newly Generated Coins)" instead of being the result of earlier transactions?

See how none of the BTCP TXIDs are present in the BTC blockchain?

That's what I mean by not a true fork.

stonedbear commented 6 years ago

I am using @ymgve script: convert_address.py sourcebtcaddress b19myfKHqRLAVKwu4BSysu3qjjtoPWtaRQo(arbitrary btcp address, always the same)

I dug out a couple of random examples and converted them as per the script above, looks like I am only able to get btcp addresses that contain transactions and coins when the source btc address starts with 1, but nothing for the ones starting with 3.

3BMEXvMeEeuAmZrdnBZEhFucyKXrGtGPGb (.434 @ fork) -> b1E8RHZiCRuctogUmcEKcs8XNT4xD4mGdke (no tx in btcp)

3QrjSaQrjpiZ4db8Z9JSK6mJCUfAGLrAXu (.06 @ fork) -> b1TdvCDmQw5SH6kDGPC4pUyP3gE5Wx9oJ7c (no tx in btcp)

3GQTmq2yvEPF7oS1wNGq2ZZQEKtc9YRwYd (.06 @ fork) -> b1KBeXUPY7V6y9v49mR3DCSB9i5JxuKLqUA (no tx in btcp)

1B8fzVUtomvM2wLLuqvaRApgnsGkmb2A7o (22BTC @ fork) -> b19myfKHqRLAVKwu4BSysu3qjjtoPWtaRQo (tx + coins in btcp)

1Q2qwoKhsDbfHPyymzj5siVrp7adJmsDAN (.141 @ fork) -> b1TW3czAhcNdmQgJYj9A4UDUYSPHhcLzKb6 (tx + coins in btcp)

1FL9e14HkXC1S4Fk1RCcmfQcnz5QVMKH4V (.515 @ fork) -> b1TW3czAhcNdmQgJYj9A4UDUYSPHhcLzKb6 (tx + coins in btcp)

Am I doing something wrong?

grzegorzszczecin commented 6 years ago

@holuan You're doing it wrong because your addresses start with 3 (Base58Check version 0x05) and the corresponding BTCP addresses must start with "bx" (Base58Check version 0x13af)

You need to supply a P2SH address to convert_address.py, for example use bxk5hXBKgzqLr9Vm2zaZmHAmwUnwm5YRYUe.

Ayms commented 6 years ago

Well... before posting this nothing appeared in BTCP explorer for BTC and now, all of sudden, even if I checked before posting (and still nothing), everything seems to be there (dated now 3rd of March)

And indeed it seems to come from nowhere (ie newly generated coins), quite strange

But there are no hazards, you seem to be comfortable with it but I am not, will find out what happened

Strangely again with ZCL it behaves like a normal fork

@holuan , yes 3 addresses becomes bx, you can find them now in the explorer

ch4ot1c commented 6 years ago

Thank you for the discussion; these points are all sensible. Closing this for now.