Bitcoin Forum
May 07, 2024, 10:48:57 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 [2]  All
  Print  
Author Topic: Is this transaction spendable?  (Read 5120 times)
rapport
Full Member
***
Offline Offline

Activity: 157
Merit: 100


View Profile
July 26, 2014, 09:58:22 AM
 #21

maybe its about the fees?

amaclin has answered above
1715078937
Hero Member
*
Offline Offline

Posts: 1715078937

View Profile Personal Message (Offline)

Ignore
1715078937
Reply with quote  #2

1715078937
Report to moderator
TalkImg was created especially for hosting images on bitcointalk.org: try it next time you want to post an image
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
poutine310
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
July 29, 2014, 04:02:45 PM
 #22

I created this transaction and it is in fact unspendable due to the fact the alt stack does not persist from the scriptSig to the scriptPubKey. I'm glad it sparked some discussion though.
Yoghurt114
Newbie
*
Offline Offline

Activity: 13
Merit: 0


View Profile
July 30, 2014, 02:32:22 PM
 #23

I'm curious though.

Can anyone think of a script that uses the altstack and can do something no other script can?
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
July 30, 2014, 02:40:45 PM
Last edit: July 30, 2014, 03:39:02 PM by DeathAndTaxes
 #24

I'm curious though.

Can anyone think of a script that uses the altstack and can do something no other script can?

An m of n PubKeyHash (as opposed to PubKey) multisig.  I haven't exhaustively tested it so there may be some clever solution I just didn't see but anything not involving altstack ends up being much longer and more complex.


amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
July 30, 2014, 03:05:45 PM
 #25

Quote
Can anyone think of a script that uses the altstack and can do something no other script can?

Some algorithms will be much more shorter using the altStack.
For example this script is only 10 bytes long
Code:
OP_TOALTSTACK 
OP_TOALTSTACK
OP_TOALTSTACK
OP_HASH160
OP_FROMALTSTACK
OP_HASH160
OP_FROMALTSTACK
OP_HASH160
OP_FROMALTSTACK
OP_HASH160
and (I can be wrong, please correct me) replaces 4 values on the top of the stack with their hashes, leaving the original order.
Try to do the same without altStack in less than 10 bytes.

Update1: OK, may be it is possible to do with OP_2DUP and OP_2SWAP opcodes. You can try to find out your own examples for using altStack

Update2: Note, that bitcoin script language is not Turing-complete. Not all things are even possible with current opcode set
TimS (OP)
Sr. Member
****
Offline Offline

Activity: 250
Merit: 253


View Profile WWW
July 30, 2014, 04:31:04 PM
 #26

I'm curious though.

Can anyone think of a script that uses the altstack and can do something no other script can?
I'm pretty sure that theoretically, there's nothing you can do with altstack that you can't without (given enough space). However, it can make some things simpler/shorter, and since there is a limit on the script size, that can make it quite useful.
rollingMyCar
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
November 13, 2014, 08:35:47 PM
 #27

what is altstack?Huh
do you have some tutorials?

thanks
amaclin
Legendary
*
Offline Offline

Activity: 1260
Merit: 1019


View Profile
November 13, 2014, 08:49:37 PM
 #28

what is altstack?Huh
do you have some tutorials?

thanks

it is alternative/secondary stack
it is not used now for standard scripts
but the operations are valid
rollingMyCar
Member
**
Offline Offline

Activity: 112
Merit: 10


View Profile
November 15, 2014, 11:20:09 AM
 #29

what is altstack?Huh
do you have some tutorials?

thanks

it is alternative/secondary stack
it is not used now for standard scripts
but the operations are valid

Where i can get more info a bout altstack?
Do you Have some docs or links?
Thanks!
Muhammed Zakir
Hero Member
*****
Offline Offline

Activity: 560
Merit: 506


I prefer Zakir over Muhammed when mentioning me!


View Profile WWW
November 15, 2014, 02:12:16 PM
 #30

what is altstack?Huh
do you have some tutorials?

thanks

it is alternative/secondary stack
it is not used now for standard scripts
but the operations are valid

Where i can get more info a bout altstack?
Do you Have some docs or links?
Thanks!

See https://bitcoin.org/en/developer-guide#p2pkh-script-validation

   ~~MZ~~

Pages: « 1 [2]  All
  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!