* ensure imbalances are properly accounted for (#2183)
* ensure imbalances are properly accounted for
* bump runtime version
* Update node/runtime/src/lib.rs
* implement contract events (#2161)
* implement contract events
* update runtime
* renaming
* update test code hash
* improve complexity details
* add deposit event base cost
* add test
* Revert "add deposit event base cost"
This reverts commit 58ec010c0f4f4f0e16935ad41da32aedd17a8c57.
* update test
* Revert "update test"
This reverts commit 6fe61a593ccf0d41f09a0b97472b28ed8751a999.
* Revert "Revert "add deposit event base cost""
This reverts commit 145e8a9bac15313a4c380aa66b94fd4d36fa3f6d.
* Fix format a bit
* Replace Vec<u8> with [u8; 32] for contract storage key (#2184)
* Replace Vec<u8> with [u8; 32] for contract storage key
* Read storage keys from sandbox memory into fixed size buffer
* Increment `impl_version`
* Remove redundant Ok(()) and explicitly specify StorageKey buffer type (#2188)
* Switch to `derive(Encode, Decode)` for `Call` (#2178)
* Add some tests
* More tests
* Switch to `derive(Encode, Decode)` for `Call`
* Update lock files
* Simplify the macro cases
* Cache changes trie config in db storage (#2170)
* cache changes trie config in db storage
* Update core/client/db/src/lib.rs
Co-Authored-By: svyatonik <svyatonik@gmail.com>
* Update core/client/db/src/lib.rs
Co-Authored-By: svyatonik <svyatonik@gmail.com>
* Fix version check for renamed runtime api methods (#2190)
* Add feature to disable including the test-runtime wasm blob
* Enable `std` feature for `consensus_authorities`
* Implement `skip_initialize_block` and `initialize_block` for runtime api
* Add test and fixes bug
* Begin to implement support for passing the `ProofRecorder`
* Make sure proof generation works as intended
* Fixes tests
* Make `BlockBuilder` generate proofs on request.
* Adds `TestClientBuilder` to simplify creating a test client
* Add `include-wasm-blob` to `test-client` as well
* Make `test-client` compile without including the wasm file
* Disable more stuff in test-client without wasm
* Reorganize the re-exports
* Use correct bounds
* Update docs
* Update core/client/src/block_builder/block_builder.rs
Co-Authored-By: bkchr <bkchr@users.noreply.github.com>
* Extend test to actually generated proof
* Switch to enum for `skip_initialize_block`
* Some wasm files updates
* Add basic BABE consensus type
* Update core/consensus/babe/slots/Cargo.toml
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Fix parameterization and run `rustfmt`
* Respond to review comments
* Update various Cargo.lock files
* Revert "Update various Cargo.lock files"
This reverts commit af53d7624752a744320e9cbb25749fdd8e6f46d2.
* `BabeSealSignature` → `BabeSeal`
* Move slot code to its own crate
This was highly non-trivial, due to cyclic dependencies.
* Remove redundancy between AuRa and BABE
Some of the code duplication was removed using a macro.
* Fix build error
* Avoid non-`#[doc(hidden)]` re-exports
Also, bump some library versions in `Cargo.toml`.
* Remove dead code in AuRa
* Remove impl_slot macro
It was more trouble than it was worth.
Also, delete useless dependencies on Serde.
* AuRa and BABE need different DB keys
* Bring back `aura::Network`, but deprecate it.
* Improve docs and add `slot_duration` inherent method
* Add docs to `substrate_consensus_aura::SlotDuration`
* Add missing documentation and #![forbid(missing_docs, unsafe_code)]
* Add a #![forbid(missing_docs)]
* Remove dependency of `test-runtime` on `slots`
* Update core/consensus/babe/src/lib.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Remove wrongly added file
* Fix copyright notice
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Bump `impl_version` and `spec_version`
* Fix deprecation version; remove spurious carets
* Update Cargo.lock
* Update dependencies
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.
* 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
* 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