Can I set "anyone-can-admin" at runtime?

+1 vote

I looked through the list of runtime parameters and anyone-can-activate wasn't there. 
I tried to set it like: multichaind -anyone-can-activate=true but it didn't work.

I guess I can do it through some unix text-replacement commands against the params.dat file, but that's a nasty solution.
Any suggestions?

asked Jun 19, 2018 by milkncookiez

1 Answer

+2 votes
Best answer

These are blockchain parameters rather than runtime parameters. They are defined by the blockchain itself and cannot be changed by nodes individually.

In the latest alpha of MultiChain 2.0, quite a few blockchain parameters can be changed via a structured chain upgrading process, but these parameters are not (yet) included. In any event you certainly couldn't change them just by modifying the params.dat file on nodes.

answered Jun 19, 2018 by MultiChain
selected Jun 20, 2018 by milkncookiez
Okay, here's what I did:
1. I create the blockchain in node1 with "multichain-util create test -anyone-can-activate=true"
2. I spin up another node2 by connecting to the blockchain from node1: "multichaind test@<some_ip>:<some_port>"
3. I look inside the the "params.dat" of both nodes and they both have "anyone-can-activate=true"
4. I kill node1
5. I spin up node3 and connect to the blockchain through node2
6. Then I try to grant connect permissions to node3 from node2 but I get an error that node2's wallet doesn't have admin permissions
7. I look inside node3's params.dat file and it says "anyone-can-activate=[null]"
And actually any parameter in "params.dat" that has a boolean value has "[null]" value in node3. As if something bugged...

But I got it solved by creating the blockchain with "anyone-can-admin=true" as well.
Many values in params.dat are [null] until the node has successfully connected to the blockchain. This is to minimize the amount of information shared with nodes until they have connect permissions. It is the intended behavior.