Skip to content

Commit

Permalink
fix/BCF-2601-simple-passwords: reverting simple passwords notificatio…
Browse files Browse the repository at this point in the history
…n. Use of simple passwords in production builds is now a breaking change (#10794)
  • Loading branch information
patrickhuie19 authored Sep 26, 2023
1 parent 5e4d5f5 commit b0940c0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
9 changes: 2 additions & 7 deletions core/cmd/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,9 @@ func (s *Shell) errorOut(err error) cli.ExitCoder {
func (s *Shell) configExitErr(validateFn func() error) cli.ExitCoder {
err := validateFn()
if err != nil {
if err.Error() != "invalid secrets: Database.AllowSimplePasswords: invalid value (true): insecure configs are not allowed on secure builds" {
fmt.Println("Invalid configuration:", err)
fmt.Println()
return s.errorOut(errors.New("invalid configuration"))
}
fmt.Printf("Notification for upcoming configuration change: %v\n", err)
fmt.Println("This configuration will be disallowed in future production releases.")
fmt.Println("Invalid configuration:", err)
fmt.Println()
return s.errorOut(errors.New("invalid configuration"))
}
return nil
}
Expand Down
10 changes: 2 additions & 8 deletions core/cmd/shell_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,7 @@ func (s *Shell) runNode(c *cli.Context) error {

err := s.Config.Validate()
if err != nil {
if err.Error() != "invalid secrets: Database.AllowSimplePasswords: invalid value (true): insecure configs are not allowed on secure builds" {
return errors.Wrap(err, "config validation failed")
}
lggr.Errorf("Notification for upcoming configuration change: %v", err)
return errors.Wrap(err, "config validation failed")
}

lggr.Infow(fmt.Sprintf("Starting Chainlink Node %s at commit %s", static.Version, static.Sha), "Version", static.Version, "SHA", static.Sha)
Expand Down Expand Up @@ -622,10 +619,7 @@ func (s *Shell) RebroadcastTransactions(c *cli.Context) (err error) {

err = s.Config.Validate()
if err != nil {
if err.Error() != "invalid secrets: Database.AllowSimplePasswords: invalid value (true): insecure configs are not allowed on secure builds" {
return s.errorOut(fmt.Errorf("error validating configuration: %+v", err))
}
lggr.Errorf("Notification for required upcoming configuration change: %v", err)
return s.errorOut(fmt.Errorf("error validating configuration: %+v", err))
}

err = keyStore.Unlock(s.Config.Password().Keystore())
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Simple password use in production builds is now disallowed - nodes with this configuration will not boot and will not pass config validation.
- Helper migrations function for injecting env vars into goose migrations. This was done to inject chainID into evm chain id not null in specs migrations.
- OCR2 jobs now support querying the state contract for configurations if it has been deployed. This can help on chains such as BSC which "manage" state bloat by arbitrarily deleting logs older than a certain date. In this case, if logs are missing we will query the contract directly and retrieve the latest config from chain state. Chainlink will perform no extra RPC calls unless the job spec has this feature explicitly enabled. On chains that require this, nops may see an increase in RPC calls. This can be enabled for OCR2 jobs by specifying `ConfigContractAddress` in the relay config TOML.

Expand Down

0 comments on commit b0940c0

Please sign in to comment.