How to validate that the data being stored is in a correct format.

+1 vote
I probably don't belong here, because I'm not even a developer, but I have unsuccessfully searched for hours to answer a (seemingly) simple question. I would be very grateful to be pointed in the right direction. Let's say that my use-case is to create shared provenance documentation in a private network for inventory that changes hands across multiple companies. Let's also say that the only meaningful data points involved are (Product ID, Hand-off Timestamp, Party Taking ownership, Party Relinquishing Ownership).

For a given transaction, how do I assure that the data itself is in the correct format? For example, what if a transaction is attempted with a null in Product ID field. My current understanding is that the only validation that occurs is essentially that transacting parties are valid participants in the network and that the transaction is not in some way a "duplicate". I just don't see the point in logging all these transactions without a fail-safe to make sure that the data itself conforms to an agreed-upon format.
asked Jul 5, 2018 by Ryan Kofford

1 Answer

0 votes
 
Best answer
These checks can be performed at the application level, outside of the blockchain, when reading and/or writing data to the chain. However obviously this is not as good as constraints within the blockchain itself. We are currently building a "Smart Filters" feature that will make this kind of on-chain data validation possible, and expect it to be available for initial testing within a few months.
answered Jul 5, 2018 by MultiChain
...