Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating gaslimit logs #14857

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
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
3 changes: 3 additions & 0 deletions changelog/james-prysm_gas-limit-logs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
### Added

- additional logs when setting or not setting the gas limit for mev builders
7 changes: 7 additions & 0 deletions config/proposer/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ func WithGasLimit() SettingsLoaderOption {
}
if gl == 0 {
log.Warnf("Gas limit was intentionally set to 0, this will be replaced with the default gas limit of %d", params.BeaconConfig().DefaultBuilderGasLimit)
} else {
log.Warnf("Setting a global gas limit of %d for mev builder", gl)
}
rgl := reviewGasLimit(validator.Uint64(gl))
psl.options.gasLimit = &rgl
Expand Down Expand Up @@ -276,6 +278,7 @@ func mergeProposerSettings(loaded, db *validatorpb.ProposerSettingsPayload, opti
db.DefaultConfig.Builder = nil
}
}

if loaded != nil && loaded.DefaultConfig != nil {
merged.DefaultConfig = loaded.DefaultConfig
}
Expand All @@ -295,6 +298,10 @@ func mergeProposerSettings(loaded, db *validatorpb.ProposerSettingsPayload, opti
}

if merged.DefaultConfig != nil {
if merged.DefaultConfig.Builder != nil && merged.DefaultConfig.Builder.Enabled && merged.DefaultConfig.Builder.GasLimit == 0 && gasLimitOnly == nil {
log.Warnf("Builder was enabled but no gas limit was specified so the global default of %d is used. Add a gas_limit field or use the --%s flag to lower the log level.",
params.BeaconConfig().DefaultBuilderGasLimit, flags.BuilderGasLimitFlag.Name)
}
merged.DefaultConfig.Builder = processBuilderConfig(merged.DefaultConfig.Builder, builderConfig, gasLimitOnly)
}
for _, option := range merged.ProposerConfig {
Expand Down
2 changes: 2 additions & 0 deletions config/proposer/loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ func TestProposerSettingsLoader(t *testing.T) {
},
}
},
wantLog: fmt.Sprintf("Builder was enabled but no gas limit was specified so the global default of %d is used.", params.BeaconConfig().DefaultBuilderGasLimit),
},
{
name: "Happy Path Config file File, bad checksum",
Expand Down Expand Up @@ -477,6 +478,7 @@ func TestProposerSettingsLoader(t *testing.T) {
},
wantErr: "",
validatorRegistrationEnabled: true,
wantLog: "Setting a global gas limit of 50000000 for mev builder",
},
{
name: "File with default gas that overrides",
Expand Down
Loading