-
Notifications
You must be signed in to change notification settings - Fork 745
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pallet-child-bounties index child bounty by parent bounty (#6255)
Resolves #5929 Migrates `ChildBountyDescriptions` to be indexed instead of unique child bounty id unique per all child bounties in the pallet to be unique per every parent bounty. Migrates `(ParentBounty, ChildBounty)` keys inside `ChildBounties` storage item to use new `ChildBounty` ids starting from `0`. @paritytech/frame-coders --------- Signed-off-by: Oliver Tale-Yazdi <[email protected]> Co-authored-by: DavidK <[email protected]> Co-authored-by: muharem <[email protected]> Co-authored-by: Oliver Tale-Yazdi <[email protected]>
- Loading branch information
1 parent
b667c27
commit a479161
Showing
8 changed files
with
759 additions
and
225 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
title: '[pallet-child-bounties] Index child bounties by parent bounty' | ||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
Index child bounties by their parent bounty, ensuring that their indexes are independent of | ||
child bounties from other parent bounties. This will allow for predictable indexes and the | ||
ability to batch creation and approval calls together. | ||
|
||
### Migration for Runtime Pallet Instance | ||
Use `migration::v1::MigrateToV1Impl` storage migration type to translate ids for the active | ||
child bounties and migrate the state to the new schema. | ||
|
||
### Migration for Clients | ||
- Use new `ParentTotalChildBounties` storage item to iterate over child bounties for a certain | ||
parent bounty; | ||
- Use new `ChildBountyDescriptionsV1` storage item to get the bounty description instead of | ||
removed `ChildBountyDescriptions`; | ||
- Use `V0ToV1ChildBountyIds` storage item to look up the new child bounty id for a given | ||
old child bounty id; | ||
- Update the child bounty account id derivation from `PalletId + "cb" + child_id` to | ||
`PalletId + "cb" + bounty_id + child_id`. | ||
|
||
### Additional Notes | ||
- The `ChildBountyCount` storage item is deprecated and will be remove in May 2025. | ||
|
||
crates: | ||
- name: pallet-child-bounties | ||
bump: major | ||
- name: pallet-bounties | ||
bump: major | ||
- name: rococo-runtime | ||
bump: major | ||
- name: sp-core | ||
bump: minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.