This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
[contracts] Forbid calling back to contracts after switching to runtime #13443
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
agryaznov
added
A0-please_review
Pull request needs code review.
C3-medium
PR touches the given topic and has a medium impact on builders.
D5-nicetohaveaudit ⚠️
PR contains trivial changes to logic that should be properly reviewed.
B1-note_worthy
Changes should be noted in the release notes
labels
Feb 22, 2023
agryaznov
changed the title
[contracts] forbid calling back to contracts after switching to runtime
[contracts] Forbid calling back to contracts after switching to runtime
Feb 22, 2023
athei
added
T4-smart_contracts
This PR/Issue is related to smart contracts.
T1-runtime
This PR/Issue is related to the topic “runtime”.
labels
Feb 22, 2023
athei
reviewed
Feb 23, 2023
athei
removed
the
T4-smart_contracts
This PR/Issue is related to smart contracts.
label
Feb 23, 2023
xermicus
reviewed
Feb 23, 2023
@athei your feedback is addressed, thanks! |
xermicus
reviewed
Feb 27, 2023
athei
reviewed
Feb 28, 2023
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.
Just more nits.
athei
reviewed
Mar 3, 2023
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
athei
approved these changes
Mar 3, 2023
xermicus
approved these changes
Mar 4, 2023
bot merge |
jakoblell
added
D1-audited 👍
PR contains changes to fund-managing logic that has been properly reviewed and externally audited
and removed
D5-nicetohaveaudit ⚠️
PR contains trivial changes to logic that should be properly reviewed.
labels
Mar 6, 2023
ukint-vs
pushed a commit
to gear-tech/substrate
that referenced
this pull request
Apr 10, 2023
…me (paritytech#13443) * save: compiles and tests pass * save: added global * done + test * cleanup * changelog update * cleanup * address feedback, step 1 * address feedback, step 2 * address feedback, step 3 * returned updated gas_estimation_call_runtime test * clippy fix * address feedback, step 4 * address feedback, step 5 * move data from context to inputs * docs fix * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * address feedback, step 6 --------- Co-authored-by: Alexander Theißen <alex.theissen@me.com>
15 tasks
nathanwhit
pushed a commit
to nathanwhit/substrate
that referenced
this pull request
Jul 19, 2023
…me (paritytech#13443) * save: compiles and tests pass * save: added global * done + test * cleanup * changelog update * cleanup * address feedback, step 1 * address feedback, step 2 * address feedback, step 3 * returned updated gas_estimation_call_runtime test * clippy fix * address feedback, step 4 * address feedback, step 5 * move data from context to inputs * docs fix * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * address feedback, step 6 --------- Co-authored-by: Alexander Theißen <alex.theissen@me.com>
5 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
A0-please_review
Pull request needs code review.
B1-note_worthy
Changes should be noted in the release notes
C3-medium
PR touches the given topic and has a medium impact on builders.
D1-audited 👍
PR contains changes to fund-managing logic that has been properly reviewed and externally audited
T1-runtime
This PR/Issue is related to the topic “runtime”.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pallet Contracts provides ways to call runtime from a contract, i.e.
call_runtime
and chain extensions.With this PR, we guard contracts from back-forth invocation after switching once from contracts engine to runtime, to avoid possible re-entrancy flaws.