diff --git a/SystemConfig.json b/SystemConfig.json index 68af3b31e..7ffdcc87a 100644 --- a/SystemConfig.json +++ b/SystemConfig.json @@ -3,7 +3,7 @@ "MAX_PUBDATA_PER_BATCH": 110000, "PRIORITY_TX_MAX_PUBDATA": 99000, "FAIR_L2_GAS_PRICE": 500000000, - "L1_GAS_PER_PUBDATA_BYTE": 17, + "L1_GAS_PER_PUBDATA_BYTE": 0, "BATCH_OVERHEAD_L2_GAS": 1200000, "BATCH_OVERHEAD_L1_GAS": 1000000, "MAX_TRANSACTIONS_IN_BATCH": 1024, @@ -16,4 +16,4 @@ "L1_TX_DELTA_FACTORY_DEPS_PUBDATA": 64, "MAX_NEW_FACTORY_DEPS": 32, "REQUIRED_L2_GAS_PRICE_PER_PUBDATA": 800 -} +} \ No newline at end of file diff --git a/l1-contracts/contracts/zksync/Config.sol b/l1-contracts/contracts/zksync/Config.sol index c33bbe8bc..509dd8ee9 100644 --- a/l1-contracts/contracts/zksync/Config.sol +++ b/l1-contracts/contracts/zksync/Config.sol @@ -81,7 +81,8 @@ uint256 constant FAIR_L2_GAS_PRICE = $(FAIR_L2_GAS_PRICE); /// @dev Even though the price for 1 byte of pubdata is 16 L1 gas, we have a slightly increased /// value. -uint256 constant L1_GAS_PER_PUBDATA_BYTE = $(L1_GAS_PER_PUBDATA_BYTE); +// uint256 constant L1_GAS_PER_PUBDATA_BYTE = $(L1_GAS_PER_PUBDATA_BYTE); +uint256 constant L1_GAS_PER_PUBDATA_BYTE = 0; /// @dev The computational overhead of processing an L2 batch. uint256 constant BATCH_OVERHEAD_L2_GAS = $(BATCH_OVERHEAD_L2_GAS); @@ -90,7 +91,8 @@ uint256 constant BATCH_OVERHEAD_L2_GAS = $(BATCH_OVERHEAD_L2_GAS); uint256 constant BATCH_OVERHEAD_L1_GAS = $(BATCH_OVERHEAD_L1_GAS); /// @dev The equivalent in L1 pubdata of L1 gas used for working with L1 -uint256 constant BATCH_OVERHEAD_PUBDATA = BATCH_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE; +// uint256 constant BATCH_OVERHEAD_PUBDATA = BATCH_OVERHEAD_L1_GAS / L1_GAS_PER_PUBDATA_BYTE; +uint256 constant BATCH_OVERHEAD_PUBDATA = 0; /// @dev The maximum number of transactions in L2 batch: uint256 constant MAX_TRANSACTIONS_IN_BATCH = $(MAX_TRANSACTIONS_IN_BATCH); diff --git a/system-contracts/bootloader/bootloader.yul b/system-contracts/bootloader/bootloader.yul index eba58c936..3b4ded723 100644 --- a/system-contracts/bootloader/bootloader.yul +++ b/system-contracts/bootloader/bootloader.yul @@ -87,7 +87,7 @@ object "Bootloader" { /// we demand at least 17 to cover up for the costs of additional /// hashing of it, etc. function L1_GAS_PER_PUBDATA_BYTE() -> ret { - ret := 17 + ret := 0 } /// @dev The size of the bootloader memory that is to spent by the transaction's @@ -1652,11 +1652,11 @@ object "Bootloader" { debugLog("requiredOverhead", requiredOverhead) debugLog("operatorOverheadForTransaction", operatorOverheadForTransaction) - // The required overhead is less than the overhead that the operator - // has requested from the user, meaning that the operator tried to overcharge the user - if lt(requiredOverhead, operatorOverheadForTransaction) { - assertionError("Operator's overhead too high") - } + // // The required overhead is less than the overhead that the operator + // // has requested from the user, meaning that the operator tried to overcharge the user + // if lt(requiredOverhead, operatorOverheadForTransaction) { + // assertionError("Operator's overhead too high") + // } ret := operatorOverheadForTransaction } @@ -1866,7 +1866,8 @@ object "Bootloader" { // pubdata to pay for. // The difference between ceil and floor division here is negligible, // so we prefer doing the cheaper operation for the end user - let pubdataEquivalentForL1Gas := safeDiv(l1GasOverhead, l1GasPerPubdata, "dd") + // let pubdataEquivalentForL1Gas := safeDiv(l1GasOverhead, l1GasPerPubdata, "dd") + let pubdataEquivalentForL1Gas := 0 ret := safeAdd( computationOverhead, @@ -1920,17 +1921,18 @@ object "Bootloader" { totalBatchOverhead, MAX_TRANSACTIONS_IN_BATCH() ) - ret := max(ret, overheadForSlot) + debugLog("overheadForSlot", overheadForSlot) - // In the proved batch we ensure that the gasPerPubdataByte is not zero // to avoid the potential edge case of division by zero. In Yul, division by // zero does not panic, but returns zero. - - if and(iszero(gasPerPubdataByte), FORBID_ZERO_GAS_PER_PUBDATA()) { - assertionError("zero gasPerPubdataByte") - } - + // + // if and(iszero(gasPerPubdataByte), FORBID_ZERO_GAS_PER_PUBDATA()) { + // assertionError("zero gasPerPubdataByte") + // } + // + + ret := max(ret, overheadForSlot) } /// @dev A method where all panics in the nearCalls get to.