Multichain 2.0 createrawsendfrom transaction limitation

+1 vote

Is there a limit to how many textual transactions can be published to a stream using createrawsendfrom in Multichain 2.0? I tried varying the size of the data portion but the limit seems to be 10 transactions regardless of the sizes I have tried. Is it configurable? If so, what are the trade offs? I have tested it on Windows but not Linux.

 

 

 

 

 

asked Mar 11, 2018 by George

1 Answer

+1 vote

This will be controlled by the max-std-op-returns-count blockchain parameter. You can set this up correctly when creating the chain, and in 2.0 alpha 2 this can also be upgraded after the chain is running.

answered Mar 11, 2018 by MultiChain
Thanks. I stopped the chain and updated max-std-op-returns-count from 10 to 100 as follows, then started the daemon.

This is the change I made in params.dat ...
max-std-op-returns-count = 100

However, I get this message. Do I need to clone the chain? If so, it looks like I will end up with a new chain name and I would think I would impact any other node synch'ing that chain.

MultiChain 2.0 alpha 2 Daemon (latest protocol 20002)
ERROR: Parameter set for blockchain mychain is invalid. You may generate new network using these parameters by running"
multichain-util clone mychain <new-blockchain-name>

My apologies if I missed some documentation, but is there a procedure to update params.dat that involves more than what I described above?

https://www.multichain.com/developers/blockchain-parameters/
Once a chain is running you can't update its parameters in this way, because it's a consensus system in which all the nodes have to agree. So you should first change your params.dat file back to how it was.

Instead you need to use the create upgrade -> approvefrom mechanism. See the second section of https://www.multichain.com/developers/upgrading-nodes-chains/ for guidance, although in your case it's the max-std-op-returns-count parameter you want to change, not the protocol-version.
Thanks again! That worked well!! I discovered that the approval command limits the change to the max-std-op-returns-count parameter to between half and double the current value. However, multiple upgrades and approvals can be executed to get to a value that is more than double the original value.

For the benefit of others (and myself! ), here are the commands I executed. Note that I escaped the double quotes and change the single quotes to double for windows.

I chose to use "updateopcount" as the name of the upgade

A. Create the upgrade

multichain-cli mychain createfrom 16YFwGjn3JohkGNAkUz7ibecjG7XWip4hvoGYu upgrade updateopcount false "{\"max-std-op-returns-count\":20}"

B. Display the upgrade.

multichain-cli mychain listupgrades

Here is the output it produced. The "required" count is 1 indicating that it needs 1 approval from an admin address. In this case, I have only one admin (and one node).

[
    {
        "name" : "updateopcount",
        "createtxid" : "58d60b5546dfaed2ccb1f3566acaaeaa0531edcd821cfed846cd3a9a11f319dd",
        "params" : {
            "max-std-op-returns-count" : 20
        },
        "startblock" : 0,
        "approved" : false,
        "appliedblock" : null,
        "appliedparams" : null,
        "skippedparams" : null,
        "admins" : [
        ],
        "required" : 1
    }
]

C. Perform the approval using an admin address

multichain-cli mychain approvefrom 16YFwGjn3JohkGNAkUz7ibecjG7XWip4hvoGYu updateopcount true

D. Display the upgrade to show that its approved. Notice that required is now 0, and approved is now true. If the approval did not work then the appliedparams will be empty and the skippedparams will have the error message. In a multi node topology I believe the other nodes will need to approve.

multichain-cli mychain listupgrades

[
    {
        "name" : "updateopcount",
        "createtxid" : "58d60b5546dfaed2ccb1f3566acaaeaa0531edcd821cfed846cd3a9a11f319dd",
        "params" : {
            "max-std-op-returns-count" : 20
        },
        "startblock" : 0,
        "approved" : true,
        "appliedblock" : 71,
        "appliedparams" : {
                   "max-std-op-returns-count" : "20"
        },
        "skippedparams" : {
          },
        "admins" : [
            "16YFwGjn3JohkGNAkUz7ibecjG7XWip4hvoGYu "
        ],
        "required" : 0
    }
]
Great - thanks for the detailed step-by-step guide!
...