How to create a version control for a simple array using blockchain

0 votes

I have built a very simple blockchain in which I want to record additions of new numbers, deletions, and interchanging of numbers. How do i store these changes without giving them a lot of storage space? 

I've considered creating a merkle tree of all the elements of the array and storing the merkle root to check whether the version matches or not, but storing the same data into multiple blocks is redundant and inefficient.

Aug 31, 2018 in Blockchain by sabby
• 4,370 points

1 answer to this question.

0 votes

For tracking changes you may simply save individual changes for every element in array. In your example it would like this:

STATE 1: [1:3,2:4,3:5,4:6]
STATE 2: [5:4]
STATE 3: [1:1,2:-1]

It won't be space-efficient if there are lots of changes with every state update. But if more then half of the array stays the same, you will benefit.

Merkle Tree is used for verifying individual blocks of data(transactions) received from unknown or little-known sources. It is used in blockchain wallets or torrent clients. It is not used for storing arrays.

answered Aug 31, 2018 by Christine
• 15,830 points

Related Questions In Blockchain

0 votes
3 answers
0 votes
1 answer

How can I create a blockchain for keeping records?

​You can use an already existing Blockchain. ...READ MORE

answered Jun 27, 2018 in Blockchain by Christine
• 15,830 points
0 votes
1 answer

How to build a non-payment application using Ethereum blockchain?

I hope the following link is helpful ...READ MORE

answered Jul 17, 2018 in Blockchain by digger
• 26,720 points
0 votes
1 answer

Looking for a simple Blockchain PoC to implement on a office level

Hyperledger has been collecting some use cases, though not ...READ MORE

answered Jul 24, 2018 in Blockchain by aryya
• 7,440 points
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
+4 votes
1 answer
0 votes
1 answer

How to create a new wallet on a blockchain?

Firstly, you need to have a clear ...READ MORE

answered Apr 4, 2018 in Blockchain by Christine
• 15,830 points
0 votes
1 answer

How can i create a simple P2P network on a blockchain?

To develop your own cryptocurrency, you need ...READ MORE

answered Apr 20, 2018 in Blockchain by Christine
• 15,830 points