1

I am new to bitcoin world and I am reading this paper: Secure multiparty computations on Bitcoin https://eprint.iacr.org/2013/784.pdf

The author said on page 7 that the standard bitcoin transaction can be represented as in attached picture. Could anyone explain what is meant by in-script and out-script. And Could any one give a easy explaniation to that standard transaction?enter image description here

1 Answer 1

1

What is meant by the both seems to be answered following the diagram in the pdf: "The transactions where the input script is a signature, and the output script is a verification algorithm are the most common type of transactions" and in context seems to directly refer to Inputs and Outputs used in Bitcoin.

I apologise in advance if you find my answer too simplified.

You can look at Inputs and Outputs like a coin in your pocket: you received it as an input in change while at the store last night, they received it as an input from the bank earlier in the week, and the bank received it as an input from the mint. The exact same coin at the same time was an output from the Mint that went to the bank, an output from the bank to the store, and an output from the store to you. When you give that coin to the gas station tomorrow, it will be your Output, and the gas station's Input.

So it is with a bitcoin: it starts life magicked into being by a miner who receives it as a reward for mining a block. He sells it for cash to pay his electric bill and so in a transaction on the blockchain, that same bitcoin is transferred as an Output from the transaction that magicked it into life, and an Input to the address of the new owner. Every single bitcoin transaction can thus be looked at as defining who owned that sum immediately beforehand: its in-script, and who may spend that coin next: its out-script. (I'm deliberately not mentioning how transaction fees affect Inputs and Outputs for simplicity.)

I've covered how the In and Out describes the movement of a bitcoin sum, but what about "Script"? In bitcoin (and computing generally) a Script is a very short program describing how data is to be handled. Here, the Out-script is a short program that defines the conditions under which that bitcoin may be transferred: in a standard transaction (I'll come to that shortly) the Out-script program will say something like "this sum may only be transferred by the private key that matches public key X". The In-script program will say something like "My right to receive these funds may be identified by Y". Only when combined and validated will the network at large agree that the transaction happened.

I've not read his entire PDF but I'll take a punt on just the section shown that The Standard Transaction he refers to is a p2pkh transaction. Your easy explanation to the diagram is this: Two sets of bitcoins (v1B and v2B) had ended up unspent in transaction Ty1 and Ty2 (think: you have two unspent coins in front of you, both received in change from different stores.) Now comes transaction Tx which identifies itself as having the right to spend those coins through In-scripts1 and 2; it imposes a condition PIx on whomever would next spend those two coins; and the result is the two are combined in one new, larger value vB. (Think: you pick the coins up and put them in your pocket.)

I do not consider myself an expert here, and am acutely aware the above is likely oversimplified to the point of offensiveness. If so, I apologise and encourage you to read https://en.bitcoin.it/wiki/Transaction for a more serious background to your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.