-
Notifications
You must be signed in to change notification settings - Fork 40
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
Include pallet-contracts into the runtime #1012
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## main #1012 +/- ##
=======================================
Coverage 94.46% 94.46%
=======================================
Files 93 93
Lines 21177 21177
=======================================
Hits 20004 20004
Misses 1173 1173
Flags with carried forward coverage won't be shown. Click here to find out more. |
runtime/zeitgeist/src/lib.rs
Outdated
RuntimeCall::Contracts(inner_call) => match inner_call { | ||
instantiate_with_code { .. } => false, | ||
instantiate_with_code_old_weight { .. } => false, | ||
upload_code { .. } => false, | ||
_ => true, | ||
}, |
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 would flip the logic here and specify the one you want to authorize (I assume just call) and then use _ => false to deny everything else
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.
runtime/zeitgeist/src/lib.rs
Outdated
// Permissioned contracts: Only deployable via utility.dispatch_as(...) | ||
RuntimeCall::Contracts(inner_call) => match inner_call { | ||
instantiate_with_code { .. } => false, | ||
instantiate_with_code_old_weight { .. } => false, | ||
upload_code { .. } => false, | ||
_ => true, | ||
}, |
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.
Will later look into this more specific to find potential calls that are not covered.
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.
Please regard the "approve" comment above.
EDIT: everything is fine
Includes pallet-contracts into the runtime and uses as sensible configuration based on the reference contracts runtime "kitchensink".
Alex@Parity:
Runtime benchmarks and apis have been added as well. Proper weights will be added during preparation of the release.
The contract upload is permissioned on the mainnet. The root origin has to dispatch the upload on behalf of an account using
utility.dispatch_as
.Contracts was tested on a dev instance of the chain. Everything works as expected.