Stream permission consensus not working as expected

+1 vote


I have set up a single node with a stream called teststream. This stream is not open i.e. user will need exclusive permission to write into it or be an admin. I did not change the default admin-consensus-admin value i.e. 0.5.

I granted 4 wallet addresses admin permission for this particular stream. Now when I want to grant another wallet address the admin permission, at least 2 already existing wallet addresses with admin permission should grant the permission (according to <admin-consensus-admin>*<active admins>) and only then, the new wallet address should have the admin permission.

But this is not the case. Even if the admin permission is granted by only one existing admin wallet address, the new address gets the admin permission. 

I was not able to figure out why is it working in this way. Any help would be appreciated. 

asked Jul 12, 2017 by jagrut.kosti

1 Answer

0 votes
Best answer

Sorry for the confusion – the admin-consensus-admin parameter only applies to global admin permissions, not to per-entity permissions like a stream admin. You might want to look into the per-stream activate permission as an intermediate level that can help you work around this – addresses with this can grant per-stream write permissions, but not affect the per-stream admin or activate permissions. Another alternative is to use a multisig as the only permitted admin address for a stream.

answered Jul 12, 2017 by MultiChain
selected Jul 13, 2017 by jagrut.kosti
But with activate permissions, as you said, one cannot modify the admin permissions. I want to have multiple admins, but the new admins should be granted the permission using consensus. I want to have write or admin permission using consensus for new addresses. I read the multisig page, but cannot figure out how that can work. As I understand, multisig is for doing everything from that single multisig address.
The multisig solution is not so convenient, but it can work. You can grant per-stream admin permission to a 2-of-3 multisig, and add that multisig to all the relevant nodes using addmultisigaddress.

Then let's say you want to add a new writer. One of the admin nodes creates the raw transaction to grant the new per-stream permission using createrawsendfrom (see the raw transactions page for how to add per-stream permissions changes inside a raw transaction), signs it, then passes it (either on- or off-chain) to another admin for additional signing and then sending over the chain.

You can also use this scheme to manage governance changes from one set of admins to another, by first granting per-stream admin permissions to a new multisig, then removing per-stream admin permissions from the old multisig.

But... I'm afraid all this will require a lot of application-level orchestration.
@MultiChain Do you plan on implementing the permission consensus over asset/streams in future releases?
It's not currently a priority on that roadmap I'm afraid.