Skip to content
Merged
Show file tree
Hide file tree
Changes from 78 commits
Commits
Show all changes
90 commits
Select commit Hold shift + click to select a range
a7c2f01
wip
ggwpez Nov 28, 2025
dc0279e
more
ggwpez Nov 28, 2025
443ce63
docs
ggwpez Dec 1, 2025
a63f8a3
wip tests
ggwpez Dec 8, 2025
b5f599d
make compile
ggwpez Dec 8, 2025
6343120
compiles
ggwpez Dec 8, 2025
ce5c08a
tests and small fixes
ggwpez Dec 8, 2025
cbab61f
tests
ggwpez Dec 8, 2025
a976303
cancel and slash functions plus tests
ggwpez Dec 10, 2025
8bc9aa2
rename
ggwpez Dec 10, 2025
150a19e
fix
ggwpez Dec 10, 2025
473d2aa
wip
ggwpez Dec 13, 2025
7b439db
good
ggwpez Dec 13, 2025
16fb322
bitfield tests
ggwpez Dec 13, 2025
4679a80
refactor test fns
ggwpez Dec 13, 2025
883266d
fmt
ggwpez Dec 13, 2025
96894c8
Merge remote-tracking branch 'origin/master' into oty-recovery-pallet
ggwpez Dec 13, 2025
484d5dd
no RuntimeDebug
ggwpez Dec 15, 2025
7d8db23
add to kitchensink runtime
ggwpez Dec 15, 2025
a41643e
Merge branch 'master' into oty-recovery-pallet
ggwpez Jan 7, 2026
21df000
remove the legacy recovery pallet on westend
claravanstaden Dec 17, 2025
8d7b2af
discover issue with inheritor tickets
ggwpez Jan 15, 2026
fed5536
fix inheritance deposit
ggwpez Jan 15, 2026
077bc90
add tests
ggwpez Jan 15, 2026
4e55c1f
fixes
ggwpez Jan 16, 2026
1c03c4c
fixes
ggwpez Jan 16, 2026
4bc03ed
prdoc and weights
ggwpez Jan 16, 2026
c2c79ad
Merge branch 'master' into oty-recovery-pallet
ggwpez Jan 16, 2026
c9d55f2
prdoc
ggwpez Jan 16, 2026
1b0f178
Update substrate/frame/recovery/src/lib.rs
ggwpez Jan 26, 2026
fcf256b
Update substrate/frame/recovery/src/lib.rs
ggwpez Jan 26, 2026
8382ed2
review comments and move types to own file
ggwpez Jan 26, 2026
9e3414f
fix
ggwpez Jan 26, 2026
8a6fb53
test burn
ggwpez Jan 26, 2026
963534a
Update substrate/frame/recovery/src/tests.rs
ggwpez Jan 26, 2026
242dc00
Update substrate/frame/recovery/src/lib.rs
ggwpez Jan 26, 2026
2c40cfb
set max friend groups to 10
ggwpez Jan 26, 2026
bda9d3e
Merge branch 'master' into oty-recovery-pallet
ggwpez Jan 26, 2026
ac665d6
fix
ggwpez Jan 28, 2026
458cbaa
set pallet version
ggwpez Feb 4, 2026
34a70a5
recovery v1 MBM
ggwpez Feb 4, 2026
49e0049
cleanup
ggwpez Feb 4, 2026
a7134c3
cleanup
ggwpez Feb 4, 2026
8db41ea
fix
ggwpez Feb 6, 2026
2ffae51
Merge branch 'master' into oty-recovery-pallet
ggwpez Feb 6, 2026
08a389e
fmt
ggwpez Feb 6, 2026
5a82278
ensure friends_needed not zero
ggwpez Feb 10, 2026
32ed69a
ensure friends are sorted and unique
ggwpez Feb 10, 2026
e5a2d72
remove unneeded deposit
ggwpez Feb 10, 2026
8643e0f
fixes
ggwpez Feb 10, 2026
fd0a020
fix set_friend_groups weight
ggwpez Feb 10, 2026
7c77909
fixes
ggwpez Feb 10, 2026
cd73e72
fix
ggwpez Feb 10, 2026
533adf2
fixes
ggwpez Feb 10, 2026
143f40d
taplo
ggwpez Feb 10, 2026
b41cb6e
Merge branch 'master' into oty-recovery-pallet
ggwpez Mar 17, 2026
eb5c37e
lockfile
ggwpez Mar 17, 2026
c7fe156
Merge branch 'master' into oty-recovery-pallet
ggwpez Mar 17, 2026
87a3778
toml format
ggwpez Mar 17, 2026
53c0c06
make it compile
ggwpez Mar 17, 2026
ac6f73a
prdoc
ggwpez Mar 17, 2026
1210f39
Merge branch 'master' into oty-recovery-pallet
ggwpez Mar 17, 2026
b3ff6cc
fixup execute worker hostcalls
ggwpez Mar 17, 2026
b312004
Revert "fixup execute worker hostcalls"
ggwpez Mar 17, 2026
f9cd997
Prevent reentrancy
ggwpez Mar 25, 2026
89f7c67
Require cancel delay
ggwpez Mar 25, 2026
8133c22
Migration to set min cancel delay to 1
ggwpez Mar 25, 2026
dd0ec39
Tracker test
ggwpez Mar 25, 2026
85cd0ff
Merge remote-tracking branch 'origin/master' into oty-recovery-pallet
ggwpez Apr 28, 2026
44292ec
fixes
ggwpez Apr 28, 2026
bdd6006
fix
ggwpez Apr 28, 2026
1555d2c
fix doc
ggwpez Apr 28, 2026
edda92e
fix westend
ggwpez Apr 28, 2026
7439559
fix wah
ggwpez Apr 28, 2026
ae4c289
Merge branch 'master' into oty-recovery-pallet
ggwpez Apr 28, 2026
137b4b0
remove bad deps
ggwpez Apr 29, 2026
3b60c29
beautify
ggwpez Apr 29, 2026
34eb28d
Merge remote-tracking branch 'origin/master' into oty-recovery-pallet
ggwpez Apr 29, 2026
31f0faf
Rename Order to Priority and explain numerical values
ggwpez Apr 30, 2026
94556eb
Use filter_map in attempts view function
ggwpez Apr 30, 2026
8c184fa
Count initiator towards approvers to avoid double TX signing
ggwpez Apr 30, 2026
65e5d88
Simplify FriendGroupIndex usage and remove Audit comment
ggwpez Apr 30, 2026
42d2059
fix benchmark
ggwpez Apr 30, 2026
6c0f81e
Update substrate/frame/recovery/src/lib.rs
ggwpez Apr 30, 2026
95997b6
Merge branch 'master' into oty-recovery-pallet
ggwpez Apr 30, 2026
260fd2c
Remove old_friend_groups from FriendGroupsChanged even since i dont k…
ggwpez Apr 30, 2026
5957330
Wire up DAP slashing instead of setting account manually
ggwpez Apr 30, 2026
68721b9
Document end-state in initiate_attempt
ggwpez Apr 30, 2026
4eba1ab
Hotfix version check
ggwpez Apr 30, 2026
04e6af8
prdoc
ggwpez Apr 30, 2026
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
8 changes: 7 additions & 1 deletion Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ pallet-pgas-allowance = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-psm = { workspace = true }
pallet-recovery = { workspace = true }
pallet-referenda = { workspace = true }
pallet-revive = { workspace = true }
pallet-scheduler = { workspace = true }
Expand Down Expand Up @@ -212,6 +213,7 @@ runtime-benchmarks = [
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-psm/runtime-benchmarks",
"pallet-recovery/runtime-benchmarks",
"pallet-referenda/runtime-benchmarks",
"pallet-revive/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
Expand Down Expand Up @@ -296,6 +298,7 @@ try-runtime = [
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
"pallet-psm/try-runtime",
"pallet-recovery/try-runtime",
"pallet-referenda/try-runtime",
"pallet-revive/try-runtime",
"pallet-scheduler/try-runtime",
Expand Down Expand Up @@ -388,6 +391,7 @@ std = [
"pallet-preimage/std",
"pallet-proxy/std",
"pallet-psm/std",
"pallet-recovery/std",
"pallet-referenda/std",
"pallet-revive/std",
"pallet-scheduler/std",
Expand Down
41 changes: 40 additions & 1 deletion cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub mod governance;
mod migrations;
pub mod staking;

use governance::{pallet_custom_origins, GeneralAdmin, StakingAdmin};
use governance::{pallet_custom_origins, GeneralAdmin, StakingAdmin, TreasuryAccount};

extern crate alloc;

Expand Down Expand Up @@ -684,6 +684,44 @@ impl pallet_utility::Config for Runtime {
type WeightInfo = weights::pallet_utility::WeightInfo<Runtime>;
}

parameter_types! {
pub const RecoveryFriendGroupsHoldReason: RuntimeHoldReason = RuntimeHoldReason::Recovery(pallet_recovery::HoldReason::FriendGroupsStorage);
pub const RecoveryAttemptHoldReason: RuntimeHoldReason = RuntimeHoldReason::Recovery(pallet_recovery::HoldReason::AttemptStorage);
pub const RecoveryInheritorHoldReason: RuntimeHoldReason = RuntimeHoldReason::Recovery(pallet_recovery::HoldReason::InheritorStorage);
// Simplified deposits
pub const RecoveryDepositBase: Balance = deposit(1, 64);
pub const RecoveryDepositFactor: Balance = deposit(0, 32);
}

impl pallet_recovery::Config for Runtime {
type RuntimeCall = RuntimeCall;
type RuntimeHoldReason = RuntimeHoldReason;
type BlockNumberProvider = RelaychainDataProvider<Runtime>;
type Currency = Balances;
type FriendGroupsConsideration = HoldConsideration<
AccountId,
Balances,
RecoveryFriendGroupsHoldReason,
LinearStoragePrice<RecoveryDepositBase, RecoveryDepositFactor, Balance>,
>;
type AttemptConsideration = HoldConsideration<
AccountId,
Balances,
RecoveryAttemptHoldReason,
LinearStoragePrice<RecoveryDepositBase, RecoveryDepositFactor, Balance>,
>;
type InheritorConsideration = HoldConsideration<
AccountId,
Balances,
RecoveryInheritorHoldReason,
LinearStoragePrice<RecoveryDepositBase, RecoveryDepositFactor, Balance>,
>;
type SecurityDeposit = ConstU128<{ 10 * UNITS }>;
type MaxFriendsPerConfig = ConstU32<100>;
type WeightInfo = ();
Comment thread
ggwpez marked this conversation as resolved.
type SlashReceiver = TreasuryAccount;
}

parameter_types! {
// One storage item; key size 32, value size 8; .
pub const ProxyDepositBase: Balance = deposit(1, 40);
Expand Down Expand Up @@ -1684,6 +1722,7 @@ construct_runtime!(
MetaTx: pallet_meta_tx = 44,
VerifySignature: pallet_verify_signature = 45,
Parameters: pallet_parameters = 46,
Recovery: pallet_recovery = 47,

// The main stage.
Assets: pallet_assets::<Instance1> = 50,
Expand Down
30 changes: 16 additions & 14 deletions polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -830,15 +830,17 @@ parameter_types! {
}

impl pallet_recovery::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type RuntimeCall = RuntimeCall;
type BlockNumberProvider = System;
type RuntimeHoldReason = RuntimeHoldReason;
type BlockNumberProvider = frame_system::Pallet<Runtime>;
type Currency = Balances;
type ConfigDepositBase = ConfigDepositBase;
type FriendDepositFactor = FriendDepositFactor;
type MaxFriends = MaxFriends;
type RecoveryDeposit = RecoveryDeposit;
type FriendGroupsConsideration = ();
type AttemptConsideration = ();
type InheritorConsideration = ();
type SecurityDeposit = ();
type MaxFriendsPerConfig = ConstU32<100>;
type WeightInfo = ();
type SlashReceiver = (); // burn
}

parameter_types! {
Expand Down Expand Up @@ -949,13 +951,13 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Utility(..) |
RuntimeCall::Identity(..) |
RuntimeCall::Society(..) |
RuntimeCall::Recovery(pallet_recovery::Call::as_recovered {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::close_recovery {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered {..}) |
// Specifically omitting Recovery `create_recovery`, `initiate_recovery`
RuntimeCall::Recovery(pallet_recovery::Call::set_friend_groups {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::initiate_attempt {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::approve_attempt {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::finish_attempt {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::cancel_attempt {..}) |
RuntimeCall::Recovery(pallet_recovery::Call::slash_attempt {..}) |
// Specifically omitting Recovery `control_inherited_account`
RuntimeCall::Vesting(pallet_vesting::Call::vest {..}) |
RuntimeCall::Vesting(pallet_vesting::Call::vest_other {..}) |
// Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer`
Expand Down
4 changes: 0 additions & 4 deletions polkadot/runtime/westend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ pallet-offences = { workspace = true }
pallet-parameters = { workspace = true }
pallet-preimage = { workspace = true }
pallet-proxy = { workspace = true }
pallet-recovery = { workspace = true }
pallet-root-offences = { workspace = true }
pallet-root-testing = { workspace = true }
pallet-scheduler = { workspace = true }
Expand Down Expand Up @@ -171,7 +170,6 @@ std = [
"pallet-parameters/std",
"pallet-preimage/std",
"pallet-proxy/std",
"pallet-recovery/std",
"pallet-root-offences/std",
"pallet-root-testing/std",
"pallet-scheduler/std",
Expand Down Expand Up @@ -256,7 +254,6 @@ runtime-benchmarks = [
"pallet-parameters/runtime-benchmarks",
"pallet-preimage/runtime-benchmarks",
"pallet-proxy/runtime-benchmarks",
"pallet-recovery/runtime-benchmarks",
"pallet-root-offences/runtime-benchmarks",
"pallet-scheduler/runtime-benchmarks",
"pallet-session-benchmarking/runtime-benchmarks",
Expand Down Expand Up @@ -314,7 +311,6 @@ try-runtime = [
"pallet-parameters/try-runtime",
"pallet-preimage/try-runtime",
"pallet-proxy/try-runtime",
"pallet-recovery/try-runtime",
"pallet-root-offences/try-runtime",
"pallet-root-testing/try-runtime",
"pallet-scheduler/try-runtime",
Expand Down
43 changes: 9 additions & 34 deletions polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ use sp_consensus_beefy::{
ecdsa_crypto::{AuthorityId as BeefyId, Signature as BeefySignature},
mmr::{BeefyDataProvider, MmrLeafVersion},
};
use sp_core::{ConstBool, ConstUint, OpaqueMetadata, H256};
use sp_core::{ConstBool, ConstU128, ConstUint, OpaqueMetadata, H256};
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
use sp_runtime::{
Expand Down Expand Up @@ -925,8 +925,8 @@ impl ah_client::Config for Runtime {
impl pallet_fast_unstake::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type BatchSize = frame_support::traits::ConstU32<64>;
type Deposit = frame_support::traits::ConstU128<{ UNITS }>;
type BatchSize = ConstU32<64>;
type Deposit = ConstU128<{ UNITS }>;
// TODO: drop once pallet is removed from Westend RC (post-AHM cleanup).
#[cfg(not(feature = "runtime-benchmarks"))]
type ControlOrigin = EnsureNever<AccountId>;
Expand Down Expand Up @@ -1144,25 +1144,6 @@ impl pallet_multisig::Config for Runtime {
type BlockNumberProvider = frame_system::Pallet<Runtime>;
}

parameter_types! {
pub const ConfigDepositBase: Balance = 500 * CENTS;
pub const FriendDepositFactor: Balance = 50 * CENTS;
pub const MaxFriends: u16 = 9;
pub const RecoveryDeposit: Balance = 500 * CENTS;
}

impl pallet_recovery::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type WeightInfo = ();
type RuntimeCall = RuntimeCall;
type BlockNumberProvider = System;
type Currency = Balances;
type ConfigDepositBase = ConfigDepositBase;
type FriendDepositFactor = FriendDepositFactor;
type MaxFriends = MaxFriends;
type RecoveryDeposit = RecoveryDeposit;
}

parameter_types! {
pub const MinVestedTransfer: Balance = 100 * CENTS;
pub UnvestedFundsAllowedWithdrawReasons: WithdrawReasons =
Expand Down Expand Up @@ -1248,13 +1229,6 @@ impl InstanceFilter<RuntimeCall> for ProxyType {
RuntimeCall::Grandpa(..) |
RuntimeCall::Utility(..) |
RuntimeCall::Identity(..) |
RuntimeCall::Recovery(pallet_recovery::Call::as_recovered{..}) |
RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery{..}) |
RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery{..}) |
RuntimeCall::Recovery(pallet_recovery::Call::close_recovery{..}) |
RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery{..}) |
RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered{..}) |
// Specifically omitting Recovery `create_recovery`, `initiate_recovery`
RuntimeCall::Vesting(pallet_vesting::Call::vest{..}) |
RuntimeCall::Vesting(pallet_vesting::Call::vest_other{..}) |
// Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer`
Expand Down Expand Up @@ -1817,10 +1791,6 @@ mod runtime {
#[runtime::pallet_index(17)]
pub type Identity = pallet_identity;

// Social recovery module.
#[runtime::pallet_index(18)]
pub type Recovery = pallet_recovery;

// Vesting. Usable initially, but removed once all vesting is finished.
#[runtime::pallet_index(19)]
pub type Vesting = pallet_vesting;
Expand Down Expand Up @@ -1985,6 +1955,7 @@ pub type TxExtension = (
parameter_types! {
/// Bounding number of agent pot accounts to be migrated in a single block.
pub const MaxAgentsToMigrate: u32 = 300;
pub const RecoveryPalletName: &'static str = "Recovery";
}

/// All migrations that will run on the next runtime upgrade.
Expand Down Expand Up @@ -2048,6 +2019,11 @@ pub mod migrations {
WhitelistPalletStr,
<Runtime as frame_system::Config>::DbWeight,
>,
// Remove the Recovery pallet.
frame_support::migrations::RemovePallet<
RecoveryPalletName,
<Runtime as frame_system::Config>::DbWeight,
>,
// permanent
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
Expand Down Expand Up @@ -2111,7 +2087,6 @@ mod benches {
[pallet_parameters, Parameters]
[pallet_preimage, Preimage]
[pallet_proxy, Proxy]
[pallet_recovery, Recovery]
[pallet_scheduler, Scheduler]
[pallet_session, SessionBench::<Runtime>]
[pallet_staking, Staking]
Expand Down
Loading
Loading