-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat(pfm): Migration to align expected escrow state #231
Merged
wllmshao
merged 18 commits into
cosmos:ws/keeper
from
Kava-Labs:dl-sync-escrow-migration
Feb 11, 2025
Merged
feat(pfm): Migration to align expected escrow state #231
wllmshao
merged 18 commits into
cosmos:ws/keeper
from
Kava-Labs:dl-sync-escrow-migration
Feb 11, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SetPreBlocker was not set, so upgrade module did not trigger. Also, upgrade handlers should not be set in the previous binary.
drklee3
commented
Feb 11, 2025
|
||
// Migrate migrates the x/packetforward module state from the consensus version | ||
// 2 to version 3 | ||
func Migrate( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a very standard migration here since it affects other modules instead of the current module state, open to feedback! Alternatively, resolving state in it in an upgrade handler without bumping consensus versions could be an option
wllmshao
approved these changes
Feb 11, 2025
wllmshao
added a commit
that referenced
this pull request
Feb 11, 2025
* fix: don't unescrow tokens that are moved between escrow accounts * add more tests * consolidate new tests * feat(pfm): Migration to align expected escrow state (#231) * feat(packetforward): Bump consensus version from 2 to 3 * feat(packetforward): Add empty migration setup * test(packetforward): Initialize mocks and tests for migration * feat(packetforward): Implement migration * fix(packetforward): Use correct expected keeper method names and parameters * docs: Migration test steps * test(packetforward): Upgrade e2e test * fix: Upgrade in app * fix: Use preblock for upgrade * fix: Set missing app PreBlocker * fix: Use corrected 8.1.0 pre-upgrade image SetPreBlocker was not set, so upgrade module did not trigger. Also, upgrade handlers should not be set in the previous binary. * ci: Update deprecated artifacts actions * ci: Update golangci/golangci-lint-action * docs: Remove inaccurate previous image upgrade info * ci: Update e2e test to use 8.1.0 pre-upgrade docker image * docs: Test case docs * build: Replace 8.1.0 pre-upgrade image with linux/amd64 * test: Enable upgrade handlers in local simapp for upgrade e2e test --------- Co-authored-by: drklee3 <github@dlee.dev>
mergify bot
pushed a commit
that referenced
this pull request
Feb 11, 2025
* fix: don't unescrow tokens that are moved between escrow accounts * add more tests * consolidate new tests * feat(pfm): Migration to align expected escrow state (#231) * feat(packetforward): Bump consensus version from 2 to 3 * feat(packetforward): Add empty migration setup * test(packetforward): Initialize mocks and tests for migration * feat(packetforward): Implement migration * fix(packetforward): Use correct expected keeper method names and parameters * docs: Migration test steps * test(packetforward): Upgrade e2e test * fix: Upgrade in app * fix: Use preblock for upgrade * fix: Set missing app PreBlocker * fix: Use corrected 8.1.0 pre-upgrade image SetPreBlocker was not set, so upgrade module did not trigger. Also, upgrade handlers should not be set in the previous binary. * ci: Update deprecated artifacts actions * ci: Update golangci/golangci-lint-action * docs: Remove inaccurate previous image upgrade info * ci: Update e2e test to use 8.1.0 pre-upgrade docker image * docs: Test case docs * build: Replace 8.1.0 pre-upgrade image with linux/amd64 * test: Enable upgrade handlers in local simapp for upgrade e2e test --------- Co-authored-by: drklee3 <github@dlee.dev> (cherry picked from commit 515bdca) # Conflicts: # middleware/packet-forward-middleware/Dockerfile # middleware/packet-forward-middleware/e2e/upgrade_test.go # middleware/packet-forward-middleware/packetforward/types/expected_keepers.go # middleware/packet-forward-middleware/testing/simapp/app.go
mergify bot
pushed a commit
that referenced
this pull request
Feb 11, 2025
* fix: don't unescrow tokens that are moved between escrow accounts * add more tests * consolidate new tests * feat(pfm): Migration to align expected escrow state (#231) * feat(packetforward): Bump consensus version from 2 to 3 * feat(packetforward): Add empty migration setup * test(packetforward): Initialize mocks and tests for migration * feat(packetforward): Implement migration * fix(packetforward): Use correct expected keeper method names and parameters * docs: Migration test steps * test(packetforward): Upgrade e2e test * fix: Upgrade in app * fix: Use preblock for upgrade * fix: Set missing app PreBlocker * fix: Use corrected 8.1.0 pre-upgrade image SetPreBlocker was not set, so upgrade module did not trigger. Also, upgrade handlers should not be set in the previous binary. * ci: Update deprecated artifacts actions * ci: Update golangci/golangci-lint-action * docs: Remove inaccurate previous image upgrade info * ci: Update e2e test to use 8.1.0 pre-upgrade docker image * docs: Test case docs * build: Replace 8.1.0 pre-upgrade image with linux/amd64 * test: Enable upgrade handlers in local simapp for upgrade e2e test --------- Co-authored-by: drklee3 <github@dlee.dev> (cherry picked from commit 515bdca) # Conflicts: # .github/workflows/packet-forward-middleware.yml # middleware/packet-forward-middleware/Dockerfile # middleware/packet-forward-middleware/packetforward/keeper/keeper.go # middleware/packet-forward-middleware/packetforward/module.go # middleware/packet-forward-middleware/packetforward/types/expected_keepers.go # middleware/packet-forward-middleware/test/mock/transfer_keeper.go # middleware/packet-forward-middleware/testing/previous_images/README.md # middleware/packet-forward-middleware/testing/simapp/app.go # middleware/packet-forward-middleware/testing/simapp/upgrades/upgrades.go
mergify bot
added a commit
that referenced
this pull request
Feb 12, 2025
…between escrow accounts (#232) * fix: don't unescrow tokens that are moved between escrow accounts (#230) * fix: don't unescrow tokens that are moved between escrow accounts * add more tests * consolidate new tests * feat(pfm): Migration to align expected escrow state (#231) * feat(packetforward): Bump consensus version from 2 to 3 * feat(packetforward): Add empty migration setup * test(packetforward): Initialize mocks and tests for migration * feat(packetforward): Implement migration * fix(packetforward): Use correct expected keeper method names and parameters * docs: Migration test steps * test(packetforward): Upgrade e2e test * fix: Upgrade in app * fix: Use preblock for upgrade * fix: Set missing app PreBlocker * fix: Use corrected 8.1.0 pre-upgrade image SetPreBlocker was not set, so upgrade module did not trigger. Also, upgrade handlers should not be set in the previous binary. * ci: Update deprecated artifacts actions * ci: Update golangci/golangci-lint-action * docs: Remove inaccurate previous image upgrade info * ci: Update e2e test to use 8.1.0 pre-upgrade docker image * docs: Test case docs * build: Replace 8.1.0 pre-upgrade image with linux/amd64 * test: Enable upgrade handlers in local simapp for upgrade e2e test --------- Co-authored-by: drklee3 <github@dlee.dev> (cherry picked from commit 515bdca) # Conflicts: # middleware/packet-forward-middleware/Dockerfile # middleware/packet-forward-middleware/e2e/upgrade_test.go # middleware/packet-forward-middleware/packetforward/types/expected_keepers.go # middleware/packet-forward-middleware/testing/simapp/app.go * fix conflicts * remove v8 previous image * fix import * fix wrong pfm versions * use pfm 7.2.0 for upgrade tests --------- Co-authored-by: William Shao <wllmshao@gmail.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based off #230 to add state migration and upgrade tests