"Insufficient funds" when calling `issuemore` for an open asset

0 votes

Hello,

I have an open asset that I have made multiple issuances of, but I have started getting an "Insufficient funds" error. I've included the example command and some more info below, and would appreciate any help on the matter.

multichain-cli GBP issuemore "1YXEDBc8M6PkX5saU1TNVa5655u6cBd3SdVsRf" "dGBP" 456.78 0 '{"reference":"large2"}'


{"method":"issuemore","params":["1YXEDBc8M6PkX5saU1TNVa5655u6cBd3SdVsRf","dGBP",456.78000000,0,{"reference":"large2"}],"id":1,"chain_name":"GBP"}

 "error: {"code":-4,"message":"Insufficient funds"}

Nodes are all running Alpha 18, and the node has connect, send, issue permissions, and the receiving node has connect, receive permissions.

multichain-cli GBP listassets dGBP true
{"method":"listassets","params":["dGBP",true],"id":1,"chain_name":"GBP"}

[
    {
        "name" : "dGBP",
        "issuetxid" : "4ebe4b45cbb0ae8d026619965682298826c20c28fe820d1606914d1d4e37348f",
        "assetref" : "6615-266-48718",
        "multiple" : 100,
        "units" : 0.01000000,
        "open" : true,
        "details" : {
            "reference" : "first"
        },
        "issueqty" : 220.50000000,
        "issueraw" : 22050,
        "issues" : [
            {
                "txid" : "4ebe4b45cbb0ae8d026619965682298826c20c28fe820d1606914d1d4e37348f",
                "qty" : 100.00000000,
                "raw" : 10000,
                "details" : {
                    "reference" : "first"
                },
                "issuers" : [
                    "1MuehZgn2wt3mnjuoD57kst3qB3bSQHXrGrU4c"
                ]
            },
            {
                "txid" : "f7f3dcfa42a7a0e0e142f8d4a02e43c767bb2c72976dd55ff33777df827a7e40",
                "qty" : 10.50000000,
                "raw" : 1050,
                "details" : {
                    "issuanceReference" : "second issuance"
                },
                "issuers" : [
                    "1MuehZgn2wt3mnjuoD57kst3qB3bSQHXrGrU4c"
                ]
            },
            {
                "txid" : "e2e4f68617e7eb7fd8eca15333ee94c5679e6a7809d0c222c211785fb3d5a0b7",
                "qty" : 10.00000000,
                "raw" : 1000,
                "details" : {
                    "issuanceReference" : "diff block"
                },
                "issuers" : [
                    "1MuehZgn2wt3mnjuoD57kst3qB3bSQHXrGrU4c"
                ]
            },
            {
                "txid" : "1004ec38dad1f80ba23f533b497196e10f7212614e91267e3e088a57d69c7c7c",
                "qty" : 50.00000000,
                "raw" : 5000,
                "details" : {
                    "reference" : "double check"
                },
                "issuers" : [
                    "1MuehZgn2wt3mnjuoD57kst3qB3bSQHXrGrU4c"
                ]
            },
            {
                "txid" : "09cb4fdb6397449f79d449ef5f8e8d2803694d73efbaed8c351045ac502b155c",
                "qty" : 50.00000000,
                "raw" : 5000,
                "details" : {
                    "reference" : "amount-check-1"
                },
                "issuers" : [
                    "1MuehZgn2wt3mnjuoD57kst3qB3bSQHXrGrU4c"
                ]
            }
        ]
    }
]

Kind regards,
Knowncolor

Second Update

I was able to get this to work again by first issuing more of the open asset to the node with the issue permissions and then transferring it on. After doing this once I was again able to issue directly to other nodes. 

asked Mar 29, 2016 by knowncolor
edited Mar 29, 2016 by knowncolor

Update, posted as answer to work around 8000 character post limit.

I changed the address to issue the asset to from the intended recipient to the issuer (after adding receive permissions) and I am now able to issue more of the asset, however this just raises another question - why one address but not another... 

I checked the issue history and saw that the first issuance (and several subsequent ones) are to an external address, see below.

ultichain-cli GBP getrawtransaction 4ebe4b45cbb0ae8d026619965682298826c20c28fe820d1606914d1d4e37348f 1
{"method":"getrawtransaction","params":["4ebe4b45cbb0ae8d026619965682298826c20c28fe820d1606914d1d4e37348f",1],"id":1,"chain_name":"GBP"}

{
    "hex" : "[CUT FOR 8000 CHARACTER LIMIT]",
    "txid" : "4ebe4b45cbb0ae8d026619965682298826c20c28fe820d1606914d1d4e37348f",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "18b8ec43a8a7236ebbba84045c8b6bc7e5015cc6ac5622c1d25f9f80e42b2865",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "[CUT FOR 8000 CHARACTER LIMIT]",
                "hex" : "[CUT FOR 8000 CHARACTER LIMIT]"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 e939086178b35490e0df52094f44003c521ce7ba OP_EQUALVERIFY OP_CHECKSIG 73706b671027000000000000 OP_DROP",
                "hex" : "76a914e939086178b35490e0df52094f44003c521ce7ba88ac0c73706b67102700000000000075",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1YXEDBc8M6PkX5saU1TNVa5655u6cBd3SdVsRf"
                ]
            },
            "assets" : [
                {
                    "name" : "dGBP",
                    "issuetxid" : "4ebe4b45cbb0ae8d026619965682298826c20c28fe820d1606914d1d4e37348f",
                    "assetref" : "6615-266-48718",
                    "qty" : 100.00000000,
                    "raw" : 10000
                }
            ],
            "permissions" : [
            ]
        },
        {
            "value" : 0.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_RETURN 53504b61640000006447425000000201017265666572656e636500056669727374",
                "hex" : "6a2153504b61640000006447425000000201017265666572656e636500056669727374",
                "type" : "nulldata"
            },
            "assets" : [
            ],
            "permissions" : [
            ]
        }
    ],
    "data" : [
        "53504b61640000006447425000000201017265666572656e636500056669727374"
    ],
    "blockhash" : "000016a738e17fb519375dec80fc832a5bccaf769c048ef53b339e76a14d385c",
    "confirmations" : 41053,
    "time" : 1458666104,
    "blocktime" : 1458666104
}

2 Answers

+1 vote
 
Best answer
We're fairly sure the problem was that the change from one issuance event was sent to a different address which also had issue permissions, leaving no unspent outputs left that could be signed by the original issuing address. This also matches how you fixed the problem. It has been fixed in alpha 19, just released.

Thanks again for reporting this!
answered Mar 31, 2016 by MultiChain
selected Apr 6, 2016 by knowncolor
+1 vote

The most likely explanation is that your blockchain is using a native currency, rather than the default setting of no native currency, and this means a certainty quantity of that native currency is required in order to build the issue transaction and not violate the blockchain's constraints on minimum output value, etc...

If you post the output from the getblockchainparams API I can confirm this.

answered Mar 29, 2016 by MultiChain
It was my intention to create a native-currency free Multichain and only use assets. getblockchainparams results below.

multichain-cli GBP getblockchainparams
{"method":"getblockchainparams","params":[],"id":1,"chain_name":"GBP"}

{
    "chain-protocol" : "multichain",
    "chain-description" : "MultiChain GBP",
    "chain-is-testnet" : false,
    "target-block-time" : 15,
    "maximum-block-size" : 1000000,
    "default-network-port" : 6457,
    "default-rpc-port" : 6456,
    "anyone-can-connect" : true,
    "anyone-can-send" : false,
    "anyone-can-receive" : false,
    "anyone-can-issue" : false,
    "anyone-can-mine" : false,
    "anyone-can-activate" : false,
    "anyone-can-admin" : false,
    "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-issue" : 0.00000000,
    "mining-requires-peers" : true,
    "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" : 16,
    "target-adjust-freq" : 86400,
    "allow-min-difficulty-blocks" : false,
    "only-accept-std-txs" : true,
    "max-std-tx-size" : 100000,
    "max-std-op-return-size" : 4096,
    "max-std-op-drops-count" : 5,
    "max-std-element-size" : 600,
    "chain-name" : "GBP",
    "protocol-version" : 10005,
    "network-message-start" : "fbedd6fc",
    "address-pubkeyhash-version" : "001bb93f",
    "address-scripthash-version" : "055be003",
    "private-key-version" : "80da4976",
    "address-checksum-value" : "df427d0f",
    "genesis-pubkey" : "0315fc3782d6560ccb86547013eba30ca0a07b0ffb8e10fcd7a3810c760a6cfc77",
    "genesis-version" : 1,
    "genesis-timestamp" : 1458572843,
    "genesis-nbits" : 520159231,
    "genesis-nonce" : 28273,
    "genesis-pubkey-hash" : "549d8ca3f29c5cfd3c0a6b83529e494baeda74e4",
    "genesis-op-return-script" : "5b6e6f74207365745d",
    "genesis-hash" : "00008cb2c7bf6a65eed62b6e52301f783e9ce7edb516dccd768b464b626712bc",
    "chain-params-hash" : "8690f2c04a0df23050136b48e2f5c056c80ee5f11699bb2815496e823bdb101f"
}
OK, thanks, we will look into it.
...