You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the stack as a Validium, gas used calculations have to account for the fact that pubdata is no longer published, and thus certain operations like storage becomes cheaper (they don’t pay for pubdata inclusion on L1). Under the new fee model that was recently merged, every change needed here is managed through the following configuration values. With this in mind, all that’s needed is, when running zk init, if the user is initializing the stack in Validium mode (passing the --validium-mode flag) we should load the following config specified for Validium in the file etc/env/base/chain.toml:
The only flag not available in the chain.toml is the l1_pubdata_price as it is computed and set by the function estimate_effective_pubdata_price() defined in the L1GasPriceProvider trait, implemented by GasAdjuster. To make this value equal to zero, we need to set the const L1_GAS_PER_PUBDATA_BYTE to zero for validium, and 17 for rollup. This required moving the const to the chain.toml configuration file.
EDIT: L1GasPriceProvider::estimate_effective_pubdata_price implementation for GasAdjuster<E> should look like:
fnestimate_effective_pubdata_price(&self) -> u64{// For now, pubdata is only sent via calldata, so its price is pegged to the L1 gas price.self.estimate_effective_gas_price()*self.config.l1_gas_per_pubdata_byte}
The config must be added to the chain.toml file in the gas_adjuster config and then we should update the GasAdjuster as needed for that new config.
The text was updated successfully, but these errors were encountered:
Not charging for pubdata
When running the stack as a Validium, gas used calculations have to account for the fact that
pubdata
is no longer published, and thus certain operations like storage becomes cheaper (they don’t pay forpubdata
inclusion on L1). Under the new fee model that was recently merged, every change needed here is managed through the following configuration values. With this in mind, all that’s needed is, when runningzk init
, if the user is initializing the stack in Validium mode (passing the--validium-mode
flag) we should load the following config specified for Validium in the fileetc/env/base/chain.toml
:chore(docs): Update documentation about our new fee model by mm-zk · Pull Request #904 · matter-labs/zksync-era
The only flag not available in the
chain.toml
is thel1_pubdata_price
as it is computed and set by the functionestimate_effective_pubdata_price()
defined in theL1GasPriceProvider
trait, implemented byGasAdjuster
. To make this value equal to zero, we need to set the constL1_GAS_PER_PUBDATA_BYTE
to zero for validium, and 17 for rollup. This required moving the const to thechain.toml
configuration file.EDIT:
L1GasPriceProvider::estimate_effective_pubdata_price
implementation forGasAdjuster<E>
should look like:The config must be added to the
chain.toml
file in thegas_adjuster
config and then we should update theGasAdjuster
as needed for that new config.The text was updated successfully, but these errors were encountered: