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

Child Bounty Pallet: chain bounty index grouped by parent bounty #5929

Closed
muharem opened this issue Oct 4, 2024 · 0 comments · Fixed by #6255
Closed

Child Bounty Pallet: chain bounty index grouped by parent bounty #5929

muharem opened this issue Oct 4, 2024 · 0 comments · Fixed by #6255
Assignees

Comments

@muharem
Copy link
Contributor

muharem commented Oct 4, 2024

Part of #5500

Goal:

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;

Solution:

To implement isolated child bounty indexes per parent bounty, we will add a new storage item that tracks the child bounty count per parent bounty without decrementing it upon child bounty completion. Similar to the ParentChildBounties, except that it keeps count of active child bounties. The ChildBountyCount can be deprecated.

We will need to adjust the keys for the ChildBountyDescriptions and ChildrenCuratorFees storage items (StorageMap -> StorageDoubleMap), changing them from (ChildIndex) to (ParentIndex, ChildIndex). The ChildBounties storage item will remain unchanged.

The migration required to translate data for ChildBountyDescriptions and ChildrenCuratorFees storage items.

github-merge-queue bot pushed a commit that referenced this issue Nov 6, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants