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

Set up for Migration #69

Open
balmy-gazebo opened this issue Apr 22, 2024 · 2 comments
Open

Set up for Migration #69

balmy-gazebo opened this issue Apr 22, 2024 · 2 comments
Assignees
Labels
request for comment Seeking community feedback

Comments

@balmy-gazebo
Copy link
Contributor

balmy-gazebo commented Apr 22, 2024

When Solana unlocks the Group and Member accounts on Mainnet, we will want to transition the group member structure in WNS to the native Solana Group/Member accounts.

I propose we knock this out in stages:

Stage 1: Write Migrate Instructions + Tests
migrate_group.rs - Migrate a group by passing in the existing WNS-owned group account and Group mint. Initialize the extra space in the Mint account with the Mint Authority still the Manager account. Re-assign the group max_size. Update the GroupPointer in the Mint account to now point to itself as the group. The group's size should be 0 as this must be set via the addition of mint's to the Group. The update_authority should be the same as the original WNS Group. Leave GroupAccount untouched. WEN will front the SOL for the group accounts and recoup it in the closing of these accounts later. Set Mint Auth to None.
migrate_member.rs - Migrate a member by passing in the existing WNS-owned member account, create a GroupMember account on the mint, point group at the group mint now, point mint at itself, member number should be the same as it was in the original WNS Member account. Once that's all done, should close the WNS GroupMember account. Set Mint Auth to None.
complete_group_migration.rs - Verify that the WNS Group mint group_size is equal to the WNS Group group_size. If so, everything should be migrated, can close the WNS group account.
tests/wen_migrate_group_members.rs - Run the full migration on localnet NFTs

Stage 2: Prepare community
Anyone who has WNS integrated into their protocol and is looking directly at the WNS group/member accounts or in their Frontend should be prepared to migrate it.

  • Should create a guide on how to replace all the existing interactions (can now use all out of the box Solana tooling as well as one call to get Group info).

Stage 3: Clean up

  • All instructions related to group and member's in WNS should be deleted
  • State objects should be deleted
  • Manager account should be migrated to a per mint or collection authority to control Closing (unless an alternative can be found)
  • Manager account should be closed
  • Tests can remove WNS Group calls and should be re-written to work for Token Extensions Groups + Members
  • SDK should be updated to reflect these changes
    Leave all these changes in a stand alone branch and pre-approve/verify tests work before running migration

Stage 4: Run + Validate Migration
fetch_groups.ts - Run a getPA on all group Accounts in WNS. Write these mints to a csv file.
migrate_group.ts - Should be a script that can be called per Group mint, loading all mints in the group by mapping GroupMember accounts back to the Group and ultimately Group Mint. The migrate_group instruction should be called on the group mint. Once confirmed, each mint should be migrated individually.
migrate_groups.ts - Read the group mints CSV and run migrate_group on each, validate before running migrate that the group still exists incase the script needs to be restarted at some point.
validate_migration.ts - Should attempt a getPA on Group and GroupMember accounts in WNS, if the migration properly happened, all accounts should be deleted or invalid.

  • We'll upgrade the WNS program to the new version and run the migration scripts in order.

Stage 5: Update Contract
Merge Stage 3 into main and deploy stable versions of Contract and SDKs.

@kespinola kespinola self-assigned this May 7, 2024
@kespinola kespinola added the request for comment Seeking community feedback label May 7, 2024
@ghulamMustafaRaza
Copy link

what's the expected timeline on looks like on Solana Labs side, of enabling it?

@balmy-gazebo
Copy link
Contributor Author

Most recent date I've heard is mid-June, but there's no hard deadline for launch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request for comment Seeking community feedback
Projects
None yet
Development

No branches or pull requests

3 participants