* Support skipping the interactive purge prompt
Skip it via `cargo run -- purge-chain -y`.
* Fix typos
* Add Grandpa telemetry
* Address comments
* Revert unnecessary version bump
* Version bump to make CI run
* Remove unnecessary cast
* Do not bump version
* Adds benchmark for direct/indirect wasm function calls
* Store the benchmark function pointer in a `Cell`
* Add some documentation
* Make function implementations exchangeable
* Add parachain stub
* Add macro for registering the `validate_block` function
* Make all functions replace-able by unimplemented
* Some more refactoring
* Adds tests for executing empty parachain block
* Work on a new test with empty witness data
* Don't exchange `ext_print_*` stuff
* Some cleanup and one more function for `validate_block`
* More tests and more functions
* Fixes after merging master
* Use `parity-codec` `derive` feature
* CHange implementation of `wasm-nice-panic-message`
* Move `parachain` stuff to cumulus
* Updated wasm files
* Integrate feedback
* Switch to `ExchangeableFunction` struct
* More fixes
* Switch to Cell and panic on multiple replaces
* Increase `impl_version`
* Fix shifting
* Make the API more verbose of `ExchangeableFunction`
* Increase `impl_version`
* fix: adds new execution strategy nativeElseWasm and replace nativeWhenPossible with it
* feat: adds cmd line params for execution strategies
* fix: uses of cmd line execution strategies
* chore: remove white spaces
* chore: remove println
* chore: remove whitespace
* fix: generating functions with context
* feat: add function to generate with_context declarations
* fix: add implementation for with_context function calls
* fix: add execution context to call_api_at function
* fix: making use of context to select strategy for block_builder
* chore: cleaning up
* fix: merging issues
* fix tests
* add wasm files
* chore: small doc for context fields
* chore: delete redundant docs
* fix: use full path for ExecutionContext
* fix: add context functions from inside fold_item_impl
* chore: remove clone
* fix: moving generative function to utils, remove unused imports
* fix: add missing full path for ExecutionContext
* fix: merge issues
* update wasm files
* fix: update to keep up with changes in master
* chore: remove unused functions, clean up
* fix test
* fix grumbles
* fix: add more tests
* fix: some refactorings
* feat: add execution strategy to call
* chore: small improvements
* fix: add message to panic
* fix tests
Procedural do not support `$crate` to get access to the crate where the
macro is defined. We use a hack to re-export the crate under a known
name. With rust edition 2018, people started to rename their crates in
`Cargo.toml`, but that breaks the re-export. This commit introduces
`proc-maco-crate` that supports finding the requested crate name, even
if it was renamed.
* 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
* Add simple benchmark for the runtime api
* Make the executor support native calls
* Some documentation
* Hide behind `feature = "std"`
* Rework the native calls
* Make all tests compile again
* Make every parameter using the Block serialized/deserialized in the native call
* Forward `UnwindSafe` requirement
* Remove debug stuff
* Add some documentation
* Fixes warnings
* Fixes errors after master rebase
* Fixes compilation after master rebase
* Fixes compilation after rebase
* BlockAuthorityId convenience type
* Rename AuthorityId -> Ed25519AuthorityId to make it more precise
* Generalize AuthorityId up to substrate-client
* Fix in client-db
* rename: BlockAuthorityId -> AuthorityIdFor
* typo: should be digest item
* Fix test-runtime authorityId mismatch
One states that AuthorityId is u64 while the other states that it's Ed25519AuthorityId.
* Fix more u64 - Ed25519AuthorityId mismatch
* Fix compile of most of the srml modules
* Continue to pin aura and grandpa with ed25519 and fix compile
* Add MaybeHash trait
* Fix node-runtime compile
* Fix network tests
* Make `decl_runtime_apis!` implement `RuntimeApiInfo` for all runtime
apis
* Make the runtime side generate the info constants as well
* Make `RuntimeApiInfo` implementation use the correct generics
* Adds a test for the runtime api info stuff
* Remove duplicated code by using block from `test-client`
* Adds `compile_fail` tests for `api_version`
* Adds documentation for `api_version`
* Make `impl_runtime_apis!` generate `RUNTIME_API_VERSIONS`
* Update documentation and tests for `RUNTIME_API_VERSIONS`
* Implement `has_api` by using the `RuntimeApiInfo`
* Make `impl_runtime_apis` check that trait identifiers are unique
* Prefix all runtime api function with the corresponding trait
So `execute_block` will be called `Core_execute_block`.
This makes it possible to have traits implement a function with the
same name.
* Rebase master
* Update after master rebase
* Rewrites `impl_runtime_apis!` macro as `proc-macro`
* Adds some documentation
* Require the `impl_runtime_apis` to use a path for accessing the trait
* Make the runtime implement `GetNodeBlockType`
* Moves first chunk of runtime api code into the `impl_runtime_apis` macro
This also renames `ClientWithApi` into `RuntimeApi`.
* Make `impl_runtime_apis` use `runtime` api version automatically
* `decl_runtime_apis` automatically adds `Block: BlockT` as generic parameter
* Remove function generic arguments in block builder api
* Remove some unnused stuff from the `decl_runtime_apis` macro
* Make `InherentData` working again
* Make `impl_runtime_apis!` implement the `RuntimeApi` side as well
* Make it compile again after rebasing with master
* Split `sr-api-macros` into multiple files
* Reimplement `decl_runtime_apis!` as proc_macro
* Use `decl_runtime_apis!` for `Core` as well and improve error reporting
* Adds documentation for `decl_runtime_apis!` and `impl_runtime_apis!`
* Move some code
* Adds compile fail tests
* Adds a test and fixes some bugs
* Make `impl_runtime_apis!` support `_` as parameter name
* Fixes build errors with wasm
* Wasm rebuild after master rebase
* Apply suggestions from code review
Co-Authored-By: bkchr <bkchr@users.noreply.github.com>
* Addresses some grumbles
* Adds test to ensure that method signatures need to match
* New wasm files