4 ms·
> https://news.ycombinator.com/item?id=41555482 https://news.ycombinator.com/item?id=41555482 I'll try to give a brief here about how Bitcoin script works but
by csomar 2y ago
> https://news.ycombinator.com/item?id=41555482 https://news.ycombinator.com/item?id=41555482
I'll try to give a brief here about how Bitcoin script works but you'd better read up on the Bitcoin wiki.
Essentially, to make a transaction valid, your script needs to pass.
1. <PubKey> + <Signature> -> This is how most transactions are handled. You provide the transaction with a signature. This doesn't expose your private key and lock the receiver. (as the receiver is signed)
2. <Hash> + <Hashed Content> -> To solve for Hash, you need to provide the Hash Content essentially solving the puzzle. Problem is, if you provide the Hashed Content publicly in the Script, anyone can also submit a competing transaction and set himself as the receiver.