Commit 8574f19
[pallet-revive] Version the Remaining Runtime API Functions (#12536)
# Description
This PR closes #11924 and #11928 and versions the final remaining
runtime API functions in pallet-revive, fully deprecating the old
unversioned runtime API in favor of the new versioned runtime API
functions.
Additionally, this PR adds an
`unversioned_runtime_api_functions_are_unchanged_by_versioning` test
which is an important test which asserts that every single type which
can be seen in the unversioned runtime API functions is identical to the
new versioned types in terms of encoding such that if we encode an old
unversioned type we can decode as a new versioned type and vice versa.
This is made possible through the schema available in the metadata which
allows us to check a pre-versioning schema against a post-versioning
schema. This test is implemented as a very very simple walker which
walks the schema in lock-step and checks that the schema of the
pre-versioning types matches that of the post-versioning types. Yes, the
code for this test is slightly long, but it's very simple. The moment
you see that lots of the code length is due to us wanting to preserve
the paths (for printing in assertion messages), you can see that the
test is quite simple.
Aside from the above, and as mentioned at the start, this PR also
versioned the remaining runtime API functions. In the process, I
combined some runtime API functions into a single versioned runtime API
function. For example, `eth_transact` and `eth_transact_with_config`
have been combined into a single `eth_transact_versioned` since
`eth_transact_with_config` was added as way to version the
`eth_transact` runtime API function. Same was done to the `trace_call`
and the `trace_call_with_config` in that they've been combined into a
single versioned runtime API function.
---------
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent 8630d5b commit 8574f19
53 files changed
Lines changed: 3500 additions & 1096 deletions
File tree
- polkadot/zombienet-sdk-tests/tests/parachains
- prdoc
- substrate/frame/revive
- dev-node/runtime/tests
- rpc/src
- apis
- client
- types
- src
- evm
- api
- block_hash
- metering
- runtime_api
- tests
- sol
- types
- src
- common
- runtime_api
- payloads
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
| 304 | + | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
320 | 320 | | |
321 | 321 | | |
322 | 322 | | |
323 | | - | |
324 | | - | |
| 323 | + | |
| 324 | + | |
325 | 325 | | |
326 | 326 | | |
327 | 327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
0 commit comments