<blockquote>
  <p>Does the bitcoin blockchain allow you to store this document hash (or
  anything else), is it not meant specifically to store the bitcoin
  crypto currency transaction details??</p>
</blockquote>

<p>Yes, the Bitcoin blockchain isn't projected to store the data inside it, but it is possible with the type of transaction called Transaction NULL data, and it uses the OPT_RETURN operator of Bitcoin script.</p>

<h2>Transaction NULL data (OP_RETUNR)</h2>

<p>It was introduced in version Bitcoin Core 0.9 in 2014, this transaction marked the transaction of how not correlated with moving of bitcoins.</p>

<p>The scriptPubKey is simple with OPT_RETURN, the example is like how this:</p>

<pre><code>OPT_RETURN &lt;data&gt;
</code></pre>

<p>From documentation of <a href="http://docs.proofofexistence.com/#/?id=proof-of-existence" rel="nofollow noreferrer">Proof of Existence</a> that I have read quickly say this </p>

<blockquote>
  <p>Calculate the document's SHA256 digest.</p>
  
  <p>Find a transaction in the bitcoin blockchain containing an OP_RETURN output with the document's
  hash prepended by our marker bytes, which are 0x444f4350524f4f46 (or
  'DOCPROOF' in ascii). </p>
  
  <p>Some online services like Coin Secrets or blockchain.info's list can help you locate OP_RETURN transactions more easily. </p>
  
  <p>The existence of that transaction in the blockchain proves
  that the document existed at the time the transaction got included
  into a block</p>
</blockquote>

<p>So the ScriptPubKey started with this code</p>

<pre><code>OPT_RETURN 0x444f4350524f4f46...
</code></pre>

<p>With this method, the System of Proof of Existence can found all transactions generated and the quantity of data stored with the System can be calculated with a simple parsing of blockchain (it can be is a good exercise).</p>

<p>There are other information on Transaction NULL data, like</p>

<ul>
<li>You can not store a lot data, because exist a limit fixed to 80 bytes.</li>
<li>These transactions are not indicated by Bitcoin core (official Client Bitcoin)</li>
<li>You can read more details on the transaction null data on <a href="https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch07.asciidoc#data-recording-output-return" rel="nofollow noreferrer">BitcoinBook</a></li>
</ul>

<blockquote>
  <p>I would have thought these solutions will use their own blockchain.</p>
</blockquote>

<p>It can be is a solution to implement this System, but the develope an own blockchain that work is difficult.
I want to add another information on the implementation of this system, for storing the document is necessary a blockchain system?
I think is a good solution a distributed database because with document there are different problems, like:</p>

<ul>
<li>The document, an example a certificate can contain some error (This was an problem that happened to me) and if this certificate was stored inside the blockchain is immutable and it can not be invalidated because the base of blockchain is immutability. </li>
</ul>

<p>But this was only my think.</p>

CC BY-SA 4.0
2020-01-30T04:42:25.107Z
thanks, this does clarify the usage.  Will accept the answer. One more question, if we do use the bitcoin blockchain for this purpose would we have to pay for it ? On the question if we need a blockchain for such a system, well the plan is only to use it for relevant scenarios where the validity or existence of the document can be questioned. Using a regular distributed DB the documents (and thereby their hashes) will not be immutable.
user132797
CC BY-SA 4.0
2020-01-31T16:00:41.137Z
Yes you must pay the miner for include your transaction on the official blockchain
vincenzopalazzo
CC BY-SA 4.0
2020-01-29T13:09:01.480Z
2020-01-29T13:09:01.480Z
vincenzopalazzo
<p>I am quite new to the blockchain and bitcoin world. I was looking at some ProofOfExistance (PoE) solutions (Digital Notary) for documents. 
While these solutions store the hash of document+timestamp, they mention that they store the document hash in "the bitcoin blockchain". Does the bitcoin blockchain allow you to store this document hash (or anything else), is it not meant specifically to store the bitcoin crypto currency transaction details?? I would have thought these solutions will use their own blockchain.</p>

<p>Asking the question in this forum as PoE documentation mentioned "bitcoin clockchain".</p>

<blockchain>
Storing Provenance details in Bitcoin Blockchain
user132797
# Storing Provenance details in Bitcoin Blockchain

(Asked by: username_0 on 2020-01-29)

I am quite new to the blockchain and bitcoin world. I was looking at some ProofOfExistance (PoE) solutions (Digital Notary) for documents.
While these solutions store the hash of document+timestamp, they mention that they store the document hash in "the bitcoin blockchain". Does the bitcoin blockchain allow you to store this document hash (or anything else), is it not meant specifically to store the bitcoin crypto currency transaction details?? I would have thought these solutions will use their own blockchain.

Asking the question in this forum as PoE documentation mentioned "bitcoin clockchain".

**Tags:** blockchain


---

## 1 answers

### Answer by username_1 on 2020-01-29. Score: 1 | Accepted answer

> Does the bitcoin blockchain allow you to store this document hash (or
> anything else), is it not meant specifically to store the bitcoin
> crypto currency transaction details??

Yes, the Bitcoin blockchain isn't projected to store the data inside it, but it is possible with the type of transaction called Transaction NULL data, and it uses the OPT\_RETURN operator of Bitcoin script.

## Transaction NULL data (OP\_RETUNR)

It was introduced in version Bitcoin Core 0.9 in 2014, this transaction marked the transaction of how not correlated with moving of bitcoins.

The scriptPubKey is simple with OPT\_RETURN, the example is like how this:

```
OPT_RETURN <data>

```

From documentation of [Proof of Existence](http://docs.proofofexistence.com/#/?id=proof-of-existence) that I have read quickly say this

> Calculate the document's SHA256 digest.
>
> Find a transaction in the bitcoin blockchain containing an OP\_RETURN output with the document's
> hash prepended by our marker bytes, which are 0x444f4350524f4f46 (or
> 'DOCPROOF' in ascii).
>
> Some online services like Coin Secrets or blockchain.info's list can help you locate OP\_RETURN transactions more easily.
>
> The existence of that transaction in the blockchain proves
> that the document existed at the time the transaction got included
> into a block

So the ScriptPubKey started with this code

```
OPT_RETURN 0x444f4350524f4f46...

```

With this method, the System of Proof of Existence can found all transactions generated and the quantity of data stored with the System can be calculated with a simple parsing of blockchain (it can be is a good exercise).

There are other information on Transaction NULL data, like

* You can not store a lot data, because exist a limit fixed to 80 bytes.
* These transactions are not indicated by Bitcoin core (official Client Bitcoin)
* You can read more details on the transaction null data on [BitcoinBook](https://github.com/bitcoinbook/bitcoinbook/blob/develop/ch07.asciidoc#data-recording-output-return)

> I would have thought these solutions will use their own blockchain.

It can be is a solution to implement this System, but the develope an own blockchain that work is difficult.
I want to add another information on the implementation of this system, for storing the document is necessary a blockchain system?
I think is a good solution a distributed database because with document there are different problems, like:

* The document, an example a certificate can contain some error (This was an problem that happened to me) and if this certificate was stored inside the blockchain is immutable and it can not be invalidated because the base of blockchain is immutability.

But this was only my think.

> **Comments:**
> **username_0**: thanks, this does clarify the usage.  Will accept the answer. One more question, if we do use the bitcoin blockchain for this purpose would we have to pay for it ? On the question if we need a blockchain for such a system, well the plan is only to use it for relevant scenarios where the validity or existence of the document can be questioned. Using a regular distributed DB the documents (and thereby their hashes) will not be immutable.  
> **username_1**: Yes you must pay the miner for include your transaction on the official blockchain  

---

