Bitcoin Forum
May 01, 2024, 04:41:24 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: bitcoin-cli getmempoolinfo  (Read 119 times)
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 956



View Profile WWW
May 11, 2023, 12:50:23 PM
 #1

Hello,

the command
Code:
bitcoin-cli getmempoolinfo
returns

Code:
{
  "loaded": true,
  "size": 91656,
  "bytes": 64818257,
  "usage": 299677520,
  "total_fee": 9.05498421,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00003100,
  "minrelaytxfee": 0.00001000,
  "unbroadcastcount": 0
}

However, in https://mempool.space/ it says "307,065 TXs" uncorfimed transactions.

Why is there such a difference between my node's mempool and the website's mempool?

1714538484
Hero Member
*
Offline Offline

Posts: 1714538484

View Profile Personal Message (Offline)

Ignore
1714538484
Reply with quote  #2

1714538484
Report to moderator
1714538484
Hero Member
*
Offline Offline

Posts: 1714538484

View Profile Personal Message (Offline)

Ignore
1714538484
Reply with quote  #2

1714538484
Report to moderator
Bitcoin addresses contain a checksum, so it is very unlikely that mistyping an address will cause you to lose money.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16577


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 11, 2023, 03:01:44 PM
 #2

Code:
  "usage": 299677520,
  "maxmempool": 300000000,
Why is there such a difference between my node's mempool and the website's mempool?
It's full. That means it starts dropping transactions. Each node can use their own settings for this.

apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 956



View Profile WWW
May 11, 2023, 03:32:49 PM
 #3

It's full. That means it starts dropping transactions. Each node can use their own settings for this.

But my mempool says 91k TXs in size. What does this "size" mean?

LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16577


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 11, 2023, 03:45:17 PM
 #4

But my mempool says 91k TXs in size. What does this "size" mean?
I guess it's the number of transactions. My node had 74243 of them.

apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 956



View Profile WWW
May 11, 2023, 03:58:49 PM
 #5

I guess it's the number of transactions. My node had 74243 of them.

Allow me to rephrase because I think I haven't made myself clear.

Inside every node's mempool there are unconfirmed transactions.

In mine how many are there? Which number from the following represents the unconfirmed transactions?

Code:
{
  "loaded": true,
  "size": 95792,
  "bytes": 65539423,
  "usage": 299771632,
  "total_fee": 11.40788335,
  "maxmempool": 300000000,
  "mempoolminfee": 0.00003200,
  "minrelaytxfee": 0.00001000,
  "unbroadcastcount": 0
}

What is the difference between "usage" and "size"?

o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 11, 2023, 04:04:42 PM
Merited by LoyceV (4), hosseinimr93 (4)
 #6

Size is the number of unconfirmed transactions your node holds in its mempool. Your node is holding 95,792 transaction.

Usage is the amount of memory those unconfirmed transactions are using after they have been deserialized. Your node is using 299,771,632 bytes. By default, the maximum is 300,000,000 bytes (300 MB).

Since you asked about mempool.space, you'll see that under memory usage it currents says something around 910 MB / 300 MB. This is because they have increased their maximum limit from 300 MB to something much higher. If you also increased your node's max memory usage to over 1 GB, then your node would also store the other 200,000 or so transactions which mempool.space's node is storing. As it stands, your node will drop the lowest fee transactions to stay within the default memory limit.
LoyceV
Legendary
*
Offline Offline

Activity: 3290
Merit: 16577


Thick-Skinned Gang Leader and Golden Feather 2021


View Profile WWW
May 11, 2023, 04:07:26 PM
 #7

Allow me to rephrase because I think I haven't made myself clear.
I thought I got it, but I'm starting to doubt now....

I assume "size" is the number of transactions in mempool, "bytes" is the size, but now I'm confused why "usage" (I assume that's "memory usage") is so much more. It makes sense that it's very close to the maximum.

o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 11, 2023, 04:09:58 PM
 #8

I assume "size" is the number of transactions in mempool, "bytes" is the size, but now I'm confused why "usage" (I assume that's "memory usage") is so much more. It makes sense that it's very close to the maximum.
Bytes is the raw size of these transactions. In OP's example, his 95,792 transactions will fill 65,539,423 bytes of block space when they are mined.

This is different to usage. Usage is specifically RAM usage of these deserialized transactions, not the bytes they will take up on the blockchain. The RAM usage will vary based on everything from his node's hardware to the specifics of the transactions in his mempool.
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 956



View Profile WWW
May 11, 2023, 04:37:48 PM
 #9

Size is the number of unconfirmed transactions your node holds in its mempool. Your node is holding 95,792 transaction.

Usage is the amount of memory those unconfirmed transactions are using after they have been deserialized. Your node is using 299,771,632 bytes. By default, the maximum is 300,000,000 bytes (300 MB).

Since you asked about mempool.space, you'll see that under memory usage it currents says something around 910 MB / 300 MB. This is because they have increased their maximum limit from 300 MB to something much higher. If you also increased your node's max memory usage to over 1 GB, then your node would also store the other 200,000 or so transactions which mempool.space's node is storing. As it stands, your node will drop the lowest fee transactions to stay within the default memory limit.

I thought I got it, but I'm starting to doubt now....

I assume "size" is the number of transactions in mempool, "bytes" is the size, but now I'm confused why "usage" (I assume that's "memory usage") is so much more. It makes sense that it's very close to the maximum.

Thank you both. Shouldn't all nodes have the same mempool capacity?

I assume "size" is the number of transactions in mempool, "bytes" is the size, but now I'm confused why "usage" (I assume that's "memory usage") is so much more. It makes sense that it's very close to the maximum.
Bytes is the raw size of these transactions. In OP's example, his 95,792 transactions will fill 65,539,423 bytes of block space when they are mined.

This confuses me... I mean you explained it perfectly, but I don't get it. The block size in Bitcoin is 1MB. So can I assume how many blocks are approximately left to be mined? Would that be 65MB / 1MB = 65 blocks?

o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 11, 2023, 04:59:21 PM
 #10

Shouldn't all nodes have the same mempool capacity?
Although the majority of nodes run with the default setting of 300 MB, there is no requirement for any node to stick to this, and nodes are free to change the memory they dedicate to their mempool.

The block size in Bitcoin is 1MB. So can I assume how many blocks are approximately left to be mined? Would that be 65MB / 1MB = 65 blocks?
For the transactions in your mempool, yes. But as we've seen, there are other nodes such as mempool.space which have much larger mempools. As the transaction in your mempool start to get added to blocks and your memory usage drops, your node will start to accept and store these transactions from other nodes with larger mempools.
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 956



View Profile WWW
May 11, 2023, 05:02:43 PM
 #11

Shouldn't all nodes have the same mempool capacity?
Although the majority of nodes run with the default setting of 300 MB, there is no requirement for any node to stick to this, and nodes are free to change the memory they dedicate to their mempool.

The block size in Bitcoin is 1MB. So can I assume how many blocks are approximately left to be mined? Would that be 65MB / 1MB = 65 blocks?
For the transactions in your mempool, yes. But as we've seen, there are other nodes such as mempool.space which have much larger mempools. As the transaction in your mempool start to get added to blocks and your memory usage drops, your node will start to accept and store these transactions from other nodes with larger mempools.

I guess my final question would be what does "unbroadcastcount": 0 indicate?

o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 11, 2023, 05:24:48 PM
 #12

I guess my final question would be what does "unbroadcastcount": 0 indicate?
Exactly as it suggests - the number of transactions in your mempool which have not yet been successfully broadcast to any peers.
DaveF
Legendary
*
Offline Offline

Activity: 3458
Merit: 6254


Crypto Swap Exchange


View Profile WWW
May 11, 2023, 07:33:39 PM
Merited by LoyceV (4)
 #13

from developer.bitcoin.org

Quote
  "loaded" : true|false,     (boolean) True if the mempool is fully loaded
  "size" : n,                (numeric) Current tx count
  "bytes" : n,               (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
  "usage" : n,               (numeric) Total memory usage for the mempool
  "maxmempool" : n,          (numeric) Maximum memory usage for the mempool
  "mempoolminfee" : n,       (numeric) Minimum fee rate in BTC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee
  "minrelaytxfee" : n,       (numeric) Current minimum relay fee for transactions
  "unbroadcastcount" : n     (numeric) Current number of transactions that haven't passed initial broadcast yet

Also, since I asked about it a while ago, there will be some variance between the mempool of different nodes:
https://bitcointalk.org/index.php?topic=5200716

With the filled mempool we are having now, depending on your config there could be a lot of difference depending on what nodes or explorers you are looking at.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
apogio (OP)
Sr. Member
****
Offline Offline

Activity: 420
Merit: 956



View Profile WWW
May 11, 2023, 07:51:58 PM
 #14

from developer.bitcoin.org

Quote
  "loaded" : true|false,     (boolean) True if the mempool is fully loaded
  "size" : n,                (numeric) Current tx count
  "bytes" : n,               (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted
  "usage" : n,               (numeric) Total memory usage for the mempool
  "maxmempool" : n,          (numeric) Maximum memory usage for the mempool
  "mempoolminfee" : n,       (numeric) Minimum fee rate in BTC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee
  "minrelaytxfee" : n,       (numeric) Current minimum relay fee for transactions
  "unbroadcastcount" : n     (numeric) Current number of transactions that haven't passed initial broadcast yet

Also, since I asked about it a while ago, there will be some variance between the mempool of different nodes:
https://bitcointalk.org/index.php?topic=5200716

With the filled mempool we are having now, depending on your config there could be a lot of difference depending on what nodes or explorers you are looking at.

-Dave

Thanks Dave. How would I go about increasing my mempool's capacity? I haven't been able to find a straightforward answer. Is it an argument when running bitcoind?

o_e_l_e_o
In memoriam
Legendary
*
Offline Offline

Activity: 2268
Merit: 18509


View Profile
May 11, 2023, 08:54:05 PM
Merited by DaveF (3)
 #15

Yes. For bitcoind, add the argument -maxmempool=300 where 300 is the number of megabytes you want to set as the upper limit.

Alternatively, you can add the same argument to your bitcoin.conf file.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!