Dev Docs: clarify null data conditions

This commit is contained in:
David A. Harding 2015-11-09 11:46:14 -05:00
parent 21559c3484
commit fd7f7c3ab1
No known key found for this signature in database
GPG key ID: 4B29C30FF29EC4B7
2 changed files with 34 additions and 7 deletions

View file

@ -7,8 +7,10 @@ required:
title_max_40_characters_no_formatting: Null Data (OP_RETURN) Transaction title_max_40_characters_no_formatting: Null Data (OP_RETURN) Transaction
summary_max_255_characters_no_formatting: > summary_max_255_characters_no_formatting: >
A standard transaction type which allows adding 80 bytes of A transaction type relayed and mined by default in Bitcoin Core
arbitrary data to the block chain up to once per transaction. 0.9.0 and later that adds arbitrary data to a provably
unspendable pubkey script that full nodes don't have to store in
their UTXO database.
synonyms_shown_in_glossary_capitalize_first_letter: synonyms_shown_in_glossary_capitalize_first_letter:
- Null data transaction - Null data transaction

View file

@ -426,18 +426,43 @@ Signature script: <sig>
{% autocrossref %} {% autocrossref %}
[Null data][/en/glossary/null-data-transaction]{:#term-null-data}{:.term} pubkey scripts let you add a small amount of arbitrary data to the block [Null data][/en/glossary/null-data-transaction]{:#term-null-data}{:.term}
chain in exchange for paying a transaction fee, but doing so is discouraged. transaction type relayed and mined by default in Bitcoin Core 0.9.0 and
(Null data is a standard pubkey script type only because some people were adding data later that adds arbitrary data to a provably unspendable pubkey script
to the block chain in more harmful ways.) that full nodes don't have to store in their UTXO database. It is
preferable to use null data transactions over transactions that bloat
the UTXO database because they cannot be automatically pruned; however,
it is usually even more preferable to store data outside transactions
if possible.
Consensus rules allow null data outputs up to the maximum allowed pubkey
script size of 10,000 bytes provided they follow all other consensus
rules, such as not having any data pushes larger than 520 bytes.
Bitcoin Core 0.9.x to 0.10.x will, by default, relay and mine null data
transactions with up to 40 bytes in a single data push and only one null
data output that pays exactly 0 satoshis:
{% endautocrossref %} {% endautocrossref %}
~~~ ~~~
Pubkey Script: OP_RETURN <0 to 80 bytes of data> Pubkey Script: OP_RETURN <0 to 40 bytes of data>
(Null data scripts cannot be spent, so there's no signature script.) (Null data scripts cannot be spent, so there's no signature script.)
~~~ ~~~
Bitcoin Core 0.11.x increases this default to 80 bytes, with the other
rules remaining the same.
It is expected that Bitcoin Core 0.12.0 (not released yet) will default
to relaying and mining null data outputs with up to 83 bytes with any
number of data pushes, provided the total byte limit is not exceeded.
There must still only be a single null data output and it must still pay
exactly 0 satoshis.
The `-datacarriersize` Bitcoin Core configuration option allows you to
set the maximum number of bytes in null data outputs that you will relay
or mine.
#### Non-Standard Transactions #### Non-Standard Transactions
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}