Joystream / Joystream/joystream

Substrate v3 Migration: Types/API changes tracking

Open
#3,876 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Tracking the changes to runtime, types, storage, and dispatchable calls (if any) that were absolutely required as a result of updating runtime from version 2.0.1 to latest v3 (0.9.23) of substrate.

Membership Pallet
  • Changed MembershipById storage map value from: Membership to Option<Membership>
/// Mapping of member's id to their membership profile.
pub MembershipById get(fn membership) : map hasher(blake2_128_concat)
    T::MemberId => Option<Membership<T>>;

ref: https://github.com/Joystream/joystream/issues/3876#issuecomment-1151927859

Council Pallet
  • Changed Candidates storage map value from Candidate to Option<Candidate>
/// Map of all candidates that ever candidated and haven't unstake yet.
pub Candidates get(fn candidates) config(): map hasher(blake2_128_concat)
    T::MemberId => Option<Candidate<T::AccountId, Balance<T>, T::Hash, VotePowerOf::<T>>>;
Working Groups Pallet
  • Changed ApplicationById storage map value from Application to Option<Application>
  • Changed WorkerById storage map value from Worker to Option<Worker>
/// Maps identifier to worker application on opening.
pub ApplicationById get(fn application_by_id) : map hasher(blake2_128_concat)
    ApplicationId => Option<Application<T>>;

/// Maps identifier to corresponding worker.
pub WorkerById get(fn worker_by_id) : map hasher(blake2_128_concat)
    WorkerId<T> => Option<Worker<T>>;
Storage Pallet
  • Changed StorageBucketById storage map value from StorageBucket to Option<StorageBucket>
/// Storage buckets.
pub StorageBucketById get (fn storage_bucket_by_id): map hasher(blake2_128_concat)
     T::StorageBucketId => Option<StorageBucket<T>>;

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 the Membership, Council, Working Groups, and Storage pallet storage declarations listed in the issue, then compare their runtime, types, storage, and dispatchable-call usage between Substrate 2.0.1 and v3 (0.9.23). Done means all required migration changes are identified and the affected declarations or usages are updated consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Refactor
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.