Hello,
I’m working on Dash Evolution, specifically on the data storage (DashDrive). Let me tell you a little about this project to make my questions clear for you.
Evolution is a new project of Dash cryptocurrency, which allows third-party developers to build own applications (DAPs) on top of Dash masternodes network and store their user data in DashDrive with validation in the blockchain. DashDrive is a service that deployed on each masternode and implements some logic and API on top of IPFS.
Demo of the first DAP: https://www.youtube.com/watch?v=gbjYhZT2Ulc
Evolution introduces a new type of blockchain transaction - State Transition, which contains DAP objects (user data).
Storing user data in blockchain is pricey, that’s why State Transition consists two parts:
- State Transition Header, which goes to chain and necessary for data validation.
- State Transition Packet, which contains DAP objects (JSON objects of users data) and goes to DashDrive.
Simplified State Transition Packet structure is:
{
"somePacketField1": "...",
"somePacketField2": "...",
"dapObjects": [
{
"objectFiled1": "...",
"objectFiled2": "...",
...
},
...
]
}
As you may have guessed, we are storing State Transition Packets in IPFS. I suppose the right way to do that is implementing own IPLD resolver, like ipld-bitcoin
. We want to store Packet data as DAG node with links to DAP objects which contains in IPFS blocks. This design is pretty flexible and allow us to work with objects as well as with whole packet using ‘recursive’ option. CID of Packet DAG node should be hash of origin State Transition Packet which we store in the blockchain.
So my questions are:
- Is it the right decision to use own IPLD resolver for this purpose?
- Can we use our own CID’s hash for storing Packet into IPFS?
- I see how to implement this using
ipld-dag-pb
format of the object, but do not fully understand how it should be in our custom IPLD implementation. - How can we integrate our IPLD implementation with go-ipfs?