Bitcoin Forum
July 07, 2024, 09:37:57 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Do we need SIGHASH_MULTIPLE for some advance contract?  (Read 685 times)
jl2012 (OP)
Legendary
*
Offline Offline

Activity: 1792
Merit: 1097


View Profile
July 09, 2013, 04:25:22 PM
 #1

Currently, we have SIGHASH_ALL (sign all outputs, the default), SIGHASH_NONE (sign none of the outputs) and, SIGHASH_SINGLE (sign one of the outputs). However, it seems there is no mechanism for user to sign more than one, but not all outputs. For some advanced contracts, one may want to specify multiple but not all outputs. Do we need a SIGHASH_MULTIPLE for this, or could we accomplish this with current code?

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4200
Merit: 8443



View Profile WWW
July 09, 2013, 04:29:39 PM
 #2

It seems weird, but I've never been able to come up with a case that couldn't be handled by the current flags plus some small number of preparatory transactions. I'd be interested in seeing if anyone can come up with one.
 
jl2012 (OP)
Legendary
*
Offline Offline

Activity: 1792
Merit: 1097


View Profile
July 09, 2013, 04:35:56 PM
 #3

It seems weird, but I've never been able to come up with a case that couldn't be handled by the current flags plus some small number of preparatory transactions. I'd be interested in seeing if anyone can come up with one.
 

Do you mean using multiple SIGHASH_ONE inupts?

Donation address: 374iXxS4BuqFHsEwwxUuH3nvJ69Y7Hqur3 (Bitcoin ONLY)
LRDGENPLYrcTRssGoZrsCT1hngaH3BVkM4 (LTC)
PGP: D3CC 1772 8600 5BB8 FF67 3294 C524 2A1A B393 6517
Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526
Merit: 1129


View Profile
July 09, 2013, 05:52:04 PM
 #4

I think you would just have multiple inputs owned by yourself and use SIGHASH_SINGLE. But Gregory is right. I never found a use case for that either (nor most of the script opcodes).
jackjack
Legendary
*
Offline Offline

Activity: 1176
Merit: 1255


May Bitcoin be touched by his Noodly Appendage


View Profile
July 09, 2013, 09:28:40 PM
 #5

I proposed it too: https://bitcointalk.org/index.php?topic=212555.0

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.
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!