I've built a simple blockchain. I want to build a version control of an array of numbers. I want to record additions of new numbers, deletions, and interchanging of numbers. What could be space-efficient way to store these changes? 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. Please direct me!
STATE 1: [3,4,5,6]
STATE 2: [3,4,5,6,4]
STATE 3: [4,3,5,6,4]
Block1 HeaderHash: h(h(34)+h(56))
Block2 HeaderHash: h(h(34)+h(56)+h(44))
Block3 HeaderHash: h(h(43)+h(56)+h(44))
P.S. I'm learning the concepts of blockchain and building this from scratch. Please don't judge the project in itself.