* Put the DB configuration in an enum
* Allow passing a custom database to client-db
* Clean-ups in client-db
* Fix client tests
* Fix service tests
* Hopefully fix tests for good this time 😩
* Address review
* Adds function `to_substrate_wasm_fn_return_value`
Instead of replicating this piece of code over and over again, just move
it to a function that does it.
* Feedback
* Comment
* Fix#1536: do not require to construct a block for encoding it
* Bump `impl_version`
* Improve `Block::encode_from` signature and rustdoc (from review by @bkchr)
* Move `Externalities` into `substrate-externalities`
- `Externalities` now support generic extensions
- Split of `primtives-storage` for storage primitive types
* Move the externalities scoping into `substrate-externalities`
* Fix compilation
* Review feedback
* Adds macro for declaring extensions
* Fix benchmarks
* Introduce `ExtensionStore` trait
* Last review comments
* Implement it for `ExtensionStore`
* executor: Move definitions of externals out of wasm_executor module.
* executor: Create WasmRuntime trait.
This will be used to decouple the runtime cache from wasmi execution.
* executor: Remove WasmExecutor and move methods to wasmi_execution.
These will now be crate-internal functions and there is no need
for the struct.
* executor: Set default default_heap_pages in NativeExecutor.
* cli: CLI configuration for Wasm execution method.
* executor: Remove wasmi-specific code from wasm_runtime.
* Respond to review comments.
* Update all dependencies
* Upgrade dependencies whenever “easy”
“easy” means that there are no major changes required.
* Fix build and bump paste dependency to 0.1.6
* Remove dead code
* Re-add = dependency for futures-preview
* Add missing std features for runtime-io
* Remove git dependencies
as updated versions have been published to crates.io
* try to debug bug
* For sr-io, "std" should imply "no_oom" and "no_panic_handler".
Otherwise, rustc complains (correctly) about duplicate lang items.
* Add missing "runtime-io/std" features
* Fix compilation errors
* Prevent duplicate lang items
Rust does not allow duplicate lang items. When compiled without the
`std` feature, `sr-io` defines two lang items. Therefore, `sr-io`
compiled without `feature = "std"` must not be linked with `std`.
However, `pwasm-utils` and `wasmi-validation` both bring in `std` unless
compiled with `default-features = "false"`. This caused a duplicate
lang item error. Building both with `default-features = "false"`
prevents this error. When building with `feature = "std"`, they should
both be built with the `std` feature, so this feature needs to be
explicitly depended on.
* Bump `impl_version`
* Make tests pass
Three tests used 1 less gas than they had previously.
* Try to un-break build
* Add a Cargo.lock file
* Revert offchain code
* Revert "Revert offchain code"
This reverts commit d216d08cc6ca0344614669c1d24cde3aa5c0d4e2.
* Don’t try to send a body with a GET request
without adding a Transfer-Encoding or Content-Length header.
This has always been wrong, but hyperium/hyper#1925 hid the bug until
hyper was upgraded to 0.12.35.
* Change some more GET requests to POST requests
* Fix excess line width and remove an `extern crate`
* Delete commented-out extern crate
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Fix regression in Cargo.toml files
dev-dependencies need `default-features = false`, too.
* Bump parity-wasm dependency
* Bump `futures-preview`
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update Cargo.lock files
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/service/src/chain_ops.rs
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Give more information why conversion between native and runtime failed
This adds the SCALE error description to the error when the conversion
between native and runtime failed.
* Fixes tests
* Add some chainspec tests and make sure we validate it.
* Manual implementation of Extension + Forks definitions.
* Move chain spec to separate crate.
* Allow using ChainSpec with extensions.
* Renames.
* Implement Extension derive.
* Implement Extension for Forks.
* Support specifying fork blocks.
* make for_blocks work
* Support forks correctly.
* Add a bunch of docs.
* Make fork blocks optional.
* Add missing docs.
* Fix build.
* Use struct for check_block params.
* Fix tests?
* Clean up.
* always fetch epoch from runtime
* node integration tests don't test light nodes
* give stand-in full node a FULL role
* rejig babe APIs
* introduce next-epoch-descriptor type
* overhaul srml-BABE epoch logic
* ensure VRF outputs end up in the right epoch-randomness
* rewrite `do_initialize` to remove unnecessary loop
* begin accounting for next epoch in epoch function
* slots passes header to epoch_data
* pass slot_number to SlotWorker::epoch_data
* begin extracting epoch-change logic into its own module
* aux methods for block weight
* aux methods for genesis configuration
* comment-out most, refactor header-check pipeline
* mostly flesh out verifier again
* reinstantiate babe BlockImport implementation
* reinstate import-queue instantiation
* reintroduce slot-worker implementation
* reinstate pretty much all the rest
* move fork-choice logic to BlockImport
* fix some, but not all errors
* patch test-runtime
* make is_descendent of slightly more generic
* get skeleton compiling when passing is_descendent_of
* make descendent-of-builder more succinct
* restore ordering of authority_index / slot_number
* start fiddling with tests
* fix warnings
* improve initialization architecture and handle genesis
* tests use correct block-import
* fix BABE tests
* fix some compiler errors
* fix node-cli compilation
* all crates compile
* bump runtime versions and fix some warnings
* tweak fork-tree search implementation
* do backtracking search in fork-tree
* node-cli integration tests now work
* fix broken assumption in test_connectivity
* babe tests fail for the right reasons.
* test genesis epoch logic for epoch_changes
* test that epochs can change between blocks
* First BABE SRML test
* Testing infrastructure for BABE
Also includes a trivial additional test.
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* A little more test progress
* More work on BABE testing
* Try to get the tests working
* Implement `UintAuthorityId`-based test mocks
* Fix compilation errors
* Adjust to upstream changes
* Block numbers are ignored in BABE epoch calculation
* authority_index() should ignore invalid authorities
* Fix compile error
* Add tests that session transitions happen
* Check if BABE produces logs
It currently does not.
* Fix test suite
This was really nasty, due to a type confusion that showed up as an
off-by-1 buffer error.
* Add additional tests
Most of these were derived from the current output, so they are only
useful to guard against regressions.
* Make the tests more readable
Also bump impl_version.
* Fix excessive line width
* Remove unused imports
* Update srml/babe/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* try to fix imports
* Fix build errors in test suite
* tests did not pass
* Try to get at least one digest to be output
Currently, the code emits either no digests (if I don’t call
`Session::rotate_session()` or two digests (if I do), which is wrong.
* More tests
They still don’t work, but this should help debugging.
* fix silly error
* Don’t even try to compile a broken test
* remove broken check_epoch test and add one for genesis epoch
* Check that the length of the pre-digests is correct
* Bump `impl_version`
* use epoch_for_descendent_of even for genesis
* account for competing block 1s
* finish srml-babe docs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* address grumbles
* srml-system checks
* wip
* more modules compiles
* node-runtime checks
* build.sh passes
* include dispatch error in failed event
* revert some unnecessary changes
* refactor based on comments
* more compile error fixes
* avoid unnecessary into
* reorder code
* fixes some tests
* manually implement encode & decode to avoid i8 workaround
* more test fixes
* more fixes
* more error fixes
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* address comments
* test for DispatchError encoding
* tyep alias for democracy
* make error printable
* line width
* fix balances tests
* fix executive test
* fix system tests
* bump version
* ensure consistent method signature
* Apply suggestions from code review
Co-Authored-By: Gavin Wood <github@gavwood.com>
* changes based on review
* Add issue number for TODOs
* fix
* line width
* fix test
* Update core/sr-primitives/src/lib.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update core/sr-primitives/src/traits.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update srml/council/src/motions.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Update srml/council/src/motions.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* update based on review
* More concrete macro matching
* fix test build issue
* Update hex-literal dependency version. (#3141)
* Update hex-literal dep version.
* Update lock file.
* Start to rework the new error handling
* More work to get it back compiling
* Start to fix after master merge
* The great transaction error handling refactoring
* Make `decl_error` errors convertible to `&'static str`
* Make srml-executive build again
* Fix `sr-primitives` tests
* More fixes
* Last round of fix ups
* Fix build
* Fix build
* Apply suggestions from code review
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Rename some stuff
* Fixes after master merge
* Adds `CheckBlockGasLimit` signed extension
* Remove debug stuff
* Fix srml-balances test
* Rename `InvalidIndex` to `CannotLookup`
* Remove weird generic parameters
* Rename function again
* Fix import
* Document the signed extension
* Change from `Into` to `From`
* Update srml/contracts/src/lib.rs
Co-Authored-By: Sergei Pepyakin <sergei@parity.io>
* Fix compilation
* Update srml/contracts/src/lib.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Update core/sr-primitives/src/transaction_validity.rs
Co-Authored-By: Tomasz Drwięga <tomusdrw@users.noreply.github.com>
* Remove unused code
* Fix compilation
* Some cleanups
* Fix compile errors
* Make `TransactionValidity` a `Result`
* Apply suggestions from code review
Co-Authored-By: Gavin Wood <gavin@parity.io>
* Beautify the code a little bit and fix test
* Make `CannotLookup` an inherent error declared by `decl_error!`
* Adds some documentation
* Make `ApplyOutcome` a result
* Up the spec_version
* Apply suggestions from code review
Co-Authored-By: Gavin Wood <gavin@parity.io>
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Initial implementation, some redundancy is awkward and there is
some useless computation (but there is a pending pr for that).
Next are tests.
* Minimal tests and fix extend child.
* implement iterator for change child trie.
* prune child trie.
* Fix pruning test.
* bump spec version.
* Avoid empty child trie (could also be checked before)
* tabs.
* Fix child digest overriding each others.
* Restore doc deleted on merge.
* Check correct child value on extrinsics build.
* Revert runtime version update.
* generalize tree_root to remove client.backend dependency
* replace client.backend.blockchain.header with client.header
* move used_state_cache_size into client info
* Create intermediate Setup State. Fixes#1134
* remove client.backend from finality proof
* update node-template
* move memory backend into test helper mode
* move test helper into client
* starting the big refactor, remove unused functions
* apply_finality
* apply_finality
* replacing more .backend from environment with client directly
* remove .backend from grandpa by using traits
* remove .backend from babe
* remove .backend from tests where it is not needed
* remove .backend from tests
* fixing tests
* fixing tests
* fixing more tests
* fixing tests
* fix all forks test
* fix style
* fixing unnecessary allocation
* remove old test.
* fix service docs
* apply suggestion
* minor clean ups
* turns out the test-helper features actually is being used!
* fixing line length.
* fix line length
* minor cleaning
* Apply suggestions from code review
thanks, @Basti
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* address grumbles
* simplify finalize block on client
* move block back into inner function
* Apply suggestions from code review
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* use as.ref instead of match
* Update core/client/src/backend.rs
Co-Authored-By: DemiMarie-parity <48690212+DemiMarie-parity@users.noreply.github.com>
* Add ability to supply extra storage in test-client
* Don't use native_equivalent in tests.
* Get rid of native_equivalent
* Try to make fields private
* Apply Basti's suggestions
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* value range in blockchain cache
* revert me (testing for spurious failure)
* Revert "revert me (testing for spurious failure)"
This reverts commit 21a4a3cf5ee14e003541b779c41351e4f5e1122a.