<ul>
<li>Each scriptPubKey is limited to 10000 bytes.</li>
<li>Each individual push in a scriptPubKey is limited to 520 bytes.</li>
<li>Transactions are limited by the block weight limit.</li>
</ul>

CC BY-SA 4.0
2018-09-14T14:55:16.097Z
thank you, so just to make sure I understand correctly - does it mean I could have 10 pushes (520 each) in one output and one op_return with total of >5 kB? and does 520 includes op code itself or is 520 just raw data?
Wapac
CC BY-SA 4.0
2018-09-03T14:15:38.833Z
2018-09-03T14:15:38.833Z
Pieter Wuille
<p>What is the validation rule, not policy, for op_return? What is the maximum length of the data that can be attached? Is it 514 bytes? As if the maximum script size was 520 bytes -1 byte for the instruction itself and -3 bytes for push instruction? Also is it possible to have more instructions after op_return, not just one push?</p>

CC BY-SA 4.0
2018-09-02T08:42:00.357Z
IMO 520 is for the push data (excluding the OP_PUSHDATA and its size).
Jonas Schnelli
CC BY-SA 4.0
2018-09-02T10:04:38.827Z
Does it mean I could have 10 pushes in one output and one op_return with total of 5 kB?
Wapac
<consensus><validation><op-return>
Consensus roles for op_return
Wapac
# Consensus roles for op_return

(Asked by: username_0 on 2018-09-02)

What is the validation rule, not policy, for op\_return? What is the maximum length of the data that can be attached? Is it 514 bytes? As if the maximum script size was 520 bytes -1 byte for the instruction itself and -3 bytes for push instruction? Also is it possible to have more instructions after op\_return, not just one push?

**Tags:** consensus, validation, op-return

> **Comments:**
> **username_1**: IMO 520 is for the push data (excluding the OP_PUSHDATA and its size).  
> **username_0**: Does it mean I could have 10 pushes in one output and one op_return with total of 5 kB?  

---

## 1 answers

### Answer by username_2 on 2018-09-03. Score: 1

* Each scriptPubKey is limited to 10000 bytes.
* Each individual push in a scriptPubKey is limited to 520 bytes.
* Transactions are limited by the block weight limit.

> **Comments:**
> **username_0**: thank you, so just to make sure I understand correctly - does it mean I could have 10 pushes (520 each) in one output and one op_return with total of >5 kB? and does 520 includes op code itself or is 520 just raw data?  

---

