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] refactor: app staking logic as keeper methods #1091

Merged
merged 144 commits into from
Mar 11, 2025

Conversation

bryanchriswhite
Copy link
Contributor

@bryanchriswhite bryanchriswhite commented Feb 26, 2025

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 Keepers as dependencies to other modules, but not msgServers.
    (see: [Morse->Shannon Migration] scaffold MsgClaimMorseApplication message #1080 (comment))

Changes:

  • Change the receiver of #createApplication() and #updateApplication() from msgServer, to Keeper.
  • Extract Keeper#StakeApplication() from msgServer#StakeApplication().

Issue

Type of change

Select one or more from the following:

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

(cherry picked from commit 71f5112)
…nnon_dest_address morse_src_address morse_signature --response morse_src_address --response claimed_balance:coin --response claimed_at_height:int
bryanchriswhite and others added 25 commits March 6, 2025 13:45
…deps

* issues/1034/refactor/query:
  self-review improvements
  chore: review feedback improvements
  chore: self-review improvements
  chore: regenerate protobufs
  chore: review feedback improvements
  chore: review feedback improvements
  refactor: MorseStateExport & MorseClaimableAccount fixtures
  [RelayMiner] Implement relayminer query caching (#1050)
…sg_claim_morse_application

* issues/1034/migration/deps:
  self-review improvements
  chore: review feedback improvements
  chore: self-review improvements
  chore: regenerate protobufs
  chore: review feedback improvements
  chore: review feedback improvements
  refactor: MorseStateExport & MorseClaimableAccount fixtures
  [RelayMiner] Implement relayminer query caching (#1050)
* pokt/main:
  [Morse->Shannon Migration] feat: implement claim Morse account (#1059)
* pokt/main:
  [Morse->Shannon Migration] s/`QueryGetMorseClaimable(.+)`/`QueryMorseClaimable$1`/g (#1076)
…g_claim_morse_application

* pokt/main:
  [Code Health] fix: support zero kvcache TTL (#1108)
  [Morse->Shannon Migration] chore: add gateway, app & supplier keeper deps (#1079)
…ake_app

* pokt/main:
  [Morse->Shannon Migration] scaffold `MsgClaimMorseApplication` message (#1080)
@bryanchriswhite bryanchriswhite changed the base branch from issues/1034/scaffold/msg_claim_morse_application to main March 11, 2025 08:02
@bryanchriswhite bryanchriswhite merged commit 15f9dfb into main Mar 11, 2025
10 checks passed
bryanchriswhite added a commit that referenced this pull request Mar 11, 2025
…morse_app

* pokt/main:
  [Morse->Shannon Migration] refactor: app staking logic as keeper methods (#1091)
@bryanchriswhite bryanchriswhite deleted the issues/1034/refactor/stake_app branch March 11, 2025 11:01
red-0ne added a commit that referenced this pull request 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
consensus-breaking IMPORTANT! If the PR with this tag is merged, next release WILL HAVE TO BE an upgrade. devnet devnet-test-e2e migration Morse to Shannon migration related work on-chain On-chain business logic push-image CI related - pushes images to ghcr.io
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[Morse->Shannon Migration] Migration module
2 participants