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

refactor: Remove VRF and add SEDA keys interface #365

Merged
merged 7 commits into from
Oct 1, 2024
Merged

Conversation

hacheigriega
Copy link
Member

Explanation of Changes

This PR replaces the existing (but unused) VRF signer interface with a new interface sedaSigner. The application can call LoadSEDASigner(loadPath string) to attain an object that satisfies the interface. This interface can then be used by various ABCI methods to provide signing services for the validators.

The SEDA keys utility will also serve as a single source of truth regarding the indices and their corresponding cryptographic curves.

This PR also removes the following unused code:

Related PRs and Issues

Related #314
Closes #364

Copy link
Member

@Thomasvdam Thomasvdam left a comment

Choose a reason for hiding this comment

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

It would be nice if we can make the key index a known constant. So the batching module can do something like

import (
  "github.com/sedaprotocol/seda-chain/app/utils"
)

// Assume we already have a SEDASigner
sedaSigner.Sign(input, utils.Secp256k1_index)

I do realise that this is basically a map with extra steps, so maybe that's worth considering?

@hacheigriega
Copy link
Member Author

I do realise that this is basically a map with extra steps, so maybe that's worth considering?

Yeah great point. I did think about it before, but the general phobia of maps held me back. It shouldn’t be an issue here since the map iterations will be done off-chain. I’d appreciate your second look!

@hacheigriega hacheigriega changed the title refactor: SEDA keys interface refactor: Remove VRF and add SEDA keys interface Sep 26, 2024
Base automatically changed from feat/pkr to main October 1, 2024 13:05
@hacheigriega hacheigriega merged commit 9de1c6f into main Oct 1, 2024
2 of 10 checks passed
@hacheigriega hacheigriega deleted the hy/seda-keys branch October 1, 2024 13:09
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.

♻️SEDA key interface
2 participants