Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Update CI image with rust 1.81.0 and 2024-09-11 #5676

Merged
merged 102 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
195f96f
[ci] Update CI image with rust 1.81.0 and 2024-09-11
alvicsam Sep 11, 2024
7460c42
".git/.scripts/commands/fmt/fmt.sh"
Sep 11, 2024
f3d3aea
Merge branch 'master' into as-upd-rust
mordamax Sep 11, 2024
a4c861f
fix try runtime usage in frame-support
gui1117 Aug 30, 2024
96f2bfc
Prepare for Rust 1.81
ggwpez Sep 11, 2024
f676227
Clippy
ggwpez Sep 11, 2024
6047445
Fix test
ggwpez Sep 11, 2024
2702d29
More
ggwpez Sep 11, 2024
46a51ca
More
ggwpez Sep 11, 2024
2006bde
More
ggwpez Sep 11, 2024
2f4a493
Clippy
ggwpez Sep 11, 2024
94c4d37
Merge remote-tracking branch 'origin/master' into as-upd-rust
ggwpez Sep 12, 2024
89a168d
fix
ggwpez Sep 12, 2024
5b06b9d
try again
ggwpez Sep 12, 2024
2b1a759
next try
ggwpez Sep 12, 2024
3d3d6d8
Fix weights
ggwpez Sep 17, 2024
2da0f7b
Remove no_show_duration from BlockImportedCandidates
ggwpez Sep 17, 2024
a7c80f8
Remove unused tests
ggwpez Sep 17, 2024
f9b9648
fmt
ggwpez Sep 17, 2024
0cae551
Remove prepare_stats from ArtifactState
ggwpez Sep 17, 2024
6f8b4e4
Remove PrepareWorkerResult from Outcome::RenameTmpFile
ggwpez Sep 17, 2024
4df574a
Remove session_data from CacheSizes
ggwpez Sep 17, 2024
6ab0a78
Remove unused file
ggwpez Sep 17, 2024
7af8a10
Remove id from ProvedValidator
ggwpez Sep 17, 2024
a8f5783
Remove PeerId from sc-network BehaviourOut
ggwpez Sep 17, 2024
1d22e28
Remove unused fields from litep2p DiscoveryEvent
ggwpez Sep 17, 2024
364d0ad
Remove inbound from sc-network NotificationsOut
ggwpez Sep 17, 2024
784cb3c
sc-network: Delete unused module
ggwpez Sep 17, 2024
47eca24
Merge remote-tracking branch 'origin/master' into as-upd-rust
ggwpez Sep 17, 2024
35c96fc
fmt
ggwpez Sep 17, 2024
d434b3a
Fix build_profile feature
ggwpez Sep 18, 2024
8f84a2a
Delete unused code
ggwpez Sep 18, 2024
7d6e682
Remove duplicate feature gates
ggwpez Sep 18, 2024
f5bd317
Temporarily try with dead_code
ggwpez Sep 18, 2024
81dde13
Merge remote-tracking branch 'origin/master' into as-upd-rust
ggwpez Sep 18, 2024
10b3682
Temporarily try with dead_code
ggwpez Sep 18, 2024
b548dbe
Supress in test
ggwpez Sep 18, 2024
54861b3
DNM: Remove DWarnings flag to see all warnings at once
ggwpez Sep 18, 2024
f3adc3d
Revert "DNM: Remove DWarnings flag to see all warnings at once"
ggwpez Sep 18, 2024
504418a
Delete unused code
ggwpez Sep 18, 2024
d8c9e87
Delete tests with bls-experimental feature since that does not exist
ggwpez Sep 18, 2024
dba150d
Simplify TestNetworkEvent
ggwpez Sep 18, 2024
a04f70c
Fixup test
ggwpez Sep 18, 2024
0edd1e0
Clippy map->inspect
ggwpez Sep 18, 2024
8aa57b1
Fix
ggwpez Sep 18, 2024
f4b1c4a
Remove unused test code
ggwpez Sep 18, 2024
9edac7a
Update substrate/utils/wasm-builder/src/wasm_project.rs
ggwpez Sep 18, 2024
d185393
Update substrate/utils/frame/benchmarking-cli/build.rs
ggwpez Sep 18, 2024
956fc46
Update substrate/utils/frame/benchmarking-cli/build.rs
ggwpez Sep 18, 2024
2248c8a
Remove unused struct and trait
ggwpez Sep 18, 2024
4c4c3a3
messages-relay: Remove stuff from RelayReference etc
ggwpez Sep 18, 2024
d1c8045
sc-network: remove more
ggwpez Sep 18, 2024
0d40efb
Fixup frame-procedural
ggwpez Sep 18, 2024
a500e2c
pallet-contracts: remove unused field
ggwpez Sep 18, 2024
c7749b9
keep FIXME on buggy test
ggwpez Sep 18, 2024
7ba5dc7
fmt
ggwpez Sep 18, 2024
373beb6
Merge remote-tracking branch 'origin/as-upd-rust' into as-upd-rust
ggwpez Sep 18, 2024
9e14b6c
sc-network: remove more
ggwpez Sep 18, 2024
ed2a8ba
test fix
ggwpez Sep 18, 2024
4041c50
pallet-contracts: remove unsued code_len fn
ggwpez Sep 18, 2024
dbe084a
see if it works without dead_code
ggwpez Sep 18, 2024
d03cf7d
clippy
ggwpez Sep 18, 2024
88462de
clippy
ggwpez Sep 19, 2024
ab78ab7
needs deadcode
ggwpez Sep 19, 2024
31d2343
Update UI tests
ggwpez Sep 19, 2024
9decbcb
Clippy
ggwpez Sep 19, 2024
373dfaf
Add manual Debug impl for GrandpaJustification
ggwpez Sep 19, 2024
408e60e
Use where clause in Runtime API to make clippy happy
ggwpez Sep 19, 2024
0879b8f
fmt toml
ggwpez Sep 19, 2024
f5646ee
fix rust doc
ggwpez Sep 19, 2024
8890001
fix
ggwpez Sep 19, 2024
a062000
doctest
ggwpez Sep 19, 2024
0723ec2
Allow dead code in overseer because of orchestra bug
ggwpez Sep 20, 2024
96d65e5
Ignore doctest that was probably never executed anyway
ggwpez Sep 20, 2024
c083dac
Merge branch 'master' into as-upd-rust
ggwpez Sep 20, 2024
b714170
prdoc
ggwpez Sep 20, 2024
da228d5
Fix mmr benchmark
ggwpez Sep 21, 2024
ea4544d
Fix mmr benchmark
ggwpez Sep 21, 2024
677d92c
Add 'pause' syscall to execute worker whitelist
ggwpez Sep 21, 2024
22d8d3c
Update UI tests
ggwpez Sep 21, 2024
37f082f
fix trybuild for sp-api
ggwpez Sep 21, 2024
1652b4a
Add 'pause' syscall to prepare worker whitelist
ggwpez Sep 21, 2024
d1968f0
unused import
ggwpez Sep 23, 2024
3c52726
make py script less verbose
ggwpez Sep 23, 2024
dce585b
Add PrDoc (auto generated)
ggwpez Sep 23, 2024
3effb47
Merge remote-tracking branch 'origin/as-upd-rust' into as-upd-rust
ggwpez Sep 23, 2024
cf54652
fix prdoc script and docs
ggwpez Sep 23, 2024
91f5afd
fix other prdocs
ggwpez Sep 23, 2024
751ec26
more clippy
ggwpez Sep 23, 2024
55e30e7
Debug UI test
ggwpez Sep 23, 2024
8fef197
fix update-ui-tests script
ggwpez Sep 23, 2024
60e50b2
fix ui tests again
ggwpez Sep 23, 2024
7a59493
Merge branch 'master' into as-upd-rust
ggwpez Sep 25, 2024
e954965
Merge branch 'master' into as-upd-rust
ggwpez Sep 25, 2024
fbf2825
bp-messages: fix feature gates
ggwpez Sep 26, 2024
b9254a2
Merge branch 'master' into as-upd-rust
ggwpez Sep 26, 2024
70097cb
Run ONLY ui tests in the UI CI check
ggwpez Sep 26, 2024
007527a
fmt
ggwpez Sep 26, 2024
b19c684
Merge branch 'master' into as-upd-rust
ggwpez Sep 26, 2024
7b74876
fix prdoc
ggwpez Sep 26, 2024
e14a466
Merge branch 'master' into as-upd-rust
ggwpez Sep 26, 2024
d24475d
fmt
ggwpez Sep 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.77.0-2024-04-10-v202407161507"
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-09-11-v202409111034"
6 changes: 1 addition & 5 deletions .github/scripts/generate-prdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def create_prdoc(pr, audience, title, description, patch, bump, force):
# Go up until we find a Cargo.toml
p = os.path.join(workspace.path, p)
while not os.path.exists(os.path.join(p, "Cargo.toml")):
print(f"Could not find Cargo.toml in {p}")
if p == '/':
exit(1)
p = os.path.dirname(p)
Expand All @@ -76,7 +75,6 @@ def create_prdoc(pr, audience, title, description, patch, bump, force):
manifest = toml.load(f)

if not "package" in manifest:
print(f"File was not in any crate: {p}")
continue

crate_name = manifest["package"]["name"]
Expand All @@ -85,8 +83,6 @@ def create_prdoc(pr, audience, title, description, patch, bump, force):
else:
print(f"Skipping unpublished crate: {crate_name}")

print(f"Modified crates: {modified_crates.keys()}")

for crate_name in modified_crates.keys():
entry = { "name": crate_name }

Expand Down Expand Up @@ -137,4 +133,4 @@ def main(args):

if __name__ == "__main__":
args = setup_parser().parse_args()
main(args)
main(args)
8 changes: 4 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- name: script
run: |
forklift cargo clippy --all-targets --locked --workspace
forklift cargo clippy --all-targets --all-features --locked --workspace
forklift cargo clippy --all-targets --locked --workspace --quiet
forklift cargo clippy --all-targets --all-features --locked --workspace --quiet
check-try-runtime:
runs-on: ${{ needs.preflight.outputs.RUNNER }}
needs: [preflight]
Expand All @@ -46,13 +46,13 @@ jobs:
- uses: actions/checkout@6d193bf28034eafb982f37bd894289fe649468fc # v4.1.7
- name: script
run: |
forklift cargo check --locked --all --features try-runtime
forklift cargo check --locked --all --features try-runtime --quiet
# this is taken from cumulus
# Check that parachain-template will compile with `try-runtime` feature flag.
forklift cargo check --locked -p parachain-template-node --features try-runtime
# add after https://github.com/paritytech/substrate/pull/14502 is merged
# experimental code may rely on try-runtime and vice-versa
forklift cargo check --locked --all --features try-runtime,experimental
forklift cargo check --locked --all --features try-runtime,experimental --quiet
# check-core-crypto-features works fast without forklift
check-core-crypto-features:
runs-on: ${{ needs.preflight.outputs.RUNNER }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/command-prdoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ on:
- "Runtime Dev"
- "Runtime User"
- "Node Dev"
- "Node User"
- "Node Operator"
overwrite:
type: choice
description: Overwrite existing PrDoc
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests-linux-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet

test-linux-stable:
needs: [preflight]
Expand Down Expand Up @@ -91,12 +91,13 @@ jobs:
--locked \
--release \
--no-fail-fast \
--cargo-quiet \
--features try-runtime,experimental,riscv,ci-only-tests \
--partition count:${{ matrix.partition }}
# run runtime-api tests with `enable-staging-api` feature on the 1st node
- name: runtime-api tests
if: ${{ matrix.partition == '1/3' }}
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api
run: forklift cargo nextest run -p sp-api-test --features enable-staging-api --cargo-quiet

confirm-required-jobs-passed:
runs-on: ubuntu-latest
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/tests-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,22 @@ jobs:
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: 1
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
SKIP_WASM_BUILD: 1
# Ensure we run the UI tests.
RUN_UI_TESTS: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: |
forklift cargo test --locked -q --profile testnet -p frame-support-test --features=frame-feature-testing,no-metadata-docs,try-runtime,experimental
forklift cargo test --locked -q --profile testnet -p frame-support-test --features=frame-feature-testing,frame-feature-testing-2,no-metadata-docs,try-runtime,experimental
forklift cargo test --locked -q --profile testnet -p xcm-procedural
forklift cargo test --locked -q --profile testnet -p frame-election-provider-solution-type
forklift cargo test --locked -q --profile testnet -p sp-api-test
cargo version
forklift cargo test --locked -q --profile testnet -p frame-support-test --features=frame-feature-testing,no-metadata-docs,try-runtime,experimental ui
forklift cargo test --locked -q --profile testnet -p frame-support-test --features=frame-feature-testing,frame-feature-testing-2,no-metadata-docs,try-runtime,experimental ui
forklift cargo test --locked -q --profile testnet -p xcm-procedural ui
forklift cargo test --locked -q --profile testnet -p frame-election-provider-solution-type ui
forklift cargo test --locked -q --profile testnet -p sp-api-test ui
# There is multiple version of sp-runtime-interface in the repo. So we point to the manifest.
forklift cargo test --locked -q --profile testnet --manifest-path substrate/primitives/runtime-interface/Cargo.toml
forklift cargo test --locked -q --profile testnet --manifest-path substrate/primitives/runtime-interface/Cargo.toml ui

test-deterministic-wasm:
timeout-minutes: 20
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet
run: forklift cargo run --locked --release -p staging-node-cli --bin substrate-node --features runtime-benchmarks --quiet -- benchmark pallet --chain dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1 --quiet

# cf https://github.com/paritytech/polkadot-sdk/issues/1652
test-syscalls:
Expand All @@ -52,7 +52,7 @@ jobs:
- name: script
id: test
run: |
forklift cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin polkadot-execute-worker --bin polkadot-prepare-worker
forklift cargo build --locked --profile production --target x86_64-unknown-linux-musl --bin polkadot-execute-worker --bin polkadot-prepare-worker --quiet
cd polkadot/scripts/list-syscalls
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-execute-worker --only-used-syscalls | diff -u execute-worker-syscalls -
./list-syscalls.rb ../../../target/x86_64-unknown-linux-musl/production/polkadot-prepare-worker --only-used-syscalls | diff -u prepare-worker-syscalls -
Expand All @@ -75,4 +75,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: script
run: forklift cargo check --all --benches
run: forklift cargo check --all --benches --quiet
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ workflow:
- if: $CI_COMMIT_BRANCH

variables:
CI_IMAGE: !reference [.ci-unified, variables, CI_IMAGE]
# CI_IMAGE: !reference [ .ci-unified, variables, CI_IMAGE ]
CI_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-09-11-v202409111034"
# BUILDAH_IMAGE is defined in group variables
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ default-members = [
[workspace.lints.rust]
suspicious_double_ref_op = { level = "allow", priority = 2 }
# `substrate_runtime` is a common `cfg` condition name used in the repo.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(substrate_runtime)'] }
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(build_opt_level, values("3"))', 'cfg(build_profile, values("debug", "release"))', 'cfg(enable_alloc_error_handler)', 'cfg(fuzzing)', 'cfg(substrate_runtime)'] }

[workspace.lints.clippy]
all = { level = "allow", priority = 0 }
Expand Down
4 changes: 1 addition & 3 deletions bridges/modules/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,15 +728,13 @@ pub mod pallet {
init_params;
let authority_set_length = authority_list.len();
let authority_set = StoredAuthoritySet::<T, I>::try_new(authority_list, set_id)
.map_err(|e| {
.inspect_err(|_| {
log::error!(
target: LOG_TARGET,
"Failed to initialize bridge. Number of authorities in the set {} is larger than the configured value {}",
authority_set_length,
T::BridgedChain::MAX_AUTHORITIES_COUNT,
);

e
})?;
let initial_hash = header.hash();

Expand Down
40 changes: 20 additions & 20 deletions bridges/modules/xcm-bridge-hub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,14 @@ pub mod pallet {
bridge.deposit,
Precision::BestEffort,
)
.map_err(|e| {
.inspect_err(|e| {
// we can't do anything here - looks like funds have been (partially) unreserved
// before by someone else. Let's not fail, though - it'll be worse for the caller
log::error!(
target: LOG_TARGET,
"Failed to unreserve during the bridge {:?} closure with error: {e:?}",
locations.bridge_id(),
);
e
})
.ok()
.unwrap_or(BalanceOf::<ThisChainOf<T, I>>::zero());
Expand Down Expand Up @@ -1456,25 +1455,26 @@ mod tests {
let lane_id = TestLaneIdType::try_new(1, 2).unwrap();
let lane_id_mismatch = TestLaneIdType::try_new(3, 4).unwrap();

let test_bridge_state = |id,
bridge,
(lane_id, bridge_id),
(inbound_lane_id, outbound_lane_id),
expected_error: Option<TryRuntimeError>| {
Bridges::<TestRuntime, ()>::insert(id, bridge);
LaneToBridge::<TestRuntime, ()>::insert(lane_id, bridge_id);

let lanes_manager = LanesManagerOf::<TestRuntime, ()>::new();
lanes_manager.create_inbound_lane(inbound_lane_id).unwrap();
lanes_manager.create_outbound_lane(outbound_lane_id).unwrap();
let test_bridge_state =
|id,
bridge,
(lane_id, bridge_id),
(inbound_lane_id, outbound_lane_id),
expected_error: Option<TryRuntimeError>| {
Bridges::<TestRuntime, ()>::insert(id, bridge);
LaneToBridge::<TestRuntime, ()>::insert(lane_id, bridge_id);

let result = XcmOverBridge::do_try_state();
if let Some(e) = expected_error {
assert_err!(result, e);
} else {
assert_ok!(result);
}
};
let lanes_manager = LanesManagerOf::<TestRuntime, ()>::new();
lanes_manager.create_inbound_lane(inbound_lane_id).unwrap();
lanes_manager.create_outbound_lane(outbound_lane_id).unwrap();

let result = XcmOverBridge::do_try_state();
if let Some(e) = expected_error {
assert_err!(result, e);
} else {
assert_ok!(result);
}
};
let cleanup = |bridge_id, lane_ids| {
Bridges::<TestRuntime, ()>::remove(bridge_id);
for lane_id in lane_ids {
Expand Down
15 changes: 13 additions & 2 deletions bridges/primitives/header-chain/src/justification/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub use verification::{

use bp_runtime::{BlockNumberOf, Chain, HashOf, HeaderId};
use codec::{Decode, Encode, MaxEncodedLen};
use frame_support::RuntimeDebugNoBound;
use scale_info::TypeInfo;
use sp_consensus_grandpa::{AuthorityId, AuthoritySignature};
use sp_runtime::{traits::Header as HeaderT, RuntimeDebug, SaturatedConversion};
Expand All @@ -43,7 +42,8 @@ use sp_std::prelude::*;
///
/// This particular proof is used to prove that headers on a bridged chain
/// (so not our chain) have been finalized correctly.
#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo, RuntimeDebugNoBound)]
#[derive(Encode, Decode, Clone, PartialEq, Eq, TypeInfo)]
#[cfg_attr(feature = "std", derive(Debug))]
pub struct GrandpaJustification<Header: HeaderT> {
/// The round (voting period) this justification is valid for.
pub round: u64,
Expand All @@ -54,6 +54,17 @@ pub struct GrandpaJustification<Header: HeaderT> {
pub votes_ancestries: Vec<Header>,
}

// A proper Debug impl for no-std is not possible for the `GrandpaJustification` since the `Commit`
// type only implements Debug that for `std` here:
// https://github.com/paritytech/finality-grandpa/blob/8c45a664c05657f0c71057158d3ba555ba7d20de/src/lib.rs#L275
// so we do a manual impl.
#[cfg(not(feature = "std"))]
impl<H: HeaderT> core::fmt::Debug for GrandpaJustification<H> {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
write!(f, "GrandpaJustification {{ round: {:?}, commit: <wasm:stripped>, votes_ancestries: {:?} }}", self.round, self.votes_ancestries)
}
}
serban300 marked this conversation as resolved.
Show resolved Hide resolved

impl<H: HeaderT> GrandpaJustification<H> {
/// Returns reasonable size of justification using constants from the provided chain.
///
Expand Down
6 changes: 3 additions & 3 deletions bridges/primitives/messages/src/lane.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl LaneIdType for LegacyLaneId {
}
}

#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))]
#[cfg(feature = "std")]
impl TryFrom<Vec<u8>> for LegacyLaneId {
type Error = ();

Expand Down Expand Up @@ -140,7 +140,7 @@ impl HashedLaneId {
/// There's no `From<H256>` implementation for the `LaneId`, because using this conversion
/// in a wrong way (i.e. computing hash of endpoints manually) may lead to issues. So we
/// want the call to be explicit.
#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))]
#[cfg(feature = "std")]
pub const fn from_inner(inner: H256) -> Self {
Self(inner)
}
Expand Down Expand Up @@ -184,7 +184,7 @@ impl LaneIdType for HashedLaneId {
}
}

#[cfg(any(feature = "std", feature = "runtime-benchmarks", test))]
#[cfg(feature = "std")]
impl TryFrom<Vec<u8>> for HashedLaneId {
type Error = ();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,9 @@ where
_,
Self::Left,
MessagesLaneIdOf<Self::R2L>,
>(common.right.client.clone(), &common.metrics_params, &common.right.accounts, &lanes)
>(
common.right.client.clone(), &common.metrics_params, &common.right.accounts, &lanes
)
.await?;
}

Expand Down
3 changes: 1 addition & 2 deletions bridges/relays/lib-substrate-relay/src/messages/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ where
let token_decimals = client
.token_decimals()
.await?
.map(|token_decimals| {
.inspect(|token_decimals| {
log::info!(target: "bridge", "Read `tokenDecimals` for {}: {}", C::NAME, token_decimals);
token_decimals
})
.unwrap_or_else(|| {
// turns out it is normal not to have this property - e.g. when polkadot binary is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,8 @@ impl<'a, P: SubstrateParachainsPipeline, SourceRelayClnt, TargetClnt>
for (
&'a OnDemandParachainsRelay<P, SourceRelayClnt, TargetClnt>,
&'a ParachainsSource<P, SourceRelayClnt>,
) where
)
where
SourceRelayClnt: Client<P::SourceRelayChain>,
TargetClnt: Client<P::TargetChain>,
{
Expand Down
Loading
Loading