简体   繁体   中英

custom blockchain data structure

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?

If I were you, I'd try Hyperledger Fabric. It is an implementation of Blockchain developed for the businesses.

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.

About the previous question: the Blockchain is the database. You have to define the logic of your code. That code, the Smart Contract, will be installed in all the nodes of the Blockchain.

Your Blockchain will store each registry like a transaction. A transaction is the equivalent from a registry of your data base. So, you have to define well your Smart Contract, defining there which type of data you will store. Also, you define the logic of your "business idea" in the Smart Contract.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM