Skip to content

Conversation

@guibescos
Copy link
Contributor

@guibescos guibescos commented Sep 23, 2022

Update all instructions that require account signatures to having the PermissionAccount checks.
It is backwards compatible and this PR doesn't try to define the permissions.

@guibescos guibescos force-pushed the guibescos/transition-to-permissions branch from f0fc2b9 to ead116a Compare September 23, 2022 17:27
Copy link
Contributor

@jayantk jayantk left a comment

Choose a reason for hiding this comment

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

LGTM, couple minor comments but feel free to merge and address in follow-ups.

next_mapping_account.clone(),
permissions_account.clone()
],
bytes_of::<CommandHeader>(&AddMapping.into())
Copy link
Contributor

Choose a reason for hiding this comment

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

is this supposed to be InitMapping ?

)
.unwrap();

assert_eq!(
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm confused about the tests below. I thought that funding_account is permissioned to do these actions, and the attacker_account isn't. It looks like every test below is a permission violation

Maybe leave some code comments explaining what the tests are supposed to be testing.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh I looked into the code and realized that only InitMapping is allowed to be done by the permissions key. suggest leaving a comment to that effect and that these tests will change as more permissions are granted.

@guibescos guibescos merged commit be121f3 into main Sep 26, 2022
@guibescos guibescos deleted the guibescos/transition-to-permissions branch September 26, 2022 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants