[Aptos Framework][Account] added rotation capability offer and revoke functions
Description
- added
offer_rotation_capabilityfunction to allow an account owner to delegate their rotation capability to another account - added
revoke_rotation_capabilityfunction to allow an account owner to revoke their rotation capability offer to theto_be_revoked_address - added struct
RotationCapabilityOfferProofChallengeV2for backward compatibility and deprecated the previousRotationCapabilityOfferProofChallenge - changed the more ambiguous
EACCOUNT_DOES_NOT_EXISTerror in capability-related functions to eitherEOFFERER_ADDRESS_DOES_NOT_EXISTorERECIPIENT_ADDRESS_DOES_NOT_EXIST - changed
ENO_SUCH_SIGNER_CAPABILITYerror to the more accurate namingENO_SUCH_SIGNER_CAPABILITY_OFFER - changed sequence number for
harness.new_account_with_key_pair()from 10 to 0, so if other devs are trying to generate a valid signature for unit test purpose, they don't have to manually change the sequence number from 10 to 0.
Test Plan
unit & e2e tests
-
I don't see any function using
RotationCapabilityto rotate the auth key. we should add these delegation&revoking after the capability is used somewhere. -
another issue is rotation capability delegation on resource account, If we allow another account to rotate the auth_key. The resource account can be controlled by both signer capability and an auth_key that seems against the resource account original design.
-
we probably don't want the rotation capability delegation on resource account, which could be achieved by signer_cap delegation.
@chloeqjz / @alinush is the current plan to wait until we have the new domain separation?
yes! we communicated on slack
This issue is stale because it has been open 45 days with no activity. Remove the stale label, comment or push a commit - otherwise this will be closed in 15 days.