Creator of the stream only has write but no admin permission after stream's creation

+1 vote
1. create stream stream2 false

2. listpermissions stream2.*

    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : {
            "type" : "stream",
            "name" : "stream2",
            "streamref" : null
        },
        "type" : "write",
        "startblock" : 0,
        "endblock" : 4294967295
    }
asked Apr 11, 2017 by kakkoiiman
Can you please post the full output of this command: listpermissions stream2.*
chain1: create stream stream5 false
{"method":"create","params":["stream","stream5",false],"id":1,"chain_name":"chain1"}

7cebe8792b41af6549033e6766c21728d17667630b449d210600b828200439b9
chain1: listpermissions stream5.*
{"method":"listpermissions","params":["stream5.*"],"id":1,"chain_name":"chain1"}

[
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : {
            "type" : "stream",
            "name" : "stream5",
            "streamref" : null
        },
        "type" : "write",
        "startblock" : 0,
        "endblock" : 4294967295
    }
]

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

[
    "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab"
]

chain1: listpermissions * 12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab
{"method":"listpermissions","params":["*","12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab"],"id":1,"chain_name":"chain1"}

[
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "connect",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "send",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "receive",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "issue",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "create",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "mine",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "admin",
        "startblock" : 0,
        "endblock" : 4294967295
    },
    {
        "address" : "12rvy3mc2FBX47ijog4ET7C2TSGv7p1nuut3ab",
        "for" : null,
        "type" : "activate",
        "startblock" : 0,
        "endblock" : 4294967295
    }
]

It works on one node but not the other.
Thanks. That does indeed look like a problem. Can you please post the output of getblockchainparams and getinfo? Unless we can see any obvious cause there we may have to ask for a copy of the chain to debug this.
chain1: getblockchainparams
{"method":"getblockchainparams","params":[],"id":1,"chain_name":"chain1"}

{
    "chain-protocol" : "multichain",
    "chain-description" : "MultiChain chain1",
    "root-stream-name" : "root",
    "root-stream-open" : true,
    "chain-is-testnet" : false,
    "target-block-time" : 15,
    "maximum-block-size" : 8388608,
    "default-network-port" : 2020,
    "default-rpc-port" : 2021,
    "anyone-can-connect" : false,
    "anyone-can-send" : false,
    "anyone-can-receive" : false,
    "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-p2sh-outputs" : true,
    "allow-multisig-outputs" : true,
    "setup-first-blocks" : 60,
    "mining-diversity" : 0.30000000,
    "admin-consensus-admin" : 0.50000000,
    "admin-consensus-activate" : 0.50000000,
    "admin-consensus-mine" : 0.50000000,
    "admin-consensus-create" : 0.00000000,
    "admin-consensus-issue" : 0.00000000,
    "lock-admin-mine-rounds" : 10,
    "mining-requires-peers" : true,
    "mine-empty-rounds" : 10.00000000,
    "mining-turnover" : 0.50000000,
    "first-block-reward" : -1,
    "initial-block-reward" : 0,
    "reward-halving-interval" : 52560000,
    "reward-spendable-delay" : 1,
    "minimum-per-output" : 0,
    "maximum-per-output" : 100000000000000,
    "minimum-relay-fee" : 0,
    "native-currency-multiple" : 100000000,
    "skip-pow-check" : false,
    "pow-minimum-bits" : 8,
    "target-adjust-freq" : -1,
    "allow-min-difficulty-blocks" : false,
    "only-accept-std-txs" : true,
    "max-std-tx-size" : 4194304,
    "max-std-op-returns-count" : 10,
    "max-std-op-return-size" : 2097152,
    "max-std-op-drops-count" : 5,
    "max-std-element-size" : 8192,
    "chain-name" : "chain1",
    "protocol-version" : 10007,
    "network-message-start" : "fad1fffa",
    "address-pubkeyhash-version" : "007c2385",
    "address-scripthash-version" : "0501083d",
    "private-key-version" : "80c39893",
    "address-checksum-value" : "19fdc25f",
    "genesis-pubkey" : "039f26469516b362a8e513d964eaf924d9a097465c6f2884f6a7b38f0478ab60c9",
    "genesis-version" : 1,
    "genesis-timestamp" : 1491202033,
    "genesis-nbits" : 536936447,
    "genesis-nonce" : 248,
    "genesis-pubkey-hash" : "0dc4b85e74f5c9a8e2e58e6b9ace962d9d0dc03d",
    "genesis-hash" : "00ce33225083d354b39db02af48dcd7fecbca8bfa007d7f3f150985b1218726d",
    "chain-params-hash" : "74a36f29ef6aff5fdf5bb79a5d180444ae081e09451f10a42f50f1d88806e9b5"
}

chain1: getinfo
{"method":"getinfo","params":[],"id":1,"chain_name":"chain1"}

{
    "version" : "1.0 alpha 28",
    "nodeversion" : 10000128,
    "protocolversion" : 10007,
    "chainname" : "chain1",
    "description" : "MultiChain chain1",
    "protocol" : "multichain",
    "port" : 2020,
    "setupblocks" : 60,
    "nodeaddress" : "chain1@10.0.0.4:2020",
    "burnaddress" : "1XXXXXXX1XXXXXXXAXXXXXXXcQXXXXXXVSrxAu",
    "incomingpaused" : false,
    "miningpaused" : false,
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "walletdbversion" : 2,
    "reindex" : false,
    "blocks" : 185,
    "timeoffset" : 0,
    "connections" : 2,
    "proxy" : "",
    "difficulty" : 0.00000006,
    "testnet" : false,
    "keypoololdest" : 1491202033,
    "keypoolsize" : 2,
    "paytxfee" : 0.00000000,
    "relayfee" : 0.00000000,
    "errors" : ""
}

1 Answer

0 votes

Thanks, I think we understand the problem. There's an issue in protocol version 10007 where the consensus thresholds (admin-consensus-activate and admin-consensus-admin) are applied to per-stream activate and admin permissions as well, even though they don't make sense there. This is fixed in protocol version 10008, implemented in alpha 29 or later. You'll need to start a new chain to use this.

answered Apr 12, 2017 by MultiChain
Thanks, I reckoned so. Node1 was running on alpha 28 but Node2 was running beta 1. That is why it worked on Node1 but not Node2. Good thing I was running different versions. I upgraded Node1 and it is now able to generate the correct permission for new streams.
Great - thanks for the update.
...