- Add new crate `substrate-build-script-utils` to unify the code of
`node`, `node-template` and `polkadot-node`.
- The `node-cli` build script needs to search upwards for the
`.git/HEAD` file to find it.
* Move config path generation into the service config for reusability
* Make NoCostum Default and fix tests
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* remove function not used anymore
* Make path into an option
* remove database_path function and call it directly
* remove helper functions, use consts
* executor: Use non wasmi-specific execution in tests.
* executor: Move all runtime execution tests into tests file.
* executor: Use test_case macro to easily execute tests with different
Wasm execution methods.
* executor: Convert errors to strings with Display, not Debug.
* node-executor: Rewrite benchmarks with criterion.
They were not passing compilation before and criterion seems to be more
widely used in Substrate.
* executor: Begin implementation of Wasm runtime.
The implementation demonstrates the outline of the execution, but does
not link against the external host functions.
* executor: Define and implement basic FunctionExecutor.
The SandboxCapabilities::invoke is still left unimplemented.
* executor: Implement host function trampoline generation.
* executor: Instantiate and link runtime module to env module.
* executor: Provide input data during wasmtime execution.
* executor: Implement SandboxCapabilites::invoke for wasmtime executor.
* executor: Integrate and test wasmtime execution method.
* executor: Improve FunctionExecution error messages.
* Scope the unsafe blocks to be smaller.
* Rename TrampolineState to EnvState.
* Let EnvState own its own compiler instead of unsafe lifetime cast.
* Refactor out some common wasmi/wasmtime logic.
* Typos and cosmetic changes.
* More trampoline comments.
* Cargo.lock update.
* cli: CLI option for running Substrate with compiled Wasm execution.
* executor: Switch dependency from fork to official wasmtime repo.
* Quiet down cranelift logs.
* Explicitly catch panics during host calls.
We do this to ensure that panics do not cross language boundaries.
* Additional checks and clarifications in make_trampoline.
* Fixes after merge from master and panic safety for wasmtime
instantiation.
* Extract CLI to separate module in node/cli
* Make node/cli compile for WASM
* More work on node/cli browser
* More work on browser node
* More work
* More work
* Purge a bit the CI script
* More clean up
* Remove substrate-finality-grandpa from the CI
Its tests use tokio, which fails to compile.
* Address review
* Add rocksdb feature to the service
* Fix substrate-service WASM CI
* Apply suggestions from code review
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Don't WASM-compile substrate-service altogether
* grandpa: Write Grandpa authorities to well known key.
Instead of requiring execution proofs for Grandpa authorities, this
enables much simpler storage proofs.
* grandpa: Introduce named AuthorityList type.
* grandpa: Storage migration for srml-grandpa module.
* Remove no-longer-used GrandpaApi runtime API.
* grandpa: Write AuthorityList to storage with encoding version.
We expect the AuthorityList type may change (eg. key changes). To make
upgrades smoother, include a version in the stored value.
* Bump node runtime spec version.
* Update srml/grandpa/src/lib.rs
Co-Authored-By: André Silva <andre.beat@gmail.com>
* node: add sentry mode flag
* cli: extend docs on validator and sentry modes
* service: add missing field in test Configuration
* node: Display instead of Debug when printing node role
* Introduce new option "always force new era".
* Take appropriate action, even for small offences.
- Deselect the offender in all circumstances
- Ensure that deselection forces a new era
- Ensure that forcing a new era works with the always-forcing.
* Bump runtime
* Remove footgun around session keys/handlers
- `OpaqueKeys` now has an associated type `KeyTypeIdProviders`. This can
be used in the runtime as input for `SessionHandler` from the session
trait.
- `impl_opaque_keys` now works with modules and extracts the `KeyTypeId`
from the module directly.
- Added some checks to the `session` storage initialization that checks
that the `SessionHandler` and `Keys` use the same number of keys and
that the order is equal.
* Update core/sr-primitives/src/traits.rs
* initial version for testing
* New version that compiles
* optional at block parameter
* Fix some more view grumbles.
* Update srml/transaction-payment/src/lib.rs
The authority discovery module enables authorities to be discoverable
and discover other authorities to improve interconnection among them. In
order to achieve this the module needs to know when the authority set
changes, thus when a session changes.
One has to register a module as a *session handler* in order for it to
be notified of changing sessions. The order and number of these *session
handlers* **MUST** correspond to the order and number of the *session
keys*.
Commit 027d887 added the authority discovery to the `SessionHandlers`.
Given that the authority discovery module piggybacks on the Babe session
keys the commit violated the above constraint.
This commit reverts most of 027d887, leaving `core/authority-discovery`
and `srml/authority-discovery` untouched.
* Transaction pool watch intristics.
* Track extrinsic rpc methods.
* Test for pool watcher.
* Track extrinsic rpc test.
* Fix rpc naming.
* review fixes
* Update jsonrpc and use une subcription.
* Naming and dependencies.
* fix node-template
Use MultiSignature to maintain compatibility with substrate-node
Reset version to 1
Remove unused const
* fix chain_spec
* line width
* support: BuildStorage methods to take self reference.
There is no reason to consume the GenesisConfig when using it to
initialize a new storage backend. Instead, build_storage and
assimilate_storage now operator on self references.
* Bump node runtime impl_version.
* Now construct_runtime must include treasury config so account is created at genesis.
* if it doesn't though it is ok, account will be created when the amount put is more than existential deposit.
* Add SECP256k1/ECDSA support for transaction signing.
* Refactoring and fixes
* Fix for contracts
* Avoid breaking runtime host function
* Build fixes, make subkey work more generaically.
* Fix tests
* Dedpulicate a bit of code, remove unneeded code, docs
* Bump runtime version
* Fix a test and clean up some code.
* Derivation can derive seed.
* Whitespace
* Bump runtime again.
* Update core/primitives/src/crypto.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Update core/primitives/src/ecdsa.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Fix AppVerify
* Add RentPayment trait to runtime
* clarify check
* improve proof
* Clarify further
* Simplify RentPayment::on_unbalance calling and get rid of NonZeroRentHook
* Wasm-builder-runner unset `CARGO_TARGET_DIR` and release 1.0.4
`CARGO_TARGET_DIR` needs to be unset or otherwise cargo deadlocks,
because cargo always holds an exclusive lock on target dir.
* Commit missing version up
* Lock file
* Split up sr_arithmetic.rs
* Add some basic fuzzing
* Add more tests
* Add printing to fuzzing
* Clean things up
* Remove arbitrary
* Remove comments
* More cleaning, fix small error that was causing a panic
* Add rational128
* Remove old random tests
* introduce panic
* fuzzing should panic properly
* Bit of cleanup
* Add a test uncovered via fuzzing that fails!
* Few small changes
* Move sr-arithmetic to its own crate
* Fix fuzzing
* Got rid of fuzzer Cargo.lock
* Added no_std
* re-export assert_eq_error_rate
* bump impl and spec version
* re add convert into
* Add an ignore to the test
* Enabled benchmarking
* Reindent
* Clean up biguint fuzzer
* Clean up biguint more
* shuffle sr-primitives/traits about
* Remove unused dependencies
* Apply clippy suggestions
* upgrade primitive-types versions
* Run tests against num-bigint
* Get rid of allocation in assert_biguints_eq
* Add an optimisation to multiply_by_rational
* rename parts_per_x -> per_things
* Change fuzzer cargo.toml
* Remove allocation from BigUint PartialEq impl
* Remove accidental indentation
* Renmove Lazy and Convert traits
* Copy assert_eq_error_rate macro back to sr-primitives
* Add documentation to fuzzers
* fix sr-primitives assert_eq_error_rate
* add cfg(test)
* Update core/sr-arithmetic/src/traits.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Update core/sr-arithmetic/src/traits.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Update core/sr-arithmetic/fuzzer/src/biguint.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Allow rounding up in rational128
* Make changes to biguint.rs
* Update core/sr-arithmetic/src/traits.rs
Co-Authored-By: Kian Paimani <5588131+kianenigma@users.noreply.github.com>
* Final touches
* Convert to num_bigint::BigUint to compare
* remove unused mut
* more small changes
* shuffle sr-primitives trait imports
* more code review
* move assert_eq_error_rate to lib.rs
* Update core/sr-arithmetic/fuzzer/src/biguint.rs
Co-Authored-By: Bastian Köcher <bkchr@users.noreply.github.com>
* Get rid of S
* Simplify rational128 honggfuzz link
* Insignificantly change rational128 fuzzing code
* Slightly tidy up some of the arithmetic logic
* Get rid of sr_arithmetic again(?) and fix sr-primitives/weights
* Apply updates to sr_arithmetic.rs to crate
* fix child_storage_hash
* extract common implementation for ext and testing
* cleaning impl.
* replace ExtBasisMut by actual Ext
* remove extbasis.
* Update tests to use Ext from test externalities.
* use Ext constructor for getting ext from TestExternalities.
* Add missing extensions from ext.
* fix wasmi test
* Fix merge error.