Understanding "Anyone-Can-Spend" Transactions

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
I do not think i have a good understanding of what is a Anyone-Can-Spend TX
I am interested in understanding how this relates when non-segwit nodes interpret a segwit TX
 
  • Like
Reactions: Lee Adams

jl777

Active Member
Feb 26, 2016
279
345
it just allows non-segwit nodes to ignore segwit tx and think they can spend it
of course how the wallets will know which anyone can spend tx is meant for them, this I am not sure about, since bitcoin tx doesnt actually include an address....
 

Chronos

Member
Mar 6, 2016
56
44
www.youtube.com
I think none of the ANYONE_CAN_SPEND txns would be for a non-segwit node, since such a node would never generate such a payment address. Correct?
 

adamstgbit

Well-Known Member
Mar 13, 2016
1,206
2,650
it just allows non-segwit nodes to ignore segwit tx and think they can spend it
of course how the wallets will know which anyone can spend tx is meant for them, this I am not sure about, since bitcoin tx doesnt actually include an address....

https://en.bitcoin.it/w/images/en/e/e1/TxBinaryMap.png
sure it does

in the "sig&PubKey (script)" there are 2 32bit words, thats where the input address is stored?

its a little more complex than i imagined, :eek: why the hell is dose a TX include both little-endian and big-endian serialization!? who coded this???? Lol!
 
Last edited:

jl777

Active Member
Feb 26, 2016
279
345
no, the input address is based on the rmd160(sha256(pubkey))
unless it is a p2sh output, then replace pubkey with the p2sh script
a few other exceptions, but the output script determines the address