* Remove `node-api` from `node-consensus` and `node-transaction-pool`
* Remove the `node-api` crate and its last usages
* Remove left over file
* Fixes compilation errors
* Switch to `As` trait
* Rename trait
* Whitespace
* 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
* Rewrite the libp2p networking
* Fix erroneous replacement during rebase
* Update libp2p
* Update libp2p
* Remove the logic error about useless substreams
* Use the new NodeHandler system of libp2p
* Commit the Cargo.lock
* Upgrade yamux
* Forward port latest changes
* Fix compilation issues
* Implement the external URL
* Update to latest networking fixes
* Forward port rest of v0.2
* Fix reserved peers being dropped when we're full
* 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.
* Make `system` module renamable in `impl_outer_event!`
* Implement `construct_runtime!` macro
This macro generates code for calling all the common `impl_outer_*` macros.
* Add documentation
* Fixes wrong declaration of `contract`
* Update dependencies to work on `no_std`
* One more `Cargo.lock` update
* Address comments
* 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
* Introduce data and salt into ContractAddressFor
* Accept salt arg in ext_create.
* Integrate contracts into the demo runtime
* Make libcontract compile to wasm
* Remove salt parameter.
This now is concern of userspace.
* Rebuild binaries.
* Adds `impl_json_metadata!` for generating all metadata of a runtime
* Adds `json_metadata` RPC call
* Adds simple test for the `json_metadata` RPC call
* Implements json metadata in the demo runtime
* Fix indent
* Adds missing copyright headers
* Dispatch json metadata renamings and improvements
* Replaces `format!` & `String` with `Vec<JSONMetadata`
* Implements `Encode` and `Decode` for JSONMetadata
* Make `impl_json_metadata!` compileable on `no_std`
* Adapt the client to decode the correct type for `json_metadata`
* Fixes compile error and warning
* Whitespace
* Treasury in runtime, generic approve/reject
* Add logic for council origin
* Add tests.
* Configurable number of members in EnsureMembers
* Fix grumbles
* Fix spelling
* Comment
* LocalCallExecutor and RemoteCallRequest generic over Hasher and NodeCodec
* Fix client/db
* Use new triehash
* Use new triehash
Don't use ethereum-types from rlp
* New triehash
* Use new triehash
* fixes and rlp without ethereum-types
* Lockfile
* lockfile
* Rename enumerated_trie_root to keccak_rlp_enumerated_trie_root
* Rename ordered_trie_root -> keccak_rlp_ordered_trie_root
Rename trie_root -> keccak_rlp_trie_root
* Fix panic message
* Kick the ball one step up the ladder
* Normalize function signatures between wasm and native
* Sort out compilation and test errors
* Cleanup
* Constrain the wasm-version using an ExternTrieCrypto trait that is implemented only for KeccakHasher
* hashdb is not optional
* lockfile
* Runtimes
* Missing bounds
* wasm binaries
* lockfiles
* binaries
* LocalCallExecutor uses concrete hasher/codec
* Use binaries from master
* Externalities is concrete
RuntimeInfo is not generic
* whitespace grumble
* lockfile
* lockfile and binaries
* System and Balances switched to new call model
* Fixed up executive for new pardigm
* Consensus works with Origin
* Timestamp ported over
* Session now compatible
* Ported staking
* Treasury compatible
* Expunge MaybeEmpty
* Make democracy work
* Council compatible
* Remove some aux-dispatch stuff and fix balances
* Rename aux -> origin, fix contracts
* Fix test
* Fix example
* Update macro to remove superfluous cruft
* Make work with new macro
* Tests
* Fix some tests
* Tests
* Fix grumbles
* Final grumble
* Initial commit.
* Split out balances module
* Minimise Balances trait requirements
* Fix up balances, remove balances stuff from staking
* Split off and fix up staking module
* Fix executive tests
* Fix up democracy module
* make council work again
* Remove unneeded cruft from democracy
* Fix up contract module
* Fix up rest of tests
* Fix minor TODOs
* Fix tests
* Remove superfluous code
* Move offline inherents to consensus module.
Fixes#630
* Version needs Decode.
* Move Decode back
* Fix nits
* Refactor to allow custom message
* more accurate consensus superseding logic
* mild revision to `can_build_on` logic
* fix a deadlock when spawning agreement as non-authority
* dropping BFT future before poll doesn't lead to service deadlock
* push cancel to BFTfuture rather than waiting for task