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

[e2e][CL]: pool migration #4690

Closed
wants to merge 58 commits into from
Closed

[e2e][CL]: pool migration #4690

wants to merge 58 commits into from

Conversation

ThanhNhann
Copy link
Contributor

Closes: #4496

What is the purpose of the change

Add e2e test pool migrations from balancer/stableswap to CL

Brief Changelog

  • Add e2e test pool migrations from balancer/stableswap to CL with 3 steps:
    • Submit a gov proposal to update pools allowed to migrate
    • Migrate your position from balancer / stableswap to CL
    • Validate that the position migrated correctly

Testing and Verifying

(Please pick one of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added unit test that validates ...
  • Added integration tests for end-to-end deployment with ...
  • Extended integration test for ...
  • Manually verified the change by ...

Documentation and Release Note

  • Does this pull request introduce a new feature or user-facing behavior changes? (yes / no)
  • Is a relevant changelog entry added to the Unreleased section in CHANGELOG.md? (yes / no)
  • How is the feature or change documented? (not applicable / specification (x/<module>/spec/) / Osmosis docs repo / not documented)

@ThanhNhann ThanhNhann changed the title update migration record [e2e][CL]: pool migration Mar 21, 2023
@ThanhNhann ThanhNhann added C:e2e F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board labels Mar 21, 2023
@github-actions github-actions bot added the C:x/gamm Changes, features and bugs related to the gamm module. label Mar 28, 2023
@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@github-actions github-actions bot added the Stale label Apr 12, 2023
@github-actions github-actions bot closed this Apr 19, 2023
@ThanhNhann ThanhNhann reopened this Apr 28, 2023
@github-actions github-actions bot removed the Stale label Apr 29, 2023
@faddat faddat added the V:state/breaking State machine breaking PR label May 7, 2023
@github-actions github-actions bot removed the C:x/gamm Changes, features and bugs related to the gamm module. label May 7, 2023
@czarcas7ic
Copy link
Member

@ThanhNhann just wanted to check in to see what the plan for this was

@ThanhNhann
Copy link
Contributor Author

Hi @czarcas7ic, thanks for your ping, I'm updating it

@github-actions github-actions bot added C:CLI C:x/gamm Changes, features and bugs related to the gamm module. labels May 26, 2023
@github-actions github-actions bot removed C:x/gamm Changes, features and bugs related to the gamm module. C:CLI labels May 29, 2023
@ThanhNhann
Copy link
Contributor Author

ThanhNhann commented Jun 20, 2023

yeah, I will update the code with @mattverse review today @czarcas7ic, just missing the notifications of this pr, so sorry for this

@czarcas7ic
Copy link
Member

@ThanhNhann please ping when r4r, thanks!

@ThanhNhann
Copy link
Contributor Author

It's good to review now @czarcas7ic

Copy link
Member

@mattverse mattverse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I have left some last comments that would be best if addressed, after that I think we should be good for merge

tests/e2e/helpers_e2e_test.go Show resolved Hide resolved
tests/e2e/helpers_e2e_test.go Show resolved Hide resolved
tests/e2e/e2e_test.go Outdated Show resolved Hide resolved
tests/e2e/configurer/chain/commands.go Outdated Show resolved Hide resolved
tests/e2e/configurer/chain/commands.go Show resolved Hide resolved
tests/e2e/configurer/chain/queries.go Outdated Show resolved Hide resolved
tests/e2e/e2e_test.go Outdated Show resolved Hide resolved
@czarcas7ic
Copy link
Member

@ThanhNhann would like the point about 6 cases vs 4 addressed, then I think we are good to merge.

@ThanhNhann
Copy link
Contributor Author

thanks your review @czarcas7ic, I will update soon

@czarcas7ic czarcas7ic added V:state/compatible/backport State machine compatible PR, should be backported A:backport/v16.x backport patches to v16.x branch and removed V:state/breaking State machine breaking PR labels Jun 22, 2023
tests/e2e/e2e_test.go Outdated Show resolved Hide resolved
Copy link
Member

@czarcas7ic czarcas7ic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this! I want to do one more review before merging though

tests/e2e/e2e_test.go Outdated Show resolved Hide resolved
tests/e2e/helpers_e2e_test.go Outdated Show resolved Hide resolved
tests/e2e/helpers_e2e_test.go Outdated Show resolved Hide resolved
balanceAfterJoin := s.addrBalance(node, poolJoinAddress)

// The balancer join pool amount is the difference between the account balance before and after joining the pool.
joinPoolAmt, _ = balanceBeforeJoin.SafeSub(balanceAfterJoin)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use safesub here? there should never be a time when this value is negative

Copy link
Contributor Author

@ThanhNhann ThanhNhann Jun 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

balanceAfterJoin will have another coin after joining pool so I think we should use SafeSub here

tests/e2e/helpers_e2e_test.go Outdated Show resolved Hide resolved
@czarcas7ic
Copy link
Member

czarcas7ic commented Jun 26, 2023

Hey, sorry for tall the back and forths on this. It looks like this test is significantly longer when compared to all the other E2E tests:

    --- PASS: TestIntegrationTestSuite/TestAConcentratedLiquidity_CanonicalPool_And_Parameters (0.46s)
    --- PASS: TestIntegrationTestSuite/TestAddToExistingLock (39.69s)
    --- PASS: TestIntegrationTestSuite/TestAddToExistingLockPostUpgrade (2.63s)
    --- SKIP: TestIntegrationTestSuite/TestArithmeticTWAP (0.00s)
    --- PASS: TestIntegrationTestSuite/TestConcentratedLiquidity (93.36s)
    --- PASS: TestIntegrationTestSuite/TestCreateConcentratedLiquidityPoolVoting_And_TWAP (42.77s)
    --- PASS: TestIntegrationTestSuite/TestExpeditedProposals (21.58s)
    --- PASS: TestIntegrationTestSuite/TestGeometricTWAP (12.51s)
    --- PASS: TestIntegrationTestSuite/TestGeometricTwapMigration (4.51s)
    --- PASS: TestIntegrationTestSuite/TestIBCTokenTransferAndCreatePool (60.43s)
    --- PASS: TestIntegrationTestSuite/TestIBCTokenTransferRateLimiting (61.23s)
    --- PASS: TestIntegrationTestSuite/TestIBCWasmHooks (8.40s)
    --- PASS: TestIntegrationTestSuite/TestLargeWasmUpload (4.03s)
    --- PASS: TestIntegrationTestSuite/TestPacketForwarding (10.96s)
    --- PASS: TestIntegrationTestSuite/TestPoolMigration (483.99s)
    --- PASS: TestIntegrationTestSuite/TestProtoRev (45.92s)
    --- PASS: TestIntegrationTestSuite/TestStableSwapPostUpgrade (6.62s)
    --- PASS: TestIntegrationTestSuite/TestStateSync (52.40s)
    --- PASS: TestIntegrationTestSuite/TestSuperfluidVoting (39.96s)

We might need to add some randomized logic to select a single migration path rather than checking every one every time. That or add some go routines in the test itself. 100s I think should be the max for one of these tests, and this is almost 5x that (not at all your fault, its a hefty test, just need to make this shorter)

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:backport/v16.x backport patches to v16.x branch A:no-changelog C:e2e F: concentrated-liquidity Tracking the development of concentrated liquidity feature to improve filtering on the project board Stale V:state/compatible/backport State machine compatible PR, should be backported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[e2e][CL]: pool migration
5 participants