Author

Topic: Bitcoin script (Read 137 times)

newbie
Activity: 14
Merit: 0
December 14, 2017, 02:07:18 PM
#7
bitcoin is not all about transferring coins from one address to the other. there are other possibilities, and through the script you tell the network exactly what you want to do
newbie
Activity: 21
Merit: 0
December 14, 2017, 02:05:37 PM
#6
Big thanks to all who responded! I want to know the role that bitcoin scripts play in bitcoin transaction output. In other words, assume there are no scripts in bitcoin's transaction output and only a public key is there, what exactly will be impossible under this assumption? My question came from the following line in a textbook on Bitcoins: "...we study the Bitcoin scripting language and come to understand why a script is used [...in transaction's output...] instead of simply assigning a public key". But the book does a poor job in explaining it. That's why I'm asking it here. Thanks is advance for your patience with newbies :-)
member
Activity: 325
Merit: 26
December 14, 2017, 12:19:04 PM
#5
Hello!
I'm trying to understand Bitcoin scripts, but it seems like all sources that I find on the Internet assume that the reader has computer science background. For example, "Each transaction output doesn't just specify a public key. It actually specifies a script". Why? What's the problem with specifying just a public key? What breaks down in the design of Bitcoin if we don't use any scripts?


So, you're trying to understand how Bitcoin works and you wonder why you need to understand the basics of programming? That's like trying to understand RSA or elliptic curve cryptography and wondering why you need to have basic math skills.


Quote
Bitcoin uses a scripting system for transactions. Forth-like, Script is simple, stack-based, and processed from left to right. It is purposefully not Turing-complete, with no loops.

A script is essentially a list of instructions recorded with each transaction that describe how the next person wanting to spend the Bitcoins being transferred can gain access to them. The script for a typical Bitcoin transfer to destination Bitcoin address D simply encumbers future spending of the bitcoins with two things: the spender must provide

a public key that, when hashed, yields destination address D embedded in the script, and
a signature to show evidence of the private key corresponding to the public key just provided.
Scripting provides the flexibility to change the parameters of what's needed to spend transferred Bitcoins. For example, the scripting system could be used to require two private keys, or a combination of several, or even no keys at all.
https://en.bitcoin.it/wiki/Script


This is a pretty straight forward answer. If you want to delve deeper then you need to start grasping some programming basics. To answer your question - how would the transactions to the block be added without some mechanism to do so?
legendary
Activity: 4466
Merit: 3391
December 14, 2017, 12:12:01 PM
#4
Hello!
I'm trying to understand Bitcoin scripts, but it seems like all sources that I find on the Internet assume that the reader has computer science background. For example, "Each transaction output doesn't just specify a public key. It actually specifies a script". Why? What's the problem with specifying just a public key? What breaks down in the design of Bitcoin if we don't use any scripts?


The output script specifies the requirements for spending the bitcoins in the output. It allows for many different kinds of transactions. If the output only includes the address (actually pubkeyhash), then there could only be one kind of transaction.
legendary
Activity: 1638
Merit: 1046
December 14, 2017, 11:41:08 AM
#3
Honestly for me i don't really understand what actually you wanted to know but if you wanted more about bitcoin better to check the wiki for bitcoin
https://en.wikipedia.org/wiki/Bitcoin
Or this main wiki page of bitcoin https://en.bitcoin.it/wiki/Main_Page

If you are talking about for transaction the public key that i know is bitcoin address? am i right and then the script you are talking about is how to send the bitcoin to other bitcoin address specify with public key?
newbie
Activity: 21
Merit: 0
December 14, 2017, 11:25:37 AM
#2
Dear forum members, I would like to ask you again! Could someone answer my question from the previous message? I would really appreciate it!
newbie
Activity: 21
Merit: 0
December 13, 2017, 11:38:27 PM
#1
Hello!
I'm trying to understand Bitcoin scripts, but it seems like all sources that I find on the Internet assume that the reader has computer science background. For example, "Each transaction output doesn't just specify a public key. It actually specifies a script". Why? What's the problem with specifying just a public key? What breaks down in the design of Bitcoin if we don't use any scripts?
Jump to: