how to check total memory used to store chain data?

+3 votes
$ multichain-cli chain5xx getblockchainparams
{"method":"getblockchainparams","params":[],"id":"50148972-1721826859","chain_name":"chain5xx"}

{
    "chain-protocol" : "multichain",
    "chain-description" : "MultiChain chain5xx",
    "root-stream-name" : "root",
    "root-stream-open" : true,
    "chain-is-testnet" : false,
    "target-block-time" : 15,
    "maximum-block-size" : 8388608,
    "maximum-chunk-size" : 1048576,
    "maximum-chunk-count" : 1024,
    "default-network-port" : 4399,
    "default-rpc-port" : 4398,
    "anyone-can-connect" : false,
    "anyone-can-send" : false,
    "anyone-can-receive" : false,
    "anyone-can-receive-empty" : true,
    "anyone-can-create" : false,
    "anyone-can-issue" : false,
    "anyone-can-mine" : false,
    "anyone-can-activate" : false,
    "anyone-can-admin" : false,
    "support-miner-precheck" : true,
    "allow-arbitrary-outputs" : false,
    "allow-p2sh-outputs" : true,
    "allow-multisig-outputs" : true,
    "setup-first-blocks" : 60,
    "mining-diversity" : 0.3,
    "admin-consensus-upgrade" : 0.5,
    "admin-consensus-txfilter" : 0.5,
    "admin-consensus-admin" : 0.5,
    "admin-consensus-activate" : 0.5,
    "admin-consensus-mine" : 0.5,
    "admin-consensus-create" : 0,
    "admin-consensus-issue" : 0,
    "lock-admin-mine-rounds" : 10,
    "mining-requires-peers" : true,
    "mine-empty-rounds" : 10,
    "mining-turnover" : 0.5,
    "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-offchain-fee" : 0,
    "minimum-relay-fee" : 0,
    "native-currency-multiple" : 100000000,
    "skip-pow-check" : false,
    "pow-minimum-bits" : 8,
    "target-adjust-freq" : -1,
    "allow-min-difficulty-blocks" : false,
    "only-accept-std-txs" : true,
    "max-std-tx-size" : 4194304,
    "max-std-op-returns-count" : 32,
    "max-std-op-return-size" : 2097152,
    "max-std-op-drops-count" : 5,
    "max-std-element-size" : 40000,
    "chain-name" : "chain5xx",
    "protocol-version" : 20011,
    "network-message-start" : "f7c4cffc",
    "address-pubkeyhash-version" : "001e81a5",
    "address-scripthash-version" : "0568ec0b",
    "private-key-version" : "80794dd3",
    "address-checksum-value" : "06b82bc4",
    "genesis-pubkey" : "02c15c2f63d9af0fd8aa37ef6f3b2a3ec9ec2e1fa8cc6cb285e7587b6cf126a245",
    "genesis-version" : 1,
    "genesis-timestamp" : 1721760656,
    "genesis-nbits" : 536936447,
    "genesis-nonce" : 262,
    "genesis-pubkey-hash" : "8f87fe98e190bd1b3d8c6c3a8f1284b2fae41737",
    "genesis-hash" : "00facd7972ea2ef344e4be133926642bddb9dec3f17e7074747b64d21bacb02b",
    "chain-params-hash" : "fc24734afe979a2886a3fa2ca68b6728b9b0732c710f83c547593f210a6459f4"
}
asked Jul 24 by anju

1 Answer

0 votes

I assume you're asking about the total size of the blockchain? This is not the same as "memory used" because the blockchain is not stored in memory.

There's no API call which gives this statistic instantly. However you can use getblocks with true for the verbose parameter and total up the size fields in the responses.

answered Jul 25 by MultiChain
...