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.

  • 1
    The size specified in that code is the penalty free zone, i.e., the size of the block up to which miners can add transactions without incurring a penalty. – dEBRUYNE May 29 at 12:30
  • "So I created a bunch of numerous transfers with some mix of big and small amounts in the transaction" <- this has no bearing on block size/reward. It is miners that affect block size (e.g. how many txs they include in a block). – jtgrassie May 29 at 13:03
  • Thank you very much for the response. Pardon me for my assumption on my questions, but yes that is what I meant about increasing the block size from numerous transactions. But my question still stands on whether the values are calculated or estimated, and should I change the values until the error above is not happening anymore. – jnra May 29 at 14:17
  • See this answer on how increasing the block size affects reward (e.g. when the penalty kicks in). – jtgrassie May 29 at 15:43
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.

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.