I have questions about create permission.

+1 vote

Hello multichain developers.

I've set anyone-can-create=false in my params.dat. And i have two nodes.(A, B)

Node A is admin node, and node B is not having any permissions.

 

On the node B,

---------------------------------------------------------------------------------------------------------------------

test: getaddresses true                                   
{"method":"getaddresses","params":[true],"id":1,"chain_name":"test"}

[
    {
        "address" : "HR5gHMdbVqwFs87V2iPQiB1FW7vrt2zpAq",
        "ismine" : true,
        "iswatchonly" : false,
        "isscript" : false,
        "pubkey" : "03d0a37e09f8972c2f303bef77881cbc6a8786ff684cff72077e2fd10186f126ea",
        "iscompressed" : true,
        "account" : "",
        "synchronized" : true
    }
]
test: listpermissions * HR5gHMdbVqwFs87V2iPQiB1FW7vrt2zpAq
{"method":"listpermissions","params":["*","HR5gHMdbVqwFs87V2iPQiB1FW7vrt2zpAq"],"id":1,"chain_name":"test"}

[
]
test: create stream newstream false
{"method":"create","params":["stream","newstream",false],"id":1,"chain_name":"test"}

41f6b1f9717173164165386688e83064ab87c53816532beda1ee7e719bb63685

===============================================================

On the node A,

-------------------------------------------------------------------------------------------------------

test: liststreams
{"method":"liststreams","params":[],"id":1,"chain_name":"test"}

[
    {
        "name" : "root",
        "createtxid" : "8c770b97f240f43b1c162dbc61ac50fe915ac8cd09d70a16b370ff5f6f0435e5",
        "streamref" : "0-0-0",
        "open" : false,
        "details" : {
        },
        "subscribed" : true,
        "synchronized" : true,
        "items" : 0,
        "confirmed" : 0,
        "keys" : 0,
        "publishers" : 0
    },
    {
        "name" : "test",
        "createtxid" : "4a3bad189d3d21e98c2bf009dd39a8763a6e956c13098ec0c8885a3a7146ed81",
        "streamref" : "1081-300-15178",
        "open" : false,
        "details" : {
        },
        "subscribed" : false
    },
    {
        "name" : "newstream",
        "createtxid" : "41f6b1f9717173164165386688e83064ab87c53816532beda1ee7e719bb63685",
        "streamref" : "7341-300-63041",
        "open" : false,
        "details" : {
        },
        "subscribed" : false
    }
]

==================================================================

I don't want anyone to create streams.

Did i set the wrong parameters?

# Global permissions

anyone-can-connect = true
anyone-can-send = true
anyone-can-receive = true 
anyone-can-receive-empty = true
anyone-can-create = false
anyone-can-issue = false
anyone-can-mine = false
anyone-can-activate = false
anyone-can-admin = false
support-miner-precheck = true
allow-arbitrary-outputs = false
allow-p2sh-outputs = true
allow-multisig-outputs = true

 

Please provide feedback.

Thank you.

asked Feb 13, 2018 by Jeon

2 Answers

0 votes

That is surprising. We tested it here and it didn't happen. Can you please post the full output of getblockchainparams?

answered Feb 13, 2018 by MultiChain
This is chain's parameter :

{
    "chain-protocol" : "multichain",
    "chain-description" : "MultiChain test",
    "root-stream-name" : "root",
    "root-stream-open" : false,
    "chain-is-testnet" : false,
    "target-block-time" : 180,
    "maximum-block-size" : 8388608,
    "default-network-port" : 8873,
    "default-rpc-port" : 8872,
    "anyone-can-connect" : true,
    "anyone-can-send" : true,
    "anyone-can-receive" : true,
    "anyone-can-receive-empty" : true,
    "anyone-can-create" : false,
    "anyone-can-issue" : false,
    "anyone-can-mine" : false,
    "anyone-can-activate" : false,
    "anyone-can-admin" : false,
    "support-miner-precheck" : true,
    "allow-arbitrary-outputs" : false,
    "allow-p2sh-outputs" : true,
    "allow-multisig-outputs" : true,
    "setup-first-blocks" : 60,
    "mining-diversity" : 0.00000000,
    "admin-consensus-upgrade" : 0.50000000,
    "admin-consensus-admin" : 0.50000000,
    "admin-consensus-activate" : 0.50000000,
    "admin-consensus-mine" : 0.50000000,
    "admin-consensus-create" : 0.50000000,
    "admin-consensus-issue" : 0.50000000,
    "lock-admin-mine-rounds" : 10,
    "mining-requires-peers" : true,
    "mine-empty-rounds" : -1.00000000,
    "mining-turnover" : 1.00000000,
    "first-block-reward" : 16800000000000000,
    "initial-block-reward" : 500000000000,
    "reward-halving-interval" : 1032000,
    "reward-spendable-delay" : 100,
    "minimum-per-output" : 0,
    "maximum-per-output" : 20000500000000000,
    "minimum-relay-fee" : 1000000,
    "native-currency-multiple" : 100000000,
    "skip-pow-check" : false,
    "pow-minimum-bits" : 10,
    "target-adjust-freq" : 86400,
    "allow-min-difficulty-blocks" : false,
    "only-accept-std-txs" : true,
    "max-std-tx-size" : 1048576,
    "max-std-op-returns-count" : 10,
    "max-std-op-return-size" : 4096,
    "max-std-op-drops-count" : 5,
    "max-std-element-size" : 1024,
    "chain-name" : "test",
    "protocol-version" : 10009,
    "network-message-start" : "f8c3c2fa",
    "address-pubkeyhash-version" : "000a2984",
    "address-scripthash-version" : "057339b8",
    "private-key-version" : "80202a9d",
    "address-checksum-value" : "9ad6ff2e",
    "genesis-pubkey" : "02ff14671f079b1330bf62bcd2c4f77e690646918ab89ef770834d435796c5dd27",
    "genesis-version" : 1,
    "genesis-timestamp" : 1518505095,
    "genesis-nbits" : 524287999,
    "genesis-nonce" : 923,
    "genesis-pubkey-hash" : "2f8dca991f9da4040d2e9080ebf5dba9773eebd3",
    "genesis-hash" : "0000e6948018c4780347097b4d26f13f285e56524d43e44e55b2c5e1baec0f97",
    "chain-params-hash" : "3071c7ab4e1801bc272fdb4aea276cb9b264fcc916b07b7f6e03680b95b26395"
}

Thanks for the fast feedback.
Thanks - nothing unusual we can see there. I think in this case we'll need to see the blockchain directory in order to understand the issue. If you are willing, please stop node B, then zip up its blockchain directory and email it to us at multichain dot debug at gmail. Thanks.
I have identified the problem that all node can use create if anyone-can-receive is true.(CanCreate)
Thanks - we've confirmed the problem and will fix it shortly in a maintenance release.
0 votes

Version 1.0.4 of MultiChain, just released, fixes this in multichain protocol version 10010. You'll need to start a new chain or upgrade your chain's protocol using these instructions:

https://www.multichain.com/developers/upgrading-nodes-chains/

answered Feb 26, 2018 by MultiChain
...