This repository was archived by the owner on Nov 15, 2023. It is now read-only.
contracts: Refactor the runtime API in order to simplify node integration#7409
Merged
13 commits merged intomasterfrom Oct 29, 2020
Merged
contracts: Refactor the runtime API in order to simplify node integration#740913 commits merged intomasterfrom
13 commits merged intomasterfrom
Conversation
Member
If the runtime upgrade and the client upgrade are done together, there shouldn't be any problem. Otherwise, there will be always a period of time until both are in sync to make it work again. |
ascjones
reviewed
Oct 29, 2020
Co-authored-by: Andrew Jones <ascjones@gmail.com>
NikVolf
reviewed
Oct 29, 2020
NikVolf
reviewed
Oct 29, 2020
NikVolf
reviewed
Oct 29, 2020
NikVolf
reviewed
Oct 29, 2020
NikVolf
reviewed
Oct 29, 2020
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
NikVolf
reviewed
Oct 29, 2020
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
NikVolf
approved these changes
Oct 29, 2020
Contributor
NikVolf
left a comment
There was a problem hiding this comment.
Other than some minor formatting grumbles, looks great!
wheresaddie
approved these changes
Oct 29, 2020
Member
Author
|
bot merge |
|
Waiting for commit status. |
|
Checks failed; merge aborted. |
Member
Author
|
bot merge |
|
Waiting for commit status. |
ascjones
added a commit
to paritytech/canvas
that referenced
this pull request
Oct 29, 2020
ascjones
added a commit
to paritytech/canvas
that referenced
this pull request
Oct 30, 2020
* Use substrate dependencies from master * Cargo update * Fix up compiler errors * Update Cargo.lock * Update contract call rpc api boilerplate. Rel paritytech/substrate#7409 * Fix up service * Update runtime * Update README
This pull request was closed.
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Currently, in order for a node to implement the contracts runtime api it is necessary to copy paste some conversion logic:
This PR reduces it to:
It does this by moving common types to the
pallet-contracts-primitivescrate and by that removing the need for intermediate types that made those conversions necessary.I think this is important because this conversion logic is duplicated in every runtime and is also part of a tutorial that can be simplified by doing so (@danforbes @wheresaddie).
Because this modifies a runtime API a client update is necessary. This API is only used by a the
contracts_callRPC and is therefore not critical: It is only relevant for public RPC nodes. Nonetheless I bumped the priority to medium to signal that a client update is necessary to restore this RPC functionality.