Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
add signed extension as well
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma committed Sep 26, 2022
1 parent e7e552a commit deb936f
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 0 deletions.
3 changes: 3 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 node/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ edition = "2021"
frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
6 changes: 6 additions & 0 deletions node/client/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ impl BenchmarkCallSigner<polkadot_runtime::RuntimeCall, sp_core::sr25519::Pair>
frame_system::CheckWeight::<runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
polkadot_runtime_common::claims::PrevalidateAttests::<runtime::Runtime>::new(),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<runtime::Runtime>::new(),
);

let payload = runtime::SignedPayload::from_raw(
Expand All @@ -171,6 +172,7 @@ impl BenchmarkCallSigner<polkadot_runtime::RuntimeCall, sp_core::sr25519::Pair>
(),
(),
(),
(),
),
);

Expand Down Expand Up @@ -211,6 +213,7 @@ impl BenchmarkCallSigner<westend_runtime::RuntimeCall, sp_core::sr25519::Pair>
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
frame_system::CheckWeight::<runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<runtime::Runtime>::new(),
);

let payload = runtime::SignedPayload::from_raw(
Expand All @@ -225,6 +228,7 @@ impl BenchmarkCallSigner<westend_runtime::RuntimeCall, sp_core::sr25519::Pair>
(),
(),
(),
(),
),
);

Expand Down Expand Up @@ -265,6 +269,7 @@ impl BenchmarkCallSigner<kusama_runtime::RuntimeCall, sp_core::sr25519::Pair>
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
frame_system::CheckWeight::<runtime::Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<runtime::Runtime>::new(),
);

let payload = runtime::SignedPayload::from_raw(
Expand All @@ -279,6 +284,7 @@ impl BenchmarkCallSigner<kusama_runtime::RuntimeCall, sp_core::sr25519::Pair>
(),
(),
(),
(),
),
);

Expand Down
1 change: 1 addition & 0 deletions node/test/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ inherents = { package = "sp-inherents", git = "https://github.com/paritytech/sub
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-cli = { git = "https://github.com/paritytech/substrate", branch = "master" }
sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" }
Expand Down
2 changes: 2 additions & 0 deletions runtime/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ where
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new(),
);
let raw_payload = SignedPayload::new(call, extra)
.map_err(|e| {
Expand Down Expand Up @@ -1452,6 +1453,7 @@ pub type SignedExtra = (
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
pallet_fast_unstake::PreventStakingOpsIfUnbonding<Runtime>,
);

pub struct StakingMigrationV11OldPallet;
Expand Down
3 changes: 3 additions & 0 deletions runtime/polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ where
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
claims::PrevalidateAttests::<Runtime>::new(),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new(),
);
let raw_payload = SignedPayload::new(call, extra)
.map_err(|e| {
Expand Down Expand Up @@ -1534,6 +1535,7 @@ pub type SignedExtra = (
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
claims::PrevalidateAttests<Runtime>,
pallet_fast_unstake::PreventStakingOpsIfUnbonding<Runtime>,
);

pub struct StakingMigrationV11OldPallet;
Expand Down Expand Up @@ -2136,6 +2138,7 @@ mod test_fees {
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(0),
claims::PrevalidateAttests::<Runtime>::new(),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new(),
);
let uxt = UncheckedExtrinsic {
function: call,
Expand Down
2 changes: 2 additions & 0 deletions runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ where
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new(),
);
let raw_payload = SignedPayload::new(call, extra)
.map_err(|e| {
Expand Down Expand Up @@ -1189,6 +1190,7 @@ pub type SignedExtra = (
frame_system::CheckNonce<Runtime>,
frame_system::CheckWeight<Runtime>,
pallet_transaction_payment::ChargeTransactionPayment<Runtime>,
pallet_fast_unstake::PreventStakingOpsIfUnbonding<Runtime>,
);

pub struct StakingMigrationV11OldPallet;
Expand Down
1 change: 1 addition & 0 deletions utils/staking-miner/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pallet-election-provider-multi-phase = { git = "https://github.com/paritytech/su
pallet-staking = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-fast-unstake = { git = "https://github.com/paritytech/substrate", branch = "master" }

core-primitives = { package = "polkadot-core-primitives", path = "../../core-primitives" }

Expand Down
3 changes: 3 additions & 0 deletions utils/staking-miner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ fn signed_ext_builder_polkadot(
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
runtime_common::claims::PrevalidateAttests::<Runtime>::new(),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new()
)
}

Expand All @@ -154,6 +155,7 @@ fn signed_ext_builder_kusama(
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new()
)
}

Expand All @@ -172,6 +174,7 @@ fn signed_ext_builder_westend(
frame_system::CheckNonce::<Runtime>::from(nonce),
frame_system::CheckWeight::<Runtime>::new(),
pallet_transaction_payment::ChargeTransactionPayment::<Runtime>::from(tip),
pallet_fast_unstake::PreventStakingOpsIfUnbonding::<Runtime>::new()
)
}

Expand Down

0 comments on commit deb936f

Please sign in to comment.