-
Notifications
You must be signed in to change notification settings - Fork 608
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
Setup e2e test for Stride pool migration #4393
Conversation
@@ -31,9 +30,6 @@ func FormatModuleRouteKey(poolId uint64) []byte { | |||
// ParseModuleRouteFromBz parses the raw bytes into ModuleRoute. | |||
// Returns error if fails to parse or if the bytes are empty. | |||
func ParseModuleRouteFromBz(bz []byte) (ModuleRoute, error) { | |||
if len(bz) == 0 { |
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.
Note: bz of length zero is expected because when we serialize ModuleRoute
that has PoolType
Balancer
that is equal to zero
, the serialization ends up being empty bytes.
6bdecc7
to
48418b3
Compare
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.
overall logic LGTM, left some nit comments
Co-authored-by: Sishir Giri <[email protected]>
Co-authored-by: Sishir Giri <[email protected]>
Co-authored-by: Sishir Giri <[email protected]>
Marked this as state-breaking since modified some state entries in the new Also, would like to give this another round of eyes before v15 |
* Setup e2e test for Stride pool migratio * add pool shares to balances of pool addresses in e2e genesis * remove debugging log * Update x/poolmanager/create_pool.go Co-authored-by: Sishir Giri <[email protected]> * Update proto/osmosis/poolmanager/v1beta1/genesis.proto Co-authored-by: Sishir Giri <[email protected]> * Update tests/e2e/initialization/config.go Co-authored-by: Sishir Giri <[email protected]> * proto --------- Co-authored-by: Sishir Giri <[email protected]> (cherry picked from commit b3cd00c) # Conflicts: # proto/osmosis/poolmanager/v1beta1/genesis.proto # proto/osmosis/poolmanager/v1beta1/module_route.proto # tests/e2e/initialization/config.go # x/poolmanager/create_pool.go # x/poolmanager/create_pool_test.go # x/poolmanager/export_test.go # x/poolmanager/keeper.go # x/poolmanager/keeper_test.go # x/poolmanager/types/genesis.pb.go # x/poolmanager/types/keys.go # x/poolmanager/types/module_route.pb.go
* Setup e2e test for Stride pool migratio * add pool shares to balances of pool addresses in e2e genesis * remove debugging log * Update x/poolmanager/create_pool.go Co-authored-by: Sishir Giri <[email protected]> * Update proto/osmosis/poolmanager/v1beta1/genesis.proto Co-authored-by: Sishir Giri <[email protected]> * Update tests/e2e/initialization/config.go Co-authored-by: Sishir Giri <[email protected]> * proto --------- Co-authored-by: Sishir Giri <[email protected]> (cherry picked from commit b3cd00c) # Conflicts: # x/poolmanager/types/module_route.pb.go
Co-authored-by: Roman <[email protected]>
Co-authored-by: Roman <[email protected]>
Closes: #XXX
What is the purpose of the change
This PR sets up e2e for Stride's pool migration in #4384
It does so by modifying genesis to create all pools up until and including the last pool id of the Stride's osmo - stOsmo pool.
It then adds a swap test to make sure that we can continue swapping after running the upgrade handler with migrations.
The test is currently disabled as we need to backport this genesis change to v14 and update the chain init image here: https://hub.docker.com/r/osmolabs/osmosis-e2e-init-chain
However, this has been successfully tested via current branch e2e test.
Brief Changelog
poolmanager
genesis to contain the mapping from pool id to pool type