Non standard multisig address script error

+1 vote
When i look out for a multisig address script by using getaddresses why is it showing non-standard instead of the redeem script?
asked Dec 4, 2018 by gimmick
Can you please post a more detailed explanation of what you did, and the API response you saw?
We have created a blockchain that is bitcoin compatible so we have changed that checksum parameters. Now when we check for the multisig address redeem script for processing a multisig transaction while using listaddresses api command we get the hex value as "nonstandard".
So how can we access redeem script for a multisig address.

1 Answer

+1 vote

I'm afraid we couldn't reproduce this. We made a blockchain using bitcoin parameters, got a new address using getnewaddress, then creating a multisig in the wallet as follows:

addmultisigaddress 2 '["15Tis1TyWZ3xHf4XS4nvf79iLGmQ9C7twm","1JoeB7kfwqUyDBURHFymta3qP6Nt4UhrfA"]'

Here's what's shown for the multisig in listaddresses with verbose=true :

        "address" : "3BRFKrSm1Qgvbg56Xmaw37NpFJupxMNK1d",
        "ismine" : true,
        "iswatchonly" : false,
        "isscript" : true,
        "script" : "multisig",
        "hex" : "522103a238e2047b3659ed11e07d7291178b263004b73f3459b1d2168e52fb5d0774d621030792853eb924b82b8f325a90deeaaf9748625e690620aba153eab8123caf958252ae",
        "addresses" : [
        "sigsrequired" : 2,
        "account" : "",
        "synchronized" : false,
        "startblock" : 5


answered Dec 11, 2018 by MultiChain
Script value of the address generated in my case is non-standard instead of multisig. Could it be because of change in native blockchain currency parameters?
Please share your blockchain parameters and the exact steps you performed to see this.
Here are the blockchain parameters:

        "chain-protocol": "multichain",
        "chain-description": "MultiChain XXXXX",
        "root-stream-name": "root",
        "root-stream-open": true,
        "chain-is-testnet": false,
        "target-block-time": 15,
        "maximum-block-size": 8388608,
        "default-network-port": 6291,
        "default-rpc-port": 6290,
        "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.3,
        "admin-consensus-upgrade": 0.5,
        "admin-consensus-admin": 0.5,
        "admin-consensus-activate": 0.5,
        "admin-consensus-mine": 0.5,
        "admin-consensus-create": 0,
        "admin-consensus-issue": 0,
        "lock-admin-mine-rounds": 10,
        "mining-requires-peers": true,
        "mine-empty-rounds": 10,
        "mining-turnover": 0.5,
        "first-block-reward": 3000000000000,
        "initial-block-reward": 0,
        "reward-halving-interval": 52560000,
        "reward-spendable-delay": 1,
        "minimum-per-output": 0,
        "maximum-per-output": 3000000000000,
        "minimum-relay-fee": 0,
        "native-currency-multiple": 100,
        "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": 32,
        "max-std-op-return-size": 2097152,
        "max-std-op-drops-count": 5,
        "max-std-element-size": 8192,
        "chain-name": "XXXXX",
        "protocol-version": 10011,
        "network-message-start": "f7eac8eb",
        "address-pubkeyhash-version": "00",
        "address-scripthash-version": "05",
        "private-key-version": "80",
        "address-checksum-value": "00000000",

and whenever I check for a particular multisig address info by using listaddresses it always shows a result like this:

    "result": [
            "address": "45Fw89cwezLnMkmMVKfprCAxNGNzz2rG8fr69C",
            "ismine": false,
            "iswatchonly": true,
            "isscript": true,
            "script": "nonstandard",
            "hex": "",
            "addresses": [],
            "account": "",
            "synchronized": false,
            "startblock": 15324
    "error": null,
    "id": null
OK, I think this is happening because you used createmultisig + importaddress instead of addmultisigaddress. If the former case, the wallet does not know this is a multisig address, since it could be any kind of pay-to-scripthash.
How would that help for non-wallet addresses as I am creating non-wallet addresses and so I have to use createmultisig only.
Would it be helpful if we use bitcore's
var p2shAddress = new Address([publicKey1, publicKey2, publicKey3], 2);
to generate a multisig address?
Will it be recognised by the wallet then?
For non-wallet multisig addresses using P2SH (pay to script hash), the wallet does not know the script itself. This is the point of a script hash - like any hash it's impossible to calculate the input data from the hash. Why not just pass in the full set of public keys to the wallets, so they can use addmultisigaddress, instead of just the final multisig address?
Okay addmultisigaddress works fine for me. Thanks for the help.