Author

Topic: 300 MB or 300 vMB? (Read 153 times)

legendary
Activity: 2870
Merit: 7490
Crypto Swap Exchange
July 06, 2022, 09:18:50 AM
#7
Additionally, we need to consider each full node implementation may have different way to store deserialized transaction.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
July 06, 2022, 07:37:09 AM
#6
Since segwit activation, each block size is now measured in virtual bytes.
One block has 1 million vbytes, or 1vMB.
If you are talking about the cap it is 4000000, not one. In other words the block weight has to be lower lower than this (maximum block weight). And the actual block size in raw bytes could be variable depending on how many transactions had how much witness and could be 1.1 MB, 1.5 MB, 2 MB, or almost 4 MB.

AFAIK, the block size may reach 4MB, but only 1vMB, according to bitcoin wiki.

Virtual bytes is just Weight Units/4. A block has 4000000 wu, but only 1000000vB

Quote
Virtual size (vsize), also called virtual bytes (vbytes), are an alternative measurement, with one vbyte being equal to four weight units. That means the maximum block size measured in vsize is 1 million vbytes.

....
The maximum size of a block in bytes is nearly equal in number to the maximum amount of block weight units, so 4M weight units allows a block of almost 4M bytes (4MB). This is not a somehow "made-up" size; the maximum block size is really almost 4MB on-disk and over-the-wire. However, this maximum can only be reached if the block is full of very weirdly-formatted transactions, so it should not usually be seen.
https://en.bitcoin.it/wiki/Weight_units
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
July 06, 2022, 12:38:57 AM
#5
Not only is a nodes' mempool size measures in MB, it is practically impossible to pre-allocate a mempool size in vMB based on the nominal segwit tx size, because segwit transactions can be made arbitrarily small (up to a point) which means that there can't be a fixed size for the memory heap that stores this informaiton.
legendary
Activity: 3444
Merit: 10558
July 06, 2022, 12:03:53 AM
#4
Since segwit activation, each block size is now measured in virtual bytes.
One block has 1 million vbytes, or 1vMB.
If you are talking about the cap it is 4000000, not one. In other words the block weight has to be lower lower than this (maximum block weight). And the actual block size in raw bytes could be variable depending on how many transactions had how much witness and could be 1.1 MB, 1.5 MB, 2 MB, or almost 4 MB.
legendary
Activity: 2212
Merit: 5622
Non-custodial BTC Wallet
July 05, 2022, 02:28:13 PM
#3


I am using mempool.space today and I noticed the memory pool capacity to be 300 MB, this means that the highest capacity of transactions that memory can hold can not be more than 300 MB, if more transactions are to be included, low fee transactions have to be removed, but what I am confused about is that is it in virtual MB or actual MB?

Just  adding more information about virtual size, to complement o_e_l_e_o post:

Since segwit activation, each block size is now measured in virtual bytes.
One block has 1 million vbytes, or 1vMB.

This is different than the old measure (bytes and MB).
If you look at some block explores you will see transactions size and vsize, which are different depending on the input format. For example,  this transactions Size is 341 B and Virtual size is 179 vB
https://blockstream.info/tx/7569112a7a2ae5f0d2fef2668cbe8ff7f8d6cf87ac667fb92938acf854e9c2e2

You can read more about it here:
Quote
Weight units are a measurement used to compare the size of different Bitcoin transactions to each other in proportion to the consensus-enforced maximum block size limit. Weight units are also used to measure the size of other block chain data, such as block headers. As of Bitcoin Core 0.13.0 (released August 2016)[1], each weight unit represents 1/4,000,000th of the maximum size of a block.

Virtual size (vsize), also called virtual bytes (vbytes), are an alternative measurement, with one vbyte being equal to four weight units. That means the maximum block size measured in vsize is 1 million vbytes.

Edit: add reference
https://en.bitcoin.it/wiki/Weight_units
legendary
Activity: 2268
Merit: 18586
July 05, 2022, 07:35:11 AM
#2
but what I am confused about is that is it in virtual MB or actual MB?
Neither in the way you are thinking about them.

The 300MB limit is in real MB, but it is not the size or the weight of the transactions in the mempool. Rather, it is the RAM usage of all these transactions deserialized.

If you look at mempool.space as you have, you'll notice the size of the mempool graph is only around 4 MvB, while the memory usage is 19 MB. A better site for visualizing this difference is here: https://statoshi.info/d/000000020/memory-pool?orgId=1. The green line in the top graph is the total transaction size, while the white line in the bottom graph is the dynamic memory usage of these transactions.
hero member
Activity: 868
Merit: 1094
July 05, 2022, 06:28:10 AM
#1


I am using mempool.space today and I noticed the memory pool capacity to be 300 MB, this means that the highest capacity of transactions that memory can hold can not be more than 300 MB, if more transactions are to be included, low fee transactions have to be removed, but what I am confused about is that is it in virtual MB or actual MB?
Jump to: