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

[Morse->Shannon Migration] Migration module #1034

Open
6 of 13 tasks
bryanchriswhite opened this issue Jan 20, 2025 · 0 comments · Fixed by #1059, #1080, #1079, #1091 or #1093
Open
6 of 13 tasks

[Morse->Shannon Migration] Migration module #1034

bryanchriswhite opened this issue Jan 20, 2025 · 0 comments · Fixed by #1059, #1080, #1079, #1091 or #1093
Assignees
Labels
consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. on-chain On-chain business logic protocol General core protocol related changes

Comments

@bryanchriswhite
Copy link
Contributor

bryanchriswhite commented Jan 20, 2025

Objective

Enable account (identity and balances) state migration from Morse to Shannon.

Origin Document

https://www.notion.so/buildwithgrove/Technical-Migration-from-Morse-Shannon-173a36edfff6800689fad43fd15287cd

Goals

  • Enable on-chain commitment to Morse migration state
  • Enable self-claiming of Morse account identity
  • Enable self-claiming of Morse account balance(s)

Deliverables

Non-goals / Non-deliverables

  • On-chain validation or Morse import state.
  • Supporting applications staked for multiple services (can claim but must choose one).
  • Any kind of stake/unstaked token redistribution as a result of the claiming.
    • Operators can update their actor stakes/configs on Morse prior to migration (i.e. "migration height").
    • Operators can update their actor stakes/configs on Shannon after claiming.

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

@bryanchriswhite bryanchriswhite added consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. on-chain On-chain business logic protocol General core protocol related changes labels Jan 20, 2025
@bryanchriswhite bryanchriswhite self-assigned this Jan 20, 2025
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Shannon Jan 20, 2025
@bryanchriswhite bryanchriswhite moved this from 📋 Backlog to 🏗 In progress in Shannon Jan 20, 2025
@bryanchriswhite bryanchriswhite linked a pull request Jan 20, 2025 that will close this issue
15 tasks
@bryanchriswhite bryanchriswhite linked a pull request Jan 20, 2025 that will close this issue
15 tasks
@bryanchriswhite bryanchriswhite linked a pull request Jan 22, 2025 that will close this issue
15 tasks
@bryanchriswhite bryanchriswhite linked a pull request Jan 27, 2025 that will close this issue
15 tasks
@Olshansk Olshansk moved this from 🏗 In progress to 👀 In review in Shannon Jan 28, 2025
@bryanchriswhite bryanchriswhite linked a pull request Jan 29, 2025 that will close this issue
12 tasks
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Shannon Feb 5, 2025
@bryanchriswhite bryanchriswhite linked a pull request Feb 5, 2025 that will close this issue
12 tasks
@bryanchriswhite bryanchriswhite moved this from ✅ Done to 🏗 In progress in Shannon Feb 5, 2025
@bryanchriswhite bryanchriswhite linked a pull request Mar 10, 2025 that will close this issue
12 tasks
bryanchriswhite added a commit that referenced this issue Mar 11, 2025
#1080)

## Summary

```bash
scaffold: message claim_morse_application --module migration --signer shannon_dest_address morse_src_address morse_signature stake:coin service_config --response morse_src_address --response claimed_balance:coin --response service_id --response claimed_application_stake:coin --response claimed_at_height:int --response application
```

Changes:
- Scaffold `MsgClaimMorseApplication` message

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [x] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Shannon Mar 11, 2025
bryanchriswhite added a commit that referenced this issue Mar 11, 2025
…ods (#1091)

## Summary

Extract application staking business logic to `Keeper` methods (as
opposed to `msgServer`).

**Rationale**: 
1. The migration module needs to stake applications/suppliers/gateways
(this PR focuses on applications).
2. There's precedent for adding module `Keeper`s as dependencies to
other modules, but not `msgServer`s.
(see:
#1080 (comment))

Changes:
- Change the receiver of `#createApplication()` and
`#updateApplication()` from `msgServer`, to `Keeper`.
- Extract `Keeper#StakeApplication()` from
`msgServer#StakeApplication()`.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [x] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [x] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
@bryanchriswhite bryanchriswhite moved this from ✅ Done to 🏗 In progress in Shannon Mar 11, 2025
bryanchriswhite added a commit that referenced this issue Mar 11, 2025
…er (#1082)

## Summary

Implement `MsgClaimMorseApplication` message handler. It should stake,
or upstake and replace the service config, a Shannon application, given
a previously imported (and unclaimed) `MorseClaimableAccount`.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
bryanchriswhite added a commit that referenced this issue Mar 11, 2025
…`Keeper` (#1093)

## Summary

Extract supplier staking business logic to `Keeper` methods (as opposed
to `msgServer`).

**Rationale**: 
1. The migration module needs to stake applications/suppliers/gateways
(this PR focuses on suppliers).
2. There's precedent for adding module `Keeper`s as dependencies to
other modules, but not `msgServer`s.
(see:
#1080 (comment))

Changes:
- Change the receiver of `#createSupplier()` and `#updateSupplier()`
from `msgServer`, to `Keeper`.
- Extract `Keeper#StakeSupplier()` from `msgServer#StakeSupplier()`.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Shannon Mar 11, 2025
@bryanchriswhite bryanchriswhite moved this from ✅ Done to 🏗 In progress in Shannon Mar 11, 2025
bryanchriswhite added a commit that referenced this issue Mar 11, 2025
## Summary

```bash
ignite scaffold message claim_morse_supplier --module migration --signer shannon_dest_address morse_src_address morse_signature stake:coin service_config --response morse_src_address --response claimed_balance:coin --response service_id --response claimed_supplier_stake:coin --response claimed_at_height:int --response supplier
```

Changes:
- Scaffold `MsgClaimMorseSupplier`
- Add `TODO_UPNEXT` comments

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [x] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Shannon Mar 11, 2025
@bryanchriswhite bryanchriswhite moved this from ✅ Done to 🏗 In progress in Shannon Mar 11, 2025
bryanchriswhite added a commit that referenced this issue Mar 11, 2025
…1117)

## Summary

Remove unused gateway keeper from the migration module.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [ ] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [ ] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable
red-0ne added a commit that referenced this issue Mar 12, 2025
## Summary

Implement the `MsgClaimMorseAccount` handler. This enables claiming the
of the total tokens (unstaked balance plus any actor stakes) of the
Morse account to a Shannon account.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne added a commit that referenced this issue Mar 12, 2025
…Claimable$1`/g (#1076)

## Summary

Rename `QueryGetMorseClaimableAccount` and
`QueryGetMorseClaimableAccountResponse` to remove the "get".

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne added a commit that referenced this issue Mar 12, 2025
…deps (#1079)

## Summary

Add application, supplier, and gateway keepers as migration module
dependencies. This is in preparation for future work on #1034 which
requires staking application, supplier, and gateway actors during Morse
account claiming.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne pushed a commit that referenced this issue Mar 12, 2025
## Summary

Fix the usage of `isTTLEnabled` to properly support zero TTL (mainly for
testing).

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable
red-0ne added a commit that referenced this issue Mar 12, 2025
#1080)

## Summary

```bash
scaffold: message claim_morse_application --module migration --signer shannon_dest_address morse_src_address morse_signature stake:coin service_config --response morse_src_address --response claimed_balance:coin --response service_id --response claimed_application_stake:coin --response claimed_at_height:int --response application
```

Changes:
- Scaffold `MsgClaimMorseApplication` message

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [x] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne added a commit that referenced this issue Mar 12, 2025
…ods (#1091)

## Summary

Extract application staking business logic to `Keeper` methods (as
opposed to `msgServer`).

**Rationale**: 
1. The migration module needs to stake applications/suppliers/gateways
(this PR focuses on applications).
2. There's precedent for adding module `Keeper`s as dependencies to
other modules, but not `msgServer`s.
(see:
#1080 (comment))

Changes:
- Change the receiver of `#createApplication()` and
`#updateApplication()` from `msgServer`, to `Keeper`.
- Extract `Keeper#StakeApplication()` from
`msgServer#StakeApplication()`.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [x] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [x] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne added a commit that referenced this issue Mar 12, 2025
…er (#1082)

## Summary

Implement `MsgClaimMorseApplication` message handler. It should stake,
or upstake and replace the service config, a Shannon application, given
a previously imported (and unclaimed) `MorseClaimableAccount`.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne added a commit that referenced this issue Mar 12, 2025
…`Keeper` (#1093)

Extract supplier staking business logic to `Keeper` methods (as opposed
to `msgServer`).

**Rationale**:
1. The migration module needs to stake applications/suppliers/gateways
(this PR focuses on suppliers).
2. There's precedent for adding module `Keeper`s as dependencies to
other modules, but not `msgServer`s.
(see:
#1080 (comment))

Changes:
- Change the receiver of `#createSupplier()` and `#updateSupplier()`
from `msgServer`, to `Keeper`.
- Extract `Keeper#StakeSupplier()` from `msgServer#StakeSupplier()`.

- Issue: #1034

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne added a commit that referenced this issue Mar 12, 2025
## Summary

```bash
ignite scaffold message claim_morse_supplier --module migration --signer shannon_dest_address morse_src_address morse_signature stake:coin service_config --response morse_src_address --response claimed_balance:coin --response service_id --response claimed_supplier_stake:coin --response claimed_at_height:int --response supplier
```

Changes:
- Scaffold `MsgClaimMorseSupplier`
- Add `TODO_UPNEXT` comments

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [x] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [ ] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [x] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [x] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [x] I added TODOs where applicable

---------

Co-authored-by: Daniel Olshansky <[email protected]>
Co-authored-by: red-0ne <[email protected]>
red-0ne pushed a commit that referenced this issue Mar 12, 2025
…1117)

## Summary

Remove unused gateway keeper from the migration module.

## Issue

- Issue: #1034

## Type of change

Select one or more from the following:

- [ ] New feature, functionality or library
- [ ] Consensus breaking; add the `consensus-breaking` label if so. See
#791 for details
- [ ] Bug fix
- [x] Code health or cleanup
- [ ] Documentation
- [ ] Other (specify)

## Sanity Checklist

- [ ] I have updated the GitHub Issue `assignees`, `reviewers`,
`labels`, `project`, `iteration` and `milestone`
- [ ] For docs, I have run `make docusaurus_start`
- [ ] For code, I have run `make go_develop_and_test` and `make
test_e2e`
- [ ] For code, I have added the `devnet-test-e2e` label to run E2E
tests in CI
- [ ] For configurations, I have update the documentation
- [ ] I added TODOs where applicable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment