max_block_ex_mem

Cardano Parameters

Cardano has over 40 network parameters. Parameters are the mechanisms that control how the Cardano Blockchain works.

In this installment of our Cardano Network Parameters series, we examine max block execution memory (max_block_ex_mem). This parameter sets a limit on how much memory can be used for all scripts within a single block. It helps balance everyday transaction efficiency with the needs of more intense – and perhaps less frequent – tasks. The current value of the max_block_ex_mem is set to 62000000 (62 Million Units). But what does that mean, and why does it matter?

What is it:

The max_block_ex_mem sets an upper limit on how much computer memory (RAM), all scripts combined inside a block is allowed to use. Cardano also has a parameter for a similar constraint on a per script basis but we will come back to that in another installment.

How does it work?

Even though the max_block_ex_mem is about controlling memory usage, that “62 Million” setting does not translate 1:1 to the typical computer memory numbers that a sales person might try to explain to you at an electronics store.

The max_block_ex_mem is part of a formula collectively called the ‘Plutus cost model’. Here, “cost” is the key word. The cost model is designed to make smart contract resource usage predictable and fair across the decentralized network. By measuring resource use in deterministic “units”, Cardano ensures that:

  • Scripts can’t hog resources.
  • Block producers can know exactly how much script execution will cost.
  • The same script always uses the same amount of memory and CPU, no matter who runs it.

While the units in max_block_ex_mem don’t translate 1:1 to megabytes or gigabytes in a way you might be used to, you can think of them as normalized resource tokens for script execution. And with cost models continually evolving, these parameters are adaptable as the network grows.

Why you might care

If you’re a DApp developer, this parameter can affect how many smart contract interactions can be squeezed into a single block. If the block is full in terms of execution memory, your transaction might get delayed to the next block, especially during times of high demand. Depending on the DApp, this might prompt you to move less critical execution off the blockchain. Or, it could mean you choose to write more fault-tolerant, smaller DApps that work with each other interdependently, instead of one giant application.

For everyday users, this parameter usually operates quietly in the background. However, it helps explain why transactions involving smart contracts sometimes take a little longer or cost slightly more when the network is busy.

Conclusion

With Cardano now having full support for ada holder driven governance. Anyone or company can propose a change to the max_block_ex_mem. If they give a good rationale and technical evidence supporting their rationale, other ada holders can vote ratified and enact their change requests. The max_block_ex_mem is one of the many ways Cardano, through rigorous science, carefully balances performance with security and decentralization, even as more and more DApps are created and usage of the network increases.

Get more articles like this in your inbox

Was the article useful?

Or leave comment

No comments yet…

close

Playlist

  • EP2: epoch_length

    Authored by: Darlington Kofa

    3m 24s
    Darlington Kofa
  • EP1: 'd' parameter

    Authored by: Darlington Kofa

    4m 3s
    Darlington Kofa
  • EP3: key_deposit

    Authored by: Darlington Kofa

    3m 48s
    Darlington Kofa
  • EP4: epoch_no

    Authored by: Darlington Kofa

    2m 16s
    Darlington Kofa
  • EP5: max_block_size

    Authored by: Darlington Kofa

    3m 14s
    Darlington Kofa
  • EP6: pool_deposit

    Authored by: Darlington Kofa

    3m 19s
    Darlington Kofa
  • EP7: max_tx_size

    Authored by: Darlington Kofa

    4m 59s
    Darlington Kofa
0:00
/
~0:00