diff --git a/common/types/block.go b/common/types/block.go index e89d423f0a..6cd95d67a9 100644 --- a/common/types/block.go +++ b/common/types/block.go @@ -98,9 +98,10 @@ func (w *WrappedBlock) EstimateL1CommitCalldataSize() uint64 { if txData.Type == types.L1MessageTxType { continue } - size += 64 // 60 bytes BlockContext + 4 bytes payload length + size += 4 // 4 bytes payload length size += w.getTxPayloadLength(txData) } + size += 60 // 60 bytes BlockContext return size } @@ -116,10 +117,13 @@ func (w *WrappedBlock) EstimateL1CommitGas() uint64 { txPayloadLength := w.getTxPayloadLength(txData) total += CalldataNonZeroByteGas * txPayloadLength // an over-estimate: treat each byte as non-zero - total += CalldataNonZeroByteGas * 64 // 60 bytes BlockContext + 4 bytes payload length + total += CalldataNonZeroByteGas * 4 // 4 bytes payload length total += GetKeccak256Gas(txPayloadLength) // l2 tx hash } + // 60 bytes BlockContext calldata + total += CalldataNonZeroByteGas * 60 + // sload total += 2100 * numL1Messages // numL1Messages times cold sload in L1MessageQueue diff --git a/common/version/version.go b/common/version/version.go index 0390587ef4..f720f12794 100644 --- a/common/version/version.go +++ b/common/version/version.go @@ -7,7 +7,7 @@ import ( "strings" ) -var tag = "v4.2.1" +var tag = "v4.2.2" var commit = func() string { if info, ok := debug.ReadBuildInfo(); ok {