Bitcoin Forum
May 25, 2024, 03:56:43 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Computational bounty using output scripts?  (Read 817 times)
TalkingAntColony (OP)
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile
May 30, 2013, 03:22:46 PM
 #1

Say someone sent some BTC to an output with a script of math operations that are equivalent to a complex equation. The input script, or what the redeemer of these BTC needs to supply, is the solution to this equation. The BTC are thus a "bounty" to solving this equation. With a limit of 10kb and 201 instructions, one could come up with some fairly complex equations. By including the text "bounty" in the script, others could be made aware of it.
Has anyone else thought about this? Do you think we will ever see this become a feasible idea?

Example 1: find the square root of 9
ScriptPubKey: BOUNTY OP_DROP OP_DUP OP_MUL 9 OP_EQUAL
ScriptSig: 3
Explanation: squares the input and checks if it is equal to 9

Note: OP_MUL is currently disabled...

Example 2: find a SHA256 hash collision
ScriptPubKey: BOUNTY OP_DROP OP_2DUP OP_EQUAL OP_IF OP_RETURN OP_ELSE OP_SHA256 OP_SWAP OP_SHA256 OP_EQUAL OP_ENDIF
ScriptSig: <string1> <string2>
Explanation: Check that string1 and string2 are not equal, then SHA256 each one and check that they are equal
etotheipi
Legendary
*
expert
Offline Offline

Activity: 1428
Merit: 1093


Core Armory Developer


View Profile WWW
May 30, 2013, 03:42:04 PM
 #2

The problem is that there is nothing stopping the miners from taking the solution that you just submitted in a sigscript, and putting it their own transaction to themselves (and dropping yours).  In fact, any of your peers could replace the TxOut to themselves before forwarding to other peers/miners.   It's because there's no signature field that locks the TxOuts (of the redeeming script) into the sigscript. 

You'd have to mine it yourself, so the first time anyone sees it is after it's already in a block.  Better hope it's not orphaned!

Founder and CEO of Armory Technologies, Inc.
Armory Bitcoin Wallet: Bringing cold storage to the average user!
Only use Armory software signed by the Armory Offline Signing Key (0x98832223)

Please donate to the Armory project by clicking here!    (or donate directly via 1QBDLYTDFHHZAABYSKGKPWKLSXZWCCJQBX -- yes, it's a real address!)
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
May 30, 2013, 03:57:38 PM
 #3

Etotheipi ninja'd me with basically the same answer
I just had one more thing in my post: if you really want bounties I think p2pool would reduce the risk of a rogue miner stealing your money
That way honest miners would have the correct transaction (p2pool have good connections with big pools I guess)

Even if I'm right that'd just reduce the risk though, I wouldn't play with this kind of things

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
TalkingAntColony (OP)
Member
**
Offline Offline

Activity: 62
Merit: 10


View Profile
May 30, 2013, 04:42:19 PM
 #4

Yes it seems true that the solution finder has no way to protect their claim without mining their own block. I suppose you could add extra conditions to require certain public keys, such as to issue the bounty to specific individuals. You could for instance make a contract with a supercomputing company to find a solution by requiring their public key and signature in addition to whatever other conditions in the script. The problem there is that the funds are locked up unless there is some backup key to redeem them if the company fails to find a solution. Regardless, I think we will see more complex uses for output scripts as time goes on...
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
May 30, 2013, 04:47:20 PM
 #5

Yes it seems true that the solution finder has no way to protect their claim without mining their own block. I suppose you could add extra conditions to require certain public keys, such as to issue the bounty to specific individuals. You could for instance make a contract with a supercomputing company to find a solution by requiring their public key and signature in addition to whatever other conditions in the script. The problem there is that the funds are locked up unless there is some backup key to redeem them if the company fails to find a solution. Regardless, I think we will see more complex uses for output scripts as time goes on...
Yeah, scripts have HUGE potential
The problem is security and developers' unwillingness to accept more op codes (ie making them standard)

Own address: 19QkqAza7BHFTuoz9N8UQkryP4E9jHo4N3 - Pywallet support: 1AQDfx22pKGgXnUZFL1e4UKos3QqvRzNh5 - Bitcointalk++ script support: 1Pxeccscj1ygseTdSV1qUqQCanp2B2NMM2
Pywallet: instructions. Encrypted wallet support, export/import keys/addresses, backup wallets, export/import CSV data from/into wallet, merge wallets, delete/import addresses and transactions, recover altcoins sent to bitcoin addresses, sign/verify messages and files with Bitcoin addresses, recover deleted wallets, etc.
Gavin Andresen
Legendary
*
qt
Offline Offline

Activity: 1652
Merit: 2217


Chief Scientist


View Profile WWW
May 30, 2013, 05:38:19 PM
 #6

The problem is security and developers' unwillingness to accept more op codes (ie making them standard)

Security, yes (including potential for denial-of-service attacks of various sorts).

But demonstrate a spiffy, compelling use of new opcodes on testnet and we'll talk about making them standard.


How often do you get the chance to work on a potentially world-changing project?
LvM
Full Member
***
Offline Offline

Activity: 126
Merit: 100


View Profile
May 31, 2013, 09:28:15 PM
 #7

The problem is that there is nothing stopping the miners from taking the solution that you just submitted in a sigscript, and putting it their own transaction to themselves (and dropping yours).  In fact, any of your peers could replace the TxOut to themselves before forwarding to other peers/miners.   It's because there's no signature field that locks the TxOuts (of the redeeming script) into the sigscript. 

You'd have to mine it yourself, so the first time anyone sees it is after it's already in a block.  Better hope it's not orphaned!

That beats everything!

BTC violates GAAP, result a MESS  https://bitcointalk.org/index.php?topic=211835.0
Anforderungen an eine PROFESSIONELLE BTC-Anwendung https://bitcointalk.org/index.php?topic=189669
BANKGEHEIMNIS mit BTC gleich NULL!? https://bitcointalk.org/index.php?topic=188383 Antwort: Ja, wenn man nicht höllisch aufpaßt.
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!