Skip to content

Commit

Permalink
Merge branch 'master' into bridge-zombienet
Browse files Browse the repository at this point in the history
  • Loading branch information
serban300 authored Feb 9, 2024
2 parents 851d18c + edd95b3 commit a2d2640
Show file tree
Hide file tree
Showing 148 changed files with 3,861 additions and 2,522 deletions.
8 changes: 2 additions & 6 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,21 +121,17 @@ default:
before_script:
- '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
- mkdir .forklift
- cp $FL_FORKLIFT_CONFIG .forklift/config.toml
- export FORKLIFT_PACKAGE_SUFFIX=${CI_JOB_NAME/ [0-9 \/]*}
- mkdir ~/.forklift
- cp $FL_FORKLIFT_CONFIG ~/.forklift/config.toml
- shopt -s expand_aliases
- export PATH=$PATH:$(pwd)
- |
if [ "$FORKLIFT_BYPASS" != "true" ]; then
echo "FORKLIFT_BYPASS not set, creating alias cargo='forklift cargo'"
alias cargo="forklift cargo"
fi
- ls -al
- rm -f forklift.sock
#
- echo "FL_FORKLIFT_VERSION ${FL_FORKLIFT_VERSION}"
- echo "FORKLIFT_PACKAGE_SUFFIX $FORKLIFT_PACKAGE_SUFFIX"

.common-refs:
rules:
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/check-each-crate.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

print(f"Checking {crates[crate][0]}", file=sys.stderr)

res = subprocess.run(["cargo", "check", "--locked"], cwd = crates[crate][1])
res = subprocess.run(["forklift", "cargo", "check", "--locked"], cwd = crates[crate][1])

if res.returncode != 0:
sys.exit(1)
6 changes: 4 additions & 2 deletions .gitlab/pipeline/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,9 @@ build-linux-substrate:
# tldr: we need to checkout the branch HEAD explicitly because of our dynamic versioning approach while building the substrate binary
# see https://github.com/paritytech/ci_cd/issues/682#issuecomment-1340953589
- git checkout -B "$CI_COMMIT_REF_NAME" "$CI_COMMIT_SHA"
- !reference [.forklift-cache, before_script]
script:
- WASM_BUILD_NO_COLOR=1 time cargo build --locked --release -p staging-node-cli
- time WASM_BUILD_NO_COLOR=1 cargo build --locked --release -p staging-node-cli
- mv $CARGO_TARGET_DIR/release/substrate-node ./artifacts/substrate/substrate
- echo -n "Substrate version = "
- if [ "${CI_COMMIT_TAG}" ]; then
Expand Down Expand Up @@ -352,9 +353,10 @@ build-runtimes-polkavm:
CARGO_TARGET_DIR: "$CI_PROJECT_DIR/target"
before_script:
- mkdir -p ./artifacts/subkey
- !reference [.forklift-cache, before_script]
script:
- cd ./substrate/bin/utils/subkey
- SKIP_WASM_BUILD=1 time cargo build --locked --release
- time SKIP_WASM_BUILD=1 cargo build --locked --release
# - cd -
# - mv $CARGO_TARGET_DIR/release/subkey ./artifacts/subkey/.
# - echo -n "Subkey version = "
Expand Down
1 change: 1 addition & 0 deletions .gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ cargo-check-benches:
git merge --verbose --no-edit FETCH_HEAD;
fi
fi'
- !reference [.forklift-cache, before_script]
parallel: 2
script:
- mkdir -p ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA
Expand Down
26 changes: 26 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ members = [
"substrate/frame/offences/benchmarking",
"substrate/frame/paged-list",
"substrate/frame/paged-list/fuzzer",
"substrate/frame/parameters",
"substrate/frame/preimage",
"substrate/frame/proxy",
"substrate/frame/ranked-collective",
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ way. The Polkadot SDK comprises three main pieces of software:
[![Polkadot-license](https://img.shields.io/badge/License-GPL3-blue)](./polkadot/LICENSE)

Implementation of a node for the https://polkadot.network in Rust, using the Substrate framework. This directory
currently contains runtimes for the Polkadot, Kusama, Westend, and Rococo networks. In the future, these will be
relocated to the [`runtimes`](https://github.com/polkadot-fellows/runtimes/) repository.
currently contains runtimes for the Westend and Rococo test networks. Polkadot, Kusama and their system chain runtimes
are located in the [`runtimes`](https://github.com/polkadot-fellows/runtimes/) repository maintained by
[the Polkadot Technical Fellowship](https://polkadot-fellows.github.io/dashboard/#/overview).

## [Substrate](./substrate/)
[![SubstrateRustDocs](https://img.shields.io/badge/Rust_Docs-Substrate-24CC85?logo=rust)](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/substrate/index.html)
Expand Down
2 changes: 1 addition & 1 deletion cumulus/parachain-template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<Block, ()>(config))
runner.sync_run(|config| cmd.run::<sp_runtime::traits::HashingFor<Block>, ()>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 14,
Expand All @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("statemine"),
impl_name: create_runtime_str!("statemine"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 14,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("westmint"),
impl_name: create_runtime_str!("westmint"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 14,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-rococo"),
impl_name: create_runtime_str!("bridge-hub-rococo"),
authoring_version: 1,
spec_version: 1_006_001,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("bridge-hub-westend"),
impl_name: create_runtime_str!("bridge-hub-westend"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("collectives-westend"),
impl_name: create_runtime_str!("collectives-westend"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("contracts-rococo"),
impl_name: create_runtime_str!("contracts-rococo"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("coretime-rococo"),
impl_name: create_runtime_str!("coretime-rococo"),
authoring_version: 1,
spec_version: 1_006_001,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("coretime-westend"),
impl_name: create_runtime_str!("coretime-westend"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("glutton-westend"),
impl_name: create_runtime_str!("glutton-westend"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("people-rococo"),
impl_name: create_runtime_str!("people-rococo"),
authoring_version: 1,
spec_version: 1_006_002,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("people-westend"),
impl_name: create_runtime_str!("people-westend"),
authoring_version: 1,
spec_version: 1_006_001,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
spec_name: create_runtime_str!("test-parachain"),
impl_name: create_runtime_str!("test-parachain"),
authoring_version: 1,
spec_version: 1_006_000,
spec_version: 1_007_000,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 6,
Expand Down
2 changes: 1 addition & 1 deletion cumulus/polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ pub fn run() -> Result<()> {
match cmd {
BenchmarkCmd::Pallet(cmd) =>
if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| cmd.run::<Block, ()>(config))
runner.sync_run(|config| cmd.run::<sp_runtime::traits::HashingFor<Block>, ()>(config))
} else {
Err("Benchmarking wasn't enabled when building the node. \
You can enable it with `--features runtime-benchmarks`."
Expand Down
8 changes: 7 additions & 1 deletion polkadot/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ sc-tracing = { path = "../../substrate/client/tracing", optional = true }
sc-sysinfo = { path = "../../substrate/client/sysinfo" }
sc-executor = { path = "../../substrate/client/executor" }
sc-storage-monitor = { path = "../../substrate/client/storage-monitor" }
sp-runtime = { path = "../../substrate/primitives/runtime" }

[build-dependencies]
substrate-build-script-utils = { path = "../../substrate/utils/build-script-utils" }
Expand All @@ -63,9 +64,14 @@ runtime-benchmarks = [
"polkadot-node-metrics/runtime-benchmarks",
"sc-service?/runtime-benchmarks",
"service/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
]
full-node = ["service/full-node"]
try-runtime = ["service/try-runtime", "try-runtime-cli/try-runtime"]
try-runtime = [
"service/try-runtime",
"sp-runtime/try-runtime",
"try-runtime-cli/try-runtime",
]
fast-runtime = ["service/fast-runtime"]
pyroscope = ["pyro", "pyroscope_pprofrs"]

Expand Down
2 changes: 1 addition & 1 deletion polkadot/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ pub fn run() -> Result<()> {

if cfg!(feature = "runtime-benchmarks") {
runner.sync_run(|config| {
cmd.run::<service::Block, ()>(config)
cmd.run::<sp_runtime::traits::HashingFor<service::Block>, ()>(config)
.map_err(|e| Error::SubstrateCli(e))
})
} else {
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/primitives/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ pub use disputes::{
/// relatively rare.
///
/// The associated worker binaries should use the same version as the node that spawns them.
pub const NODE_VERSION: &'static str = "1.6.0";
pub const NODE_VERSION: &'static str = "1.7.0";

// For a 16-ary Merkle Prefix Trie, we can expect at most 16 32-byte hashes per node
// plus some overhead:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ use crate::{
GeneratedState, BUFFER_FOR_GENERATION_MILLIS, LOG_TARGET, SLOT_DURATION_MILLIS,
},
core::{
configuration::{TestAuthorities, TestConfiguration, TestObjective},
configuration::{TestAuthorities, TestConfiguration},
mock::session_info_for_peers,
NODE_UNDER_TEST,
},
TestObjective,
};
use polkadot_node_network_protocol::v3 as protocol_v3;
use polkadot_primitives::Hash;
Expand Down
3 changes: 2 additions & 1 deletion polkadot/node/subsystem-bench/src/approval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::{
mock_chain_selection::MockChainSelection,
},
core::{
configuration::{TestAuthorities, TestConfiguration},
configuration::TestAuthorities,
environment::{
BenchmarkUsage, TestEnvironment, TestEnvironmentDependencies, MAX_TIME_OF_FLIGHT,
},
Expand All @@ -43,6 +43,7 @@ use crate::{
},
NODE_UNDER_TEST,
},
TestConfiguration,
};
use colored::Colorize;
use futures::channel::oneshot;
Expand Down
2 changes: 1 addition & 1 deletion polkadot/node/subsystem-bench/src/availability/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ use super::core::{configuration::TestConfiguration, mock::dummy_builder, network

const LOG_TARGET: &str = "subsystem-bench::availability";

use super::{cli::TestObjective, core::mock::AlwaysSupportsParachains};
use super::{core::mock::AlwaysSupportsParachains, TestObjective};
use polkadot_node_subsystem_test_helpers::{
derive_erasure_chunks_with_proofs_and_root, mock::new_block_import_info,
};
Expand Down
Loading

0 comments on commit a2d2640

Please sign in to comment.