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
Changes from 1 commit
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
Next Next commit
updating gaslimit logs
james-prysm committed Jan 31, 2025
commit ce111e0dd13b1b2129e84b083cd851f2938cbe6a
6 changes: 6 additions & 0 deletions config/proposer/loader/loader.go
Original file line number Diff line number Diff line change
@@ -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
@@ -247,6 +249,10 @@ func (psl *settingsLoader) processProposerSettings(loadedSettings, dbSettings *v

// process any builder overrides on defaults
if newSettings.DefaultConfig != nil {
if newSettings.DefaultConfig.Builder != nil && newSettings.DefaultConfig.Builder.Enabled && newSettings.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)
}
newSettings.DefaultConfig.Builder = processBuilderConfig(newSettings.DefaultConfig.Builder, builderConfig, gasLimitOnly)
}

2 changes: 2 additions & 0 deletions config/proposer/loader/loader_test.go
Original file line number Diff line number Diff line change
@@ -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",
@@ -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",