Bitcoin Forum
April 26, 2024, 12:53:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Some questions about scripts  (Read 1194 times)
titeuf_87 (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


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
The forum was founded in 2009 by Satoshi and Sirius. It replaced a SourceForge forum.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714092799
Hero Member
*
Offline Offline

Posts: 1714092799

View Profile Personal Message (Offline)

Ignore
1714092799
Reply with quote  #2

1714092799
Report to moderator
1714092799
Hero Member
*
Offline Offline

Posts: 1714092799

View Profile Personal Message (Offline)

Ignore
1714092799
Reply with quote  #2

1714092799
Report to moderator
1714092799
Hero Member
*
Offline Offline

Posts: 1714092799

View Profile Personal Message (Offline)

Ignore
1714092799
Reply with quote  #2

1714092799
Report to moderator
Pieter Wuille
Legendary
*
qt
Offline Offline

Activity: 1072
Merit: 1174


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).

I do Bitcoin stuff.
ribuck
Donator
Hero Member
*
Offline Offline

Activity: 826
Merit: 1039


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 (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


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
*
Offline Offline

Activity: 5180
Merit: 12884


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 (OP)
Member
**
Offline Offline

Activity: 111
Merit: 10


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:  

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