Skip to content
This repository was archived by the owner on Oct 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions internal/config/values.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type Values struct {
PMGasEstBuffer int64
MaxOpTTL time.Duration
MaxOpsForUnstakedSender int
MaxOpsForBundle int
Beneficiary string

// Searcher mode variables.
Expand Down Expand Up @@ -79,6 +80,7 @@ func GetValues() *Values {
viper.SetDefault("erc4337_bundler_paymaster_gas_estimate_buffer", 10)
viper.SetDefault("erc4337_bundler_max_op_ttl_seconds", 180)
viper.SetDefault("erc4337_bundler_max_ops_for_unstaked_sender", 4)
viper.SetDefault("erc4337_bundler_max_ops_for_bundle", 0)
viper.SetDefault("erc4337_bundler_blocks_in_the_future", 25)
viper.SetDefault("erc4337_bundler_otel_insecure_mode", false)
viper.SetDefault("erc4337_bundler_debug_mode", false)
Expand Down Expand Up @@ -109,6 +111,7 @@ func GetValues() *Values {
_ = viper.BindEnv("erc4337_bundler_paymaster_gas_estimate_buffer")
_ = viper.BindEnv("erc4337_bundler_max_op_ttl_seconds")
_ = viper.BindEnv("erc4337_bundler_max_ops_for_unstaked_sender")
_ = viper.BindEnv("erc4337_bundler_max_ops_for_bundle")
_ = viper.BindEnv("erc4337_bundler_eth_builder_url")
_ = viper.BindEnv("erc4337_bundler_blocks_in_the_future")
_ = viper.BindEnv("erc4337_bundler_otel_service_name")
Expand Down Expand Up @@ -160,6 +163,7 @@ func GetValues() *Values {
pmGasEstBuffer := int64(viper.GetInt("erc4337_bundler_paymaster_gas_estimate_buffer"))
maxOpTTL := time.Second * viper.GetDuration("erc4337_bundler_max_op_ttl_seconds")
maxOpsForUnstakedSender := viper.GetInt("erc4337_bundler_max_ops_for_unstaked_sender")
maxOpsForBundle := viper.GetInt("erc4337_bundler_max_ops_for_bundle")
ethBuilderUrl := viper.GetString("erc4337_bundler_eth_builder_url")
blocksInTheFuture := viper.GetInt("erc4337_bundler_blocks_in_the_future")
otelServiceName := viper.GetString("erc4337_bundler_otel_service_name")
Expand All @@ -180,6 +184,7 @@ func GetValues() *Values {
PMGasEstBuffer: pmGasEstBuffer,
MaxOpTTL: maxOpTTL,
MaxOpsForUnstakedSender: maxOpsForUnstakedSender,
MaxOpsForBundle: maxOpsForBundle,
EthBuilderUrl: ethBuilderUrl,
BlocksInTheFuture: blocksInTheFuture,
OTELServiceName: otelServiceName,
Expand Down
1 change: 1 addition & 0 deletions internal/start/private.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func PrivateMode() {
b.SetGetBaseFeeFunc(gasprice.GetBaseFeeWithEthClient(eth))
b.SetGetGasTipFunc(gasprice.GetGasTipWithEthClient(eth))
b.SetGetLegacyGasPriceFunc(gasprice.GetLegacyGasPriceWithEthClient(eth))
b.SetMaxBatch(conf.MaxOpsForBundle)
b.UseLogger(logr)
if err := b.UserMeter(otel.GetMeterProvider().Meter("bundler")); err != nil {
log.Fatal(err)
Expand Down
1 change: 1 addition & 0 deletions internal/start/searcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ func SearcherMode() {
b.SetGetBaseFeeFunc(gasprice.GetBaseFeeWithEthClient(eth))
b.SetGetGasTipFunc(gasprice.GetGasTipWithEthClient(eth))
b.SetGetLegacyGasPriceFunc(gasprice.GetLegacyGasPriceWithEthClient(eth))
b.SetMaxBatch(conf.MaxOpsForBundle)
b.UseLogger(logr)
if err := b.UserMeter(otel.GetMeterProvider().Meter("bundler")); err != nil {
log.Fatal(err)
Expand Down