* Adds first version of traits for generating the host functions
* First steps of the procedural macro
* Implements generation of the host extern functions
* Prefix ext host function with snake case trait name
* Implement host functions implementation on the host
* Change `HostFunctions` interface
* Implement `HostFunctions` for tuples
* Make `WasmExecutor` generic over the host functions
* Begin to add a test and make it compile
* Make the test succeed
* Add test to ensure that host functions are not found
* It's alive! Make the `set_storage` test work
* Add test for mutable references
* Code cleanup and documentation etc
* Add marker trait for types that should be passed as SCALE encoded
* Inherit the visibility from the trait and more improvements
* More impls and move them into their own file
* Code simplification by dropping one trait
* Give it a better name
* Implement traits for arrays
* Refactor code to support pass by codec/inner
* Docs
* Implement pass by inner for some crypto types and add a test
* Implement exchangeable function support
* Rewrite sr-io with as runtime interface
* Start reworking after master merge
* Adds `PassByCodec` derive
* Adds `PassByInner` derive
* Fix compilation errors
* More implementations
* Implement runtime interface traits for `str`
* Make `sr-io` compile again
* Fix more compilation errors
* More progress on getting stuff back to compile
* More compilation fixes
* Fix warnings
* Remove le conversions
* Add support for `wasm_only` interfaces
* Implement `Allocator` interface
* Improve error message
* Move `WasmAllocator` to `sr-io` and more clean ups
* Use correct function signature for wasm functions
* Store the host functions with the Wasm runtime
* Docs update
* Fix compilation after master merge
* Remove `sr-io/without_std`
* Make `srml-support` tests run again
* More compilation error fixes
* Use correct doc syntax
* Fix test-runtime
* Fix compilation
* Catch native panics when executing the wasm runtime
As with the native runtime, we now catch all native panics when we
execute the wasm runtime. The panics inside the wasm runtime were
already catched before by the wasm executor automatically, but any panic
in the host functions could bring down the node. The recent switch to
execute the native counterpart of the host function in `sr-io`, makes
this change required. The native `sr-io` functions just `panic` when
something is not provided or any other error occured.
* Fix compilation
* Don't panic in a panic
* Move `sr-sandbox` to new runtime interface
* Fixes tests after sandbox changes
* Make sure we detect invalid utf8
* Fixes after master merge
* Adds pass by enum strategy
* Fix wasmtime integration
* Some macro structure clean up
* Rework and test exchangebale host functions
* PassBy derive macros documentation
* Docs for `runtime_interface` macro
* Support wild card argument names
* Adds ui tests
* Make sure that we are backwards compatible to the old runtime interfaces
* Documentation
* Fixes after latest master merge
* Make `wasmtime` happy
* Make `full_crypto` work
* Make the new interface versionable
* Rename `Sanboxing` to `Sandbox`
* Don't finalize in test while importing
* Fix Performance regression
* Fix test
* grandpa: stricter gossip message filtering
* gossip: remove filtered message on send_message
* gossip: add test for tracking of broadcast attempts
* grandpa: only restrict gossip if we're connected to more than 5 authorities
* grandpa: add test for progressive gossip
* grandpa: add test for gossip filtering on local non-authority node
* grandpa: fix doc
* gossip, grandpa: tabify
* grandpa: relax filtering logic for global messages
* Remove dependency on hyper-tls
This removes one of the dependencies on native-tls, and thus on OpenSSL.
I will remove the other in a separate commit.
* Remove the `HttpClient` enum
It only had one variant.
* Apply suggestions from code review
Co-Authored-By: Pierre Krieger <pierre.krieger1708@gmail.com>
* Correctly serialize code in chain spec as hex.
Due to a bug, the runtime code was previously serialized as a JSON
array of numbers, pretty printed one byte per line.
* Remove panic in macro and whitelist attribute types for storage
genesis config lines.
* Use syn::Error to enforce whitelisted attributes on genesis config.
* Blacklist genesis extra config line attributes instead of whitelist.
* Added a public transfer_some function and a private transfer_inner fn
* Move transfer_some to the end of the module impl to fix failing contracts test
* Change whitespace
* Remove needless change to transfer logic
* Fix error
* Update srml/balances/src/lib.rs
Co-Authored-By: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
* Improve documentation and add test
* Update srml/balances/src/lib.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Switch to changing Currency trait instead
* Apply breaking changes of new libp2p versions
* Oops, forgot to update version
* Fix tests
* Fix imports with WASM
* Fix WASM for real
* Update core/network/src/debug_info.rs
Co-Authored-By: Roman Borschel <romanb@users.noreply.github.com>
* Fix compilation
- Add new crate `substrate-build-script-utils` to unify the code of
`node`, `node-template` and `polkadot-node`.
- The `node-cli` build script needs to search upwards for the
`.git/HEAD` file to find it.
* introduced "with_crypto" feature and applied switches like in substrate-api-client fork
* introduced "with_crypto" feature and applied switches like in substraTEE-worker fork
* distinguishing core::hash vs std::hash
* @bkchr's review requests fulfilled
* fixes
* revert dependency upgrade ed25519-dalek
* added full_crypto features to all crates using app_crypto! macro
* fixing CI complaints.
* fix again
* adding CI test for with_crypto feature
* added full_crypto for ecdsa. now builds wit h--no-deafault-features --features with_crypto
* remove --release from CI test
* @bkchr requested changes. moved full_crypto CI test to build stage
* fixing no_std issue
* CI fresh copy from srml-staking
* gitlab CI with +nightly
* solved no-feature-in-macro dilemma
* cosmetics
* Update core/application-crypto/src/sr25519.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/application-crypto/src/ed25519.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* even more simple
* undo line delete
* refactoring app_crypto macro. splitting functionalities based on full_crypto feature
* whitespace cosmetics
* srml-evm: init the basic structures
* srml-evm: finish executor implementation
* srml-evm: implement balance deposit and withdraw
* srml-evm: implement the actuall call/create
* srml-evm: use crates.io version of evm
* srml-evm: fix no-std compile
* Remove dependency patch
* Update to evm 0.14
* Use double map for account storage
* Add precompiles support
* Add some basic docs
* Use runtime_io::chain_id()
* Update srml/evm/src/lib.rs
Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>
* Update srml/evm/src/lib.rs
Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com>
* Fix WithdrawReason
* Unique saturate balance to u128
* Unique saturate withdraw to u128
* Remove extern crate alloc
* Move account code to a separate storage and use ref for convert_account_id
* More match cause for error message
* Fix potential interger overflow
* Use decode_len for fetching code length