Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.

Commit 6f7d1ed

Browse files
authored
Remove batch fixed from PVG calc (#201)
1 parent 990eaa6 commit 6f7d1ed

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/gas/overhead.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import (
1414
// Overhead provides helper methods for calculating gas limits based on pre-defined parameters.
1515
type Overhead struct {
1616
intrinsicFixed float64
17-
batchFixed float64
1817
perUserOpFixed float64
1918
perUserOpMultiplier float64
2019
zeroByte float64
@@ -35,7 +34,6 @@ type Overhead struct {
3534
func NewDefaultOverhead() *Overhead {
3635
return &Overhead{
3736
intrinsicFixed: 21000,
38-
batchFixed: 816,
3937
perUserOpFixed: 22874,
4038
perUserOpMultiplier: 25,
4139
zeroByte: 4,
@@ -112,7 +110,7 @@ func (ov *Overhead) CalcPreVerificationGas(op *userop.UserOperation) (*big.Int,
112110
}
113111

114112
// Calculate the additional gas for adding this userOp to a batch.
115-
batchOv := ((ov.intrinsicFixed + ov.batchFixed) / ov.minBundleSize) + ov.CalcCallDataCost(tmp)
113+
batchOv := (ov.intrinsicFixed / ov.minBundleSize) + ov.CalcCallDataCost(tmp)
116114

117115
// The total PVG is the sum of the batch overhead and the overhead for this userOp's validation and
118116
// execution.

0 commit comments

Comments
 (0)