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

[Migration] Total POKT Validation #1066

Open
7 tasks
bryanchriswhite opened this issue Feb 12, 2025 · 1 comment
Open
7 tasks

[Migration] Total POKT Validation #1066

bryanchriswhite opened this issue Feb 12, 2025 · 1 comment
Assignees
Labels
migration Morse to Shannon migration related work

Comments

@bryanchriswhite
Copy link
Contributor

Objective

Determine whether and how we want to validate the integrity of the migrated supply.

Origin Document

Image

https://github.com/pokt-network/poktroll/pull/1039/files#r1942969852

Goals

  • Evaluate whether validating the migrated supply is worthwhile.
  • If we determine that it is, design the validation mechanism

Deliverables

  • A notion document that documents the thinking behind the decision making regarding whether to pursue this direction.
  • A PR that updates the docusaurus docs which incorporates the supply validation.
  • A PR that implements the supply validation.

Non-goals / Non-deliverables

  • ...

General deliverables

  • Comments: Add/update TODOs and comments alongside the source code so it is easier to follow.
  • Testing: Add new tests (unit and/or E2E) to the test suite.
  • Makefile: Add new targets to the Makefile to make the new functionality easier to use.
  • Documentation: Update architectural or development READMEs; use mermaid diagrams where appropriate.

Creator: @bryanchriswhite
Co-Owners: @Olshansk @red-0ne

@bryanchriswhite bryanchriswhite added the migration Morse to Shannon migration related work label Feb 12, 2025
@bryanchriswhite bryanchriswhite self-assigned this Feb 12, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon Feb 12, 2025
@Olshansk Olshansk moved this from 📋 Backlog to 🔖 Ready in Shannon Feb 13, 2025
@Olshansk Olshansk moved this from 🔖 Ready to 🏗 In progress in Shannon Mar 3, 2025
@Olshansk Olshansk changed the title [Migration] Supply Validation [Migration] Total POKT Validation Mar 3, 2025
@Olshansk
Copy link
Member

Olshansk commented Mar 3, 2025

I'm going to propose an initial solution but want to call out that it'll be iterative as we work w/ the foundation to identify & clarify requirements along the way.


1. Background & Context

1.1 Morse

In Morse, we can query the total liquid & staked supply as below

pocket query supply --remoteCLIURL https://pocket-rpc.liquify.com
{
    "app_staked": "5057233331383",
    "dao": "395476463285026",
    "node_staked": "697282087528293",
    "total": "2322205220809287",
    "total_staked": "1097815784144702",
    "total_unstaked": "1224389436664585"
}

1.2 Shannon

In Shannon, we can query the total supply like so

pkd_beta_query bank total -o json
{
  "supply": [
    {
      "denom": "upokt",
      "amount": "10000000000000000000000000000000000000000000000005000069731225049"
    }
  ],
  "pagination": {
    "total": "1"
  }
}

And the staked supply (per module) using each respective module address.

I took this from our Makefile:

APPLICATION_MODULE_ADDRESS = pokt1rl3gjgzexmplmds3tq3r3yk84zlwdl6djzgsvm
SUPPLIER_MODULE_ADDRESS = pokt1j40dzzmn6cn9kxku7a5tjnud6hv37vesr5ccaa
GATEWAY_MODULE_ADDRESS = pokt1f6j7u6875p2cvyrgjr0d2uecyzah0kget9vlpl
SERVICE_MODULE_ADDRESS = pokt1nhmtqf4gcmpxu0p6e53hpgtwj0llmsqpxtumcf
GOV_ADDRESS = pokt10d07y265gmmuvt4z0w9aw880jnsr700j8yv32t
PNF_ADDRESS = pokt1eeeksh2tvkh7wzmfrljnhw4wrhs55lcuvmekkw

And we can then:

$ pkd_beta_query bank balance pokt1rl3gjgzexmplmds3tq3r3yk84zlwdl6djzgsvm upokt -o json
{
  "balance": {
    "denom": "upokt",
    "amount": "1680031998790"
  }
}

1.3 Shadow Launch Strategy

This is out of scope of this issue but it requires minimal context.

Part of our launch + Validator strategy will involve having a net new mint.

This is purely an example:

  1. Assume Morse has 100 total POKT
  2. Shannon Shadow launches with 10 POKT and 0 inflation; needed for initial validators, applications, suppliers, gateways, etc
  3. Migration brings Shannon POKT from 10 POKT to 110 POKT
  4. DAO aligns on what happens to the new 10 POKT

2. Requirements

2.1 From the Foundation

I'm going to reference the requirement from the foundation checklist:

Image

I think we can have a bit more leeway than 0.0001% but let's use that as a starting point.

2.2 Supply Validation in Local + Dev Net

We need to have an E2E test that goes through claim+stake process for ALL (supplier + application) actors below.

Image
Image

2.3 Supply Validation in TestNet

We will test state upload in Beta TestNet, but I do not expect us to go through the effort of claiming all staked actors (i.e. many keys are probably lost anyhow).

2.4 Supply Validation in Prod

Keep in mind that claiming Morse POKT in Shannon is likely going to be a LONG (months / years) process as prior holders come along.

3. Suggested PATH forward

3.1 Supply Validation in Local + Dev Net

  1. Create an E2E test
  2. Prepare a fixture to be uploaded in Local/DevNet
  3. Claim all Applications + all Suppliers
  4. Ensure APPLICATION_MODULE_ADDRESS increased by app_staked
  5. Ensure SUPPLIER_MODULE_ADDRESS increased by node_staked
  6. Ensure bank total increased by total

3.2 Supply Validation in TestNet + Prod

Once we have the above done, we'll present it to the foundation and start collecting feedback.

CCing @red-0ne @okdas @fredteumer for visibility


@bryanchriswhite Thanks for calling this out as a blocker!

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
migration Morse to Shannon migration related work
Projects
Status: 🏗 In progress
Development

No branches or pull requests

2 participants