Non-Custodial Claim Migration Workflow #1311
Replies: 8 comments 17 replies
-
|
Subscribing. |
Beta Was this translation helpful? Give feedback.
-
Non-Custodial Claim Migration Workflow (Rewrite)Background: This document is a (AI-assited) rewrite of the original content from @jorgecuesta that I put together while reading, understanding, evaluating and thinking about the suggestion. Disclaimer: Suggested changes are a function of the assumptions being correct. Whether that's the case or not, streamlining the node's workflow will require a deeper dive into the investigation. TL;DRThe goal is to streamline the claiming of -- WITHOUT -- Requiring What's new and what will come?
A. Background - Migration Use Cases1. Wallet MigrationClick to expand Wallet Migration detailsTL;DRA basic account migration that bonds Morse accounts to Shannon accounts, establishing the foundation for further migration steps. Process
graph LR
A[Morse Account A] -->|MsgClaimMorseAccount| B[Shannon Account B]
style A fill:#f9d5e5,stroke:#000
style B fill:#eeeeee,stroke:#000
%% Making text black by adding class definitions
classDef default color:#000
class A,B default
2. Custodial MigrationClick to expand Custodial Migration detailsTL;DRMigration process for a custodial setup where a single supplier account represents a node address on the Shannon network. Process
graph TD
subgraph "Morse Network" AS MN
A["Node Address A <br> A = Owner = Operator"]
end
subgraph "Shannon Network" AS SN
Z["Supplier Address Z <br> A = Addr = Add"]
end
A -->|MsgClaimMorseAccount| Z
A -->|MsgClaimMorseSupplier| Z
style A fill:#f9d5e5,stroke:#000
style Z fill:#eeeeee,stroke:#000
%% Making all text black
classDef default color:#000
class A,Z default
classDef subgraphStyle color:#000
class MN,SN subgraphStyle
3. Non-Custodial Migration (CRITICAL SCENARIO FOR THIS DISCUSSION)Click to expand Non-Custodial Migration detailsTL;DRComplex migration scenario where:
Process
graph TD
subgraph "Morse Network" as MN
A[Output Address A]
B[Node 1 Address B]
C[Node 2 Address C]
end
subgraph "Shannon Network" as SN
X[Owner Address X]
Y[Supplier 1 Address Y]
Z[Supplier 2 Address Z]
end
A -->|MsgClaimMorseAccount| X
B -->|MsgClaimMorseAccount| Y
C -->|MsgClaimMorseAccount| Z
B -->|MsgClaimMorseSupplier| Y
C -->|MsgClaimMorseSupplier| Z
X -->|Owns| Y
X -->|Owns| Z
style A fill:#f9d5e5,stroke:#000
style B fill:#c8e6c9,stroke:#000
style C fill:#c8e6c9,stroke:#000
style X fill:#eeeeee,stroke:#000
style Y fill:#e3f2fd,stroke:#000
style Z fill:#e3f2fd,stroke:#000
%% Making all text black
classDef default color:#000
class A,B,C,X,Y,Z default
classDef subgraphStyle color:#000
class MN,SN subgraphStyle
B. Assumptions, Issues, Conerns & SuggestionsThe assumptions and concerns below are in reference to section A3 above. 1. Migration Rule AssumptionsClick to expand Migration Rule detailstl;dr The migration process depends on proper account bonding established during the wallet migration phase. We believe 2. Current Implementation ConcernsClick to expand Implementation Concernstl;dr The current implementation appears to require owner approval for migrations, which complicates the process for non-technical users. B2.1 Looking at the code [1], only the 'owner address' appears authorized to approve transactions. This is problematic because:
C. Conclusion & Proposed Changes + ImplementationClick to expand Proposed Implementation detailstl;dr Allow node operators to handle migrations (fully) to streamline the process while maintaining security through proper account bonding. Benefits of proposed approach:
Current implementation issues:
D. References |
Beta Was this translation helpful? Give feedback.
-
|
Just meant as a #FYI for reference - no more than that. Posting a link w/ related github issues, PRs and ongoing work. Actual details, proposal, explanations will follow up in a separate thread.
|
Beta Was this translation helpful? Give feedback.
-
A2. Cusotial MigrationStarting a thread ONLY to explain and provide details on flow A2 in this message This is how things currently work on Takeaway: The understanding was this: graph TD
subgraph "Morse Network" AS MN
A["Node Address A<br>A = Addr = Output"]
end
subgraph "Shannon Network" AS SN
Z["Supplier Address Z<br>Z = Owner = Operator"]
end
A -->|MsgClaimMorseAccount| Z
A -->|MsgClaimMorseSupplier| Z
style A fill:#f9d5e5,stroke:#000
style Z fill:#eeeeee,stroke:#000
%% Making all text black
classDef default color:#000
class A,Z default
classDef subgraphStyle color:#000
class MN,SN subgraphStyle
The actuality is this: graph TD
subgraph MN["Morse Network"]
A["Node Address A<br>A = Addr = Output"]
UA["Unstaked Balance"]
SA["Staked Balance"]
end
subgraph SN["Shannon Network"]
UZ["Unstaked Balance (Shannon)"]
Z["Supplier Address Z<br>Z = Owner = Operator"]
SZ["Staked Balance "]
end
MN -.->|MsgClaimMorseSupplier| SN
UA ---|"Transfer <br> (Unstaked Balance)"| UZ
SA ---|"Transfer <br> (Staked Balance)"| SZ
style A fill:#f9d5e5,stroke:#000
style UA fill:#fff2cc,stroke:#000
style SA fill:#cfe2f3,stroke:#000
style Z fill:#eeeeee,stroke:#000
style UZ fill:#fff2cc,stroke:#000
style SZ fill:#cfe2f3,stroke:#000
%% Making all text black
classDef default color:#000
class A,UA,SA,Z,UZ,SZ default
classDef subgraphStyle color:#000
class MN,SN subgraphStyle
|
Beta Was this translation helpful? Give feedback.
-
A3. Non-Cusotial MigrationStarting a thread ONLY to continue the discussion in flow A3 in this message This IS NOT due to a lack of support for There are two PRs in flight to add partial support for this, and one more will follow to enforce the table below. In flight:
Call to action & Next Steps: Feedback on whether the list of supported/unsupported with onchain/offchain requirements below will satisfy the migration requirements. The process will be similar to what is described in A2 with additional constraints and slightly different configurations.
Some assumptions:
V1 of the Table| Morse / Shannon-sign Description | Morse (`address`, `output_address`) | Shannon (`owner_address`, `operator_address`) | Claim Signer | Supported | Details / Notes / Explanation | Pre-conditions |
| ----------------------------------- | ----------------------------------- | --------------------------------------------- | ------------ | --------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| custodial / owner-operator-sign | (`M`, `M`) | (`S`, `S`) | `S` | ✅ | Custodial flow #1 | `S` owns `M` |
| custodial / owner-sign | (`M1`, null) | (`S1`, null) | `S1` | ✅ | Custodial flow #1 | `S1` owns `M1` |
| non-custodial / owner-sign | (`M1`, `M2`) | (`S1`, null) | `S1` | ❌ | MUST have `operator_address` if `output_address` exists for backwards-simplification | NA |
| non-custodial / owner-sign | (`M1`, `M2`) | (`S1`, `S2`) | `S1` | ✅ | Non-custodial flow executed by owner | (`S1` owns `M1`) && (`S2` owns `M2`) && (`M2` gives `S2` shannon staking instructions offchain) |
| non-custodial / operator-sign | (`M1`, `M2`) | (`S1`, `S2`) | `S2` | ✅ | Non-custodial flow executed by operator | (`S1` owns `M1`) && (`S2` owns `M2`) && (`S2` gives `M2` shannon address offline) |
| non-custodial / owner-sign | (`M1`, null) | (`S1`, `S2`) | `S2` | ❌ | MUST NOT have `operator_address` if `output_address` does not exist for backwards-simplification | NA |
| missing operator / NA | (null, `M2`) | NA | NA | ❌ | Not supported because `M1` cannot be null | NA |
| NA / missing owner | NA | (null, `S2`) | NA | ❌ | Not supported because `S1` cannot be null | NA |
| non-custodial / owner-operator-sign | (`M1`, `M2`) | (`S`, `S`) | `S` | ❌ | `operator_address` must differ from `owner_address` for backwards-simplification | NA | |
Beta Was this translation helpful? Give feedback.
-
Bonus: WIP LocalNet E2E Copy-Pasta Supplier Claiming InstructionsI'm actively working on an early WIP to test claims on LocalNet (to simplify things). The work:
Below is a copy-pasta of the current state of the instructions for easier access. Details# LocalNet Supplier ClaimThese are manual copy-pasta instructions to test, experiment and showcase Supplier Claiming on a localnet. Table of ContentsMorse (
|
| Morse / Shannon-sign Description | Morse (address, output_address) |
Shannon (owner_address, operator_address) |
Claim Signer | Supported | Details / Notes / Explanation | Pre-conditions |
|---|---|---|---|---|---|---|
| custodial / owner-operator-sign | (M, M) |
(S, S) |
S |
✅ | Custodial flow #1 | S owns M |
| custodial / owner-sign | (M1, null) |
(S1, null) |
S1 |
✅ | Custodial flow #1 | S1 owns M1 |
| non-custodial / owner-sign | (M1, M2) |
(S1, null) |
S1 |
❌ | MUST have operator_address if output_address exists for backwards-simplification |
NA |
| non-custodial / owner-sign | (M1, M2) |
(S1, S2) |
S1 |
✅ | Non-custodial flow executed by owner | (S1 owns M1) && (S2 owns M2) && (M2 gives S2 shannon staking instructions offchain) |
| non-custodial / operator-sign | (M1, M2) |
(S1, S2) |
S2 |
✅ | Non-custodial flow executed by operator | (S1 owns M1) && (S2 owns M2) && (S2 gives M2 shannon address offline) |
| non-custodial / owner-sign | (M1, null) |
(S1, S2) |
S2 |
❌ | MUST NOT have operator_address if output_address does not exist for backwards-simplification |
NA |
| missing operator / NA | (null, M2) |
NA | NA | ❌ | Not supported because M1 cannot be null |
NA |
| NA / missing owner | NA | (null, S2) |
NA | ❌ | Not supported because S1 cannot be null |
NA |
| non-custodial / owner-operator-sign | (M1, M2) |
(S, S) |
S |
❌ | operator_address must differ from owner_address for backwards-simplification |
NA |
Claim Shannon Supplier WITHOUT an output address
Conditions whereby:
- In Morse:
operator_address!= nulloutput_address=null - In Shannon:
owner_address=operator_address - Claiming as a
owner_addresson behalf ofoperator_address
Prepare a supplier stake config:
cat <<EOF > 2e26_claim_supplier_1_supplier_config.yaml
owner_address: ${ADDR_SUPPLIER_1}
operator_address: ${ADDR_SUPPLIER_1}
default_rev_share_percent:
${ADDR_OWNER}: 100
services:
- service_id: anvil
endpoints:
- publicly_exposed_url: http://relayminer1:8545
rpc_type: JSON_RPC
EOFClaim the supplier:
pocketd tx migration claim-supplier \
pocket-account-2e2624762bcfee4a44001543adddce0e4f4cc823.json \
2e26_claim_supplier_1_supplier_config.yaml \
--from=2e26-claim-supplier-1 \
--node=http://localhost:26657 --chain-id=pocket \
--home=./localnet/pocketd --keyring-backend=test --no-passphraseAnd verify it is onchain:
pocketd query supplier show-supplier ${ADDR_SUPPLIER_1} \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketdYou can check its stake:
pocketd query supplier show-supplier ${ADDR_SUPPLIER_1} \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketd | jq '.supplier.stake.amount'You can check its unstaked balance:
pocketd query bank balance ${ADDR_SUPPLIER_1} upokt \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketd | jq '.balance.amount'[NOT IMPLEMENTED YET] Option 1 - Claim Shannon Supplier WITH an output address - as an owner
Conditions whereby:
- In Morse:
output_address!=null&operator_address!= null - In Shannon:
owner_address!=operator_address - Claiming as a
owner_addresson behalf ofoutput_address
Prepare a supplier stake config:
cat <<EOF > 80e3_claim_supplier_2_supplier_config.yaml
owner_address: ${ADDR_OWNER}
operator_address: ${ADDR_SUPPLIER_2}
default_rev_share_percent:
${ADDR_OWNER}: 20
${ADDR_SUPPLIER_2}: 80
services:
- service_id: anvil
endpoints:
- publicly_exposed_url: http://relayminer1:8545
rpc_type: JSON_RPC
EOFClaim the supplier:
pocketd tx migration claim-supplier \
pocket-account-80e3058d66ee75578b07472650483da0035febe6.json \
80e3_claim_supplier_2_supplier_config.yaml \
--from=80e3-claim-supplier-2 \
--node=http://localhost:26657 --chain-id=pocket \
--home=./localnet/pocketd --keyring-backend=test --no-passphraseAnd verify it is onchain:
pocketd query supplier show-supplier ${ADDR_SUPPLIER_2} \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketdYou can check its stake:
pocketd query supplier show-supplier ${ADDR_SUPPLIER_2} \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketd | jq '.supplier.stake.amount'You can check the unstaked balance transfer of the owner's unstaked balance:
pocketd query bank balance ${ADDR_OWNER} upokt \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketd | jq '.balance.amount'[NOT IMPLEMENTED YET] Option 2 - Claim Shannon Supplier WITH an output address - as an operator
Conditions whereby:
- In Morse:
output_address!=null&operator_address!= null - In Shannon:
owner_address=operator_address - Claiming as a
operator_addresson behalf ofoutput_address
Prepare a supplier stake config:
cat <<EOF > 80e3_claim_supplier_2_supplier_config.yaml
owner_address: ${ADDR_OWNER}
operator_address: ${ADDR_SUPPLIER_2}
default_rev_share_percent:
${ADDR_OWNER}: 20
${ADDR_SUPPLIER_2}: 80
services:
- service_id: anvil
endpoints:
- publicly_exposed_url: http://relayminer1:8545
rpc_type: JSON_RPC
EOFClaim the supplier:
pocketd tx migration claim-supplier \
pocket-account-80e3058d66ee75578b07472650483da0035febe6.json \
80e3_claim_supplier_2_supplier_config.yaml \
--from=80e3-claim-supplier-2 \
--node=http://localhost:26657 --chain-id=pocket \
--home=./localnet/pocketd --keyring-backend=test --no-passphraseAnd verify it is onchain:
pocketd query supplier show-supplier ${ADDR_SUPPLIER_2} \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketdYou can check its stake:
pocketd query supplier show-supplier ${ADDR_SUPPLIER_2} \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketd | jq '.supplier.stake.amount'You can check the unstaked balance transfer of the owner's unstaked balance:
pocketd query bank balance ${ADDR_OWNER} upokt \
-o json --node=http://127.0.0.1:26657 \
--home=./localnet/pocketd | jq '.balance.amount'Beta Was this translation helpful? Give feedback.
-
|
@jorgecuesta @RawthiL @Alann27 @TheFeloniousMonk @fredteumer I've tried to tackle all the open questions w/ next steps as clearly and simply as possible in separate threads. PTAL at your convenience so we can keep the momentum going. |
Beta Was this translation helpful? Give feedback.
-
Additional Use Case for Migration Flow:There should be a mechanism during the migration process that allows a
Currently, This functionality might be better implemented as a separate message (e.g. Failing to support this scenario risks locking up |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello folks @Olshansk @bryanchriswhite @red-0ne; @breezytm and I was reading through the documentation, asking AIs, etc.
We are trying to understand the claim process of the migration, specifically for the
non-custodial.Here we prepare a few use cases of our understandings on how the migration either works or should work, based on our
experience as node runners.
----------------------------------
Use Cases:
----------------------------------
Wallet Migration Use Case:
----------------------------------
MsgClaimMorseAccountfrom A -> B (this creates bonding between morse and shannon account)Result:
----------------------------------
Custodial Migration Use Case:
----------------------------------
Morse Context:
Shannon Context (Note: just empty wallets):
Wallet Migration Use Casefor every wallet on contexts1.1 Node Address (A) -> Supplier Address (Z)
MsgClaimMorseSupplierfor Node on Morse:2.1 Node Address = A -> Operator & Owner Address = Z - Because is the Shannon bonding created with
MsgClaimMorseAccountbetween networks for account AResult:
----------------------------------
Non-Custodial Migration Use Case:
----------------------------------
Morse Context:
Shannon Context (Note: just empty wallets):
Wallet Migration Use Casefor every wallet on contexts1.1 Output Address (A) -> Owner Address (X)
1.2 Node 1 Address (B) -> Supplier 1 Address (Y)
1.3 Node 2 Address (C) -> Supplier 2 Address (Z)
MsgClaimMorseSupplierfor every Node on Morse:--- iter 1 ---
2.1 Owner Address = X - Because is the Shannon account bonded to Morse Account A as
Output Address2.2 Morse Address = B -> Operator Address 1 = Y - Because is the Shannon bonding created with
MsgClaimMorseAccountbetween networks for account B--- iter 2 ---
2.3 Owner Address = X - Because is the Shannon account bonded to Morse Account A as
Output Address2.4 Morse Address = C -> Operator Address 2 = Z - Because is the Shannon bonding created with
MsgClaimMorseAccountbetween networks for account CResult:
Ownerof Supplier Account (X) and (Z)----------------------------------
Assumptions:
MsgClaimMorseSupplierenforce the following rules:1.1
shannon_owner_addressused was theshannon_dest_addressof theMsgClaimMorseAccountto migrate Morse Account (A) to Shannon Account (Y)1.2
shannon_operator_addressused was theshannon_dest_addressof theMsgClaimMorseAccountto migrate Morse Account 1 (B) to Shannon Account (X)1.3
shannon_operator_addressused was theshannon_dest_addressof theMsgClaimMorseAccountto migrate Morse Account 1 (C) to Shannon Account (Z)1.4 Same of 1.2 and 1.3 for Morse Node 2 -> Shannon Supplier 2
----------------------------------
Conclusion:
If our assumption about how the migration from Morse to Shannon works is correct, then the staking providers (who manage the nodes) only need to know the BONDED ‘output address/owner address’ in order to move the nodes for customers.
However, when we look at the code [1], it seems that only the ‘owner address’ is allowed to approve the transaction, which is not ideal.
Why isn't it ideal? Rely on the customer to run the migration could delay the process and overcomplicate it because they are not technical.
Also, the
MsgClaimMorseSupplierrequires some configuration files that require deep knowledge of stake structure [2], and usage of web/bash tools which may be ready but not properly documented for everyone.Letting operators migrate these nodes for customers would make the process easier. It would also ensure that anyone with the proper private key could move the servicer's address to Shannon—as long as the ‘owner address’ matches during the migration.
I want to add that the flow we described here provides security for each actor (stake holder aka owner, provider aka node runner):
MsgClaimMorseAccountOf course if the flow is the one we describe.
----------------------------------
Links:
Beta Was this translation helpful? Give feedback.
All reactions