* Intro `ChildStorageKey` for checked child keys
* Get rid of Into in Externalities trait
* Use Cow in ChildStorageKey
* Fix tests for state-machine.
* Clean
* child_storage_root always return a value
* Don't return Option from Ext::child_storage_root
* Return 42 in child_storage_root
* Return CHILD_STORAGE_KEY_PREFIX from trie id gen
* Bump spec and impl version.
* Require `:default:` in `is_child_trie_key_valid`
* Add `default:` prefix.
* Introduce `into_owned` for `ChildStorageKey`.
* Add documentation.
* Fix state-machine tests
* Remove outdated TODO
I check out with Emeric and he is ok with that
* child_storage_root is infailable
* Nit
* Move assert after check.
* Apply suggestions from @DemiMarie-parity
Co-Authored-By: pepyakin <s.pepyakin@gmail.com>
* Formatting nit in core/executor/src/wasm_executor.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Formatting nits from @thiolliere
* Adds deposit event benchmark
* Add `StorageValue::append`
`StorageValue::append` can be used by types that implement `EncodeAppend` to speed-up situations where you just want to append
an item to storage without wanting to decode all previous items.
* Stay at 100 events
* Fixes compilation
* Use correct year and increase spec version
* Refactor state-machine stuff.
* Fix tests.
* WiP
* WiP2
* Service support for offchain workers.
* Service support for offchain workers.
* Testing offchain worker.
* Initial version working.
* Pass side effects in call.
* Pass OffchainExt in context.
* Submit extrinsics to the pool.
* Support inherents.
* Insert to inherents pool.
* Inserting to the pool asynchronously.
* Add test to offchain worker.
* Implement convenience syntax for modules.
* Dispatching offchain worker through executive.
* Fix offchain test.
* Remove offchain worker from timestamp.
* Update Cargo.lock.
* Address review comments.
* Use latest patch version for futures.
* Add CLI parameter for offchain worker.
* Fix compilation.
* Fix test.
* Fix extrinsics format for tests.
* Fix RPC test.
* Bump spec version.
* Fix executive.
* Fix support macro.
* Address grumbles.
* Bump runtime
* first implementation
* remove done comment
* origin done
* impl log for instance
* impl inherent for instance
* Fix wasm build + full example build
this requires parity codec implements codec for core::marker::PhantomData
* patch parity-codec link to github branch
* improve internal names and fix instance prefix
* Fix in macros
* add test modules for support
this allow to test for construct_runtime as well.
The reason to have put that in another crate is:
* if we put test in `tests/` dir of srml/support then decl_storage fails to get
srml-support access because it believes it is inside srml-support
crate and so derive access to `quote!{ crate }` but this is wrong
(and I don't see any way to prevent that, and it only bother us so I
don't think that matters that much)
* if we put test inside lib.rs then contruct_runtime cannot be used
because it call some macros that are defined with macros
(decl_outer_event and decl_outer_origin) and thus rustc complains.
* defaultinstance to its own struct to avoid errors
* enforce <T, I> for Event and Config, impl test
* add origin, log, inherent to test
* test more code generation
* basic storage test
* fix typo
* rename a few imports and field
* delete wip test in example and runtime
* change default prefix to make it backward compatible with test
* rename Instance to I and Instantiable to Instance
note: the name of generic parameter I is only enforce by decl_module!
and this could be rewritten
* doc
* clean old TODOs
* update parity-codec to 3.2
* update node impl version + builds
* fix warning
* fix unrelated grandpa test
* refactor code
* 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`
* Clean up session key rotation
* Fix build
* Bump version
* Introduce feature to balances.
* Move staking locking logic over to central point
* ^^^ rest
* First part of assimilation
* More assimilation
* More assimilation
* Fix most tests
* Fix build
* Move Balances to new locking system
* :q!
* Bump runtime version
* Build runtime
* Convenience function
* Test fix.
* Whitespace
* Improve type legibility.
* Fix comment.
* More tests.
* More tests.
* Bump version
* Caps
* Whitespace
* Whitespace
* Remove unneeded function.
* Make use of parity-codec "derive" crate feature
* Bump impl_version
* Update wasm files and Cargo.lock files
* Transferred to parity_codec derive feature for the rest of the crates
* Update wasm binaries and lock files
* Update core and node wasm binaries
* first draft of ristretto crypto module #1685
* adds better comments and code-style
* remove the last evil unwrap
* remove a mistakenly committed lockfile
* add a fresh new lockfile --will probably need a manual merge later
* fix an invalid old test vector
* Wire in ristretto
* Update comment
* Fix use.
* new Signature type api alias to be compatible with substrate
* Add new keyring, fix node executor tests
* Bump version.
* Remove all hashes.
* Update core/primitives/src/sr25519.rs
Co-Authored-By: gavofyork <github@gavwood.com>
* Revert back to Ed25519 (until JS UI is ready)
* Fix test
* Replace unwrap with expect
* Move expect to call sites
* Bubble errors up and trap
* Update wasm
* Update invalid pointer
* Remove test which makes problems in CI
* Check for underflow
* Temporarily pin trie to #2
* Use generic and delay trait object casting
Rust does not support super-trait upcasting
* Add PlainDB impl for Ephemeral
* Add PlainDB trait alias for completeness
* Use PlainDB for test TrieBackendStorage fetch
We always check overlay first for a storage fetch, which already checked null data. Using PlainDB here makes it work
nicer with other PlainDB overlays.
* Update trie reference
* Use HashDBRef in places when approriate
* Use PlainDBRef in places when approriate
* Update trie crate reference
* Remove unused HashDB::keys
* Patch dependencies
* Fix cargolock
* Update cargo lock again
* Link substrate issue tracker in panic
* Replace allocator with freeing-bump allocator
* Revert me: Panic on double allocate/free
* Revert me: Add shallow benchmark for a first impression
* Revert "Revert me: Add shallow benchmark for a first impression"
This reverts commit 5f0d4df39395eb55c9ec2d6fe1ed992533475fec.
* Revert "Revert me: Panic on double allocate/free"
This reverts commit a114df7d6cfc21d60af396ccca02e5c8205db6ce.
* Rename heap to FreeingBumpHeapAllocator
* Rename heap.rs to allocator.rs
* Use sandbox heap
* Move functions
* Move variables into constructor
* Revert "Move variables into constructor"
This reverts commit f46fa0d0cdf4ea97760ccce58003b0d33f433743.
* Remove unnecessary casts
* Add comment for new parameter
* Improve typing
* Move variables into constructor
* Avoid dynamic allocation
* Remove unused variables
* Revert "Link substrate issue tracker in panic"
This reverts commit 32dfa1d02bcf881d1d514a930fcc0fdf3c5f8e08.
In the meantime this was fixed in https://github.com/paritytech/substrate/pull/1667.
* Improve naming
* Only assert in debug mode
* Remove dynamic allocation
* Decrease bucket size
A bucket size of 8192 bytes is quite large and it turned
out that this can exhaust the available heap space too
too quickly.
This is because even for allocating 1 byte a bucket of
8192 bytes is allocated/wasted.
* Return 0 if requested size too large
* Improve test
The test didn't use an offset when setting up the heap.
Hence the first successfully allocated pointer was
always `0`.
This is unfortunate since `0` is also the return value
when there is an error.
This lead to us not noticing that the test was failing,
because it did not distinguish between success and error.
* Revert to linear allocator
Went through the TODOs, removed a bunch, which are outdated or nothing more than a regular comment, documented a bunch more as actual tickets and made them FIXMEs and unified their structure (`FIXME #TICKETNO DESC` for local tickets, `FIXME: DESC LINK` for external tickets) for easier in-editor support. Further more remove unnecessary remarks and related old code that I noticed in that instance.
* Fix warnings in substrate
* More warnings removed and wasm updated
* Fixes error on stable and grumbles
* Update wasm files
* Add links to the github issue for replacing `error-chain`
* Better allocator for wasm (#1460)
* Add Arch Linux installation instructions
* Enable tracing heap size
* Extract heap
* Replace linear allocator with buddy allocator
* Fix test
The purose of this big block is for the tests
to test a failure when the block is too big
though. The improved buddy allocation strategy
results in this block fitting on the heap now.
Hence the increase.
* Get rid of memcpy in to_vec()
* fixup: Style and comments
* fixup: Split Linux instructions by distribution
To prevent misunderstandings of people executing both.
* fixup: Remove unnecessary types and code
* fixup: Make Pointers start from 1, remove some panics, code improvements
* fixup: Return 0 on errors
* fixup: Move loop to separate function
* fixup: Use FnvHashMap instead of HashMap
* fixup: Fix error handling
* fixup: Use current_size() instead of used_size()
* fixup: Fix and document allocation offset
* fixup: Remove unnecessary multiplication
* fixup: Fix comments
* fixup: Remove Arch installation instructions
* Revert "Fix test"
This reverts commit 292c177df8efaa4658293748a13b1ab1c0b76ea8.
* fixup: Remove unused code, improve import
* fixup: Proper alignment
* fixup: Do not use internal constant in public description
* fixup: Add comment regarding invariants
* fixup: Move assertion to compile-time check
* Fix bug in necessary tree level calculation
The tree levels necessary to house a number
of nodes was calculated incorrectly.
* Improve naming
* 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
* Add Arch Linux installation instructions
* Enable tracing heap size
* Extract heap
* Replace linear allocator with buddy allocator
* Fix test
The purose of this big block is for the tests
to test a failure when the block is too big
though. The improved buddy allocation strategy
results in this block fitting on the heap now.
Hence the increase.
* Get rid of memcpy in to_vec()
* fixup: Style and comments
* fixup: Split Linux instructions by distribution
To prevent misunderstandings of people executing both.
* fixup: Remove unnecessary types and code
* fixup: Make Pointers start from 1, remove some panics, code improvements
* fixup: Return 0 on errors
* fixup: Move loop to separate function
* fixup: Use FnvHashMap instead of HashMap
* fixup: Fix error handling
* fixup: Use current_size() instead of used_size()
* fixup: Fix and document allocation offset
* fixup: Remove unnecessary multiplication
* fixup: Fix comments
* fixup: Remove Arch installation instructions
* Revert "Fix test"
This reverts commit 292c177df8efaa4658293748a13b1ab1c0b76ea8.
* fixup: Remove unused code, improve import
* fixup: Proper alignment
* fixup: Do not use internal constant in public description
* fixup: Add comment regarding invariants
* fixup: Move assertion to compile-time check
* impl Compact<> and HasCompact for Permill Perbill
* update parity-codec to 2.2
* add Cargo.lock
* add lock and build for runtime
* rebuild Cargo.lock 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