- Hashchains is a non-permanent solution to the problem of data and transactions storing on IOTA.
- The validation process of the Hashchain uses a simplified method of the one found in a blockchain.
Conceived as an alternative to the IOTA storage solutions “Chronicle” and “AION”, developer Alessandro Buser presents Hashchains. According to a Medium publication, Buser developed a proof of concept that includes a hashchains solution to retrieve an unexplored use case due to the increase of fees in the most important blockchains, such as Ethereum, unalterable data storage. The developer chose IOTA for its “fee-less architecture” operating with the IOTA tangle technology on a distributed ledger.
How does a hashchain work on IOTA?
Buser explains that unlike the other two solutions mentioned, Hashchain is a “quick fix” solution for the problem of transaction storage on IOTA. Due to the design of the IOTA tangle, the information stored in the distributed ledger only remains for one month. In this way, IOTA notes are lightweight and can use the Internet of Things (IoT) hardware.
According to Buser, the hashchain operates with a mechanism similar to a blockchain on the IOTA tangle. Therefore, the solution creates a proof-of-chain that uses information stored with hash-linked blocks. However, his operation is much easier to use.
The hashchain uses an API to enter the server. Once there, it receives a timestamp and is stored on the mempool, similar to the way Bitcoin‘s blockchain works. Buser explains below how the hashchain adapts to a use case to access the data stored on the mempool with metadata and create blocks with modifiable periods of days, minutes, or seconds. This is also referred to by the developer as an interval T. He outlines:
This new block is sent to the IOTA tangle in a 0-value transaction, the returned transaction hash is appended to the block header and everything is stored in the local database. From here it can be queried through an API (public or private).
The chain that is created as a result of the hashchain mechanism can be verified by comparing the information in the database with that stored on the IOTA tangle. Because the information is not permanently stored, the solution converts the information and metadata from the genesis block into hashes as part of its validation process. In this way, a user can verify that the “previous hash” stored in each block corresponds to the previous block and so on to obtain, as Buser explains, a “cryptographically correct” hashchain. The developer explains:
But given that it is stored on a single server, with not proof-of-work involved, it would still be possible for the database owner to just create a correct chain at any point in time with any data he likes.
A user can validate a block by finding a hash transaction that is “stored deep” on the Tangle network with information that matches with the same data and metadata with the database. Lateron it can be determined that the hashchain is valid up to that block. The developer has created a prototype with a Proof of Concept that can be reviewed at the following link. The prototype is written with Rust language and uses the old iota-lib-rs box to interact with the IOTA tangle.