Bitcoin Forum
December 07, 2016, 06:43:59 PM *
News: To be able to use the next phase of the beta forum software, please ensure that your email address is correct/functional.
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Purpose of IsStandard  (Read 1081 times)
CodesInChaos
Newbie
*
Offline Offline

Activity: 19



View Profile
July 06, 2012, 01:03:25 PM
 #1

My understanding of `IsStandard` is that non standard transactions:

* are considered valid when they're part of the block-chain.
* don't get relayed, and many miners won't mine them.

See https://en.bitcoin.it/wiki/Nonstandard_block

This means that clients must be able to handle non standard blocks correctly, and bugs in the handling of non standard transactions are still problematic. So see no security gain, and it doesn't simplify clients either.

Quote from: Gavin
You're right, I think even without blockexplorer Satoshi would've added the IsStandard() check.  There were a series of "oops, didn't think of that" moments that pushed him to disable a bunch, tighten up some requirements on existing opcodes, and add IsStandard().

In general, I believe in "whitelisting" instead of "blacklisting" to try to prevent harm. Enable functionality that you can prove (or convince yourself beyond a reasonable doubt) will not cause problems. I'm strongly influenced from watching web content systems that fail repeatedly trying to detect malicious HTML or CSS.
https://bitcointalk.org/index.php?topic=38932.msg476436#msg476436
I don't understand this quote. Since those block can and do occasionally occur in the blockchain, what is the security gain he's talking about?

So what's the purpose of `IsStandard`? It hinders innovation at no gain I can see.
1481136239
Hero Member
*
Offline Offline

Posts: 1481136239

View Profile Personal Message (Offline)

Ignore
1481136239
Reply with quote  #2

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

Posts: 1481136239

View Profile Personal Message (Offline)

Ignore
1481136239
Reply with quote  #2

1481136239
Report to moderator
1481136239
Hero Member
*
Offline Offline

Posts: 1481136239

View Profile Personal Message (Offline)

Ignore
1481136239
Reply with quote  #2

1481136239
Report to moderator
1481136239
Hero Member
*
Offline Offline

Posts: 1481136239

View Profile Personal Message (Offline)

Ignore
1481136239
Reply with quote  #2

1481136239
Report to moderator
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218


Gerald Davis


View Profile
July 06, 2012, 01:46:52 PM
 #2

There is a reason that the quote function creates a back link.  Context would be useful.

The network "could" probably operate just fine without the IsStandard check BUT IsStandard is a sanity check of sort.  Bitcoin is complex, very complex and the number of people who understand it completely is probably less than ten (I would argue it is zero).  Bugs and unanticipated side effects are rare but do happen.  

IsStandard provides the ability to unit test at least "standard transactions" (a definition which is continually evolving).  If a non-standard transaction can be clearly defined and gains popularity it can be added to the IsStandard check in future versions.  

The purpose of not relaying standard transactions is to limit the effect of unpatched clients on the network.  Pools, miners, major exchanges/merchants/service providers, and developers tend to be good at upgrading to patch vulnerabilities.  Many "casual users" tend to be very bad (look at the version breakdown charts if you need proof).  By making default action to not relay non-standard transactions the threat from these unpatched nodes is reduced.

Eventually IsStandard will likely go away but I don't see any rush.  Bitcoin is BETA v0.6.x right now.  Having sanity checks in place is a good idea.  The codebase is still very young and portions of it cumbersome which makes producing bug free updates more difficult.
CodesInChaos
Newbie
*
Offline Offline

Activity: 19



View Profile
July 06, 2012, 01:56:24 PM
 #3

I can't hit quote on threads I can't post in, so I used copy&paste for quoting. I've added a link.

My point is that the sanity check is at a point where it doesn't really help. Clients will receive non standard transactions once they're in the block-chain. So I don't see how IsStandard protects them from bugs in handling non-standard transactions.
davout
Legendary
*
Offline Offline

Activity: 1358


1davout


View Profile WWW
July 06, 2012, 07:35:12 PM
 #4

There is a reason that the quote function creates a back link.  Context would be useful.

[...]

Eventually IsStandard will likely go away but I don't see any rush.  Bitcoin is BETA v0.6.x right now.  Having sanity checks in place is a good idea.  The codebase is still very young and portions of it cumbersome which makes producing bug free updates more difficult.
Wrong.

IsStandard is not a sanity check, it's a DOS protection.
A transaction is either valid or not, it has nothing to do with being "standard" in the IsStandard check semantics.

Mike Hearn
Legendary
*
expert
Offline Offline

Activity: 1526


View Profile
July 11, 2012, 08:58:13 AM
 #5

It raises the difficulty of doing things like flooding the network with ultra-expensive transactions and hitting other weird unexpected edge cases. It's not the case that the only bugs you need to consider are "see tx in block -> crash".
Sergio_Demian_Lerner
Hero Member
*****
expert
Offline Offline

Activity: 534


View Profile WWW
July 11, 2012, 03:28:01 PM
 #6

When I analyzed and found the DoS vulnerabilities in 0.6.2, I remember having also found potential DoS vectors that were prevented by the IsStandard() check. The attack surface is a lot greater if the check is absent, so I think the check is completely necessary right now.

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!