From 04a556f68e6e35bc0c0b62b6e623358fd37030f7 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 10:24:08 -0600 Subject: [PATCH 1/9] fix non osmo txfees to community pool instead of stakers --- x/txfees/keeper/feedecorator.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/txfees/keeper/feedecorator.go b/x/txfees/keeper/feedecorator.go index 069dbcb7b4c..ee3253a8670 100644 --- a/x/txfees/keeper/feedecorator.go +++ b/x/txfees/keeper/feedecorator.go @@ -249,8 +249,8 @@ func DeductFees(txFeesKeeper types.TxFeesKeeper, bankKeeper types.BankKeeper, ct return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error()) } } else { - // sends to FeeCollectorForStakingRewardsName module account - err := bankKeeper.SendCoinsFromAccountToModule(ctx, acc.GetAddress(), types.FeeCollectorForStakingRewardsName, fees) + // sends to FeeCollectorForCommunityPoolName module account + err := bankKeeper.SendCoinsFromAccountToModule(ctx, acc.GetAddress(), types.FeeCollectorForCommunityPoolName, fees) if err != nil { return errorsmod.Wrapf(sdkerrors.ErrInsufficientFunds, err.Error()) } From 60e7378a591eeaded9dba0752b1d3262b2924e72 Mon Sep 17 00:00:00 2001 From: devbot-wizard <141283918+devbot-wizard@users.noreply.github.com> Date: Mon, 18 Sep 2023 16:25:23 +0000 Subject: [PATCH 2/9] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5990b89a86b..dfd8272dbdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -60,6 +60,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * [#6334](https://github.com/osmosis-labs/osmosis/pull/6334) fix: enable taker fee cli * [#6352](https://github.com/osmosis-labs/osmosis/pull/6352) Reduce error blow-up in CalcAmount0Delta by changing the order of math operations. * [#6368](https://github.com/osmosis-labs/osmosis/pull/6368) Stricter rounding behavior in CL math's CalcAmount0Delta and GetNextSqrtPriceFromAmount0InRoundingUp +* [#6426](https://github.com/osmosis-labs/osmosis/pull/6426) bug: send non osmo txfees to community pool instead of stakers ### API Breaks From 1589ef06c8d9c241ea17fc56956a42162c1a777d Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 10:34:42 -0600 Subject: [PATCH 3/9] update fee decorator test --- x/txfees/keeper/feedecorator_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/txfees/keeper/feedecorator_test.go b/x/txfees/keeper/feedecorator_test.go index 2e8d8ca6c8b..c89dc4d8432 100644 --- a/x/txfees/keeper/feedecorator_test.go +++ b/x/txfees/keeper/feedecorator_test.go @@ -209,7 +209,7 @@ func (s *KeeperTestSuite) TestFeeDecorator() { if !tc.txFee.IsZero() { moduleName := types.FeeCollectorName if tc.txFee[0].Denom != baseDenom { - moduleName = types.FeeCollectorForStakingRewardsName + moduleName = types.FeeCollectorForCommunityPoolName } moduleAddr := s.App.AccountKeeper.GetModuleAddress(moduleName) s.Require().Equal(tc.txFee[0], s.App.BankKeeper.GetBalance(s.Ctx, moduleAddr, tc.txFee[0].Denom), tc.name) From 0c56027ecca8bde106ebf2e249494f35bd937648 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 12:28:38 -0600 Subject: [PATCH 4/9] change version to alpine --- tests/e2e/containers/config.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/containers/config.go b/tests/e2e/containers/config.go index b6676066fa7..c540d432792 100644 --- a/tests/e2e/containers/config.go +++ b/tests/e2e/containers/config.go @@ -24,7 +24,7 @@ const ( // It should be uploaded to Docker Hub. OSMOSIS_E2E_SKIP_UPGRADE should be unset // for this functionality to be used. previousVersionOsmoRepository = "osmolabs/osmosis" - previousVersionOsmoTag = "19.0" + previousVersionOsmoTag = "19.0.0-alpine" // Pre-upgrade repo/tag for osmosis initialization (this should be one version below upgradeVersion) previousVersionInitRepository = "osmolabs/osmosis-e2e-init-chain" previousVersionInitTag = "19.0.0" From 5f74596cf099da066bf9053d963d8958c96a3df9 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 12:29:30 -0600 Subject: [PATCH 5/9] add comment --- tests/e2e/e2e_test.go | 190 +++++++++++++++++++++--------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 45bc13f0eb8..a4af3d874b1 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -45,114 +45,114 @@ func (s *IntegrationTestSuite) TestAllE2E() { s.SetDefaultTakerFeeChainB() }) - // Zero Dependent Tests - s.T().Run("CreateConcentratedLiquidityPoolVoting_And_TWAP", func(t *testing.T) { - t.Parallel() - s.CreateConcentratedLiquidityPoolVoting_And_TWAP() - }) + // // Zero Dependent Tests + // s.T().Run("CreateConcentratedLiquidityPoolVoting_And_TWAP", func(t *testing.T) { + // t.Parallel() + // s.CreateConcentratedLiquidityPoolVoting_And_TWAP() + // }) - s.T().Run("ProtoRev", func(t *testing.T) { - t.Parallel() - s.ProtoRev() - }) + // s.T().Run("ProtoRev", func(t *testing.T) { + // t.Parallel() + // s.ProtoRev() + // }) - s.T().Run("ConcentratedLiquidity", func(t *testing.T) { - t.Parallel() - s.ConcentratedLiquidity() - }) + // s.T().Run("ConcentratedLiquidity", func(t *testing.T) { + // t.Parallel() + // s.ConcentratedLiquidity() + // }) - s.T().Run("SuperfluidVoting", func(t *testing.T) { - t.Parallel() - s.SuperfluidVoting() - }) + // s.T().Run("SuperfluidVoting", func(t *testing.T) { + // t.Parallel() + // s.SuperfluidVoting() + // }) - s.T().Run("AddToExistingLock", func(t *testing.T) { - t.Parallel() - s.AddToExistingLock() - }) + // s.T().Run("AddToExistingLock", func(t *testing.T) { + // t.Parallel() + // s.AddToExistingLock() + // }) - s.T().Run("ExpeditedProposals", func(t *testing.T) { - t.Parallel() - s.ExpeditedProposals() - }) + // s.T().Run("ExpeditedProposals", func(t *testing.T) { + // t.Parallel() + // s.ExpeditedProposals() + // }) - s.T().Run("GeometricTWAP", func(t *testing.T) { - t.Parallel() - s.GeometricTWAP() - }) + // s.T().Run("GeometricTWAP", func(t *testing.T) { + // t.Parallel() + // s.GeometricTWAP() + // }) - s.T().Run("LargeWasmUpload", func(t *testing.T) { - t.Parallel() - s.LargeWasmUpload() - }) + // s.T().Run("LargeWasmUpload", func(t *testing.T) { + // t.Parallel() + // s.LargeWasmUpload() + // }) s.T().Run("StableSwap", func(t *testing.T) { t.Parallel() s.StableSwap() }) - // Test currently disabled - // s.T().Run("ArithmeticTWAP", func(t *testing.T) { - // t.Parallel() - // s.ArithmeticTWAP() - // }) - - // State Sync Dependent Tests - - if s.skipStateSync || !s.runScheduledTest { - s.T().Skip() - } else { - s.T().Run("StateSync", func(t *testing.T) { - t.Parallel() - s.StateSync() - }) - } - - // Upgrade Dependent Tests - - if s.skipUpgrade { - s.T().Skip("Skipping GeometricTwapMigration test") - } else { - s.T().Run("GeometricTwapMigration", func(t *testing.T) { - t.Parallel() - s.GeometricTwapMigration() - }) - } - - if s.skipUpgrade { - s.T().Skip("Skipping AddToExistingLockPostUpgrade test") - } else { - s.T().Run("AddToExistingLockPostUpgrade", func(t *testing.T) { - t.Parallel() - s.AddToExistingLockPostUpgrade() - }) - } - - // IBC Dependent Tests - - if s.skipIBC { - s.T().Skip("Skipping IBC tests") - } else { - s.T().Run("IBCTokenTransferRateLimiting", func(t *testing.T) { - t.Parallel() - s.IBCTokenTransferRateLimiting() - }) - - s.T().Run("IBCTokenTransferAndCreatePool", func(t *testing.T) { - t.Parallel() - s.IBCTokenTransferAndCreatePool() - }) - - s.T().Run("IBCWasmHooks", func(t *testing.T) { - t.Parallel() - s.IBCWasmHooks() - }) - - s.T().Run("PacketForwarding", func(t *testing.T) { - t.Parallel() - s.PacketForwarding() - }) - } + // // Test currently disabled + // // s.T().Run("ArithmeticTWAP", func(t *testing.T) { + // // t.Parallel() + // // s.ArithmeticTWAP() + // // }) + + // // State Sync Dependent Tests + + // if s.skipStateSync || !s.runScheduledTest { + // s.T().Skip() + // } else { + // s.T().Run("StateSync", func(t *testing.T) { + // t.Parallel() + // s.StateSync() + // }) + // } + + // // Upgrade Dependent Tests + + // if s.skipUpgrade { + // s.T().Skip("Skipping GeometricTwapMigration test") + // } else { + // s.T().Run("GeometricTwapMigration", func(t *testing.T) { + // t.Parallel() + // s.GeometricTwapMigration() + // }) + // } + + // if s.skipUpgrade { + // s.T().Skip("Skipping AddToExistingLockPostUpgrade test") + // } else { + // s.T().Run("AddToExistingLockPostUpgrade", func(t *testing.T) { + // t.Parallel() + // s.AddToExistingLockPostUpgrade() + // }) + // } + + // // IBC Dependent Tests + + // if s.skipIBC { + // s.T().Skip("Skipping IBC tests") + // } else { + // s.T().Run("IBCTokenTransferRateLimiting", func(t *testing.T) { + // t.Parallel() + // s.IBCTokenTransferRateLimiting() + // }) + + // s.T().Run("IBCTokenTransferAndCreatePool", func(t *testing.T) { + // t.Parallel() + // s.IBCTokenTransferAndCreatePool() + // }) + + // s.T().Run("IBCWasmHooks", func(t *testing.T) { + // t.Parallel() + // s.IBCWasmHooks() + // }) + + // s.T().Run("PacketForwarding", func(t *testing.T) { + // t.Parallel() + // s.PacketForwarding() + // }) + // } } // TestProtoRev is a test that ensures that the protorev module is working as expected. In particular, this tests and ensures that: From cdc9f91289c192eb768568e041af72f720be94a5 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 12:34:49 -0600 Subject: [PATCH 6/9] uncomment test --- tests/e2e/e2e_test.go | 190 +++++++++++++++++++++--------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index a4af3d874b1..45bc13f0eb8 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -45,114 +45,114 @@ func (s *IntegrationTestSuite) TestAllE2E() { s.SetDefaultTakerFeeChainB() }) - // // Zero Dependent Tests - // s.T().Run("CreateConcentratedLiquidityPoolVoting_And_TWAP", func(t *testing.T) { - // t.Parallel() - // s.CreateConcentratedLiquidityPoolVoting_And_TWAP() - // }) + // Zero Dependent Tests + s.T().Run("CreateConcentratedLiquidityPoolVoting_And_TWAP", func(t *testing.T) { + t.Parallel() + s.CreateConcentratedLiquidityPoolVoting_And_TWAP() + }) - // s.T().Run("ProtoRev", func(t *testing.T) { - // t.Parallel() - // s.ProtoRev() - // }) + s.T().Run("ProtoRev", func(t *testing.T) { + t.Parallel() + s.ProtoRev() + }) - // s.T().Run("ConcentratedLiquidity", func(t *testing.T) { - // t.Parallel() - // s.ConcentratedLiquidity() - // }) + s.T().Run("ConcentratedLiquidity", func(t *testing.T) { + t.Parallel() + s.ConcentratedLiquidity() + }) - // s.T().Run("SuperfluidVoting", func(t *testing.T) { - // t.Parallel() - // s.SuperfluidVoting() - // }) + s.T().Run("SuperfluidVoting", func(t *testing.T) { + t.Parallel() + s.SuperfluidVoting() + }) - // s.T().Run("AddToExistingLock", func(t *testing.T) { - // t.Parallel() - // s.AddToExistingLock() - // }) + s.T().Run("AddToExistingLock", func(t *testing.T) { + t.Parallel() + s.AddToExistingLock() + }) - // s.T().Run("ExpeditedProposals", func(t *testing.T) { - // t.Parallel() - // s.ExpeditedProposals() - // }) + s.T().Run("ExpeditedProposals", func(t *testing.T) { + t.Parallel() + s.ExpeditedProposals() + }) - // s.T().Run("GeometricTWAP", func(t *testing.T) { - // t.Parallel() - // s.GeometricTWAP() - // }) + s.T().Run("GeometricTWAP", func(t *testing.T) { + t.Parallel() + s.GeometricTWAP() + }) - // s.T().Run("LargeWasmUpload", func(t *testing.T) { - // t.Parallel() - // s.LargeWasmUpload() - // }) + s.T().Run("LargeWasmUpload", func(t *testing.T) { + t.Parallel() + s.LargeWasmUpload() + }) s.T().Run("StableSwap", func(t *testing.T) { t.Parallel() s.StableSwap() }) - // // Test currently disabled - // // s.T().Run("ArithmeticTWAP", func(t *testing.T) { - // // t.Parallel() - // // s.ArithmeticTWAP() - // // }) - - // // State Sync Dependent Tests - - // if s.skipStateSync || !s.runScheduledTest { - // s.T().Skip() - // } else { - // s.T().Run("StateSync", func(t *testing.T) { - // t.Parallel() - // s.StateSync() - // }) - // } - - // // Upgrade Dependent Tests - - // if s.skipUpgrade { - // s.T().Skip("Skipping GeometricTwapMigration test") - // } else { - // s.T().Run("GeometricTwapMigration", func(t *testing.T) { - // t.Parallel() - // s.GeometricTwapMigration() - // }) - // } - - // if s.skipUpgrade { - // s.T().Skip("Skipping AddToExistingLockPostUpgrade test") - // } else { - // s.T().Run("AddToExistingLockPostUpgrade", func(t *testing.T) { - // t.Parallel() - // s.AddToExistingLockPostUpgrade() - // }) - // } - - // // IBC Dependent Tests - - // if s.skipIBC { - // s.T().Skip("Skipping IBC tests") - // } else { - // s.T().Run("IBCTokenTransferRateLimiting", func(t *testing.T) { - // t.Parallel() - // s.IBCTokenTransferRateLimiting() - // }) - - // s.T().Run("IBCTokenTransferAndCreatePool", func(t *testing.T) { - // t.Parallel() - // s.IBCTokenTransferAndCreatePool() - // }) - - // s.T().Run("IBCWasmHooks", func(t *testing.T) { - // t.Parallel() - // s.IBCWasmHooks() - // }) - - // s.T().Run("PacketForwarding", func(t *testing.T) { - // t.Parallel() - // s.PacketForwarding() - // }) - // } + // Test currently disabled + // s.T().Run("ArithmeticTWAP", func(t *testing.T) { + // t.Parallel() + // s.ArithmeticTWAP() + // }) + + // State Sync Dependent Tests + + if s.skipStateSync || !s.runScheduledTest { + s.T().Skip() + } else { + s.T().Run("StateSync", func(t *testing.T) { + t.Parallel() + s.StateSync() + }) + } + + // Upgrade Dependent Tests + + if s.skipUpgrade { + s.T().Skip("Skipping GeometricTwapMigration test") + } else { + s.T().Run("GeometricTwapMigration", func(t *testing.T) { + t.Parallel() + s.GeometricTwapMigration() + }) + } + + if s.skipUpgrade { + s.T().Skip("Skipping AddToExistingLockPostUpgrade test") + } else { + s.T().Run("AddToExistingLockPostUpgrade", func(t *testing.T) { + t.Parallel() + s.AddToExistingLockPostUpgrade() + }) + } + + // IBC Dependent Tests + + if s.skipIBC { + s.T().Skip("Skipping IBC tests") + } else { + s.T().Run("IBCTokenTransferRateLimiting", func(t *testing.T) { + t.Parallel() + s.IBCTokenTransferRateLimiting() + }) + + s.T().Run("IBCTokenTransferAndCreatePool", func(t *testing.T) { + t.Parallel() + s.IBCTokenTransferAndCreatePool() + }) + + s.T().Run("IBCWasmHooks", func(t *testing.T) { + t.Parallel() + s.IBCWasmHooks() + }) + + s.T().Run("PacketForwarding", func(t *testing.T) { + t.Parallel() + s.PacketForwarding() + }) + } } // TestProtoRev is a test that ensures that the protorev module is working as expected. In particular, this tests and ensures that: From 29cdbccf975ba28efaa29e03bda1a2bccf65bb12 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 13:05:37 -0600 Subject: [PATCH 7/9] fix script to pull alpine image --- scripts/empty_upgrade_handler_gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/empty_upgrade_handler_gen.sh b/scripts/empty_upgrade_handler_gen.sh index 8508ede253a..a4746cdf199 100755 --- a/scripts/empty_upgrade_handler_gen.sh +++ b/scripts/empty_upgrade_handler_gen.sh @@ -105,7 +105,7 @@ sed -i "s/E2E_UPGRADE_VERSION := ${bracks}v$latest_version$bracks/E2E_UPGRADE_VE # bumps up prev e2e version e2e_file=./tests/e2e/containers/config.go -PREV_OSMOSIS_DEV_TAG=$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/osmolabs/osmosis-dev/tags?page=1&page_size=100' | jq -r '.results[] | .name | select(.|test("^(?:v|)[0-9]+\\.[0-9]+(?:$|\\.[0-9]+$)"))' | grep --max-count=1 "") +PREV_OSMOSIS_DEV_TAG=$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/osmolabs/osmosis/tags?page=1&page_size=100' | jq -r '.results[] | .name | select(.|test("^(?:v|)[0-9]+\\.0\\.0-alpine$"))' | \grep --max-count=1 "") PREV_OSMOSIS_E2E_TAG=$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/osmolabs/osmosis-e2e-init-chain/tags?page=1&page_size=100' | jq -r '.results[] | .name | select(.|test("^(?:v|)[0-9]+\\.[0-9]+(?:$|\\.[0-9]+$)"))' | grep --max-count=1 "") # previousVersionOsmoTag = PREV_OSMOSIS_DEV_TAG From bd6803a5e4fb87d13256e4db0d57650cdd0bae1a Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 13:10:05 -0600 Subject: [PATCH 8/9] update README --- tests/e2e/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/e2e/README.md b/tests/e2e/README.md index fb22a751c30..08fd4615170 100644 --- a/tests/e2e/README.md +++ b/tests/e2e/README.md @@ -47,7 +47,9 @@ Conceptually, we can split the e2e setup into 2 parts: If with the upgrade, the same `chain.Init(...)` function is run inside a Docker container of the previous Osmosis version, inside `configurer/upgrade.go`. This is needed to initialize chain configs and the genesis of the previous version that - we are upgrading from. + we are upgrading from. Note, we use the alpine image of the previous version, + as functionality such as copying mnemonics across containers in unavailable in the + stripped down images. The decision of what configuration type to use is decided by the `Configurer`. This is an interface that has `CurrentBranchConfigurer` and `UpgradeConfigurer` implementations. From 5d7c249c8e910f3280a2d3298965dc3a905e2606 Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 18 Sep 2023 14:15:21 -0500 Subject: [PATCH 9/9] Update empty_upgrade_handler_gen.sh --- scripts/empty_upgrade_handler_gen.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/empty_upgrade_handler_gen.sh b/scripts/empty_upgrade_handler_gen.sh index a4746cdf199..c705739c342 100755 --- a/scripts/empty_upgrade_handler_gen.sh +++ b/scripts/empty_upgrade_handler_gen.sh @@ -105,7 +105,7 @@ sed -i "s/E2E_UPGRADE_VERSION := ${bracks}v$latest_version$bracks/E2E_UPGRADE_VE # bumps up prev e2e version e2e_file=./tests/e2e/containers/config.go -PREV_OSMOSIS_DEV_TAG=$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/osmolabs/osmosis/tags?page=1&page_size=100' | jq -r '.results[] | .name | select(.|test("^(?:v|)[0-9]+\\.0\\.0-alpine$"))' | \grep --max-count=1 "") +PREV_OSMOSIS_DEV_TAG=$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/osmolabs/osmosis/tags?page=1&page_size=100' | jq -r '.results[] | .name | select(.|test("^(?:v|)[0-9]+\\.0\\.0-alpine$"))' | grep --max-count=1 "") PREV_OSMOSIS_E2E_TAG=$(curl -L -s 'https://registry.hub.docker.com/v2/repositories/osmolabs/osmosis-e2e-init-chain/tags?page=1&page_size=100' | jq -r '.results[] | .name | select(.|test("^(?:v|)[0-9]+\\.[0-9]+(?:$|\\.[0-9]+$)"))' | grep --max-count=1 "") # previousVersionOsmoTag = PREV_OSMOSIS_DEV_TAG