Questions about private streams and dynamic networks

+1 vote
I need to arbitrarily create a stream for a contract.

on this stream I will store Create/Update/Delete commands for entities within the generic contract schema.

party nodes, and only party nodes on this contract/stream, need to be able to validate these operations at an application level. By that I mean, I need the nodes to call my javascript stuff to check that we are OK with the operation, which will involve interrogating this generic schema. If they like it they will commit to their local instance and return success back to multichain.

all parties need to sign the transaction with the resultant hash of the contract, which should be consistent in normal circumstances.

My schema has a Request->Dialogue one to many relation for each operation. A contract is not in a valid state until all the dialogues for each party have been completed correctly (have the right hash state). I have a Transmitter and Receiver program on each node, these would get refitted to write and read from streams, not from each other.

parties can be added or removed from the contract provided everyone, including the leaving party on a delete, agree, based on rules configured within the contract itself. e.g. the originator of the contract, before inviting new members, may have configured the rules so that only they can add new users, or that only a certain list of parties (such as approved brokers for a specific area). New users will therefore have agreed to join a contract where they have less privileges than the originator.

Right now, as you know, I am just broadcasting the request to everyone directly and on another channel collecting confirmations, and merkeling these hashes. Collisions are merged into a block until we have a consistent hash. In terms of the amount of traffic, i dont think it makes any difference using blockchain proper, it's still going to be ~n^2. For prototyping purposes my stuff works. But you have to trust me that the immutability really does work in production. I am going to have to refit this with one or other standard offering, even though ultimately its doing no more than what I am doing now. (well, universal timestamp makes stuff even easier, but I've sidestepped most of that)

This business of who can and cannot be on the chain is messy I guess. We need the originator to be able to delegate the choice of sub parties to other intermediates, possibly with restrictions. i.e it's your choice, but they have to be in this list.

I dont need this right now, but if it's all there or will be soon I can at least think more seriously about using MC both as a transport layer under my generic contract schema, as well as a publication layer for certain states of the contract , the purpose of which right now is mainly so we can say we are using blockchain proper ;).
asked Jul 16, 2016 by MarkLester
Another thing I need is to be able to lock the stream in order that these rules can be published/made active. They are just parts of the record but have a flag denoting if they are active, but they of course need to go live "simultaneously", so dont commit till you know everyone is OK, i.e not in the middle of trying to commit a normal update transaction on the stream.

I hope at least some of that is making sense.
I read it all through twice, but didn't understand what feature you are requesting - can you translate your application's needs into one or more feature requests that fit the general paradigm for MultiChain?
Sorry. You are not alone.

I want to restrict consensus to only those on the contract.
I want to be able to fit my own validation module to this using an arbitrary platform (in this case Node.JS).

So we have a chain that is only using the members of the contract, preferably no information whatsoever is being transmitted to any nodes outside that group. And the validation can be performed by whatever language the application people are using.
Apart from traffic analysis issues of placing everything on a common chain,  I have to distribute a common private decryption key to each party. This is clearly a potential security issue.  Right now I am using SSL directly between parties. This means we need to be able to verify these SSL keys (some kind of verisign) but then we are done, I dont need to create and distribute a private key for every stream/contract.

1 Answer

0 votes
Based on your comment above, it sounds like you should be managing this process at a different level of your application, using the blockchain to store encrypted information relating to the contract's state, but not to perform contract validation within the chain. The validation should be done off-chain, with the results posted back to the chain with the appropriate signatures. You can use data streams for this sort of thing:

http://www.multichain.com/developers/creating-data-streams/
answered Jul 18, 2016 by MultiChain
...