Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into cl/remove-all-tra…
Browse files Browse the repository at this point in the history
…ces-of-contracts-rococo

# Conflicts:
#	cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs
  • Loading branch information
clangenb committed Feb 20, 2025
2 parents 5cc6ed0 + 9e75647 commit e2ff0e7
Show file tree
Hide file tree
Showing 139 changed files with 667 additions and 251 deletions.
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.81.0-2024-11-19-v202411281558"
IMAGE="docker.io/paritytech/ci-unified:bullseye-1.84.1-2025-01-28-v202502131220"
2 changes: 1 addition & 1 deletion .github/workflows/command-backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: korthout/backport-action@v3
id: backport
with:
target_branches: stable2407 stable2409 stable2412
target_branches: stable2407 stable2409 stable2412 stable2503
merge_commits: skip
github_token: ${{ steps.generate_token.outputs.token }}
pull_description: |
Expand Down
10 changes: 5 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ workflow:

variables:
# CI_IMAGE: !reference [ .ci-unified, variables, CI_IMAGE ]
CI_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-11-19-v202411281558"
CI_IMAGE: "docker.io/paritytech/ci-unified:bullseye-1.84.1-2025-01-28-v202502131220"
# BUILDAH_IMAGE is defined in group variables
BUILDAH_COMMAND: "buildah --storage-driver overlay2"
RELENG_SCRIPTS_BRANCH: "master"
Expand Down Expand Up @@ -125,18 +125,18 @@ default:
- cat .forklift/config-gitlab.toml > .forklift/config.toml
- >
if [ "$FORKLIFT_BYPASS" != "true" ]; then
echo "FORKLIFT_BYPASS not set";
echo "FORKLIFT_BYPASS not set";
if command -v forklift >/dev/null 2>&1; then
echo "forklift already exists";
echo "forklift already exists";
forklift version
else
echo "forklift does not exist, downloading";
curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64";
curl --header "PRIVATE-TOKEN: $FL_CI_GROUP_TOKEN" -o forklift -L "${CI_API_V4_URL}/projects/676/packages/generic/forklift/${FL_FORKLIFT_VERSION}/forklift_${FL_FORKLIFT_VERSION}_linux_amd64";
chmod +x forklift;
export PATH=$PATH:$(pwd);
echo ${FL_FORKLIFT_VERSION};
fi
echo "Creating alias cargo='forklift cargo'";
echo "Creating alias cargo='forklift cargo'";
shopt -s expand_aliases;
alias cargo="forklift cargo";
fi
Expand Down
23 changes: 10 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -1367,7 +1367,7 @@ trie-bench = { version = "0.39.0" }
trie-db = { version = "0.29.1", default-features = false }
trie-root = { version = "0.18.0", default-features = false }
trie-standardmap = { version = "0.16.0" }
trybuild = { version = "1.0.89" }
trybuild = { version = "1.0.103" }
tt-call = { version = "1.0.8" }
tuplex = { version = "0.1", default-features = false }
twox-hash = { version = "1.6.3", default-features = false }
Expand Down
9 changes: 3 additions & 6 deletions bridges/modules/grandpa/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -789,12 +789,9 @@ where
pub fn synced_headers_grandpa_info() -> Vec<StoredHeaderGrandpaInfo<BridgedHeader<T, I>>> {
frame_system::Pallet::<T>::read_events_no_consensus()
.filter_map(|event| {
if let Event::<T, I>::UpdatedBestFinalizedHeader { grandpa_info, .. } =
event.event.try_into().ok()?
{
return Some(grandpa_info)
}
None
let Event::<T, I>::UpdatedBestFinalizedHeader { grandpa_info, .. } =
event.event.try_into().ok()?;
Some(grandpa_info)
})
.collect()
}
Expand Down
2 changes: 1 addition & 1 deletion bridges/primitives/test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub fn make_justification_for_header<H: HeaderT>(
);

// Roughly, how many vote ancestries do we want per fork
let target_depth = (ancestors + forks - 1) / forks;
let target_depth = ancestors.div_ceil(forks);

let mut unsigned_precommits = vec![];
for i in 0..forks {
Expand Down
1 change: 1 addition & 0 deletions bridges/relays/lib-substrate-relay/src/messages/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ mod tests {
}

// mock runtime with `pallet_bridge_messages`
#[allow(unexpected_cfgs)]
mod mock {
use super::super::*;
use bp_messages::{target_chain::ForbidInboundMessages, HashedLaneId};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1688,6 +1688,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
15 changes: 10 additions & 5 deletions cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1884,6 +1884,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down Expand Up @@ -2371,11 +2372,15 @@ impl_runtime_apis! {
{
use pallet_revive::tracing::trace;
let mut tracer = config.build(Revive::evm_gas_from_weight);
trace(&mut tracer, || {
Self::eth_transact(tx)
})?;

Ok(tracer.collect_traces().pop().expect("eth_transact succeeded, trace must exist, qed"))
let result = trace(&mut tracer, || Self::eth_transact(tx));

if let Some(trace) = tracer.collect_traces().pop() {
Ok(trace)
} else if let Err(err) = result {
Err(err)
} else {
Ok(Default::default())
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
use super::{weights, AccountId, Balance, Balances, BlockNumber, Runtime, RuntimeEvent};
use bp_messages::LegacyLaneId;
use bp_relayers::RewardsAccountParams;
use codec::{Decode, Encode, MaxEncodedLen};
use codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use frame_support::parameter_types;
use scale_info::TypeInfo;
use xcm::VersionedLocation;
Expand All @@ -36,7 +36,18 @@ parameter_types! {
}

/// Showcasing that we can handle multiple different rewards with the same pallet.
#[derive(Clone, Copy, Debug, Decode, Encode, Eq, MaxEncodedLen, PartialEq, TypeInfo)]
#[derive(
Clone,
Copy,
Debug,
Decode,
DecodeWithMemTracking,
Encode,
Eq,
MaxEncodedLen,
PartialEq,
TypeInfo,
)]
pub enum BridgeReward {
/// Rewards for the R/W bridge—distinguished by the `RewardsAccountParams` key.
RococoWestend(RewardsAccountParams<LegacyLaneId>),
Expand All @@ -51,7 +62,9 @@ impl From<RewardsAccountParams<LegacyLaneId>> for BridgeReward {
}

/// An enum representing the different types of supported beneficiaries.
#[derive(Clone, Debug, Decode, Encode, Eq, MaxEncodedLen, PartialEq, TypeInfo)]
#[derive(
Clone, Debug, Decode, DecodeWithMemTracking, Encode, Eq, MaxEncodedLen, PartialEq, TypeInfo,
)]
pub enum BridgeRewardBeneficiaries {
/// A local chain account.
LocalAccount(AccountId),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
1 change: 1 addition & 0 deletions cumulus/parachains/runtimes/testing/penpal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1140,6 +1140,7 @@ impl_runtime_apis! {
(list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, alloc::string::String> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ macro_rules! impl_node_runtime_apis {
unimplemented!()
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
_: frame_benchmarking::BenchmarkConfig
) -> Result<Vec<frame_benchmarking::BenchmarkBatch>, String> {
Expand Down
2 changes: 1 addition & 1 deletion docs/contributor/container.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ The command below allows building a Linux binary without having to even install
docker run --rm -it \
-w /polkadot-sdk \
-v $(pwd):/polkadot-sdk \
docker.io/paritytech/ci-unified:bullseye-1.81.0-2024-11-19-v202411281558 \
docker.io/paritytech/ci-unified:bullseye-1.84.1-2025-01-28-v202502131220 \
cargo build --release --locked -p polkadot-parachain-bin --bin polkadot-parachain
sudo chown -R $(id -u):$(id -g) target/
```
Expand Down
2 changes: 2 additions & 0 deletions docs/sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#![doc = simple_mermaid::mermaid!("../../mermaid/IA.mmd")]
#![warn(rustdoc::broken_intra_doc_links)]
#![warn(rustdoc::private_intra_doc_links)]
// Frame macros reference features which this crate does not have
#![allow(unexpected_cfgs)]
#![doc(html_favicon_url = "https://polkadot.com/favicon.ico")]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/docs/images/Polkadot_Logo_Horizontal_Pink_White.png"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ async fn answer_expected_hypothetical_membership_request(
)
}

/// Assert that the correct peer is reported.
#[macro_export]
macro_rules! assert_peer_reported {
($virtual_overseer:expr, $peer_id:expr, $rep_change:expr $(,)*) => {
Expand Down
3 changes: 2 additions & 1 deletion polkadot/node/overseer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@
// unused dependencies can not work for test and examples at the same time
// yielding false positives
#![warn(missing_docs)]
#![allow(dead_code)] // TODO https://github.com/paritytech/polkadot-sdk/issues/5793
// TODO https://github.com/paritytech/polkadot-sdk/issues/5793
#![allow(dead_code, irrefutable_let_patterns)]

use std::{
collections::{hash_map, HashMap},
Expand Down
1 change: 1 addition & 0 deletions polkadot/runtime/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ std = [
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-election-provider-support/runtime-benchmarks",
"frame-support-test/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"libsecp256k1/hmac",
Expand Down
1 change: 1 addition & 0 deletions polkadot/runtime/parachains/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ std = [
]
runtime-benchmarks = [
"frame-benchmarking/runtime-benchmarks",
"frame-support-test/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-babe/runtime-benchmarks",
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/parachains/src/coretime/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ mod v_coretime {
return None
},
};
let time_slice = (valid_until + TIMESLICE_PERIOD - 1) / TIMESLICE_PERIOD;
let time_slice = valid_until.div_ceil(TIMESLICE_PERIOD);
log::trace!(target: "coretime-migration", "Sending of lease holding para {:?}, valid_until: {:?}, time_slice: {:?}", p, valid_until, time_slice);
Some(mk_coretime_call::<T>(crate::coretime::CoretimeCalls::SetLease(p.into(), time_slice)))
});
Expand Down
1 change: 1 addition & 0 deletions polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2468,6 +2468,7 @@ sp_api::impl_runtime_apis! {
return (list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig,
) -> Result<
Expand Down
1 change: 1 addition & 0 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2649,6 +2649,7 @@ sp_api::impl_runtime_apis! {
return (list, storage_info)
}

#[allow(non_local_definitions)]
fn dispatch_benchmark(
config: frame_benchmarking::BenchmarkConfig,
) -> Result<
Expand Down
2 changes: 2 additions & 0 deletions polkadot/xcm/docs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
//!
//! ## Docs structure
#![doc = simple_mermaid::mermaid!("../mermaid/structure.mmd")]
// Frame macros reference features which this crate does not have
#![allow(unexpected_cfgs)]

/// Fundamentals of the XCM language. The virtual machine, instructions, locations and assets.
pub mod fundamentals;
Expand Down
5 changes: 5 additions & 0 deletions polkadot/xcm/xcm-simulator/example/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@
// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

// We do not declare all features used by `construct_runtime`
#[allow(unexpected_cfgs)]
mod parachain;

// We do not declare all features used by `construct_runtime`
#[allow(unexpected_cfgs)]
mod relay_chain;

#[cfg(test)]
Expand Down
Loading

0 comments on commit e2ff0e7

Please sign in to comment.