custom blockchain data structure

Viewed 483

I am trying to verify a business idea for a blockchain application, that would use a private / consortium blockchain.

I am looking at trying a test in multichain or a similar platform.

One thing I am unsure of, is how I can define what my data looks like? If I was creating my own app from scratch I'd design a database etc.

How would I do this with something like multichain? For example, if I am trying to store records of a particular asset, and the varying interests in that asset of multiple parties, how do I define how that looks like in my blockchain app?

Put another way, what would be the equivalent of defining my "asset" table, my "assetparties" table etc? Can I control what data is actually stored there / what the transactions represent?

2 Answers

Never used multichain, but with Hyperledger Sawtooth, the transaction payloads and data stored in state are entirely opaque to the blockchain. This means you can store absolutely anything you can encode as bytes. This could be as simple as a JSON string. Although you have to be careful, because it will need to be byte-for-byte identical every time it is generated. So in the JSON case you'd probably want to sort the keys first. A popular option to create consistent, compact, sequences of bytes is Google's Protocol Buffers

Related