-
Notifications
You must be signed in to change notification settings - Fork 343
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
Conversation
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.
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 |
Co-authored-by: Leo Eichhorn <99166915+eichhorl@users.noreply.github.com>
This is Part 2 of CRP-2612.
This PR activates the
ReshareChainKey
endpoint, which generalizes theComputeIDkgDealings
endpoint to also support non IDKG chain keys such as VetKD keys.Since #4131, the
compute_i_idkg_dealings
endpoint internally creates aReshareChainKeyContext
.This PR extends the
ReshareChainKeyContext
with atarget_id
. The only difference between aReshareChainKeyContext
generated bycompute_i_dkg_dealings
andreshare_chain_key
is that the latter also initializes thetarget_id
to a random number while the first one initializestarget_id
to zero (Also old contexts are treated as if theirtarget_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 aReshareChainKeyContext
was generated usingcompute_i_dkg_dealings
orreshare_chain_key
. This code can be removed, once thecompute_i_dkg_dealings
endpoint will be removed (CRP-2613).