Skip to content
Snippets Groups Projects
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