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

Refactor pallet-state-trie-migration to fungible::* traits #1801

Merged
merged 65 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from 60 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8efe522
Replace `Currency` with funginle traits
bkontur Oct 5, 2023
63a99fe
Use TestDefaultConfig
bkontur Oct 6, 2023
84b4d36
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 6, 2023
de57c65
Fix
bkontur Oct 6, 2023
ff2aa2f
Fmt
bkontur Oct 6, 2023
90dd4e6
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 9, 2023
546c532
Fix for `pallet_alliance`
bkontur Oct 9, 2023
9fb54cf
Use TestDefaultConfig in `pallet_society` mock
bkontur Oct 9, 2023
f67ae22
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 9, 2023
2d6e042
Use TestDefaultConfig in `pallet_state_trie_migration` mock
bkontur Oct 9, 2023
76a2c76
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 12, 2023
e486410
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 16, 2023
8fb9df0
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 18, 2023
6c9a630
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 18, 2023
d065165
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 18, 2023
f5d3982
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 18, 2023
d5c41d9
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 19, 2023
13e1d28
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Oct 30, 2023
35dbbeb
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 10, 2023
28627d4
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 13, 2023
4d73987
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 13, 2023
1a48753
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 15, 2023
5e06174
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 16, 2023
b56b2b0
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 17, 2023
3b4a75d
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 17, 2023
834e470
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 22, 2023
5abfa6c
Change `Currency` to `fungible` traits
bkontur Nov 22, 2023
e3a4e90
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 22, 2023
a65a107
Fix
bkontur Nov 22, 2023
a763f29
Fix imports
bkontur Nov 22, 2023
7288556
Increase `MaxHolds`
bkontur Nov 22, 2023
6e86f4b
git apply patch from: https://gitlab.parity.io/parity/mirrors/polkado…
bkontur Nov 22, 2023
1e03e3d
Fix `MaxHolds`
bkontur Nov 22, 2023
9650d35
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 23, 2023
b371db3
Based on element discussion removing `pallet-nicks` (R.I.P.)
bkontur Nov 23, 2023
d3548e4
Merge branch 'master' into bko-pallet-nicks-refactor
bkontur Nov 24, 2023
1381cf8
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Nov 30, 2023
07ef547
Update substrate/frame/state-trie-migration/src/lib.rs
bkontur Nov 30, 2023
5ab4b1b
Update substrate/frame/state-trie-migration/src/lib.rs
bkontur Nov 30, 2023
43efe43
Update substrate/frame/state-trie-migration/src/lib.rs
bkontur Nov 30, 2023
c9c40cb
Update substrate/frame/state-trie-migration/src/lib.rs
bkontur Nov 30, 2023
9265dad
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Dec 1, 2023
4b595b0
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Dec 7, 2023
ad6c887
Removed `println!` for `sp_std::if_std!`
bkontur Dec 7, 2023
a7700fc
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Dec 7, 2023
3fbef1c
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Dec 8, 2023
12fdb1d
Added test for `continue_migrate` slashing scenario
bkontur Dec 8, 2023
cc076a3
Changed `slash` to `burn_all_held`
bkontur Dec 8, 2023
69588b5
Removed `as Fun*` stuff
bkontur Dec 8, 2023
5eb2d8c
One more
bkontur Dec 8, 2023
274777e
Merge branch 'master' into bko-pallet-nicks-refactor
bkontur Dec 8, 2023
4af7b5e
Merge branch 'master' into bko-pallet-nicks-refactor
bkontur Dec 11, 2023
68a48bf
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Dec 15, 2023
149147e
Merge branch 'master' into bko-pallet-nicks-refactor
bkontur Dec 22, 2023
4d2b657
Merge branch 'master' into bko-pallet-nicks-refactor
bkontur Jan 19, 2024
57e3bea
`fungible` remove `as Fn` (https://github.com/paritytech/polkadot-sdk…
bkontur Jan 19, 2024
1b98225
`fungible` remove `as Fun` (https://github.com/paritytech/polkadot-sd…
bkontur Jan 19, 2024
c933c89
fix
bkontur Jan 19, 2024
34b6ddc
Merge branch 'master' into bko-pallet-nicks-refactor
bkontur Jan 19, 2024
6f8feda
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 19, 2024
863a747
Merge remote-tracking branch 'origin/master' into bko-pallet-nicks-re…
bkontur Jan 24, 2024
338a494
Fix deposit stuff
bkontur Jan 24, 2024
9f2c695
Single reason is enough
bkontur Jan 24, 2024
c07b5b5
Hide away `hold + slash_all_held` to `fn slash`
bkontur Jan 24, 2024
5b03bf2
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Jan 24, 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
15 changes: 0 additions & 15 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ members = [
"substrate/frame/nft-fractionalization",
"substrate/frame/nfts",
"substrate/frame/nfts/runtime-api",
"substrate/frame/nicks",
bkontur marked this conversation as resolved.
Show resolved Hide resolved
"substrate/frame/nis",
"substrate/frame/node-authorization",
"substrate/frame/nomination-pools",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ impl pallet_balances::Config for Runtime {
type FreezeIdentifier = ();
// We allow each account to have holds on it from:
// - `NftFractionalization`: 1
type MaxHolds = ConstU32<1>;
// - `StateTrieMigration`: 1
type MaxHolds = ConstU32<2>;
type MaxFreezes = ConstU32<0>;
bkontur marked this conversation as resolved.
Show resolved Hide resolved
}

Expand Down Expand Up @@ -1646,6 +1647,7 @@ parameter_types! {
impl pallet_state_trie_migration::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
type SignedDepositPerItem = MigrationSignedDepositPerItem;
type SignedDepositBase = MigrationSignedDepositBase;
// An origin that can control the whole pallet: should be Root, or a part of your council.
Expand Down
5 changes: 3 additions & 2 deletions polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl pallet_balances::Config for Runtime {
type MaxFreezes = ConstU32<1>;
type RuntimeHoldReason = RuntimeHoldReason;
type RuntimeFreezeReason = RuntimeFreezeReason;
type MaxHolds = ConstU32<2>;
type MaxHolds = ConstU32<3>;
}

parameter_types! {
Expand Down Expand Up @@ -1167,7 +1167,7 @@ impl pallet_balances::Config<NisCounterpartInstance> for Runtime {
type RuntimeHoldReason = RuntimeHoldReason;
type RuntimeFreezeReason = RuntimeFreezeReason;
type FreezeIdentifier = ();
type MaxHolds = ConstU32<2>;
type MaxHolds = ConstU32<3>;
type MaxFreezes = ConstU32<1>;
}

Expand Down Expand Up @@ -1693,6 +1693,7 @@ parameter_types! {
impl pallet_state_trie_migration::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
type SignedDepositPerItem = MigrationSignedDepositPerItem;
type SignedDepositBase = MigrationSignedDepositBase;
type ControlOrigin = EnsureRoot<AccountId>;
Expand Down
3 changes: 2 additions & 1 deletion substrate/bin/node/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ impl pallet_balances::Config for Runtime {
type WeightInfo = pallet_balances::weights::SubstrateWeight<Runtime>;
type FreezeIdentifier = RuntimeFreezeReason;
type MaxFreezes = ConstU32<1>;
type MaxHolds = ConstU32<6>;
type MaxHolds = ConstU32<7>;
}

parameter_types! {
Expand Down Expand Up @@ -1901,6 +1901,7 @@ impl pallet_state_trie_migration::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ControlOrigin = EnsureRoot<AccountId>;
type Currency = Balances;
type RuntimeHoldReason = RuntimeHoldReason;
type MaxKeyLen = MigrationMaxKeyLen;
type SignedDepositPerItem = MigrationSignedDepositPerItem;
type SignedDepositBase = MigrationSignedDepositBase;
Expand Down
2 changes: 1 addition & 1 deletion substrate/frame/alliance/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ parameter_types! {
#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Test {
type Block = Block;
type AccountData = pallet_balances::AccountData<AccountId>;
type AccountData = pallet_balances::AccountData<u64>;
seadanda marked this conversation as resolved.
Show resolved Hide resolved
liamaharon marked this conversation as resolved.
Show resolved Hide resolved
}

parameter_types! {
Expand Down
49 changes: 0 additions & 49 deletions substrate/frame/nicks/Cargo.toml

This file was deleted.

25 changes: 0 additions & 25 deletions substrate/frame/nicks/README.md

This file was deleted.

Loading