Under the hood of Alterscope’s Storage Proofs
In an era where data is the new currency, the need for the possibility of verification of this data is increasingly important. The repercussions of utilizing unverified data can lead to a multitude of negative effects, from incorrect decision-making through security breaches to downright fraud.
As a case in point, consider the ramifications of unverified data in the healthcare sector. An inaccurate medical record could lead to improper treatment, while in the financial sector, erroneous data could result in significant monetary losses. This is especially true in the DeFi sector as the data there is unobservable and the only way an interested party to participate is by using the computer screen in front.
This brings us to the novel use of Merkle Mountain Ranges (MMRs), a data structure that delivers a robust and efficient means of data verification. If you are more technically inclined you may imagine them as a polymerization of Merkle Trees and Binomial Heaps. They are thus combining the ability to very easily prove that a certain data point is contained in the data structure and the very efficient $\Theta(1)$ insertion of new data points. Those two properties are building the notion of the storage proof that we have decided to take on in Alterscope. We are not going to go into a lot of detail here, nevertheless, we think that a bit more detail would assist you with the overall comprehension of our storage-proof solution. If you have time and are interested in the topic you can also check the link above for a deeper dive into how the data structure is working under the hood.
In the following section, we are briefly going to go over how the two main properties are working together.
Insertion of new data points
The main difficulty here comes from the need for very efficient insertion of data points. The way this is done is by using only fully balanced (perfect) Merkle Trees in order to store that data. Then we are ordering the balanced trees as shown in the diagram. The numbers represent the order in which the different nodes were included in the data structure.
Each parent is generated partly from the hashes of its left and right children. When we have two Merkle trees(ranges) with the same height $n$ we combine them into a single range with height $n+1$. This allows us to have amortized complexity of $\Theta(1)$. The Merkle root at the end of insertion is the hashed value of all peaks of the r of the Merkle ranges. In the above example, this would be $hash(6|9|10)$. At the end of the operation, we have a single succint hash value which allows us to represent all of the data combined in the data structure.
Provability of containment
The Merkle proof of containment for a given data point is very similar to the one in a simple Merkle tree. We would just need to also take into account the last step of the hashing of all of the peaks of the Merkle ranges. So for example to prove that the is in the MMR we would need to provide the following information to the user - $4,2,9,10$. He would then use the starting point - $3$ to calculate $6$ with the help of $4 \text{ and }2$. The next step would be the additional step that is needed when working with MMR - $hash(6|9|10)$.
The MMR’s traits combined with the EVM smart contract enforced append-only approach implemented by us would allow us to efficiently, cheaply, and securely provide the needed properties for Alterscope’s Storage Proofs.
Looking to the future, the potential synergies between MMRs and zero-knowledge (ZK) proofs are promising. ZK proofs allow one party to prove to another that they have computed a given result without revealing ANY other information - thus the name zero-knowledge. Combining MMRs with ZK proofs could provide an overarching data verification framework, enhancing both data security and data privacy as well as increasing user satisfaction. Additionally, the integration of this framework in machine learning techniques could further propel the adoption of the technology by the public. Another exciting prospect is the implementation of multi-party computation (MPC) in the context of ML, DeFI, and cryptography. You can read about what Alterscope is undergoing on those sides of things in this article.
In conclusion, in the data-driven world of today, the importance of accurate data verification cannot be overstated. MMRs offer a robust and efficient solution to this challenge. And with exciting developments combining MMRs with ZK proofs, machine learning, and MPC on the horizon, the future of the technology looks bright.