Bitcoin Forum
May 04, 2024, 02:24:41 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoin script  (Read 114 times)
AlexR12 (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 14, 2017, 04:38:27 AM
Last edit: December 14, 2017, 04:55:53 AM by AlexR12
 #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?
"Governments are good at cutting off the heads of a centrally controlled networks like Napster, but pure P2P networks like Gnutella and Tor seem to be holding their own." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714789481
Hero Member
*
Offline Offline

Posts: 1714789481

View Profile Personal Message (Offline)

Ignore
1714789481
Reply with quote  #2

1714789481
Report to moderator
1714789481
Hero Member
*
Offline Offline

Posts: 1714789481

View Profile Personal Message (Offline)

Ignore
1714789481
Reply with quote  #2

1714789481
Report to moderator
1714789481
Hero Member
*
Offline Offline

Posts: 1714789481

View Profile Personal Message (Offline)

Ignore
1714789481
Reply with quote  #2

1714789481
Report to moderator
AlexR12 (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 14, 2017, 04:25:37 PM
 #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!
crairezx20
Legendary
*
Offline Offline

Activity: 1638
Merit: 1046



View Profile
December 14, 2017, 04:41:08 PM
 #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?
odolvlobo
Legendary
*
Offline Offline

Activity: 4298
Merit: 3214



View Profile
December 14, 2017, 05: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.

Join an anti-signature campaign: Click ignore on the members of signature campaigns.
PGP Fingerprint: 6B6BC26599EC24EF7E29A405EAF050539D0B2925 Signing address: 13GAVJo8YaAuenj6keiEykwxWUZ7jMoSLt
mayo2u
Member
**
Offline Offline

Activity: 325
Merit: 26


View Profile
December 14, 2017, 05: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?
AlexR12 (OP)
Newbie
*
Offline Offline

Activity: 21
Merit: 0


View Profile
December 14, 2017, 07: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 :-)
yizhaks
Newbie
*
Offline Offline

Activity: 14
Merit: 0


View Profile
December 14, 2017, 07: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
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!