Is it possible to send a metadata larger than 4096B ?

+4 votes

Hi,

I've been trying to send larger metadata on my blockchain, but it keeps being cut at 4096B.

To send larger hex strings, I followed the Creating data streams tutorial and I changed the params.dat file right after creating the blockchain and before launching it with -daemonI edited the following fields to maximum : 
max-std-op-return-size =8388608
maximum-block-size=1000000000
max-std-tx-size=10000000
max-std-element-size=32768
max-std-op-drops-count=100

I also enabled the following fields by marking them true :
anyone-can-connect ; anyone-can-send ; anyone-can-receive ; anyone-can-issue ; anyone-can-mine ; anyone-can-activate ; anyone-can-admin

I can tell that my modifications have been taken into account since the params.dat file is updated on both my nodes after I launch them and I no longer need to grant send, receive, etc. to my addresses.

Any clue as to why my metadata always gets cut at 4096 ?

Thanks

asked Sep 13, 2016 by usr1309
edited Sep 14, 2016 by usr1309

1 Answer

+1 vote
 
Best answer
Just checking you mean 4096 KB, i.e. 4 MB? If so, how are you passing in the metadata? If it's through the command-line interface, you may be coming up against a buffer limit in that. Try directly via JSON-RPC instead.
answered Sep 13, 2016 by MultiChain
selected Nov 2, 2016 by usr1309
I meant 4096 bytes, sorry about that.
Thank you for your answer, yes I am using JSON-RPC.
Any chance it might be because I can't increase the default metadata max size ?
Please run getblockchainparams and send the output so we can check it's configured as necessary.
Hello again,

Thank you for your help, I tried only changing the max-std-op-return-size value and it worked.

Just in case here is what I get when running getblockchainparams : {
    "chain-protocol" : "multichain",
    "chain-description" : "MultiChain chain4",
    "chain-is-testnet" : false,
    "target-block-time" : 15,
    "maximum-block-size" : 1000000,
    "default-network-port" : 5793,
    "default-rpc-port" : 5792,
    "anyone-can-connect" : false,
    "anyone-can-send" : false,
    "anyone-can-receive" : false,
    "anyone-can-issue" : false,
    "anyone-can-mine" : false,
    "anyone-can-activate" : false,
    "anyone-can-admin" : false,
    "allow-p2sh-outputs" : true,
    "allow-multisig-outputs" : true,
    "setup-first-blocks" : 60,
    "mining-diversity" : 0.30000000,
    "admin-consensus-admin" : 0.50000000,
    "admin-consensus-activate" : 0.50000000,
    "admin-consensus-mine" : 0.50000000,
    "admin-consensus-issue" : 0.00000000,
    "mining-requires-peers" : true,
    "first-block-reward" : -1,
    "initial-block-reward" : 0,
    "reward-halving-interval" : 52560000,
    "reward-spendable-delay" : 1,
    "minimum-per-output" : 0,
    "maximum-per-output" : 100000000000000,
    "minimum-relay-fee" : 0,
    "native-currency-multiple" : 100000000,
    "skip-pow-check" : false,
    "pow-minimum-bits" : 16,
    "target-adjust-freq" : -1,
    "allow-min-difficulty-blocks" : false,
    "only-accept-std-txs" : true,
    "max-std-tx-size" : 100000,
    "max-std-op-return-size" : 8388608,
    "max-std-op-drops-count" : 5,
    "max-std-element-size" : 600,
    "chain-name" : "chain4",
    "protocol-version" : 10005,
    "network-message-start" : "fbcafcef",
    "address-pubkeyhash-version" : "00bee128",
    "address-scripthash-version" : "0543a3d2",
    "private-key-version" : "80ff3962",
    "address-checksum-value" : "cf7f4c7d",
    "genesis-pubkey" : "02c84cd231c68ef8c10291fc8717c82465badc39f3755edfa4c8e0864320e3ad42",
    "genesis-version" : 1,
    "genesis-timestamp" : 1473846904,
    "genesis-nbits" : 520159231,
    "genesis-nonce" : 149345,
    "genesis-pubkey-hash" : "6e577065cafd88ab9fb3f048f2054a36e9441a03",
    "genesis-op-return-script" : "5b6e6f74207365745d",
    "genesis-hash" : "0000a17e98ab159037ad2a2790273012f383e12713cfe245a84b7d4fae28cca6",
    "chain-params-hash" : "304e6b48893abfdc88097963d68a0e15c2d4e1b6eef10971ff01016b665ab46a"
}
Great, looks like you fixed it.
...