3

As far as I understand, a non-standard transaction can be mined in to a block (and this block will be accepted by all nodes), but nodes will not relay a non-standard transaction to other nodes.

Why is it that miners have the freedom to construct non-standard transactions, but everyone else is limited to standard transactions?

I've heard that limiting the types of transactions that get relayed is some form of protection (against unusual script types that could cause problems). However, if this is the reason, doesn't this just leave miners with the ability to perform an attack whilst leaving everyone else restricted?

I'm not against standard transactions. I'm just not sure how this situation came to be.

2 Answers 2

6

doesn't this just leave miners with the ability to perform an attack whilst leaving everyone else restricted?

Not necessarily. Many of the attacks that the standardness rules protect against require large and many transactions that are expensive to verify. If a node is sent a lot of expensive to verify transactions, it can effectively go down as it spends time verifying those transactions instead of verifying and relaying other "normal" transactions and blocks.

However by virtue of mining, a miner can only create transactions that are limited in size, and they are limited in the number of transactions that can be sent in a block. So non-standard transactions that are large and expensive to verify can be included in blocks (and they have been before), but because there are few of them and they happen, at worst, infrequently, it isn't that big of a problem. The problem is only when there are a lot of such transactions which can only happen via normal transaction broadcast, and then standardness rules will prevent those from being verified (standardness is checked before any expensive verifications happen) and relayed.

2
  • Thank you. So the mempool would have no limit to the number of expensive to verify transactions it could receive, which could be used as an attack. Whereas blocks can hold a limited number of transactions (delivered every 10 minutes), so any expensive to verify transactions are less of a problem?
    – inersha
    Apr 11, 2018 at 11:33
  • 1
    Basically yes. The mempool does have a limited size, but that limit is pretty large is there is effectively no limit.
    – Ava Chow
    Apr 11, 2018 at 16:15
1

Why is it that miners have the freedom to construct non-standard transactions, but everyone else is limited to standard transactions?

  • You are not limited to patch your code and relay non-standard transactions
  • You are not limited to promote your client and its source code
  • You are not limited to be a miner

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.