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

polkadot-sdk v1.11.0 uplift #1314

Merged
merged 34 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c8f3723
Update deps - init commit
Dinonard Aug 1, 2024
47be5b6
Local uplift WIP
Dinonard Aug 2, 2024
2e7ff59
Shibuya progress
Dinonard Aug 2, 2024
df1ccc1
mend
Dinonard Aug 2, 2024
6f994c2
Shibuya compiles
Dinonard Aug 2, 2024
b31e299
Changes
Dinonard Aug 5, 2024
3bbb593
Basic compilation
Dinonard Aug 5, 2024
803c3f7
All features compile
Dinonard Aug 5, 2024
d6cbddf
Tests passing
Dinonard Aug 5, 2024
e1a80f2
Integration tests
Dinonard Aug 5, 2024
a091a95
Fix evm-tracing init block code
Dinonard Aug 5, 2024
32b5a6f
Rename to make it consistent with frontier
Dinonard Aug 5, 2024
8288ea1
Remove getters
Dinonard Aug 5, 2024
3ccb618
Fix tests
Dinonard Aug 5, 2024
f5aea69
Resolve issues
Dinonard Aug 5, 2024
d78dd3e
Review comments
Dinonard Aug 6, 2024
dd43285
Minor changes
Dinonard Aug 6, 2024
8f34b00
tracing integration test update
Dinonard Aug 6, 2024
b16f05b
xcm api integration tests wip
Dinonard Aug 6, 2024
59404f0
Finish integration tests
Dinonard Aug 6, 2024
f472e80
Weights
Dinonard Aug 7, 2024
b247cc9
Merge remote-tracking branch 'origin/master' into feat/polkadot-sdk-v…
Dinonard Aug 7, 2024
55a103b
Fixes
Dinonard Aug 7, 2024
37d1e17
Benchmark fixes
Dinonard Aug 7, 2024
bcb5ce0
fixes
Dinonard Aug 7, 2024
2dca9d9
Revert some changes
Dinonard Aug 7, 2024
16aa6eb
Missing migrations, dead code removal
Dinonard Aug 8, 2024
caae7ac
Fix for broken benchmarks
Dinonard Aug 8, 2024
0351ea5
Comments
Dinonard Aug 8, 2024
0cf39aa
Fixes
Dinonard Aug 8, 2024
0aadb7a
Minor fix for xcm-simulator
Dinonard Aug 8, 2024
bbfaff4
weight updates
Dinonard Aug 8, 2024
b3e589a
remove NativeElseWasmExecutor
ermalkaleci Aug 8, 2024
edde0ad
fix benchmarking
ermalkaleci Aug 8, 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,235 changes: 1,281 additions & 954 deletions Cargo.lock

Large diffs are not rendered by default.

308 changes: 154 additions & 154 deletions Cargo.toml

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions bin/collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ cumulus-test-relay-sproof-builder = { workspace = true }

# polkadot dependencies
polkadot-cli = { workspace = true, optional = true }
polkadot-core-primitives = { workspace = true }
polkadot-parachain = { workspace = true, features = ["std"] }
polkadot-primitives = { workspace = true, features = ["std"] }
polkadot-service = { workspace = true }
Expand All @@ -139,7 +140,6 @@ polkadot-runtime-common = { workspace = true, features = ["std"], optional = tru

# try-runtime
frame-try-runtime = { workspace = true, features = ["std"], optional = true }
try-runtime-cli = { workspace = true, optional = true }

# evm-tracing
moonbeam-rpc-primitives-debug = { workspace = true, features = ["std"], optional = true }
Expand Down Expand Up @@ -182,10 +182,8 @@ runtime-benchmarks = [
"sp-runtime/runtime-benchmarks",
"cumulus-primitives-core/runtime-benchmarks",
]
cli = ["try-runtime-cli"]
try-runtime = [
"local-runtime/try-runtime",
"try-runtime-cli/try-runtime",
"astar-primitives/try-runtime",
"astar-runtime/try-runtime",
"frame-system/try-runtime",
Expand Down
78 changes: 31 additions & 47 deletions bin/collator/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
// You should have received a copy of the GNU General Public License
// along with Astar. If not, see <http://www.gnu.org/licenses/>.

use crate::parachain::service::ParachainExecutor;
use astar_primitives::{AccountId, Balance, Block};
use cumulus_primitives_core::PersistedValidationData;
use cumulus_primitives_parachain_inherent::{ParachainInherentData, INHERENT_IDENTIFIER};
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
use parity_scale_codec::Encode;
use polkadot_runtime_common::BlockHashCount;
use sc_executor::NativeElseWasmExecutor;
use sc_service::TFullClient;
use sp_api::ConstructRuntimeApi;
use sp_core::{Pair, H256};
Expand All @@ -33,41 +33,35 @@ use std::sync::Arc;
/// Generates `System::Remark` extrinsics for the benchmarks.
///
/// Note: Should only be used for benchmarking.
pub struct RemarkBuilder<RuntimeApi, Executor>
pub struct RemarkBuilder<RuntimeApi>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
client: Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
client: Arc<TFullClient<Block, RuntimeApi, ParachainExecutor>>,
}

impl<RuntimeApi, Executor> RemarkBuilder<RuntimeApi, Executor>
impl<RuntimeApi> RemarkBuilder<RuntimeApi>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
/// Creates a new [`Self`] from the given client.
pub fn new(
client: Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
) -> Self {
pub fn new(client: Arc<TFullClient<Block, RuntimeApi, ParachainExecutor>>) -> Self {
Self { client }
}
}

impl<RuntimeApi, Executor> frame_benchmarking_cli::ExtrinsicBuilder
for RemarkBuilder<RuntimeApi, Executor>
impl<RuntimeApi> frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder<RuntimeApi>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn pallet(&self) -> &str {
"system"
Expand Down Expand Up @@ -100,30 +94,28 @@ where
/// Generates `Balances::TransferKeepAlive` extrinsics for the benchmarks.
///
/// Note: Should only be used for benchmarking.
pub struct TransferKeepAliveBuilder<RuntimeApi, Executor>
pub struct TransferKeepAliveBuilder<RuntimeApi>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
client: Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
client: Arc<TFullClient<Block, RuntimeApi, ParachainExecutor>>,
dest: AccountId,
value: Balance,
}

impl<RuntimeApi, Executor> TransferKeepAliveBuilder<RuntimeApi, Executor>
impl<RuntimeApi> TransferKeepAliveBuilder<RuntimeApi>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
/// Creates a new [`Self`] from the given client.
pub fn new(
client: Arc<TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>,
client: Arc<TFullClient<Block, RuntimeApi, ParachainExecutor>>,
dest: AccountId,
value: Balance,
) -> Self {
Expand All @@ -135,14 +127,12 @@ where
}
}

impl<RuntimeApi, Executor> frame_benchmarking_cli::ExtrinsicBuilder
for TransferKeepAliveBuilder<RuntimeApi, Executor>
impl<RuntimeApi> frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder<RuntimeApi>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn pallet(&self) -> &str {
"balances"
Expand Down Expand Up @@ -192,14 +182,13 @@ trait BenchmarkCallSigner<RuntimeCall: Encode + Clone, Signer: Pair> {
) -> OpaqueExtrinsic;
}

impl<RuntimeApi, Executor> BenchmarkCallSigner<local_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>
impl<RuntimeApi> BenchmarkCallSigner<local_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, ParachainExecutor>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn sign_call(
&self,
Expand Down Expand Up @@ -251,14 +240,13 @@ where
}
}

impl<RuntimeApi, Executor> BenchmarkCallSigner<astar_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>
impl<RuntimeApi> BenchmarkCallSigner<astar_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, ParachainExecutor>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn sign_call(
&self,
Expand Down Expand Up @@ -310,14 +298,13 @@ where
}
}

impl<RuntimeApi, Executor> BenchmarkCallSigner<shiden_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>
impl<RuntimeApi> BenchmarkCallSigner<shiden_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, ParachainExecutor>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn sign_call(
&self,
Expand Down Expand Up @@ -369,14 +356,13 @@ where
}
}

impl<RuntimeApi, Executor> BenchmarkCallSigner<shibuya_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>
impl<RuntimeApi> BenchmarkCallSigner<shibuya_runtime::RuntimeCall, sp_core::sr25519::Pair>
for TFullClient<Block, RuntimeApi, ParachainExecutor>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn sign_call(
&self,
Expand Down Expand Up @@ -434,14 +420,12 @@ pub trait ExistentialDepositProvider {
fn existential_deposit(&self) -> Balance;
}

impl<RuntimeApi, Executor> ExistentialDepositProvider
for TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>
impl<RuntimeApi> ExistentialDepositProvider for TFullClient<Block, RuntimeApi, ParachainExecutor>
where
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, NativeElseWasmExecutor<Executor>>>
RuntimeApi: ConstructRuntimeApi<Block, TFullClient<Block, RuntimeApi, ParachainExecutor>>
+ Send
+ Sync
+ 'static,
Executor: sc_executor::NativeExecutionDispatch + 'static,
{
fn existential_deposit(&self) -> Balance {
with_runtime! {
Expand Down
4 changes: 0 additions & 4 deletions bin/collator/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ pub enum Subcommand {
#[clap(name = "benchmark", about = "Benchmark runtime pallets.")]
#[clap(subcommand)]
Benchmark(frame_benchmarking_cli::BenchmarkCmd),

/// Try some command against runtime state.
/// No moved to separte cli and just a placeholder command here
TryRuntime,
}

#[derive(Debug)]
Expand Down
Loading
Loading