* handle executor should_panic test better
* Revert "reduce should panic, due to extended error messages"
This reverts commit c0805940184a62cd9302603ad911c3591e70a60c.
* remove excessive constraints
* remove duplicate documentation messages for error variants
* reduce T: constraints to the abs minimum
* whoops
* fewer bounds again
Co-authored-by: Bernhard Schuster <bernhard@parity.io>
* Log outgoing notifications too
* Update client/network/src/protocol/generic_proto/handler.rs
Co-authored-by: Max Inden <mail@max-inden.de>
Co-authored-by: Addie Wagenknecht <addie@nortd.com>
Co-authored-by: Max Inden <mail@max-inden.de>
* chore/error: remove from str conversion and add deprecation notifications
* fixup changes
* fix test looking for gone ::Msg variant
* another test fix
* one is duplicate, the other is not, so duplicates reported are n-1
* darn spaces
Co-authored-by: Andronik Ordian <write@reusable.software>
* remove pointless doc comments of error variants without any value
* low hanging fruits (for a tall person)
* moar error type variants
* avoid the storage modules for now
They are in need of a refactor, and the pain is rather large
removing all String error and DefaultError occurences.
* chore remove pointless error generic
* fix test for mocks, add a bunch of non_exhaustive
* max line width
* test fixes due to error changes
* fin
* error outputs... again
* undo stderr adjustments
* Update client/consensus/slots/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* remove closure clutter
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* more error types
* introduce ApiError
* extract Mock error
* ApiError refactor
* even more error types
* the last for now
* chore unused deps
* another extraction
* reduce should panic, due to extended error messages
* error test happiness
* shift error lines by one
* doc tests
* white space
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Into -> From
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* remove pointless codec
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* avoid pointless self import
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Bernhard Schuster <bernhard@parity.io>
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Remove `RpcMetrics` weirdness
The metrics was returning an error when prometheus was not given. This
was a really weird setup, especially when compared to all other metrics
that just do nothing if there is no registry.
* Fix browser build
* Inform sync explicitly about new best block
Instead of "fishing" the new best block out of the processed blocks, we
now tell sync directly that there is a new best block. It also makes
sure that we update the corresponding sync handshake to the new best
block. This is required for parachains as they first import blocks and
declare the new best block after being made aware of it by the relay chain.
* Adds test
* Make sure async stuff had time to run
* pallet-contracts: Fix seal_restore_to to output proper module errors
Those errors where part of the decl_error for some time but where
never actually returned. This allows proper debugging of failed
restorations. Previously, any error did return the misleading
`ContractTrapped`.
* Bind UncheckedFrom<T::Hash> + AsRef<[u8]> everywhere
This allows us to make assumptions about the AccoutId
that are necessary for testing and in order to benchmark
the module properly.
This also groups free standing functions into inherent functions
in order to minimize the places where the new bounds need to
be specified.
* Rework contract address determination
* Do not allow override by runtime author
* Instantiate gained a new parameter "salt"
This change is done now in expecation of the upcoming code rent
which needs to change the instantiation dispatchable and
host function anyways.
The situation in where we have only something that is like CREATE2
makes it impossible for UIs to help the user to create an arbitrary
amount of instantiations from the same code.
With this change we have the same functionality as ethereum with
a CREATE and CREATE2 instantation semantic.
* Remove TrieIdGenerator
The new trait bounds allows us to remove this workaround
from the configuration trait.
* Remove default parameters for config trait
It should be solely the responsiblity to determine proper values for
these parameter. As a matter of fact most runtime weren't using these
values anyways.
* Fix tests for new account id type
Because of the new bounds on the trait tests can't get away by using
u64 as accound id. Replacing the 8 byte value by a 32 byte value
creates out quite a bit of code churn.
* Fix benchmarks
The benchmarks need adaption to the new instantiate semantics.
* Fix compile errors caused by adding new trait bounds
* Fix compile errors caused by renaming storage and rent functions
* Adapt host functions and dispatchables to the new salt
* Add tests for instantiate host functions (was not possible before)
* Add benchmark results
* Adapt to the new WeightInfo
The new benchmarks add a new parameter for salt "s" to the instantiate weights
that needs to be applied.
* Fix deploying_wasm_contract_should_work integration test
This test is adapted to use the new instantiate signature.
* Break overlong line
* Break more long lines
Co-authored-by: Parity Benchmarking Bot <admin@parity.io>
* Build every wasm crate in its own project with wasm-builder
Building all wasm crates in one workspace was a nice idea, however it
just introduced problems:
1. We needed to prune old members, but this didn't worked for old git
deps.
2. We locked the whole wasm workspace while building one crate. This
could lead to infinitely locking the workspace on a crash.
Now we just build every crate in its own project, this means we will
build the dependencies multiple times. While building the dependencies
multiple times, we still decrease the build time by around 30 seconds
for Polkadot and Substrate because of the new parallelism ;)
* Remove the requirement on wasm-builder-runner
This removes the requirement on wasm-builder-runner by using the new
`build_dep` feature of cargo. We use nightly anyway and that enables us
to use this feature. This solves the problem of not mixing
build/proc-macro deps with normal deps. By doing this we get rid off
this complicated project structure and can depend directly on
`wasm-builder`. This also removes all the code from wasm-builder-runner
and mentions that it is deprecated.
* Copy the `Cargo.lock` to the correct folder
* Remove wasm-builder-runner
* Update docs
* Fix deterministic check
Modified-by: Bastian Köcher <git@kchr.de>
* Try to make the ui test happy
* Switch to `SKIP_WASM_BUILD`
* Rename `SKIP_WASM_BINARY` to the correct name...
* Update utils/wasm-builder/src/builder.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* Update utils/wasm-builder/src/builder.rs
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
* client/authority-discovery: Publish and query on exponential interval
When a node starts up publishing and querying might fail due to various
reasons, for example due to being not yet fully bootstrapped on the DHT.
Thus one should retry rather sooner than later. On the other hand, a
long running node is likely well connected and thus timely retries are
not needed. For this reasoning use an exponentially increasing interval
for `publish_interval`, `query_interval` and
`priority_group_set_interval` instead of a constant interval.
* client/authority-discovery/src/interval.rs: Add license header
* .maintain/gitlab: Ensure adder collator tests are run on CI
* More extensible multiaddress format
* update name
* Don't depend on indices to define multiaddress type
* Use MultiAddress in Node Template too!
* reduce traits, fix build
* support multiple `StaticLookup`
* bump tx version
* feedback