* Add Assets module
* Fixes
* Fix
* Update comments
* Support `GenesisConfig` without any fields
Fixes: #923
* Do not generate an empty `GenesisConfig`, instead generate no `GenesisConfig`
* 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
* Adds new `ProvideInherent` trait
Also implements the new trait for `srml/consensus` and `srml/timestamp`.
* Adds `impl_outer_inherent!` macro
* Reexport macros from `alloc`
* Introduce `RuntimeString` and fix `ProvideInherent` on `no_std`
* Replace `VersionString` with `RuntimeString`
* Improvements for `impl_outer_inherent!`
* Make `construct_runtime!` support `impl_outer_inherent!`
* Fixes after rebase
* Whitespace
* 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
* Adds new `check_inherents` function to the `BlockBuilder` API
* Switch to `check_inherents` in `node-consensus`
* Remove `CheckedBlock`, because it is not required anymore
* Fixes after rebase
* Fixes compilation on stable
* Make the graph generic.
* Adapting pool API for the graph.
* Merge pool & graph.
* Restructure.
* Fix test of transaction pool.
* Get rid of node/transaction-pool.
* Compilation fixes.
* Test7
* Fix compilation of tests.
* Revert runtime changes.
* Add validate_transaction to test-runtime.
* Fix RPC tests.
* Add clearing of the old transactions.
* Trigger pool events.
* Use new queue API.
* Fix wasm build, re-export Hasher.
* No warning if validate transaction fails.
* Get rid of Into<u64> and use As
* Rename `NewTxQueue` to `TaggedTransactionQueue`
* Remove `BlockBuilder` API and support adding documentation to the API functions
* Adds new `BlockBuilder` API
* Fixes compilation with new `BlockBuilder` API
* Some more cleanup
* Cargo.lock update
* Try to fix on stable
* Add missing `As` imports.
* Adds new API traits that will be used by the client and runtime
* Switch consensus to new API's
* Switches transaction-pool to new API's
* Move runtime api stuff into its own crate
* Adds `impl_apis!` macro for implementing the new API traits
* Make `metadata` return directly a blob
* Runtime replace `impl_stubs!` with `impl_apis!`
* Switches to none feature based approach for declaring the different API traits
* Fixes compilation error
* Fixes errors
* Make the `decl_apis!` trait usable from the outside
* Make the `test-client` use the new API traits
* Remove last `impl_stubs!` bits and move some of them into wasm executor for tests
* A little bit more documentation
* pass correct header column to read_meta again
fixes#826
* make COLUMN_META exist in a single place
* pass COLUMN_META as arg for more consistency with other db utils
* remove unused import
* add stub for Client.best_chain_containing_block_hash
* add fn blockchain::Backend::leaf_hashes
* fix typo
* sketch out Client.best_chain_containing_block_hash
* fix indent
* Blockchain.leaf_hashes -> Blockchain.leaves
* add unimplemented! stub impls for Blockchain.leaves
* start impl of Blockchain.leaves for in-memory client db
* Client.best_chain_containing...: check canonical first and make compile
* first rough attempt at maintaining leaf list in in-memory db
* fix tab indent
* add test best_chain_containing_single_block
* add failing test best_chain_containing_with_fork
* pub use client::blockchain; in test-client to prevent circular dep in client tests
* best_chain_containing_with_single_block: improve and test leaves
* far improve in-memory Backend::leaves impl
* test blockchain::Backend::leaves more thoroughly
* handle more edge cases in blockchain::Backend::leaves impl for in memory
* fix test best_chain_containing_with_fork (two distinct test blocks had same hash)
* make best_chain_containing_block_hash pass existing tests
* improve docstring for Blockchain::leaves
* Client.best_chain_containing: some cleanup. support max_block_number
* best_chain_containing: remove broken outcommented fast check for best = canonical
* remove blank line
* best_block_containing: return None if target_hash not found
* best_chain_containing: add unreachable! at end of function
* improve tests for best_chain_containing
* renames
* more elaborate test scenario for best_containing
* best_containing: fix restriction of search through maybe_max_number
* best_containing: tests for restriction of search
* get rid of unnecessary clones
* replace Client::new_in_mem by new_with_backend which is useful for testing backends
* add test_client::new_with_backend for testing different backend impls
* add test for in_mem::Backend::leaves
* remove unused imports
* in_mem test_leaves: simplify
* flesh out tests for in_mem leaves impl
* remove tests for leaves from client which are now covered in implementing module
* improve comment
* add Client.new_in_mem again
* unwrap in test_client::new_with_backend
* make test_client::BlockBuilderExt work not just with in-mem backend
* make test client ext not just work with in mem backend
* add failing Backend.leaves test for client-db
* update Cargo.lock
* replace KeccakHasher with Blake2Hasher
* refactor
address grumble https://github.com/paritytech/substrate/pull/740#discussion_r217822862
* refactor using NumberFor
address grumble https://github.com/paritytech/substrate/pull/740#discussion_r217823341
* add test that exposes possible problem
* update docstring for Client.best_containing
* extract test for Backend.leaves for reuse
* improve test blockchain_header_and_hash_return_blocks_from_canonical_chain_given_block_numbers
* extract test_blockchain_query_by_number_gets_canonical to easily test multiple impls
* remove whitespace
* remove todo
* Client.best_containing: pre-empt search loop when target in canonical
* best_containing: prevent race condition by holding import lock
* add todo
* extract leaf list update code into function
* add comment
* client-db: use in-memory-kvdb for tests
* use BTreeSet to store leaves for in-mem which is faster and simpler
* add docstring
* add comments and fix formatting
* add initial raw version of LeafSet
* remove Client::update_leaves which has been superceded by LeafSet
* use LeafSet in in-mem backend
* keccak -> blake2
* don't reexport codec traits in primitives
addresses https://github.com/paritytech/substrate/pull/740#discussion_r219538185
* fix rebase mistake
* improve LeafSet and use it in state-db
* correct Transfer nonces to fix ApplyExtinsicFailed(Stale)
* use given backend in canoncal test
* kill dead tree-route code in util
* fix warnings
* tests for leafset
* reorganizations in in_mem backend
* fix reorganization canon block logic
* DB commit and safe reversion on write error
* fix style nits
* state-db: typo fixes
* use fmt::Result for 'fmt'
* state-db: typo fixes
* state-db: use the same pattern to pass the parameter
* state-db: follow the same style
* state pruning after window even when nothing is finalized
* rename and alter canonicalization delay
* fix constant
* address grumbles
* add comment on canonicality vs finality
* finalization for in_mem
* fetch last finalized block
* pruning: use canonical term instead of final
* finalize blocks in full node
* begin to port light client DB
* add tree-route
* keep number index consistent in full nodes
* fix tests
* disable cache and finish porting light client
* add AsMut to system module
* final leaf is always best
* fix all tests
* Fix comment and trace
* removed unused Into call
* add comment on behavior of `finalize_block`
* move `tree_route` to client common
* tree_route tests
* return slices in TreeRoute
* apply finality up to parent
* add `finalize_block` call
* adjust formatting
* finality notifications and add last finalized block to chain info
* exhaustive match and comments
* fix sync tests by using non-instant finality
* finalization for in_mem
* fetch last finalized block
* pruning: use canonical term instead of final
* finalize blocks in full node
* begin to port light client DB
* add tree-route
* keep number index consistent in full nodes
* fix tests
* disable cache and finish porting light client
* add AsMut to system module
* final leaf is always best
* fix all tests
* Fix comment and trace
* removed unused Into call
* add comment on behavior of `finalize_block`
* Move module metadata from json string to custom metadata
* Revisit the metadata structures
1. Move the structures into the metadata crate.
2. Switch to using Cow/MaybeOwnedArray to support Encode/Decode
* Adapt to new metadata structures
* Convert event json metadata to new metadata structures
* Convert storage json metadata to new metadata structures
* Convert runtime metadata from json to new metadata structs
* Implements new metadata structures in client and runtime
* Fixes errors on `no_std`
* Fixes errors after rebasing master
* Do not use `Cow` anymore in metadata
Also replace `String` with our own type definition `StringBuf`.
This fixes compilation on `no_std`.
* Wrap `RuntimeMetadata` in `RuntimeMetadataVersioned` to support versioning
* Move metadata into `srml` and make core unaware of the implementation
* First effort
* API versioning
* Introduce validate_transaction
* Introduce the API plus fixes.
* Docs
* Typo
* Add longevity parameter to transaction validity info.
* Remove unneeded script
* Rename Substrate Demo -> Substrate
* Rename demo -> node
* Build wasm from last rename.
* Merge ed25519 into substrate-primitives
* Minor tweak
* Rename substrate -> core
* Move substrate-runtime-support to core/runtime/support
* Rename/move substrate-runtime-version
* Move codec up a level
* Rename substrate-codec -> parity-codec
* Move environmental up a level
* Move pwasm-* up to top, ready for removal
* Remove requirement of s-r-support from s-r-primitives
* Move core/runtime/primitives into core/runtime-primitives
* Remove s-r-support dep from s-r-version
* Remove dep of s-r-support from bft
* Remove dep of s-r-support from node/consensus
* Sever all other core deps from s-r-support
* Forgot the no_std directive
* Rename non-SRML modules to sr-* to avoid match clashes
* Move runtime/* to srml/*
* Rename substrate-runtime-* -> srml-*
* Move srml to top-level