* sc-tracing: Only print events for whitelisted targets
We should only print events for whitelisted targets, otherwise we may run into some stack overflow
while printing the event.
* Update client/tracing/src/lib.rs
Co-authored-by: Koute <koute@users.noreply.github.com>
* Fix
---------
Co-authored-by: Koute <koute@users.noreply.github.com>
* frame-benchmarking-cli: Remove native dispatch requirement
No need for this, we can just use the `WasmExecutor` directly.
* Fixes
* Pass benchmarking host functions
* Ensure we can pass custom host functions
This improves the reporting of invalid boot nodes. First, it will only report each boot node once
as invalid and not every time we try to connect to the node. Second, the node will only report for
addresses that we added as startup and not for addresses of the boot node that the node learned from
other nodes.
Closes: https://github.com/paritytech/substrate/issues/13584
Closes: https://github.com/paritytech/polkadot/issues/7385
* expose kademlia replication factor through node CLI
* set default CLI flag value for kademlia_replication_factor
Co-authored-by: Bastian Köcher <git@kchr.de>
* wrap CLI value as Option
* make kademlia replication factor non-optional
---------
Co-authored-by: Bastian Köcher <git@kchr.de>
Test was using too small a timeout of 250ms to verify equivocation is reported.
If the test machine is loaded with many async tasks running, the voters work
and subsequent gossiping does not fit within the 250ms window.
Do multiple tries to verify equivocation reporting with exponential timeouts,
most times it will be within 250ms, but the test will retry several times up
to 5seconds total before giving up.
Signed-off-by: Adrian Catangiu <adrian@parity.io>
* [frame/im-online] remove `external_addresses` from heartbeats
Users should use DHT for discovering new nodes. The reason for adding external addresses was
unstable work of authority discovery (see https://github.com/paritytech/substrate/issues/2719),
which is now stable. Hence we can safely remove `external_addresses`.
Refs https://github.com/paritytech/polkadot/issues/7181
* remove unused import
* run benchmark
* remove external_addresses from offchain NetworkState
* add missing fn to TestNetwork
* Revert "run benchmark"
This reverts commit a282042c2d6bf8bae2c383f6e2699c3fe2970a3d.
* update weights
* address @bkchr comments
* remove duplicate fn
* cleanup benchmarking.rs
* fix executor tests
* remove peer_id from hearbeat as well
https://github.com/paritytech/substrate/pull/14251#discussion_r1210887220
* remove MaxPeerDataEncodingSize
* change storage value type to `()`
https://github.com/paritytech/substrate/pull/14251#discussion_r1214268931
* scaffold storage migration
* no need to check the type actually
* remove unnecessary types from v0 mod
* add a test for migration
* expose Config types
+ pre_upgrade and post_upgrade working fn
* fix test
* replace dummy type with ConstU32
* add some comments to migration test
* fix comment
* respond to @bkchr comments
* use BoundedOpaqueNetworkState::default
intead of using default for each field
* sc-executor-wasmtime: Do not use absolute path to `Cargo.toml` in test
As the test is executed inside the workspace, `cargo metadata` will automatically detect the correct
`Cargo.toml`. This is required for the mono repo.
* ".git/.scripts/commands/fmt/fmt.sh"
---------
Co-authored-by: command-bot <>
* Make block sync service customizable
This change allows user to have their own network block logic, for example, we'd like to disable
the builtin block sync service when using another syncing approach.
* Remove unnecessary Box
* Revert network_block
* Expose build_system_rpc_future() and TransactionPoolAdaptor
* fmt
* Make offchain tx pool creation reusable
Introduces an `OffchainTransactionPoolFactory` for creating offchain transactions pools that can be
registered in the runtime externalities context. This factory will be required for a later pr to
make the creation of offchain transaction pools easier.
* Update client/transaction-pool/api/src/lib.rs
Co-authored-by: Anton <anton.kalyaev@gmail.com>
---------
Co-authored-by: Anton <anton.kalyaev@gmail.com>
* wasm-builder: Enforce `runtime_version` wasm section
This pr changes the `wasm-builder` to enforce the `runtime_version` wasm section. This wasm section
is being created by the `sp_version::runtime_version` attribute macro. This attribute macro now
exists since quite some time and `runtime_version` also is the only way for parachains to support
reading the `RuntimeVersion` from the runtime.
\# Disabling the check
By default the `WasmBuilder` will now check for this wasm section and if not found, exit with an
error. However, there are situations where you may want to disable this check (like for tests). In
this case there exists the `disable_runtime_version_section_check` function.
```
WasmBuilder::new()
...
...
...
.disable_runtime_version_section_check()
.build()
```
By using this method you get back the old behavior.
* Review comment
* Fix
* Fix issue with `enum-as-inner`
* Don't start evicting peers right after `SyncingEngine` is started
Parachain collators may need to wait to receive a relaychain block before
they can start producing blocks which can cause `SyncingEngine` to
incorrectly evict them.
When `SyncingEngine` is started, wait 2 minutes before the eviction is
activated to give collators a chance to produce a block.
* fix doc
* Use `continue` instead of `break`
* Trigger CI
---------
Co-authored-by: parity-processbot <>
BEEFY consensus can be restarted by resetting "genesisBlock" in
pallet-beefy, but we don't want to also reset authority set IDs so
that they are uniquely identified across the entire chain history
regardless of how many times BEEFY consensus has been reset/restarted.
This is why the client now also accepts initial authority_set_id != 0.
BEEFY client now detects pallet-beefy reset/reinit and errors-out and
asks for a restart.
BEEFY client persisted state should be discarded on client restarts
following pallet-beefy reset/reinit.
End result is BEEFY client/voter can now completely reinitialize using
"new" on-chain info following pallet-beefy reset/reinit, discarding old state.
Fixes#14203Fixes#14204
Signed-off-by: acatangiu <adrian@parity.io>
* HoldReason: Improve usage
`HoldReason` was switched recently to use the `composite_enum` attribute that will merge the enums
from all pallets in the runtime to `RuntimeHoldReason`. `pallet-nis` was still requiring that the
variant was passed as constant to call `hold`. The proper implementation is to use the `HoldReason`
from inside the pallet directly when calling `hold`. This is done by adding a `RuntimeHoldReason` as
type to the `Config` trait and requiring that `Currency` is using the same reason. Besides that the
pr changes the name `HoldIdentifier` in `pallet_balances::Config` to `RuntimeHoldReason`.
* Update frame/nis/src/lib.rs
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* Review comment
* Fixes
---------
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
* RevertCmd: Expose database params via CLI
This exposes the database params for the `RevertCmd` via CLI. So, users can use `revert` with ParityDb.
* ".git/.scripts/commands/fmt/fmt.sh"
---------
Co-authored-by: command-bot <>