Bitman2k
Posts: 3
Joined: Sun Oct 02, 2016 2:42 pm

BTC Scripts

Sun Oct 02, 2016 3:08 pm

Reading the white paper I faced with the term "the Script", to be more exact it's ScriptPubKey.
So let's say Bob wants to send some bitcoins to Alice. He creates a Transaction, where he specifies the previous transaction and then he should Specify the address of Alice. However, instead of this, he speficies the ScriptPubKey.
The ScritpPubKey contains the address of Alice, but it also contains some instructions to run a VM(?) using some Stack.

So my questions are:
1) Where this VM is located ? Is it just the Alice's computer? And what is meant by "Stack"? - the usual programming Stack or something else?
2) What are these instructions and why they need to be placed into the Stack? I checked some commands they are a kinda similar to the commands of assembler language: put some number into stack, etc.
3) The definition says that Alice can spend these money only if the Script gets successfully implemented. But how the others know that Alice successfully implemented the Script?
All the network can see the transaction: Bob send 1 BTC to Alice.
So all the network knows that Alice possesses 1 BTC.
it means that even if a bit coin wallet requires some condition to use the BTC, Alice can always manually generate a Transaction and spend this BTC she received from Bob.
Did I miss something?

User avatar
klaaas
Bronze Bitcoiner
Bronze Bitcoiner
Posts: 418
Joined: Fri Sep 23, 2016 8:17 pm
Location: NL

Re: BTC Scripts

Sun Oct 23, 2016 12:07 pm

a quick read through your questions and some searching on the subject i think you will find some answers over here

Signature script: a script that provides data to the pubkey script

Pubkey Script: A script included in outputs which sets the conditions that must be fulfilled for those satoshis to be spent. Data for fulfilling the conditions can be provided in a signature script.

User avatar
Decoded
Global Moderator
Global Moderator
Posts: 417
Joined: Sat Oct 15, 2016 11:28 am

Donate BTC of your choice to 1fdFgrw59gczh96esrpJST6MVHyQm4VJK

Re: BTC Scripts

Sun Oct 23, 2016 12:49 pm

I think you're slightly mistaken. I'm not sure that the pubkeyscript specifies a vm.

I'm not the best acquainted with the inner details, so don't quote me on this.

The pubkeyscript is needed along with a signature script to create a valid transaction.

The signature script is essentially a transaction signature.

The pubkey script is the script specific to the transaction that acts as a checklist of paramaters, which when fulfilled, allows the outputs to be spendable and the transaction valid.
theres a snake in my boot

User avatar
klaaas
Bronze Bitcoiner
Bronze Bitcoiner
Posts: 418
Joined: Fri Sep 23, 2016 8:17 pm
Location: NL

Re: BTC Scripts

Tue Oct 25, 2016 1:02 am

I think you're slightly mistaken. I'm not sure that the pubkeyscript specifies a vm.

I'm not the best acquainted with the inner details, so don't quote me on this.

The pubkeyscript is needed along with a signature script to create a valid transaction.

The signature script is essentially a transaction signature.

The pubkey script is the script specific to the transaction that acts as a checklist of paramaters, which when fulfilled, allows the outputs to be spendable and the transaction valid.
For as i know it is correct and wil be handled in the client.

Return to “Development & Technical Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest