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

fix: EOTS signing for multiple finality providers #199

Merged
merged 5 commits into from
Dec 6, 2024

Conversation

gitferry
Copy link
Member

@gitferry gitferry commented Dec 6, 2024

To support EOTS signing for multiple finality providers, the signing record should be saved with key (public key || chainID || height)

@gitferry gitferry marked this pull request as ready for review December 6, 2024 06:49

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)

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)

Copy link
Member Author

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 48ac5ee

@gitferry gitferry merged commit 27349c9 into main Dec 6, 2024
12 checks passed
@gitferry gitferry deleted the gai/fix-eots-signing branch December 6, 2024 08:31
gitferry added a commit that referenced this pull request Dec 6, 2024
To support EOTS signing for multiple finality providers, the signing
record should be saved with key (public key || chainID || height)
gitferry added a commit that referenced this pull request Dec 6, 2024
…200)

To support EOTS signing for multiple finality providers, the signing
record should be saved with key (public key || chainID || height)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants