One-step raw transactions - Issue

+1 vote

Hi,

I am using the latest version on Multichain on a Windows machine.

When trying to do One-step raw transactions using the following command on the windows command prompt,

multichain-cli abc createrawsendfrom "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk" {\"1b6GeMSBsqinKrmcSdyX5XpFHZoKeETzaPnSkz\":"{\"vote\":7}"}" send

Result:

I get an hexadecimal blob as the result

But the assets do not get transferred from the current holder to new holder.

Please advice.

asked Mar 16, 2017 by rahul
Can you please explain why you conclude that the assets do not get transferred from the current holder to new holder. Which APIs are you using to find this out? It could just be that the transaction is not confirmed yet.
I use the getmultibalances API also tried the same with getaddressbalances API.

How do I check for confirmation? I can see several blocks added after that transaction.

My understanding is that in One-step raw transaction there is no need to do a signrawtransaction and sendrawtransaction.

1 Answer

+1 vote

OK, we can see the problem. You missed out the data parameter in createrawsendfrom – it should be (on Windows):

multichain-cli abc createrawsendfrom "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk" "{\"1b6GeMSBsqinKrmcSdyX5XpFHZoKeETzaPnSkz\":{\"vote\":7}}" "[]" send

answered Mar 16, 2017 by MultiChain
Isuficient Funds - When assets are available
I tried the command.

Still I get the same result.

Insufficient funds.

What could be the issue?
Did you see the other answer we posted about improper node shutdown? Alpha 29 handles this much better, but in the meantime you can run MultiChain with the -reindex=1 option.
Sorry. I forgot to mention. I tried restarting the node with -reindex=1 option.

Same error.
OK, please post the following:

a) the output of listunspent
b) the output of getmultibalances
c) the output of listaddresses
d) the command you are running
e) the result you get for that command
a) Output of listunspent
{"method":"listunspent","params":[],"id":1,"chain_name":"abc"}

[
      {
        "txid" : "c27323c358955c827877e7c7f4dece1a8a369fb178b8bcf5cee0761794426a91",
        "vout" : 1,
        "address" : "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",
        "account" : "",
        "scriptPubKey" : "76a914e816919e07d8d0fe11621ea7cea3a8974ab8893f88ac",
        "amount" : 0.00000000,
        "confirmations" : 2560,
        "cansend" : true,
        "spendable" : true,
        "assets" : [
        ],
        "permissions" : [
        ]
    },
   {
        "txid" : "e4ff2253dc4879b5e1d9ed8c5cc5bcc99d1d572e98e362ddde09078308fdcf02",
        "vout" : 0,
        "address" : "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",
        "account" : "",
        "scriptPubKey" : "76a914e816919e07d8d0fe11621ea7cea3a8974ab8893f88ac1473706b700611000000000000ffffffff4a31ca5875",
        "amount" : 0.00000000,
        "confirmations" : 3609,
        "cansend" : true,
        "spendable" : true,
        "assets" : [
        ],
        "permissions" : [
            {
                "for" : null,
                "connect" : false,
                "send" : true,
                "receive" : true,
                "create" : false,
                "issue" : false,
                "mine" : true,
                "admin" : true,
                "activate" : false,
                "startblock" : 0,
                "endblock" : 4294967295,
                "timestamp" : 1489645898
            }
        ]
    },
    {
        "txid" : "f3cbae30fefb5a37fbdf0afe7d0f30db06a4a98298098feaadd2de9229b89aa5",
        "vout" : 0,
        "address" : "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",
        "account" : "",
        "scriptPubKey" : "76a914e816919e07d8d0fe11621ea7cea3a8974ab8893f88ac1c73706b7140d35182cb59f36b8fc76b53f822b158bc0200000000000075",
        "amount" : 0.00000000,
        "confirmations" : 2539,
        "cansend" : true,
        "spendable" : true,
        "assets" : [
            {
                "name" : "vote",
                "assetref" : "58962-267-45400",
                "qty" : 7.00000000
            }
        ],
        "permissions" : [
        ]
    },
    {
        "txid" : "f5c346e8f0d8ad0f2f6f8c8b9fd7d0214a19c0c7efeeab0f3bb1875192b94d9a",
        "vout" : 1,
        "address" : "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",
        "account" : "",
        "scriptPubKey" : "76a914e816919e07d8d0fe11621ea7cea3a8974ab8893f88ac",
        "amount" : 0.00000000,
        "confirmations" : 2595,
        "cansend" : true,
        "spendable" : true,
        "assets" : [
        ],
        "permissions" : [
        ]
    },
    {
        "txid" : "f79b5bfedbdd81c0965b552cc06d6e9c738ae38cb7d66825e00a674fa729bcd6",
        "vout" : 1,
        "address" : "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",
        "account" : "",
        "scriptPubKey" : "76a914e816919e07d8d0fe11621ea7cea3a8974ab8893f88ac",
        "amount" : 0.00000000,
        "confirmations" : 2681,
        "cansend" : true,
        "spendable" : true,
        "assets" : [
        ],
        "permissions" : [
        ]
    }
]
b) get multibalances
{"method":"getmultibalances","params":[],"id":1,"chain_name":"abc"}

{
    "197GmEBnoQduSkwbTY7ovK9EtKvxxpFwxsEYFs" : [
        {
            "name" : "ACoin",
            "assetref" : "38413-268-42282",
            "qty" : 0.00000000
        },
        {
            "name" : "asset1",
            "assetref" : "288-266-2225",
            "qty" : 124.00000000
        }
    ],
    "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk" : [
        {
            "name" : "vote",
            "assetref" : "58962-267-45400",
            "qty" : 7.00000000
        }
    ],
    "total" : [
        {
            "name" : "ACoin",
            "assetref" : "38413-268-42282",
            "qty" : 0.00000000
        },
        {
            "name" : "asset1",
            "assetref" : "288-266-2225",
            "qty" : 124.00000000
        },
        {
            "name" : "vote",
            "assetref" : "58962-267-45400",
            "qty" : 7.00000000
        }
    ]
}

c) listaddresses
{"method":"listaddresses","params":[],"id":1,"chain_name":"abc"}

[
    {
        "address" : "197GmEBnoQduSkwbTY7ovK9EtKvxxpFwxsEYFs",
        "ismine" : true
    },
    {
        "address" : "4959EiF1S9ecS7sXQ1fq4jKEmzhVQkbthZ86iw",
        "ismine" : false
    },
    {
        "address" : "1GHRQJYYe6d75xsMi8KPDd8YnVWnsrDnZSPXBv",
        "ismine" : true
    },
    {
        "address" : "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",
        "ismine" : true
    },
    {
        "address" : "14YH57RoegH9maTt5KDJm9ZvtJAETuhU3pUUdK",
        "ismine" : true
    },
    {
        "address" : "12R6a7CuhP8XhZkH9UT4wUdqsdyxcd8W9R3Kox",
        "ismine" : true
    },
    {
        "address" : "1AaUN3mUciH58CCCcpcxabbb71VeQ42zJXVSww",
        "ismine" : true
    },
    {
        "address" : "1b6GeMSBsqinKrmcSdyX5XpFHZoKeETzaPnSkz",
        "ismine" : true
    },
    {
        "address" : "1TTUWU3sKnWWci7squiYBhnN9wjDGR3VbdMPvp",
        "ismine" : true
    },
    {
        "address" : "1ADRT2BdjiQ9BqFbFbzbGpvosLScFdYE6f3yPp",
        "ismine" : true
    }
]

d and  e -  Command & Output

D:\multichain>multichain-cli abc createrawsendfrom "1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk" "{\"1b6GeMSBsqinKrmcSdyX5XpFHZoKeETzaPnSkz\":{\"vote\":7}}" "[]" send
{"method":"createrawsendfrom","params":["1YNLLmqEZwpN3TTPDMCu4G8L2D1oNSvVKX39tk",{"1b6GeMSBsqinKrmcSdyX5XpFHZoKeETzaPnSkz":{"vote":7}},[],"send"],"id":1,"chain_name":"abc
"}

error code: -4
error message:
Insufficient funds
OK, so I'm guessing this could be a rounding error (our bug). What happens if you use createrawsendfrom to send 6.9999 units instead of 7?
I had tried earlier with lower values viz. 5 and 1. It gave the same error. Does that help.

Else, if you want me to try the exact amount 6.9999, I can try and let you know.
In that case it won't be necessary. The only thing I can suggest is that you upgrade to the latest version of MultiChain, then re-run multichaind with -reindex=1, and if that doesn't help, send us the files to look at here, if you are willing. If so, you would need to zip up the blockchain directory, then send it to multichain dot debug at gmail dot com, then we can hopefully diagnose and fix the problem.
...