-
davidk-pt authored
Resolves https://github.com/paritytech/polkadot-sdk/issues/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 <oliver.tale-yazdi@parity.io> Co-authored-by:
DavidK <davidk@parity.io> Co-authored-by:
muharem <ismailov.m.h@gmail.com> Co-authored-by:
Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Unverifieda4791617
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
pr_6255.prdoc 1.35 KiB
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