feat: fall-back to current signer set + threshold from contract for stacks tx validation #1333
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Changes the tx-signer's
assert_valid_stacks_tx_sign_request()
method to use the current signer set public keys & threshold according to the following rule set.main
, so changes from both PR's are in the diff.With only #1315, we would be unable to submit a rotate-keys contract call if any of the signers were missing the dkg shares entry for the current aggregate key. This PR adds a fallback mechanism for this case.
Changes
StacksInteract
method for retrieving thecurrent-signature-threshold
fromsbtc-registry
.StacksInteract
method for retrieving thecurrent-signing-set
fromsbtc-registry
to return anOption<>
, andNone
if the Stacks node returns a404
.assert_valid_stacks_tx_sign_request()
to use a new methodget_current_signer_set_public_keys_and_threshold()
for retrieving the signer set public keys and signature threshold, which uses the above rule set.Testing Information
StacksInteract
changes.devenv
with a deposit and everything looks good.Checklist: