Bitcoin Forum
December 11, 2016, 06:28:24 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Some questions about scripts  (Read 965 times)
titeuf_87
Member
**
Offline Offline

Activity: 112


View Profile
May 17, 2011, 11:28:36 AM
 #1

Hi everyone,

I've been looking at the script parts now of the Bitcoin protocol and have the following questions about it:

1) Right now there are only two (I think) different scripts whitelisted and it's not possible to do custom scripts. If a miner starts accepting transactions with non-standard scripts and creates a new block using them, will they also be accepted by the Bitcoin client?

I'm guessing they will, because the transactions being in a block already means they are valid transactions. I'm just asking for confirmation.

2) If I create a nonstandard transaction, with a valid and normal TxIn but with a special TxOut that has a script that always evaluate to true, everyone will be able to claim those bitcoins and use them for their own needs. In this situation, I'm assuming the first person that has a transaction in a valid block will be the "winner" and all the others that tried to use those coins will have their transactions never confirmed?

Thanks!
Titeuf

15kfBM3TQ4PGzL7cKncU3su2pH7ZJmiLtr
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
1481437704
Hero Member
*
Offline Offline

Posts: 1481437704

View Profile Personal Message (Offline)

Ignore
1481437704
Reply with quote  #2

1481437704
Report to moderator
1481437704
Hero Member
*
Offline Offline

Posts: 1481437704

View Profile Personal Message (Offline)

Ignore
1481437704
Reply with quote  #2

1481437704
Report to moderator
1481437704
Hero Member
*
Offline Offline

Posts: 1481437704

View Profile Personal Message (Offline)

Ignore
1481437704
Reply with quote  #2

1481437704
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1036


View Profile WWW
May 17, 2011, 11:43:07 AM
 #2

Hi everyone,

I've been looking at the script parts now of the Bitcoin protocol and have the following questions about it:

1) Right now there are only two (I think) different scripts whitelisted and it's not possible to do custom scripts. If a miner starts accepting transactions with non-standard scripts and creates a new block using them, will they also be accepted by the Bitcoin client?

I'm guessing they will, because the transactions being in a block already means they are valid transactions. I'm just asking for confirmation.

Exactly.

2) If I create a nonstandard transaction, with a valid and normal TxIn but with a special TxOut that has a script that always evaluate to true, everyone will be able to claim those bitcoins and use them for their own needs. In this situation, I'm assuming the first person that has a transaction in a valid block will be the "winner" and all the others that tried to use those coins will have their transactions never confirmed?

Again correct, but I'm not sure the default client will be able to create a corresponding txIn 9even though it's trivial).

aka sipa, core dev team

Tips and donations: 1KwDYMJMS4xq3ZEWYfdBRwYG2fHwhZsipa
ribuck
Donator
Legendary
*
Offline Offline

Activity: 826


View Profile
May 17, 2011, 01:19:41 PM
 #3

... if a miner starts accepting transactions with non-standard scripts ...

Luke-jr already accepts non-standard transactions and mines them into blocks, if you include a fee of 0.00004096 bitcoins per 512 bytes, and connect your (modified) client to his node using "-addnode=nat.router.dashjr.org".
titeuf_87
Member
**
Offline Offline

Activity: 112


View Profile
May 17, 2011, 02:02:09 PM
 #4

...
Exactly.
...

Again correct, but I'm not sure the default client will be able to create a corresponding txIn 9even though it's trivial).
Thanks Sipa, I think I start to understand the bitcoin protocol more completely now Smiley

Luke-jr already accepts non-standard transactions and mines them into blocks, if you include a fee of 0.00004096 bitcoins per 512 bytes, and connect your (modified) client to his node using "-addnode=nat.router.dashjr.org".

That's nice to know. Are there any non-standard transactions in the blockchain yet? Blockexplorer shows three under "Latest strange transactions", are there more?

15kfBM3TQ4PGzL7cKncU3su2pH7ZJmiLtr
theymos
Administrator
Legendary
*
expert
Offline Offline

Activity: 2506


View Profile
May 17, 2011, 03:22:49 PM
 #5

That's nice to know. Are there any non-standard transactions in the blockchain yet? Blockexplorer shows three under "Latest strange transactions", are there more?

That's all of them on the main network. There are a few more on testnet:
http://blockexplorer.com/testnet
(The public key sizes for these transactions is odd.)

1NXYoJ5xU91Jp83XfVMHwwTUyZFK64BoAD
titeuf_87
Member
**
Offline Offline

Activity: 112


View Profile
May 17, 2011, 04:56:17 PM
 #6


That's all of them on the main network. There are a few more on testnet:
http://blockexplorer.com/testnet
(The public key sizes for these transactions is odd.)

Thanks!

That pretty much answers all my questions about scripts (for now). If I find anything else I don't understand, I'll ask Smiley

15kfBM3TQ4PGzL7cKncU3su2pH7ZJmiLtr
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!