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:
From documentation of 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
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
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.