-
Notifications
You must be signed in to change notification settings - Fork 18
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/modify rotate key to ask for all signatures #1315
base: main
Are you sure you want to change the base?
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.
Looks good. If you have the time, I would add a test that an honest coordinator would not submit a rotate-keys contract call transaction if one of the signers does not send a signature.
I added a test, but I don't like how I did it :( Open to suggestions if you have a better way in mind. Expecially to avoid exposing the |
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.
There may be an issue with this feature (blocking merge pending confirmation)
/// Returns true if the transaction is a rotate keys transaction, regardless | ||
/// of the version. | ||
pub fn is_rotate_keys(&self) -> bool { | ||
matches!(self, StacksTx::ContractCall(ContractCall::RotateKeysV1(_))) | ||
} | ||
} |
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.
Enum variant name RotateKeysV1
and "regardless of the version" comment looks a bit confusing. Maybe something like
/// Returns true if the transaction is a rotate keys transaction, regardless
/// of it's contens.
Description
Make sure that rotate keys is signed by all signers.
Changes
estimate_fees
to accept a new parameterrequire_all_signatures
that forces the estimate to expect all signers signatures.sign_stacks_transaction
to wait for all signatures in case of a RotateKeyTx.Testing Information
estimate_fees
Checklist: