Bitcoin Forum
April 27, 2024, 03:48:15 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can one make a transaction that any address can claim it just by solving the  (Read 214 times)
NonFungibleUser (OP)
Newbie
*
Offline Offline

Activity: 37
Merit: 0


View Profile
July 09, 2023, 07:56:00 AM
 #1

I just learned that Mike Hearn created a Bitcoin Puzzle transaction where the first person to solve its scriptPubKey, could claim that transaction's amount as a reward.

The thing is... Aren't all the transactions forced to have a destination address? So, even if the winner solves the scriptPubKey, how can then he/she divert the funds to another destination address?
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, which will follow the rules of the network no matter what miners do. Even if every miner decided to create 1000 bitcoins per block, full nodes would stick to the rules and reject those blocks.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
digaran
Copper Member
Hero Member
*****
Offline Offline

Activity: 1330
Merit: 899

🖤😏


View Profile
July 09, 2023, 08:36:42 AM
 #2

I just learned that Mike Hearn created a Bitcoin Puzzle transaction where the first person to solve its scriptPubKey, could claim that transaction's amount as a reward.

The thing is... Aren't all the transactions forced to have a destination address? So, even if the winner solves the scriptPubKey, how can then he/she divert the funds to another destination address?
First delete your other 3 identical threads on the same subject, then do some more reading on the same topic you learned about that puzzle. This is one of the features of block chain technology, smart contracts etc.

In short, the solver sends his address with the answer of the puzzle, that's the destination, if your coins sit on your private key, do they need a destination? You will be the one giving them one, so the answer of the puzzle is like the private key for those puzzle addresses.

🖤😏
BlackHatCoiner
Legendary
*
Online Online

Activity: 1498
Merit: 7292


Farewell, Leo


View Profile
July 09, 2023, 10:51:02 AM
Merited by pooya87 (2), ABCbits (1), WhyFhy (1)
 #3

You should add some destination to where the funds will go after you complete the puzzle, correct.

So, even if the winner solves the scriptPubKey, how can then he/she divert the funds to another destination address?
They will just construct a transaction which includes an input that satisfies the conditions specified by the script. It would look like this:
Code:
Input:
- Previous Transaction Output: Puzzle Transaction Output
- ScriptSig: <puzzle_solution>

Output:
- Destination Address: XYZabc...

.
.HUGE.
▄██████████▄▄
▄█████████████████▄
▄█████████████████████▄
▄███████████████████████▄
▄█████████████████████████▄
███████▌██▌▐██▐██▐████▄███
████▐██▐████▌██▌██▌██▌██
█████▀███▀███▀▐██▐██▐█████

▀█████████████████████████▀

▀███████████████████████▀

▀█████████████████████▀

▀█████████████████▀

▀██████████▀▀
█▀▀▀▀











█▄▄▄▄
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
.
CASINSPORTSBOOK
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀▀█











▄▄▄▄█
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4610



View Profile
July 13, 2023, 08:50:34 PM
Merited by Cyrus (5), ABCbits (5), vapourminer (3), pooya87 (2), NotATether (2), DdmrDdmr (1), Synchronice (1)
 #4

Aren't all the transactions forced to have a destination address?

No. Not at all. This is a very common misconception about how Bitcoin works.

Technically, in the blockchain, there are no addresses at all.

Addresses are just an abstraction that we humans use to make it easier to discuss the concept of modifying control over value.

What ACTUALLY exists in a transaction is a transaction output script.  That output script creates requirements that must be met in order to be allowed to broadcast a new transaction that uses that existing output as an input.

The most common transaction types have scripts that create a requirement to provide a public key that hashes to a given value and a digital signature of the new transaction that matches that public key.

However, while it is very fast and easy for computer software to create and validate these scripts, it would be awkward and error-prone if I were to tell you to please create a transaction that has an output which requires both a public key that hashes to (some 256 bit number) and a digital signature of the transaction that spends the output which can be verified with that public key.

So, instead, we all agree that we will represent that set of instructions with a single value (such as a 1, or a 3, or a set of characters such as bc1), and that we will then join that to the hash of the public key, and add on a checksum to prevent typo and miscommunication errors.  Once we've smooshed all that together, we call the result a "bitcoin address".  Our wallet software knows when it sees the address how to pull it apart and generate the proper transaction output script.

In this case that you've mentioned, a transaction has been created that has an output that does NOT translate into an address.  It didn't use any of the standard address scripts, so wallet software doesn't know how to build the transaction, nor does it know how to spend it. Instead, this transaction output is a script that sets up a puzzle.  You can satisfy the requirements of the puzzle if you provide the puzzle solution in the input of a transaction that you create.  Since wallet software doesn't know how to translate that script, it's something that you'd either have to do by heand, or write your own software to do.

Then, once you've created the proper transaction input with the solution, you would create a transaction output for your transaction that uses one of the standard "address" scripts.  In this way, you would assign the bitcoins to the control of a wallet that you have access to.

 So, even if the winner solves the scriptPubKey, how can then he/she divert the funds to another destination address?
[/quote]
NotATether
Legendary
*
Online Online

Activity: 1582
Merit: 6688


bitcoincleanup.com / bitmixlist.org


View Profile WWW
July 14, 2023, 11:17:01 AM
 #5

DannyHamilton is spot on. Basically, transaction outputs do not have addresses hardcoded to them, (unlike in ETH), but a "script" (that looks like assembly language) that hashes a "script input" to an address and asserts that it equals to the one also placed inside the script.

*script inputs are provided by your wallet to the script when you create a transaction using the unspent output. The script is similar to a BASH script in that it will either exit with success or failure.

This "script" can be replaced by something totally different that does a cryptographic problem instead of hashing to an address. When you see people using this kind of crazy problem script in a P2SH (3) address, that is actually what happens. It's not actually associated with the address (but it's still attached to the private/public keys) and usually it's just a block explorer filling it in.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Flexystar
Full Member
***
Offline Offline

Activity: 1092
Merit: 227



View Profile
July 28, 2023, 10:47:34 AM
 #6

DannyHamilton is spot on. Basically, transaction outputs do not have addresses hardcoded to them, (unlike in ETH), but a "script" (that looks like assembly language) that hashes a "script input" to an address and asserts that it equals to the one also placed inside the script.

*script inputs are provided by your wallet to the script when you create a transaction using the unspent output. The script is similar to a BASH script in that it will either exit with success or failure.

This "script" can be replaced by something totally different that does a cryptographic problem instead of hashing to an address. When you see people using this kind of crazy problem script in a P2SH (3) address, that is actually what happens. It's not actually associated with the address (but it's still attached to the private/public keys) and usually it's just a block explorer filling it in.

I think to understand this one needs to understand how the input and output workflow works. I mean as given in the second post, does it mean I would be solving the puzzle manually and then I have to add the solution manually over the blockchain? I am so not close to understanding the math here or whatever this puzzle solving thing is?

Where do I find this puzzle, a link or some sort of destination would be amazing.

Quote
This "script" can be replaced by something totally different that does a cryptographic problem instead of hashing to an address. When you see people using this kind of crazy problem script in a P2SH (3) address, that is actually what happens. It's not actually associated with the address (but it's still attached to the private/public keys) and usually it's just a block explorer filling it in.

Is this entirely associated with the miners OR non miner person can also get involved with this?
What does it mean to solve this sort of puzzle? A math problem that a mining equipment is not able to solve?
DannyHamilton
Legendary
*
Offline Offline

Activity: 3374
Merit: 4610



View Profile
July 28, 2023, 10:55:44 PM
Merited by vapourminer (2), ABCbits (2)
 #7

I think to understand this one needs to understand how the input and output workflow works.

Correct. If you don't understand how transactions ACTUALLY work, then you won't be able to solve the puzzle without some help from someone that does understand.

I mean as given in the second post, does it mean I would be solving the puzzle manually and then I have to add the solution manually

That's certainly one way that you could do it.

Another option would be to write your own computer program that solves the puzzle and creates the transaction.

Is this entirely associated with the miners OR non miner person can also get involved with this?

Transactions are all publically stored on the blockchain.  Anyone that wants to can learn how to access them and then can find the puzzles.

What does it mean to solve this sort of puzzle?

It means figuring out what data needs to be supplied in a transaction input to satisfy the requirements of the puzzle transaction output. Then, create a transaction that uses that input and sends the bitcoins to whatever address you like.

A math problem that a mining equipment is not able to solve?

Bitcoin mining equipment doesn't solve math problems.  It simply hashes 80 bytes, checks to see if the result is small enough, and if not, tries a different 80 bytes, until it happens to get lucky and stumble on 80 bytes that hash to a low enough value.

pooya87
Legendary
*
Offline Offline

Activity: 3430
Merit: 10505



View Profile
July 29, 2023, 02:58:01 AM
 #8

Where do I find this puzzle, a link or some sort of destination would be amazing.
The closest thing I can think of is the collision reward scripts that created by another core dev Peter Todd (not Mike Hearn) and can be found on bitcointalk in this topic.

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
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!