* Implement runtime apis for fake runtime
These runtime api implementations are only used to make the compiler
think that we have implemented all required runtime apis. They will not
be called as we switch the executor to `WasmExecutor`. In the near
future we will not require these fake implementations anymore after
Substrate has shifted away from this compile time requirement.
This brings us the advantage that the `polkadot-service` doesn't need to
depend on the runtimes for getting the `RuntimeApi` type.
It also removes around 1min of build time on my machine ;)
* Fix warning
* FMT
* ".git/.scripts/commands/fmt/fmt.sh"
* Use more descriptive id
* Fix warnings
* Adapt path
* Fix 🙈
---------
Co-authored-by: command-bot <>
* companion for #13384
* adjust parsing RPC address from process output
* update rpc cli
* update lockfile for {"substrate"}
* bump zombienet v1.3.48
* bump zombienet version
* allow zombienet-tests-misc-upgrade-node to fail
* add comment and issue link to allowed_failure
* grumbles: disable failed job
* disabled the correct test
---------
Co-authored-by: parity-processbot <>
Co-authored-by: Javier Viola <javier@parity.io>
* Happy New Year!
* Remove year entierly
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Remove years from copyright notice in the entire repo
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Add clippy config and remove .cargo from gitignore
* first fixes
* Clippyfied
* Add clippy CI job
* comment out rusty-cachier
* minor
* fix ci
* remove DAG from check-dependent-project
* add DAG to clippy
Co-authored-by: alvicsam <alvicsam@gmail.com>
* Adjust to the new API
* Remove mutability
* Async constructor
* unwrap result
* do not panic
* suggestion
* leftover
* update lockfile for {"substrate"}
Co-authored-by: parity-processbot <>
* Add BlockBackend::requires_full_sync() implementation
* do not specify --pruning explicitly
* update lockfile for {"substrate"}
* Please re-run the CI
* Please re-run the CI
Co-authored-by: Roman Gafiyatullin <rg@rgmbp-16-m1.lan>
Co-authored-by: parity-processbot <>
* Align to changes in Substrate
* Align to the newest changes in substrate
* Rename `--disable-hardware-benchmarks` to `--no-hardware-benchmarks`
* Fix `polkadot-test-service` compilation
* Fix compilation of test parachains
* parity db subsystem without cache and no splitted column
* fmt
* fix path (auto from parity-db fail)
* lru cache for db column with cache
* Revert "lru cache for db column with cache"
This reverts commit ae177bc5e107a075eff6a21f651218ada6599b74.
* Write_lock mutex
* theoric code for bridges
* revert changes
* Revert bridge changes
* fix spec_version
* update parity db
* test purge-db
* Use specific ordered collection with paritydb.
* Revert "Use specific ordered collection with paritydb."
This reverts commit 8b66d0a4ae914cba1af0f44050d45dd6d9327c6b.
* fix chain selection tests.
* remove patch
* fix auto.
* Remove useless exists directory method
* purge chain without parity-db removal
* spellcheck
* renamings and filtering.
* fix assertion
* format
* update parity-db and fmt
* Auto keep using rocksdb when it exists.
* Revert "Auto keep using rocksdb when it exists."
This reverts commit cea49b32ae590bdce31fed5c45f3c028ae0c7564.
* Update kvdb version.
* seed commit for fatality based errors
* fatality
* first draft of fatality
* cleanup
* differnt approach
* simplify
* first working version for enums, with documentation
* add split
* fix simple split test case
* extend README.md
* update fatality impl
* make tests passed
* apply fatality to first subsystem
* fatality fixes
* use fatality in a subsystem
* fix subsystemg
* fixup proc macro
* fix/test: log::*! do not execute when log handler is missing
* fix spelling
* rename Runtime2 to something sane
* allow nested split with `forward` annotations
* add free license
* enable and fixup all tests
* use external fatality
Makes this more reviewable.
* bump fatality dep
Avoid duplicate expander compilations.
* migrate availability distribution
* more fatality usage
* chore: bump fatality to 0.0.6
* fixup remaining subsystems
* chore: fmt
* make cargo spellcheck happy
* remove single instance of `#[fatal(false)]`
* last quality sweep
* fixup
* Remove sleep and use polkadot test service
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* updates
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Fix other tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Run metrics tests separately
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* copy some substrate utilities
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* update runtime metric test
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Remove sleep from cli tests
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* cargo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Polkadot companion for Substrate#10463 (#4519)
* Grandpa and Beefy protocol names include chain id
Signed-off-by: acatangiu <adrian@parity.io>
* chain_spec: include fork id
* use simplified protocol name
* fix after merge
* avoid using hash default, even for protocol names
* update lockfile for substrate
Co-authored-by: parity-processbot <>
* configuration: Update upgrade validation delay doc (#4662)
* typo
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* review feedback
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* cargo lock
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* use testnet profile
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* Don't run with runtime-benchmark feature
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
* conditional compile up one level
Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
Co-authored-by: Sergei Shulepov <sergei@parity.io>
* start working on building the real overseer
Unfortunately, this fails to compile right now due to an upstream
failure to compile which is probably brought on by a recent upgrade
to rustc v1.47.
* fill in AllSubsystems internal constructors
* replace fn make_metrics with Metrics::attempt_to_register
* update to account for #1740
* remove Metrics::register, rename Metrics::attempt_to_register
* add 'static bounds to real_overseer type params
* pass authority_discovery and network_service to real_overseer
It's not straightforwardly obvious that this is the best way to handle
the case when there is no authority discovery service, but it seems
to be the best option available at the moment.
* select a proper database configuration for the availability store db
* use subdirectory for av-store database path
* apply Basti's patch which avoids needing to parameterize everything on Block
* simplify path extraction
* get all tests to compile
* Fix Prometheus double-registry error
for debugging purposes, added this to node/subsystem-util/src/lib.rs:472-476:
```rust
Some(registry) => Self::try_register(registry).map_err(|err| {
eprintln!("PrometheusError calling {}::register: {:?}", std::any::type_name::<Self>(), err);
err
}),
```
That pointed out where the registration was failing, which led to
this fix. The test still doesn't pass, but it now fails in a new
and different way!
* authorities must have authority discovery, but not necessarily overseer handlers
* fix broken SpawnedSubsystem impls
detailed logging determined that using the `Box::new` style of
future generation, the `self.run` method was never being called,
leading to dropped receivers / closed senders for those subsystems,
causing the overseer to shut down immediately.
This is not the final fix needed to get things working properly,
but it's a good start.
* use prometheus properly
Prometheus lets us register simple counters, which aren't very
interesting. It also allows us to register CounterVecs, which are.
With a CounterVec, you can provide a set of labels, which can
later be used to filter the counts.
We were using them wrong, though. This pattern was repeated in a
variety of places in the code:
```rust
// panics with an cardinality mismatch
let my_counter = register(CounterVec::new(opts, &["succeeded", "failed"])?, registry)?;
my_counter.with_label_values(&["succeeded"]).inc()
```
The problem is that the labels provided in the constructor are not
the set of legal values which can be annotated, but a set of individual
label names which can have individual, arbitrary values.
This commit fixes that.
* get av-store subsystem to actually run properly and not die on first signal
* typo fix: incomming -> incoming
* don't disable authority discovery in test nodes
* Fix rococo-v1 missing session keys
* Update node/core/av-store/Cargo.toml
* try dummying out av-store on non-full-nodes
* overseer and subsystems are required only for full nodes
* Reduce the amount of warnings on browser target
* Fix two more warnings
* InclusionInherent should actually have an Inherent module on rococo
* Ancestry: don't return genesis' parent hash
* Update Cargo.lock
* fix broken test
* update test script: specify chainspec as script argument
* Apply suggestions from code review
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* Update node/service/src/lib.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
* node/service/src/lib: Return error via ? operator
* post-merge blues
* add is_collator flag
* prevent occasional av-store test panic
* simplify fix; expand application
* run authority_discovery in Role::Discover when collating
* distinguish between proposer closed channel errors
* add IsCollator enum, remove is_collator CLI flag
* improve formatting
* remove nop loop
* Fix some stuff
Co-authored-by: Andronik Ordian <write@reusable.software>
Co-authored-by: Bastian Köcher <git@kchr.de>
Co-authored-by: Fedor Sakharov <fedor.sakharov@gmail.com>
Co-authored-by: Robert Habermeier <robert@Roberts-MBP.lan1>
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: Max Inden <mail@max-inden.de>
* Use tempdir for tests
* Rename tmp to tempdir
* Update Cargo.lock
* Update expect error message in run_command_and_kill
* Call with .path() rather than creating an string slice
* Call tempdir with arg instead of args
* Update tests/purge_chain_works.rs
Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Make sure that --dev purge-chain is rejected
```
[0] [11:24:02] ~/r/polkadot master > ./target/debug/polkadot purge-chain --dev -y
"/home/cecile/.local/share/polkadot/chains/dev/db" did not exist.
[0] [11:25:36] ~/r/polkadot cecton-fix-invalid-argument-order > ./target/debug/polkadot --dev purge-chain -y
error: Found argument 'purge-chain' which wasn't expected, or isn't valid in this context
USAGE:
polkadot --dev
For more information try --help
```