Skip to content

Commit

Permalink
Merge branch 'master' into AndreiEres/pvf-execution-priority
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiEres authored Sep 23, 2024
2 parents 6ce2f5a + 86dc1ab commit 6924446
Show file tree
Hide file tree
Showing 61 changed files with 1,673 additions and 1,576 deletions.
21 changes: 21 additions & 0 deletions .gitlab/pipeline/short-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,27 @@ short-benchmark-westend: &short-bench
script:
- ./artifacts/polkadot benchmark pallet --chain $RUNTIME-dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1

short-benchmark-rococo: &short-bench
stage: short-benchmarks
extends:
- .docker-env
- .common-refs
needs:
- job: build-short-benchmark
artifacts: true
variables:
RUNTIME: rococo
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-C debug-assertions -D warnings"
RUST_BACKTRACE: "full"
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-C debug-assertions -D warnings"
tags:
- benchmark
script:
- ./artifacts/polkadot benchmark pallet --chain $RUNTIME-dev --pallet "*" --extrinsic "*" --steps 2 --repeat 1

# run short-benchmarks for system parachain runtimes from cumulus

.short-benchmark-cumulus: &short-bench-cumulus
Expand Down
26 changes: 9 additions & 17 deletions Cargo.lock

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

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@ curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/paritytec
* [Introduction](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/index.html)
to each component of the Polkadot SDK: Substrate, FRAME, Cumulus, and XCM
* [Guides](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/guides/index.html),
namely how to build your first FRAME pallet.
namely how to build your first FRAME pallet
* [Templates](https://paritytech.github.io/polkadot-sdk/master/polkadot_sdk_docs/polkadot_sdk/templates/index.html)
for starting a new project.
* Other Resources:
for starting a new project
* Other resources:
* [Polkadot Wiki -> Build](https://wiki.polkadot.network/docs/build-guide)

## 🚀 Releases

<!-- markdownlint-disable-next-line MD013 -->
![Current Stable Release](https://raw.githubusercontent.com/paritytech/release-registry/main/badges/polkadot-sdk-latest.svg)&nbsp;&nbsp;![Next Stable Release](https://raw.githubusercontent.com/paritytech/release-registry/main/badges/polkadot-sdk-next.svg)

The Polkadot-SDK is released every three months as a `stableYYMMDD` release. They are supported for
The Polkadot SDK is released every three months as a `stableYYMMDD` release. They are supported for
one year with patches. See the next upcoming versions in the [Release
Registry](https://github.com/paritytech/release-registry/).

Expand Down
34 changes: 18 additions & 16 deletions cumulus/client/relay-chain-rpc-interface/src/rpc_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use jsonrpsee::{
rpc_params,
};
use prometheus::Registry;
use serde::de::DeserializeOwned;
use serde::{de::DeserializeOwned, Serialize};
use serde_json::Value as JsonValue;
use std::collections::{btree_map::BTreeMap, VecDeque};
use tokio::sync::mpsc::Sender as TokioSender;
Expand Down Expand Up @@ -122,6 +122,9 @@ pub async fn create_client_and_start_light_client_worker(
Ok(client)
}

#[derive(Serialize)]
struct PayloadToHex<'a>(#[serde(with = "sp_core::bytes")] &'a [u8]);

/// Client that maps RPC methods and deserializes results
#[derive(Clone)]
pub struct RelayChainRpcClient {
Expand Down Expand Up @@ -153,27 +156,26 @@ impl RelayChainRpcClient {
&self,
method_name: &str,
hash: RelayHash,
payload_bytes: &[u8],
payload: &[u8],
) -> RelayChainResult<sp_core::Bytes> {
let payload = PayloadToHex(payload);

let params = rpc_params! {
method_name,
payload_bytes,
payload,
hash
};

let res = self
.request_tracing::<sp_core::Bytes, _>("state_call", params, |err| {
tracing::trace!(
target: LOG_TARGET,
%method_name,
%hash,
error = %err,
"Error during call to 'state_call'.",
);
})
.await?;

Ok(res)
self.request_tracing::<sp_core::Bytes, _>("state_call", params, |err| {
tracing::trace!(
target: LOG_TARGET,
%method_name,
%hash,
error = %err,
"Error during call to 'state_call'.",
);
})
.await
}

/// Call a call to `state_call` rpc method.
Expand Down
1 change: 0 additions & 1 deletion cumulus/parachains/common/src/genesis_config_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
// limitations under the License.

//! Some common helpers for declaring runtime's presets
// note: copied from: cumulus/polkadot-parachain/src/chain_spec/mod.rs

use crate::{AccountId, Signature};
#[cfg(not(feature = "std"))]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ pub fn genesis() -> Storage {
minimum_validator_count: 1,
stakers: validators::initial_authorities()
.iter()
.map(|x| {
(x.0.clone(), x.1.clone(), STASH, westend_runtime::StakerStatus::Validator)
})
.map(|x| (x.0.clone(), x.1.clone(), STASH, pallet_staking::StakerStatus::Validator))
.collect(),
invulnerables: validators::initial_authorities().iter().map(|x| x.0.clone()).collect(),
force_era: pallet_staking::Forcing::ForceNone,
Expand Down
Loading

0 comments on commit 6924446

Please sign in to comment.