-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix: MSA owner should be able to invoke non-signature methods on SignatureRequired schemas directly #1844
Conversation
…atureRequired schemas directly
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1844 +/- ##
==========================================
+ Coverage 82.90% 82.95% +0.04%
==========================================
Files 56 56
Lines 4540 4552 +12
==========================================
+ Hits 3764 3776 +12
Misses 776 776 ☔ View full report in Codecov by Sentry. |
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.
These aren't the signature require extrinsics, but I think all of your tests should pass without any changes to the lib.rs due to https://github.com/LibertyDSNP/frequency/blob/c92466510fb78a4885a8977d1d7444916ff77465/pallets/stateful-storage/src/lib.rs#L762-L763
That's right; these aren't the signature required extrinsics. That's not the point of the PR; in fact, I pointed out in the original issue here that the problem seems to have been mis-stated. The signature-required extrinsics always worked correctly with a signature on a I verified that against the current Frequency release, my new e2e tests fail; with these modifications, they pass. |
Ah I see now. Sorry about that. I missed connecting this with the other. Calling the normal one instead of the Will re-review. |
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.
Now that I understand what is going on, this is a great fix! A few notes, but my guess is that those were mostly already on your todo list for before it gets out of draft mode
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.
I haven't run the code locally, but this captures a nice simple solution to the problem with minimal code changes. (and a lot of new tests)
- Read code
- Validated it solves the original issue
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, added some nits. Spec version needs to get updated!
- Ran the local chain
- Ran unit & e2e tests
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.
I only reviewed the code, had read the related issue + discussion fairly well. Looks like an elegant solution to me. One naming suggestion but NBD.
Co-authored-by: Aramik <aramikm@gmail.com>
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.
wonderful! 👍
…n-all-extrinsics-on-stateful-pallet-if-called-from-owner
Goal
The goal of this PR is to make it possible for MSA owners to call non-signature stateful-storage methods directly without requiring a separate payload signature.
Adds e2e test scenarios to validate this correct behavior for both signature and non-signature stateful-storage extrinsics
Closes #1793
Discussion
Testing
stateful-storage
pallet against an unmodified frequency chain; should result in ~ 6 errorsTODOChecklist