Migration E2E Testing (LocalNet)

Read Me First

  • You must already know what pocket, pocketd, and LocalNet are.

  • If you are not a developer/operator, stop here.

Goal of this document:

  • Manually test Supplier Claiming on LocalNet with clear, step-by-step, 📠-🍝 commands.

  • This guide is idiot-proofed: every step is explicit, warnings are surfaced, and copy-paste actions are clearly marked.


Prerequisites

  • pocket must be installed

  • pocketd must be installed

  • You must know how to run a shannon LocalNet (omitting details intentionally)

Morse Setup ( pocket )

Morse Account Preparation

Create 6 Accounts with these roles:

  • (1) PNF & Validator (same address for both)

  • (2-4) Operators (suppliers)

  • (5-6) Owners (outputs)

When prompted for a password, just press Enter (leave it empty).

Verify accounts were created:

You should see 6 addresses such as:

Assign addresses to environment variables (use your real output if different):

⚠️ Make sure to replace — double check you use the right address for each variable. Copy-pasta with care ⚠️

Export the private keys for each address:

This creates several files in your current directory which you can check via:

Retrieve their public keys:

Assign the public keys to environment variables (replace with your values):

⚠️ Make sure to replace — double check you use the right address for each variable. Copy-pasta with care ⚠️

Morse State Preparation

Copy the example state file:

Replace placeholder variables in the new file:

Testing an edge case?

This is the part where you SHOULD manually modify localnet_testing_state_export.json if you're testing some weird edge case.

Generate import message:

This creates a new file locally which you can check via:

Shannon State Upload

Start LocalNet:

Wait for all services to be fully up before continuing.

Upload Morse state:

⚠️ This command does not output anything. If it returns to prompt, it likely succeeded ⚠️

Check claimable accounts:

⚠️ You should see exactly 6 accounts in the output! If not, something is wrong ⚠️

Example output:

Shannon Setup ( pocketd )

Shannon Account Preparation

Create prefix variables:

Create 5 new Shannon accounts (3 suppliers, 2 owners):

Export addresses:

These variables will be used in all subsequent steps.

Fund all accounts:

If any command fails, stop and debug before continuing.

Check balances:

Each account should show a balance. If not, fix before proceeding.


[Most Common] Option 1 : Non-Custodial Supplier Claim WITH Output Address - Signed by Operator

Create supplier config:

Check owner's unstaked balance before claim:

This should return 0.

Check supplier's unstaked balance before claim:

This should return 0.

Check stake before claim:

This should error (supplier doesn't exist yet).

Submit the onchain account claim (step 1/2):

Verify account exists onchain:

And check its balance:

This should return non-0.

Submit the onchain supplier claim (step 2/2):

Verify supplier exists onchain:

Verify the supplier's account exists onchain:

Check supplier's unstaked balance after claim:


Option 2 : Non-Custodial Supplier Claim WITH Output Address - Signed by Owner

out of date

TODO(@olshansk): Update the documentation in this section if/when necessary.

Create supplier config:

Check stake before claim:

This should error (supplier doesn't exist yet).

Check owner's unstaked balance before claim:

Check supplier's unstaked balance before claim:

Submit the onchain claim:

If this fails, do not continue until resolved.

Verify supplier exists onchain:

Check stake after claim:

Check owner's unstaked balance after claim:

Check supplier's unstaked balance after claim:


Option 3: Custodial Supplier Claim WITHOUT Output Address Signed by Operator

out of date

TODO(@olshansk): Update the documentation in this section if/when necessary.

Create supplier config:

Check stake before claim:

This should error (supplier doesn't exist yet).

Check unstaked balance before claim:

Submit the onchain claim:

Verify supplier exists onchain:

Check stake after claim:

Check unstaked balance after claim:

Example

For an example of some copy-pasta, see the example script:

https://dev.poktroll.com/assets/files/instructions-196cfa80db7ede6f0e96b81e3cb6b2e0.sh


Was this helpful?