2

A bit of a conundrum interpreting the results from "bitcoin-cli getmempoolinfo".

Straight from https://chainquery.com/bitcoin-api/getmempoolinfo:

getmempoolinfo
Returns details on the active state of the TX memory pool.
Result:
{
  "size": xxxxx,               (numeric) Current tx count
  "bytes": xxxxx,              (numeric) Sum of all tx sizes
  "usage": xxxxx,              (numeric) Total memory usage for the mempool
  "maxmempool": xxxxx,         (numeric) Maximum memory usage for the mempool
  "mempoolminfee": xxxxx       (numeric) Minimum fee for tx to be accepted
}*

Cool! So "size" returns the number of transactions in the memory pool! But the numbers don't add up. Straight from the same page:

"result": {
    "size": 9178,
    "bytes": 100859918,
    "usage": 216557216,
    "maxmempool": 300000000,
    "mempoolminfee": 0.00001070
},
"error": null,
"id": null*

Doing the math, "bytes" divided by "size" equals 10,989 bytes/transaction. I would expect sometime on the order of ~400 bytes/transaction. Hence my conundrum.

  • What is the question in this post? – Comodore May 29 '16 at 20:07
  • I am trying to understand the output from "bitcoin-cli getmempoolinfo". The numbers don't jibe. If there are 9178 transactions in the memory pool, representing 100,859,918 bytes, then each transaction is ~10KB. That is 20x larger than expected. How does one interpret the numbers? – Pressed250 May 30 '16 at 3:46
3

After some digging, I believe I have an explanation: the memory pool is clogged with 'junk' transactions.

Bitcoin Core's minrelaytxfee parameter defaults to 0.01 mBTC/KB, which is "too low" in the sense that it permits TONS of 'junk' transactions to enter the memory pool. I've bumped minrelaytxfee to 0.05 mBTC/KB and the results so far are very encouraging. The memory pool profile now makes sense, from the # of transactions to the size of each transaction.

And minrelaytxfee=0.00005 strikes me as "fair" as it is one-tenth the broadly recommended transaction fee of 0.5 mBTC/KB (backup up by the Pareto breakdown of real transactions on various websites).

I encourage everyone running Bitcoin Core can make their own decision on minrelaytxfee for their full node.

  • 1
    Since Bitcoin Core 0.12, the mempool is limited in size, and the effective relay fee will be modified to compensate for it growing too large. If your mempool is taking more space than you can spare, reduce it with -maxmempool=N (with N in MB RAM). Having the transactions otherwise does not hurt, apart from hurting your averages :) – Pieter Wuille May 31 '16 at 22:18
0

For anyone reading this in 2019, not all txns have the same size, it all depends on the # of inputs/outputs and the scripts, that's why summing the mempool size and dividing by the # of transactions doesn't make sense.

Take for example a transaction by a large exchange, hundreds of clients withdraw and the site batch the all the request in a single transaction, making the size of it very big (see https://www.blockchain.com/btc/tx/b30679bf3c688ad8f8b674a25c33399be23234934a488c04b8666f9486c1e5f3 it's 81486 bytes, where a normal tx nowadays is around 150.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.