mandatory-script-verify-flag-failed (Script too big)

+2 votes

I issued 8000 to 15000 assets for 1 address in a loop, and when i'm trying to transfer all assets to set of other addresses some are not transferred and it gives error "Error Code: -26 Error Message: Transaction was rejected: ConnectInputs failed: mandatory-script-verify-flag-failed (Script too big)"

From my research, i found that some assets were transferred to the same address successfully and others are not getting transferred.

All addresses have connect, send and receive permissions

Can anyone suggest me a solution for this

asked Aug 22, 2019 by anjnkmr

2 Answers

+1 vote
 
Best answer

OK, so we've found the cause of this, thanks for all the information. It's actually a bug that will be fixed in the next protocol upgrade.

If this is not yet a live system, you can solve the problem by starting a new blockchain with the following parameter setting (edit params.dat before starting the chain):

max-std-element-size=1024

answered Aug 29, 2019 by MultiChain
selected Sep 3, 2019 by anjnkmr
Ok, please let us know once it is fixed.
This issue has been fixed in today's releases. If you want to keep running your old blockchain you will need to upgrade the protocol in order to spend these UTXOs:

https://www.multichain.com/developers/upgrading-nodes-chains/
0 votes
Can you please post an example of an API call you are making to transfer an asset? Are you trying to transfer a large number of assets in a single transaction?
answered Aug 22, 2019 by MultiChain
I was asking how many assets are shown in the output of:

gettxout 206ac1882fb03761caafee52b07327c4481add6d3171a37300b94926dd274881 3
Sorry,
Earlier we assumed that they were approx 10,000 (As our assets count is nearly 10,000 at that time) but we checked the exact count of the assets in the transaction output of the command and got 424.

We carried out some other asset transfers, Will that affect the asset count in that command output?
OK, so please tell me the asset count in the transaction input as well. Use:

gettxout 206ac1882fb03761caafee52b07327c4481add6d3171a37300b94926dd274881 3
If this UTXO is no longer available, we will need to start again. For a new transaction that is failing, please send the output of decoderawtransaction including an exact count of assets in each output, as well as the output of gettxout on the input spent by that transaction (see "txid" and "vout" fields of "vin" structure of the output of decoderawtransaction) including that input's count of assets.
The UTXO was available so we ran the gettxout command and got 424 assets.

Output of the command "gettxout 206ac1882fb03761caafee52b07327c4481add6d3171a37300b94926dd274881 3"

{"method":"gettxout","params":["206ac1882fb03761caafee52b07327c4481add6d3171a37300b94926dd274881",3],"id":"92830864-1566995309","chain_name":"my-chain"}

{
    "bestblock" : "00d7b140ca6f6e3acac8d2893a3fe0d864583d7f494ea53d89ad03e1dc163101",
    "confirmations" : 11253,
    "value" : 0.00000000,
    "scriptPubKey" : {
        "asm" : "OP_DUP OP_HASH160 86de661ad6377939d21df732091b9668b5f6881a OP_EQUALVERIFY OP_CHECKSIG 73706b7124482f0fad2a830....00000000 OP_DROP 73706b7129c02aa.........0000000000000 OP_DROP",
        "hex" : "76a91486de661a.........cf9bb61e0000000000000075",
        "reqSigs" : 1,
        "type" : "pubkeyhash",
        "addresses" : [
            "FROM ADDRESS"
        ]
    },
    "version" : 1,
    "coinbase" : false,
    "assets" : [
        {
            "name" : "ABC-214-015-1",
            "issuetxid" : "00286543d4d220e600832aad0f2f48241225e5d71219f549894154edf3edecc2",
            "assetref" : "648-28697-10240",
            "qty" : 1.00000000,
            "raw" : 10
        },
+ 463 ASSETS
"permissions" : [
    ]
}
...