Forum Discussion

Robert Rowe's avatar
Robert Rowe
Copper Contributor
Mar 15, 2017

Question on writing documents/data to the blockchain?

I have seen the Bletchly Azure template and how to spin up a private Ethereum Blockchain in Azure... In the examples, you show how to transmit Ether between accounts.   Are there any tutorials on how to write docs (i.e. PDF, Text Blocks, etc...) to the blockchain?    

  • Good question. There is a demo that we have built around real estate transactions, which allow buyers and sellers to transfer home titles. We haven't released the code for the demo, but we are working on it. That said, at a high level there are several ways to accomplish your scenario. The easiest way is to represent the document as a hash and store the hash on the blockchain. 

    • Robert Rowe's avatar
      Robert Rowe
      Copper Contributor

      So, the hash of the data/doc is saved on the block-chain... Is it important to note/persist the block in which the hash was written in order to go back and validate(at a later time)?   Or, is the hash searchable against the entire blockchain.

       

      Also, in the Bletchly example (private blockchain), when we spin it up and the miners are mining, we can see the block count increasing even though no activity is happening.   What is processing those blocks in the background and what is going on?   Is it just a handshake between miners saying we are in consensus (even though nothing may have happened)?

      • Zeyad Rajabi's avatar
        Zeyad Rajabi
        Icon for Microsoft rankMicrosoft

        The document does not have to be stored on the blockchain itself. You can essentially store the document elsewhere and represent the hash of the document on the chain. You can also ensure the representation of the document on the blockchain uses checksum to validate whether the document (outside the chain) gets updated or not. 

         

        With respect to block counts increasing, essentially miners are always doing work and pushing blocks to the chain, albeit, blocks with no transactions. 

Resources