Joystream / Joystream/joystream

[Content curation working group] Possible incorrect IDs in curator opening record

Open
#128 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

Note: this was replicated using PR #103, which may be outdated. All calls are assumed to be via polkadot.js via Pioneer

Problem

When a new content curators working group application has been made successfully to an active opening, the curator_opening_id seems to be a sequential ID for the opening. This does not correlate with the CuratorApplicationById storage. This is quite counter-intuitive.

Steps to reproduce
  1. Create a new working group opening (let's call it A) and make sure it's accepting applications. Then create a second group - B - and make sure that's also accepting applications.
  2. Make a new application to A, then make a second application to B, and a third application to A.
  3. Check the application_id and curator_opening_id field values for the applications to A. Ideally, their curator_opening_id values would represent the values in the CuratorApplicationById storage, not their sequential IDs.
Example

The screenshot below illustrates the issue using the nascent roles admin tab, starting with a fresh, local devnet at block 1.

Here, two openings have been created, following the steps above; the one at the top is effectively A and the bottom is B. After the openings were created, three applications were made in the pattern A, B, A as described in the steps above.

screenshot

The first column (WG ID) contains the value of curator_opening_id for each application. As you can see, this value is sequential, and is not the map key for CuratorApplicationById .

What I'd like to see

The value of curator_opening_id for each application should be the same as CuratorApplicationById . This will allow Pioneer to look up application data with only the working group ID.

┆Issue is synchronized with this Asana task by Unito

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with content_working_group/lib.rs, especially the curator opening creation around line 405 and CuratorApplicationById storage around line 888. Reproduce the A, B, A application sequence on a fresh local devnet, noting that the report was based on PR #103 and may be outdated. Done means curator_opening_id matches the relevant CuratorApplicationById key so Pioneer can look up application data using the working group ID.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.