Send From Burn Address Behaviour

+2 votes
Scenario: The burn address is provided the permissions of send and receive

Executing command 'sendfrom burnaddress someaddress 0', executes fine, but the source and destinations are same. For example:

echo $burn
1XXXXXXWs6XXXXXXEXXXXXXXXXXXXXXXdKRi3S

echo $admin
1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui

multichain-cli test sendfrom $burn $admin 0
{"method":"sendfrom","params":["1XXXXXXWs6XXXXXXEXXXXXXXXXXXXXXXdKRi3S","1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui",0],"id":1,"chain_name":"test"}

f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b

If we analyze the transaction using gettransaction method:

details" : [
        {
            "account" : "1XXXXXXWs6XXXXXXEXXXXXXXXXXXXXXXdKRi3S",
            "address" : "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui",
            "category" : "send",
            "amount" : 0.00000000,
            "vout" : 0,
            "fee" : 0.00000000
        },
        {
            "account" : "1XXXXXXWs6XXXXXXEXXXXXXXXXXXXXXXdKRi3S",
            "address" : "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui",
            "category" : "send",
            "amount" : 0.00000000,
            "vout" : 1,
            "fee" : 0.00000000
        },
        {
            "account" : "",
            "address" : "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui",
            "category" : "receive",
            "amount" : 0.00000000,
            "vout" : 0
        },
        {
            "account" : "",
            "address" : "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui",
            "category" : "receive",
            "amount" : 0.00000000,
            "vout" : 1
        }

Auto mapping of source address with account is performed.
asked Jun 22, 2016 by 7sigma
That's weird... can you please let us know which MultiChain version you're using, and show the information about this transaction from the getrawtransaction (verbose=1) and getwallettransaction APIs?
Output getrawtransaction with verbose
multichain-cli test getrawtransaction f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b 1{"method":"getrawtransaction","params":["f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b",1],"id":1,"chain_name":"test"}

{
    "hex" : "010000000123a69b9418a340cb4f91e2450643db1834c071818bad1dd809620670efe9f276000000006b483045022100a4661091b3d8403eeef2bdc3f446ba3c5ec1ab085160c463cf01951b36794b88022077e1329dc507982f4492fb6c7312fda76be15d4c2238c8fa1a9c643534fdfbcf0121033cdaba27098a0ca965f766319a137ef2190e30934474ee6922de030e57c8f072ffffffff0200000000000000001976a914df76ac0958d2ab7c28e7a33958ab2ee430d6d39588ac00000000000000001976a914df76ac0958d2ab7c28e7a33958ab2ee430d6d39588ac00000000",
    "txid" : "f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "76f2e9ef70066209d81dad8b8171c03418db430645e2914fcb40a318949ba623",
            "vout" : 0,
            "scriptSig" : {
                "asm" : "3045022100a4661091b3d8403eeef2bdc3f446ba3c5ec1ab085160c463cf01951b36794b88022077e1329dc507982f4492fb6c7312fda76be15d4c2238c8fa1a9c643534fdfbcf01 033cdaba27098a0ca965f766319a137ef2190e30934474ee6922de030e57c8f072",
                "hex" : "483045022100a4661091b3d8403eeef2bdc3f446ba3c5ec1ab085160c463cf01951b36794b88022077e1329dc507982f4492fb6c7312fda76be15d4c2238c8fa1a9c643534fdfbcf0121033cdaba27098a0ca965f766319a137ef2190e30934474ee6922de030e57c8f072"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 0.00000000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 df76ac0958d2ab7c28e7a33958ab2ee430d6d395 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914df76ac0958d2ab7c28e7a33958ab2ee430d6d39588ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui"
                ]
            },
            "assets" : [
            ],
            "permissions" : [
            ]
        },
        {
            "value" : 0.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 df76ac0958d2ab7c28e7a33958ab2ee430d6d395 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914df76ac0958d2ab7c28e7a33958ab2ee430d6d39588ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui"
                ]
            },
            "assets" : [
            ],
            "permissions" : [
            ]
        }
    ],
    "data" : [
    ],
    "blockhash" : "0000083646b7030e7b71988dcc475178181533a473ded8a8842f4440feb0b028",
    "confirmations" : 128,
    "time" : 1466576767,
    "blocktime" : 1466576767
}

Output Wallet API
 multichain-cli test getwallettransaction f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b true
{"method":"getwallettransaction","params":["f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b",true],"id":1,"chain_name":"test"}

{
    "balance" : {
        "amount" : 0.00000000,
        "assets" : [
        ]
    },
    "myaddresses" : [
        "1XCj5SYCgQwtodUXu9weWXS8YyLcpZx99RTqui"
    ],
    "addresses" : [
    ],
    "permissions" : [
    ],
    "data" : [
    ],
    "confirmations" : 142,
    "blockhash" : "0000083646b7030e7b71988dcc475178181533a473ded8a8842f4440feb0b028",
    "blockindex" : 1,
    "blocktime" : 1466576767,
    "txid" : "f1446c3deb52caf8f5e54748209b7b0fd328fbeecac9716765981775ca8fc48b",
    "time" : 1466576761,
    "timereceived" : 1466576761
}

More Info On Versions:
"version" : "1.0 alpha 21",
    "protocolversion" : 10005,
    "walletversion" : 60000,

{
    "walletversion" : 60000,
    "balance" : 0.00000000,
    "txcount" : 8,
    "keypoololdest" : 1466575911,
    "keypoolsize" : 2
}
Thanks, did you ever run importaddress on the burn address, i.e. is it in the wallet as a watch-only address?
I haven't imported the burn address. Actually I found the issue, after which I had created a new chain (test) to see the issue in details. There is only one node and one wallet in the test chain.
multichain-cli test validateaddress $burn
{"method":"validateaddress","params":["1XXXXXXWs6XXXXXXEXXXXXXXXXXXXXXXdKRi3S"],"id":1,"chain_name":"test"}

{
    "isvalid" : true,
    "address" : "1XXXXXXWs6XXXXXXEXXXXXXXXXXXXXXXdKRi3S",
    "ismine" : false
}
See Michael's answer below - he's correct.

1 Answer

+2 votes
I think there is a confusion between two APIs - sendfrom and sendfromaddress

'sendfromaddress burnaddress someaddress 0' will return error.

'sendfrom burnaddress someaddress 0' considers burnaddress as 'account' (see 'help sendfrom') and just tags it to the output of gettransactions. The funds are sent from some address in this wallet.
answered Jun 22, 2016 by Michael
...