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

Log out important directories for validator client #5653

Merged
merged 18 commits into from
Apr 30, 2020
2 changes: 2 additions & 0 deletions slasher/db/kv/kv.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"github.com/pkg/errors"
"github.com/prysmaticlabs/prysm/slasher/cache"
bolt "go.etcd.io/bbolt"
"github.com/sirupsen/logrus"
)

var databaseFileName = "slasher.db"
Expand Down Expand Up @@ -76,6 +77,7 @@ func NewKVStore(dirPath string, cfg *Config) (*Store, error) {
if err := os.MkdirAll(dirPath, 0700); err != nil {
return nil, err
}
logrus.Infof(".db & validator keys dir is: %v", dirPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed, the slasher already logs out the datadir.

datafile := path.Join(dirPath, databaseFileName)
boltDB, err := bolt.Open(datafile, 0600, &bolt.Options{Timeout: 1 * time.Second})
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions validator/db/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func NewKVStore(dirPath string, pubKeys [][48]byte) (*Store, error) {
if err := os.MkdirAll(dirPath, 0700); err != nil {
return nil, err
}
log.Infof(".db & validator keys dir is: %v", dirPath)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct, the validator keys are not in this directory. You will need another log to declare where they are. Look at how the Checking DB log is put out and mirror that for this one.

datafile := filepath.Join(dirPath, databaseFileName)
boltDB, err := bolt.Open(datafile, 0600, &bolt.Options{Timeout: 1 * time.Second})
if err != nil {
Expand Down