Make API backwards compatible with CC (#1697)
* Rework how a runtime api calls into the runtime Now we generate a default implementation for each api call that calls a generated method `method_runtime_api_impl`. This newly generated method is the one that will be implemented by the `impl_runtime_apis` macro in the runtime for the client side. * Support `changed_in` to change runtime api function signatures * Update documentation * Fixes tests * Implement checking the api version with a predicate * Make the implementation backwards compatible with CC * Update wasm files after merge * Check for wasm runtime differences by building master and current branch * Update spec_version and wasm files * Fixes * Revert my changes * Remove `patch.crates-io` from test-runtime
Showing
- Cargo.lock 2 additions, 0 deletionsCargo.lock
- core/basic-authorship/src/basic_authorship.rs 4 additions, 4 deletionscore/basic-authorship/src/basic_authorship.rs
- core/client/Cargo.toml 4 additions, 2 deletionscore/client/Cargo.toml
- core/client/src/block_builder/api.rs 43 additions, 1 deletioncore/client/src/block_builder/api.rs
- core/client/src/client.rs 1 addition, 12 deletionscore/client/src/client.rs
- core/client/src/lib.rs 2 additions, 0 deletionscore/client/src/lib.rs
- core/client/src/runtime_api.rs 15 additions, 1 deletioncore/client/src/runtime_api.rs
- core/consensus/aura/src/lib.rs 65 additions, 7 deletionscore/consensus/aura/src/lib.rs
- core/finality-grandpa/src/tests.rs 38 additions, 16 deletionscore/finality-grandpa/src/tests.rs
- core/rpc/src/state/tests.rs 1 addition, 6 deletionscore/rpc/src/state/tests.rs
- core/sr-api-macros/src/compile_fail_tests.rs 32 additions, 0 deletionscore/sr-api-macros/src/compile_fail_tests.rs
- core/sr-api-macros/src/decl_runtime_apis.rs 189 additions, 14 deletionscore/sr-api-macros/src/decl_runtime_apis.rs
- core/sr-api-macros/src/impl_runtime_apis.rs 56 additions, 51 deletionscore/sr-api-macros/src/impl_runtime_apis.rs
- core/sr-api-macros/src/lib.rs 11 additions, 2 deletionscore/sr-api-macros/src/lib.rs
- core/sr-api-macros/src/utils.rs 5 additions, 0 deletionscore/sr-api-macros/src/utils.rs
- core/sr-api-macros/tests/decl_and_impl.rs 7 additions, 0 deletionscore/sr-api-macros/tests/decl_and_impl.rs
- core/sr-api-macros/tests/runtime_calls.rs 20 additions, 0 deletionscore/sr-api-macros/tests/runtime_calls.rs
- core/sr-version/src/lib.rs 10 additions, 0 deletionscore/sr-version/src/lib.rs
- core/test-runtime/Cargo.toml 1 addition, 10 deletionscore/test-runtime/Cargo.toml
- core/test-runtime/src/lib.rs 197 additions, 73 deletionscore/test-runtime/src/lib.rs
Please register or sign in to comment