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

feat(CRP-2612): Implement ReshareChainKey endpoint #4177

Merged
merged 19 commits into from
Mar 12, 2025

Conversation

Sawchord
Copy link
Member

@Sawchord Sawchord commented Feb 28, 2025

This is Part 2 of CRP-2612.

This PR activates the ReshareChainKey endpoint, which generalizes the ComputeIDkgDealings endpoint to also support non IDKG chain keys such as VetKD keys.

Since #4131, the compute_i_idkg_dealings endpoint internally creates a ReshareChainKeyContext.
This PR extends the ReshareChainKeyContext with a target_id. The only difference between a ReshareChainKeyContext generated by compute_i_dkg_dealings and reshare_chain_key is that the latter also initializes the target_id to a random number while the first one initializes target_id to zero (Also old contexts are treated as if their target_id is 0). Since the IDKG variant of the code does not make use of the target_id, this is ok.

When generating a response for a ReshareChainKeyContext, it is important to return the correct response type. We look at the method name to determine, whether a ReshareChainKeyContext was generated using compute_i_dkg_dealings or reshare_chain_key. This code can be removed, once the compute_i_dkg_dealings endpoint will be removed (CRP-2613).

@github-actions github-actions bot added the feat label Feb 28, 2025
@Sawchord Sawchord changed the base branch from master to leon/reshare_chain_key_types February 28, 2025 18:05
@Sawchord Sawchord added CI_OVERRIDE_BUF_BREAKING Skip buf-breaking (protobuf) check (explain in PR description why) and removed CI_OVERRIDE_BUF_BREAKING Skip buf-breaking (protobuf) check (explain in PR description why) labels Mar 5, 2025
Base automatically changed from leon/reshare_chain_key_types to master March 5, 2025 15:21
@Sawchord Sawchord marked this pull request as ready for review March 6, 2025 12:32
@Sawchord Sawchord requested review from a team as code owners March 6, 2025 12:32
Copy link
Contributor

@berestovskyy berestovskyy left a comment

Choose a reason for hiding this comment

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

Execution part looks good, modulo some nits. I'm hoping there are tests that cover all this new functionality...

@Sawchord
Copy link
Member Author

Sawchord commented Mar 6, 2025

Execution part looks good, modulo some nits. I'm hoping there are tests that cover all this new functionality...

I have #4245, which migrates the registry to the new endpoint and everything still works

@Sawchord Sawchord enabled auto-merge March 12, 2025 13:39
@Sawchord Sawchord added this pull request to the merge queue Mar 12, 2025
Merged via the queue into master with commit e005586 Mar 12, 2025
21 checks passed
@Sawchord Sawchord deleted the leon/reshare_chain_key_endpoint branch March 12, 2025 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants