-
Notifications
You must be signed in to change notification settings - Fork 15
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
fix: EOTS signing for multiple finality providers #199
Conversation
|
||
func getSignRecordKey(pk, chainID []byte, height uint64) []byte { | ||
// calculate the randomn hash of the key concatenated with chainID and height | ||
digest := hmac.New(sha256.New, pk) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I wonder whether just concatenating bytes wouldn't be be better as key.
If the key is fpPk || height || chainID
then finding all records for fp
is just finding all keys with prefix fpPk || ..
. I am not sure what this hashing gives us except decreasing key slightly.
(this is not blocking though, we can disscuss it in separate issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. Will do it in this PR as db schema change in the future is troublesome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 48ac5ee
To support EOTS signing for multiple finality providers, the signing record should be saved with key (public key || chainID || height)
To support EOTS signing for multiple finality providers, the signing record should be saved with key (public key || chainID || height)