Bitcoin Forum
September 22, 2017, 10:11:03 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Script System  (Read 532 times)
Shirik
Jr. Member
*
Offline Offline

Activity: 32


View Profile
July 04, 2012, 03:32:15 PM
 #1

I'm a software engineer by profession, so when I started looking at bitcoin, the transaction system immediately grabbed my attention. I think I understand it, but the wiki isn't entirely clear, so I was hoping someone could double-check my understanding.

I checked out https://en.bitcoin.it/wiki/Transactions and https://en.bitcoin.it/wiki/Script and get that each input has half of a script, and each output has half of a script. What has been hanging me up is how the two are combined, but I think I finally figured it out. I think that those two halves don't get paired together. Instead, the input script is paired with the previous transaction's output script, so the input script is basically proving that you're allowed to spend the coins from that transaction. Is that correct?

So if I wanted to, I could create an output that could be used by two different addresses by creating a script that basically said "if sig matches this or this, true" right? (Or I could just say it could be spent by anyone by saying "true" always.)

That being said, do most miners actually accept transactions like this? Or do they just reject any transaction that does not follow the typical pattern? (I read about the mtgox loss, but it seemed like a lot of miners were rejecting that transaction.)
1506075063
Hero Member
*
Offline Offline

Posts: 1506075063

View Profile Personal Message (Offline)

Ignore
1506075063
Reply with quote  #2

1506075063
Report to moderator
1506075063
Hero Member
*
Offline Offline

Posts: 1506075063

View Profile Personal Message (Offline)

Ignore
1506075063
Reply with quote  #2

1506075063
Report to moderator
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
.
|
.
|
          ▄█████▄
        ▄█████████▄
      ▄████▀   ▀████▄
    ▄████▀   ▄ ▄█▀████▄
  ▄████▀   ▄███▀   ▀████▄
▄████▀   ▄███▀   ▄   ▀████▄
█████   ███▀   ▄███   █████
▀████▄   ▀██▄▄███▀   ▄████▀
  ▀████▄   ▀███▀   ▄████▀
    ▀████▄       ▄████▀
      ▀████▄   ▄████▀
        ▀███  ████▀
          ▀█▄███▀
unthy
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1506075063
Hero Member
*
Offline Offline

Posts: 1506075063

View Profile Personal Message (Offline)

Ignore
1506075063
Reply with quote  #2

1506075063
Report to moderator
theymos
Administrator
Legendary
*
Offline Offline

Activity: 2786


View Profile
July 04, 2012, 06:16:47 PM
 #2

Right. An output's script provides an algorithm for determining whether that output can be spent, and any input trying to spend the output provides the arguments for that algorithm.

Quote
That being said, do most miners actually accept transactions like this? Or do they just reject any transaction that does not follow the typical pattern? (I read about the mtgox loss, but it seemed like a lot of miners were rejecting that transaction.)

Everyone accepts non-standard transactions if they appear in a block. The default client doesn't mine or relay non-standard transactions. A few big miners like Eligius do accept them, though.

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
Shirik
Jr. Member
*
Offline Offline

Activity: 32


View Profile
July 04, 2012, 07:37:19 PM
 #3

Yeah, what I meant to say is miners refusing to include those transactions in their generated blocks. Naturally you have to accept non-standard transactions in blocks (assuming they're valid) or you wouldn't be able to build on the block chain.

Thanks,
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!