* 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
* 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
* 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.
* 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
* 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
* Move `CODE` directly into `TestExternalities`
This change allows tests to modify CODE in storage.
* Update more hashes
* Test
* Move `code` back into a field of `TestExternalities`
* Update wasm after master merge
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.
* 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
* 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
* build CHT for changes tries roots
* collect chnages tries roots proof in key_changes_proof
* flush check_changes_proof
* fixed compilation
* LightDataChecker now has a ref to the blockchain
* continue passing proofs
* new light db tests
* more CHT tests
* more tests for key changes proof when headers are missing
* lost files
* docs: Remove safe-mix since is no longer local dependency
* docs: Fix existing packages link. Still only includes Substrate Core
* docs: Remove empty package Readmes. Remove old docs links. Rename to Readme
* docs: Remove link to old docs
* misc: Merge latest from master. Renaem to sr-metadata. Fix list of RustDoc package names
* Rename substrate-metadata to sr-metadata, since it is in the "srml" subdirectory
* Change example to use package name that opens all packages in RustDocs
* Fix list of packages names that are available to open in RustDocs
* fix typo
* fix ordering of CLI options and add missing backslash
* [core/primitives] Update crunchy 0.1 => 0.2
* [core/primitives] Update fixed-hash 0.2 => 0.3.0-beta
* [core/primitives] Update `uint` 0.4 => 0.5.0-beta
* [core/state-machine] Fix errors emerged by fixed-hash update
* [core/state-db] Fix errors that emerged from fixed-hash update
* [core/sr-io] Fix errors that emerged from the fixed-hash update
* [core/trie] Fix errors emerged from fixed-hash updates
* [core/trie] Make use of new Hash::as_fixed_bytes_mut method in tests
* [core/sr-primitives] Fix errors emerged from updating fixed-hash
* [core/executor] Fix errors that emerged from fixed-hash update
* [core/test-runtime] Fix errors that emerged from updating fixed-hash
* [core/test-runtime] Fix an error that emerged from fixed-hash update
* [core/transaction-pool] Fix errors that emerged from updating fixed-hash
* Add From<u64> impl for hash types defined in core/primitives
* [core/client/db] Fix errors that emerged from fixed-hash update
* [core/{client/network/rpc}]: Fix errors emerged by fixed-hash update
* [node/{cli/executor/runtime}]: Fix errors emerged by updating fixed-hash
* [core/network]: Fix bug in parsing constant str
* Update Cargo.lock
- Add crunchy 0.2.1
- fixed-hash 0.2.2 => 0.3.0-beta.3
- Add static-assertions 0.2.5
- uint 0.4.1 => 0.5.0-beta.1
* [core/primitives]: Add fixed-hash/rustc-hex feature for FromStr impl
* [core/primitives] No longer provide From<u64> impl for hash types if byteorder support is not enabled
* [core/primitives] Revert to using From impl again in primitives tests
* [core/..] Fix some bugs that emerged by recent fixed-hash updates
* Update a bunch of Cargo.lock files
* [core/state-db] Re-add whitespace between attr and extern crate/mod
* [core/primitives] Fix bug in From<u64> impl for hash types using the wrong feature guard
* Generalize BlockImport
- move ImportBlock, BlockOrigin, ImportResult into shared sr-primitives
- let Consensus provide and traits again
- update consensus traits to latest development
- implement traits on client::Client, test_client::TestClient
- update RHD to use the new import_block API
* Move ImportBlock into consensus-common
* Send import notification in aura tests
* Integrating aura into service
* Make Signatures more generic
* Aura Block Production with the given key
* run aura on the thread pool
* start at exact step start in aura
* Add needed wasm blob, in leiu of better solutions.
* Make API ids consistent with traits and bring upstream for sharing.
* Add decrease_free_balance to Balances module
* Encode `Metadata` once instead of two times
* Bitops include xor
* Upgrade key module.
* Default pages to somewhat bigger.
* Introduce upgrade key into node
* Add `Created` event
* Implement a non generic version of child delta trie
* Use delta_trie_root in state_machine
* Expand InMemory backend to support multi-storage
* Create Consolidate trait
* Fix all crate compile and remove unused OverlayedChanges::drain
* Implement child storage root support and overlay changes
* Add child storage reader
* Add child storage writer
* Implement child storage cleaning
* Fix light backend compile
* Add all required ext functions for wasm executor
* Add ext def to io
* Add all io functions
* Fix nostd compile
* Add simple test
* Remove unnecessary vec copy in child_storage_root_transaction
* Use values_mut/for_each to make it shorter
* Use extend to shorter a for loop
* Move record_all_keys to trie so it's easier to generic them later
* space -> tab
* Remove to_owned in debug format
* Clean out all to_owned
* Break debug_trace to multiple lines
* Remove 0..
* UserError copy/paste typo
* Replace Vec::from_raw_parts by slice::from_raw_parts
* Use iter::empty()
* Wrap some long lines
* Wrap a missing line
* Remove unnecessary map
https://github.com/paritytech/substrate/pull/856#discussion_r226222663
* Call ext_free after from_raw_parts
* Fix tests in other crates
* Try to make everything compact
* Make `Clone` work
* Fix
* Move contracts and balances over to compact encoding
* Session and timestamp are compact
* Sataking uses compact numbers
* Treasury now compact
* Compact Democracy
* Council is compact
* Fix