How can I know from the JSON RPC response if my file was too big?

+1 vote

"max-std-tx-size" : 4194304,

"maximum-block-size" : 8388608,

"max-std-op-return-size" : 2097152,

These are my parameters:

Why I try and post a string of size ~450KB from Savoir, the Python JSON RPC wrapper, the transaction it posts, has a another JSON object in it's 'data' field with the the same txid as it's holder. 

The API behaves as expected for small files for

START of Transaction:

{

        "publishers" : [

            "1QSfe3geasekw2yWsSj7vPzNWfNmYQDgD6n8WJ"

        ],

        "key" : "7765646e657364617933",

        "data" : {

            "txid" : "33051951af13f3fb2c610b0f92201eb1c464eb7a7d10c6b5950011381db19057",

            "vout" : 0,

            "size" : 209670

        },

        "confirmations" : 6,

        "blocktime" : 1490811137,

        "txid" : "33051951af13f3fb2c610b0f92201eb1c464eb7a7d10c6b5950011381db19057"

    }

 

asked Mar 29, 2017 by Madhav

1 Answer

+1 vote

To prevent API responses getting too large, there is a maxshowndata runtime parameter which sets the size threshold after which the full data is not returned for stream items (and any other data fields in API responses).

You can change this setting like any other runtime parameter, with a command-line option, entry in multichain.conf, or using the setruntimeparam command while MultiChain is running.

For data items larger than the threshold, use the gettxoutdata command to retrieve the data in full or in part (using byte offsets).

answered Mar 30, 2017 by MultiChain
...