small improvements to logs (#14405)

* removing redundant log, and poorly worded log

* move log printing message

* changelog

* reverting a log change
This commit is contained in:
james-prysm
2024-10-29 15:42:24 -05:00
committed by GitHub
parent a29ecb6bbe
commit 060527032b
3 changed files with 10 additions and 8 deletions

View File

@@ -54,6 +54,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
- Fix `--backfill-oldest-slot` handling - this flag was totally broken, the code would always backfill to the default slot [pr](https://github.com/prysmaticlabs/prysm/pull/14584) - Fix `--backfill-oldest-slot` handling - this flag was totally broken, the code would always backfill to the default slot [pr](https://github.com/prysmaticlabs/prysm/pull/14584)
- Fix keymanager API should return corrected error format for malformed tokens - Fix keymanager API should return corrected error format for malformed tokens
- Fix keymanager API so that get keys returns an empty response instead of a 500 error when using an unsupported keystore. - Fix keymanager API so that get keys returns an empty response instead of a 500 error when using an unsupported keystore.
- Small log imporvement, removing some redundant or duplicate logs
### Security ### Security

View File

@@ -142,10 +142,6 @@ func (psl *settingsLoader) Load(cliCtx *cli.Context) (*proposer.Settings, error)
for _, method := range psl.loadMethods { for _, method := range psl.loadMethods {
switch method { switch method {
case defaultFlag: case defaultFlag:
if psl.existsInDB && len(psl.loadMethods) == 1 {
// only log the below if default flag is the only load method
log.Warn("Previously saved proposer settings were loaded from the DB, only default settings will be updated. Please provide new proposer settings or clear DB to reset proposer settings.")
}
suggestedFeeRecipient := cliCtx.String(flags.SuggestedFeeRecipientFlag.Name) suggestedFeeRecipient := cliCtx.String(flags.SuggestedFeeRecipientFlag.Name)
if !common.IsHexAddress(suggestedFeeRecipient) { if !common.IsHexAddress(suggestedFeeRecipient) {
return nil, errors.Errorf("--%s is not a valid Ethereum address", flags.SuggestedFeeRecipientFlag.Name) return nil, errors.Errorf("--%s is not a valid Ethereum address", flags.SuggestedFeeRecipientFlag.Name)
@@ -159,6 +155,10 @@ func (psl *settingsLoader) Load(cliCtx *cli.Context) (*proposer.Settings, error)
if psl.options.builderConfig != nil { if psl.options.builderConfig != nil {
defaultConfig.Builder = psl.options.builderConfig.ToConsensus() defaultConfig.Builder = psl.options.builderConfig.ToConsensus()
} }
if psl.existsInDB && len(psl.loadMethods) == 1 {
// only log the below if default flag is the only load method
log.Debug("Overriding previously saved proposer default settings.")
}
loadConfig.DefaultConfig = defaultConfig loadConfig.DefaultConfig = defaultConfig
case fileFlag: case fileFlag:
var settingFromFile *validatorpb.ProposerSettingsPayload var settingFromFile *validatorpb.ProposerSettingsPayload

View File

@@ -1327,6 +1327,11 @@ func (v *validator) buildSignedRegReqs(
if v.genesisTime > uint64(time.Now().UTC().Unix()) { if v.genesisTime > uint64(time.Now().UTC().Unix()) {
return signedValRegRequests return signedValRegRequests
} }
if v.ProposerSettings().DefaultConfig != nil && v.ProposerSettings().DefaultConfig.FeeRecipientConfig == nil && v.ProposerSettings().DefaultConfig.BuilderConfig != nil {
log.Warn("Builder is `enabled` in default config but will be ignored because no fee recipient was provided!")
}
for i, k := range activePubkeys { for i, k := range activePubkeys {
// map is populated before this function in buildPrepProposerReq // map is populated before this function in buildPrepProposerReq
_, ok := v.pubkeyToStatus[k] _, ok := v.pubkeyToStatus[k]
@@ -1338,10 +1343,6 @@ func (v *validator) buildSignedRegReqs(
gasLimit := params.BeaconConfig().DefaultBuilderGasLimit gasLimit := params.BeaconConfig().DefaultBuilderGasLimit
enabled := false enabled := false
if v.ProposerSettings().DefaultConfig != nil && v.ProposerSettings().DefaultConfig.FeeRecipientConfig == nil && v.ProposerSettings().DefaultConfig.BuilderConfig != nil {
log.Warn("Builder is `enabled` in default config but will be ignored because no fee recipient was provided!")
}
if v.ProposerSettings().DefaultConfig != nil && v.ProposerSettings().DefaultConfig.FeeRecipientConfig != nil { if v.ProposerSettings().DefaultConfig != nil && v.ProposerSettings().DefaultConfig.FeeRecipientConfig != nil {
defaultConfig := v.ProposerSettings().DefaultConfig defaultConfig := v.ProposerSettings().DefaultConfig
feeRecipient = defaultConfig.FeeRecipientConfig.FeeRecipient // Use cli defaultBuilderConfig for fee recipient. feeRecipient = defaultConfig.FeeRecipientConfig.FeeRecipient // Use cli defaultBuilderConfig for fee recipient.