2

I can't quite figure out the purpose of the dynamic block size in Monero, or I'm just missing something.

Based on the original CryptoNote code, from my understanding, you need to change a specific constant to adjust to your preferred block size, which in Monero, is defined by the constants:

#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V2    60000 //size of block (bytes) after which reward for block calculated using block size
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V1    800000 //size of block (bytes) after which reward for block calculated using block size
#define CRYPTONOTE_BLOCK_GRANTED_FULL_REWARD_ZONE_V5    300000 //size of block (bytes) after which reward for block calculated using block size - second change, from v5

So I have made a little experiment to determine what size would cause the core code to emit an error when the block size is over this expected value. I created numerous transfers with a mix of some big and some small amounts in the transaction, I then encountered this error:

2019-05-29 10:21:28.662      0x10e85a5c0    ERROR   cn  src/cryptonote_basic/cryptonote_basic_impl.cpp:114  Block cumulative weight is too big: 64156336, expected less than 62562850

So I am puzzled by this. Are the numbers specified by the constants calculated in some way, or are they just getting values with trial and error, proceeding with the max value and some reasonable offset?

Thanks.

jtgrassie
  • 19,601
  • 4
  • 17
  • 54
jnra
  • 69
  • 4

1 Answers1

2

The constants you reference specify the maximum block size you can reach before the dynamic fee calculation is used.

Therefore, if the block size is below 300000, the full reward is granted and there is no need for the dynamic fee calculation. If however the block is larger than 300000, the dynamic fee calculation is applied. This doesn't mean a full reward is not granted, rather there may be a penalty applied.

A little outdated, but https://web.getmonero.org/2017/12/11/A-note-on-fees.html details more on how the dynamic fee calculation works.

Lastly, "dynamic block size" and "dynamic fee" are related terms. Monero does not have a maximum block size, therefore, it is a dynamic block size. However, dependent on the size of the block being mined (in relation to average block size over the last N blocks), it can only grow by a certain amount before incurring a penalty fee. This is where the term "dynamic fee" applies.

jtgrassie
  • 19,601
  • 4
  • 17
  • 54