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

SetKey failed when .pass files are present in .hmy/blskeys directory #2954

Open
LeoHChen opened this issue May 8, 2020 · 2 comments
Open
Assignees
Labels
bug Something isn't working

Comments

@LeoHChen
Copy link
Contributor

LeoHChen commented May 8, 2020

Describe the bug
When I was testing the dryrun branch, 10 keys per node. I copied the bls.pass file to the .hmy/blskeys directory together with the corresponding .key file.

However, after restarting the node, we saw errors like below in leader,

{"level":"warn","port":"9000","ip":"3.86.161.62","error":"key not found","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/consensus/consensus_v2.go:139","time":"2020-05-07T22:20:39.335530411Z","message":"[Announce] Leader prepareBitmap SetKey failed"}

And errors like below in validators

{"level":"warn","port":"9000","ip":"18.224.64.164","error":"[BytesToBlsPublicKey] bytes is empty","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/consensus/fbft_log.go:260","time":"2020-05-07T22:43:52.646224388Z","message":"ParseViewChangeMessage failed to parse senderpubkey"}
{"level":"warn","port":"9000","ip":"18.224.64.164","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/consensus/view_change.go:151","time":"2020-05-07T22:43:52.646231518Z","message":"[onViewChange] Unable To Parse Viewchange Message"}
{"level":"info","port":"9000","ip":"18.224.64.164","TotalIn":348008,"RateIn":6873.702155507352,"caller":"/home/leochen/go/src/github.com/harmony-one/harmony/node/node_handler.go:77","time":"2020-05-07T22:43:52.650122631Z","message":"[metrics][p2p] traffic in in bytes"}
{"level":"info","port":"9000","ip":"18.224.64.164","TotalIn":348008,"RateIn":6873.702155507352,"caller":"/home/leochen/go/src/github.com/harmony-one/harmony/node/node_handler.go:77","time":"2020-05-07T22:43:52.652125298Z","message":"[metrics][p2p] traffic in in bytes"}
{"level":"warn","port":"9000","ip":"18.224.64.164","error":"[BytesToBlsPublicKey] bytes is empty","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/consensus/fbft_log.go:260","time":"2020-05-07T22:43:52.652286339Z","message":"ParseViewChangeMessage failed to parse senderpubkey"}
{"level":"warn","port":"9000","ip":"18.224.64.164","caller":"/home/leochen/go/src/github.com/harmony-one/harmony/consensus/view_change.go:151","time":"2020-05-07T22:43:52.652293451Z","message":"[onViewChange] Unable To Parse Viewchange Message"}

To Reproduce
Steps to reproduce the behavior:

  1. Check out code from s3 branch
  2. Build
  3. in your node, created bls key files like .hmy/blskeys/1.key, .hmy/blskeys/1.pass, 2.key, 2.pass

Assuming all the pass are the same, I have another pass file in /home/ec2-user/bls.pass

Start the node.sh with multi-key support -M -p /home/ec2-user/bls.pass

@gupadhyaya
Copy link
Contributor

@LeoHChen currently s3 code does not really have the code to read passphrase from .pass file and use it to load the bls key and it simply uses the default passphrase provided in using blspass. For your deployment, if you didn't had same passphrase blspass for all the keys that you wanted to load, and not passed this passphrase, it would have led to empty bls. However it should have printed the error.

@LeoHChen
Copy link
Contributor Author

LeoHChen commented May 8, 2020

we have the same pass phrase for all the blskeys we used. Anyway, we should have failed earlier if any errors encountered during the startup especially related to the key/pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants