@@ -9,21 +9,22 @@ import (
9
9
"github.com/ethereum/go-ethereum/common"
10
10
"github.com/gin-gonic/gin"
11
11
"github.com/spf13/viper"
12
+ "github.com/stackup-wallet/stackup-bundler/pkg/modules/entities"
12
13
"github.com/stackup-wallet/stackup-bundler/pkg/signer"
13
14
)
14
15
15
16
type Values struct {
16
17
// Documented variables.
17
- PrivateKey string
18
- EthClientUrl string
19
- Port int
20
- DataDirectory string
21
- SupportedEntryPoints []common.Address
22
- MaxVerificationGas * big.Int
23
- MaxBatchGasLimit * big.Int
24
- MaxOpTTL time.Duration
25
- MaxOpsForUnstakedSender int
26
- Beneficiary string
18
+ PrivateKey string
19
+ EthClientUrl string
20
+ Port int
21
+ DataDirectory string
22
+ SupportedEntryPoints []common.Address
23
+ MaxVerificationGas * big.Int
24
+ MaxBatchGasLimit * big.Int
25
+ MaxOpTTL time.Duration
26
+ Beneficiary string
27
+ ReputationConstants * entities. ReputationConstants
27
28
28
29
// Searcher mode variables.
29
30
EthBuilderUrls []string
@@ -84,10 +85,9 @@ func GetValues() *Values {
84
85
viper .SetDefault ("erc4337_bundler_port" , 4337 )
85
86
viper .SetDefault ("erc4337_bundler_data_directory" , "/tmp/stackup_bundler" )
86
87
viper .SetDefault ("erc4337_bundler_supported_entry_points" , "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789" )
87
- viper .SetDefault ("erc4337_bundler_max_verification_gas" , 3000000 )
88
- viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 25000000 )
88
+ viper .SetDefault ("erc4337_bundler_max_verification_gas" , 6000000 )
89
+ viper .SetDefault ("erc4337_bundler_max_batch_gas_limit" , 18000000 )
89
90
viper .SetDefault ("erc4337_bundler_max_op_ttl_seconds" , 180 )
90
- viper .SetDefault ("erc4337_bundler_max_ops_for_unstaked_sender" , 4 )
91
91
viper .SetDefault ("erc4337_bundler_blocks_in_the_future" , 6 )
92
92
viper .SetDefault ("erc4337_bundler_otel_insecure_mode" , false )
93
93
viper .SetDefault ("erc4337_bundler_debug_mode" , false )
@@ -116,7 +116,6 @@ func GetValues() *Values {
116
116
_ = viper .BindEnv ("erc4337_bundler_max_verification_gas" )
117
117
_ = viper .BindEnv ("erc4337_bundler_max_batch_gas_limit" )
118
118
_ = viper .BindEnv ("erc4337_bundler_max_op_ttl_seconds" )
119
- _ = viper .BindEnv ("erc4337_bundler_max_ops_for_unstaked_sender" )
120
119
_ = viper .BindEnv ("erc4337_bundler_eth_builder_urls" )
121
120
_ = viper .BindEnv ("erc4337_bundler_blocks_in_the_future" )
122
121
_ = viper .BindEnv ("erc4337_bundler_otel_service_name" )
@@ -174,7 +173,6 @@ func GetValues() *Values {
174
173
maxVerificationGas := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_verification_gas" )))
175
174
maxBatchGasLimit := big .NewInt (int64 (viper .GetInt ("erc4337_bundler_max_batch_gas_limit" )))
176
175
maxOpTTL := time .Second * viper .GetDuration ("erc4337_bundler_max_op_ttl_seconds" )
177
- maxOpsForUnstakedSender := viper .GetInt ("erc4337_bundler_max_ops_for_unstaked_sender" )
178
176
ethBuilderUrls := envArrayToStringSlice (viper .GetString ("erc4337_bundler_eth_builder_urls" ))
179
177
blocksInTheFuture := viper .GetInt ("erc4337_bundler_blocks_in_the_future" )
180
178
otelServiceName := viper .GetString ("erc4337_bundler_otel_service_name" )
@@ -186,25 +184,25 @@ func GetValues() *Values {
186
184
debugMode := viper .GetBool ("erc4337_bundler_debug_mode" )
187
185
ginMode := viper .GetString ("erc4337_bundler_gin_mode" )
188
186
return & Values {
189
- PrivateKey : privateKey ,
190
- EthClientUrl : ethClientUrl ,
191
- Port : port ,
192
- DataDirectory : dataDirectory ,
193
- SupportedEntryPoints : supportedEntryPoints ,
194
- Beneficiary : beneficiary ,
195
- MaxVerificationGas : maxVerificationGas ,
196
- MaxBatchGasLimit : maxBatchGasLimit ,
197
- MaxOpTTL : maxOpTTL ,
198
- MaxOpsForUnstakedSender : maxOpsForUnstakedSender ,
199
- EthBuilderUrls : ethBuilderUrls ,
200
- BlocksInTheFuture : blocksInTheFuture ,
201
- OTELServiceName : otelServiceName ,
202
- OTELCollectorHeaders : otelCollectorHeader ,
203
- OTELCollectorUrl : otelCollectorUrl ,
204
- OTELInsecureMode : otelInsecureMode ,
205
- AltMempoolIPFSGateway : altMempoolIPFSGateway ,
206
- AltMempoolIds : altMempoolIds ,
207
- DebugMode : debugMode ,
208
- GinMode : ginMode ,
187
+ PrivateKey : privateKey ,
188
+ EthClientUrl : ethClientUrl ,
189
+ Port : port ,
190
+ DataDirectory : dataDirectory ,
191
+ SupportedEntryPoints : supportedEntryPoints ,
192
+ Beneficiary : beneficiary ,
193
+ MaxVerificationGas : maxVerificationGas ,
194
+ MaxBatchGasLimit : maxBatchGasLimit ,
195
+ MaxOpTTL : maxOpTTL ,
196
+ ReputationConstants : NewReputationConstantsFromEnv () ,
197
+ EthBuilderUrls : ethBuilderUrls ,
198
+ BlocksInTheFuture : blocksInTheFuture ,
199
+ OTELServiceName : otelServiceName ,
200
+ OTELCollectorHeaders : otelCollectorHeader ,
201
+ OTELCollectorUrl : otelCollectorUrl ,
202
+ OTELInsecureMode : otelInsecureMode ,
203
+ AltMempoolIPFSGateway : altMempoolIPFSGateway ,
204
+ AltMempoolIds : altMempoolIds ,
205
+ DebugMode : debugMode ,
206
+ GinMode : ginMode ,
209
207
}
210
208
}
0 commit comments