diff --git a/CHANGELOG.md b/CHANGELOG.md index b840983fd78d63a58164332f38bfbcdad0e8bf5e..6837cd36558c92a4d837a3e34a923d2814a53e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v11 +#### SDK Upgrades +* [#2245](https://github.com/osmosis-labs/osmosis/pull/2245) Upgrade SDK for to v0.45.0x-osmo-v9.2. Major changes: + * Minimum deposit on proposer at submission time: https://github.com/osmosis-labs/cosmos-sdk/pull/302 + ## v10.1.1 #### Improvements diff --git a/go.mod b/go.mod index cfedec3600ebfa553e9a59f514f6a629b594fa00..442408c961a0f72be72efd3aac8833b96844c253 100644 --- a/go.mod +++ b/go.mod @@ -270,8 +270,8 @@ require ( replace ( // branch: v0.27.0.rc3-osmo, current tag: v0.27.0.rc3-osmo github.com/CosmWasm/wasmd => github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58 - // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk v0.45.0x-osmo-v9 - github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220709005907-f37e34d99505 + // Our cosmos-sdk branch is: https://github.com/osmosis-labs/cosmos-sdk v0.45.0x-osmo-v9, tag v0.45.0x-osmo-v9.2 + github.com/cosmos/cosmos-sdk => github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220728141005-f09814c9e23f // Use Osmosis fast iavl github.com/cosmos/iavl => github.com/osmosis-labs/iavl v0.17.3-osmo-v7 // use cosmos-compatible protobufs diff --git a/go.sum b/go.sum index d190f87f8557d1866e264722dd05d79ce1ca2340..4f992515466b135b80fd5dd9deb5ffecd2011df0 100644 --- a/go.sum +++ b/go.sum @@ -1034,8 +1034,8 @@ github.com/ory/dockertest/v3 v3.9.1 h1:v4dkG+dlu76goxMiTT2j8zV7s4oPPEppKT8K8p2f1 github.com/ory/dockertest/v3 v3.9.1/go.mod h1:42Ir9hmvaAPm0Mgibk6mBPi7SFvTXxEcnztDYOJ//uM= github.com/osmosis-labs/bech32-ibc v0.3.0-rc1 h1:frHKHEdPfzoK2iMF2GeWKudLLzUXz+6GJcdZ/TMcs2k= github.com/osmosis-labs/bech32-ibc v0.3.0-rc1/go.mod h1:X5/FZHMPL+B3ufuVyY2/koxVjd4hIwyTLjYP1DZwppQ= -github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220709005907-f37e34d99505 h1:vrTGp5Yty0U3X4718KaZLhdznEeAs6010LEFpJH+z1k= -github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220709005907-f37e34d99505/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220728141005-f09814c9e23f h1:Jw7c9MZXtH3K82Jl4goH3g+6H5mMzRuLNNYs9T69UkA= +github.com/osmosis-labs/cosmos-sdk v0.45.1-0.20220728141005-f09814c9e23f/go.mod h1:pMiEr6WR7drhXAXK1FOdAKPazWCi7b+WOyWOF4O0OXY= github.com/osmosis-labs/iavl v0.17.3-osmo-v7 h1:6KcADC/WhL7yDmNQxUIJt2XmzNt4FfRmq9gRke45w74= github.com/osmosis-labs/iavl v0.17.3-osmo-v7/go.mod h1:lJEOIlsd3sVO0JDyXWIXa9/Ur5FBscP26zJx0KxHjto= github.com/osmosis-labs/wasmd v0.27.0-rc2.0.20220517191021-59051aa18d58 h1:15l3Iss2oCGCeJRi2g3CuCnqmEjpAr3Le7cDnoN/LS0= diff --git a/tests/e2e/e2e_setup_test.go b/tests/e2e/e2e_setup_test.go index 5e4a971d774f4e02e31fb8941691ab33912074a1..b1be904eb6353bbcec4c192a7f1214bf0159b5c4 100644 --- a/tests/e2e/e2e_setup_test.go +++ b/tests/e2e/e2e_setup_test.go @@ -14,12 +14,14 @@ import ( "testing" "time" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" "github.com/stretchr/testify/suite" rpchttp "github.com/tendermint/tendermint/rpc/client/http" + appparams "github.com/osmosis-labs/osmosis/v10/app/params" dockerconfig "github.com/osmosis-labs/osmosis/v10/tests/e2e/docker" "github.com/osmosis-labs/osmosis/v10/tests/e2e/initialization" "github.com/osmosis-labs/osmosis/v10/tests/e2e/util" @@ -66,6 +68,10 @@ const ( propBufferBlocks float32 = 5 // max retries for json unmarshalling maxRetries = 60 + // minimum deposit value for a proposal to enter a voting period. + minDepositValue = 10000000 + // minimum deposit value for proposal to be submitted. + initialMinDeposit = minDepositValue / 4 ) var ( @@ -507,7 +513,7 @@ func (s *IntegrationTestSuite) upgrade() { for _, chainConfig := range s.chainConfigs { currentHeight := s.getCurrentChainHeight(chainConfig, 0) chainConfig.propHeight = currentHeight + int(chainConfig.votingPeriod) + int(propSubmitBlocks) + int(propBufferBlocks) - s.submitUpgradeProposal(chainConfig) + s.submitUpgradeProposal(chainConfig, sdk.NewCoin(appparams.BaseCoinUnit, sdk.NewInt(initialMinDeposit))) s.depositProposal(chainConfig) s.voteProposal(chainConfig) } diff --git a/tests/e2e/e2e_test.go b/tests/e2e/e2e_test.go index 0b05a7e9e10552255a1cb1796101a3556f5d16a7..62edafb8c64829163a455360d3a1abcb9ebcbe50 100644 --- a/tests/e2e/e2e_test.go +++ b/tests/e2e/e2e_test.go @@ -5,6 +5,9 @@ import ( "strconv" "time" + sdk "github.com/cosmos/cosmos-sdk/types" + + appparams "github.com/osmosis-labs/osmosis/v10/app/params" "github.com/osmosis-labs/osmosis/v10/tests/e2e/initialization" ) @@ -19,7 +22,7 @@ func (s *IntegrationTestSuite) TestIBCTokenTransfer() { func (s *IntegrationTestSuite) TestSuperfluidVoting() { const walletName = "wallet" chainA := s.chainConfigs[0] - s.submitSuperfluidProposal(chainA, "gamm/pool/1") + s.submitSuperfluidProposal(chainA, "gamm/pool/1", sdk.NewCoin(appparams.BaseCoinUnit, sdk.NewInt(initialMinDeposit))) s.depositProposal(chainA) s.voteProposal(chainA) walletAddr := s.createWallet(chainA, 0, walletName) @@ -30,7 +33,7 @@ func (s *IntegrationTestSuite) TestSuperfluidVoting() { // superfluid delegate from validator 0 non self-delegation wallet to validator 1 on chain A s.superfluidDelegate(chainA, chainA.validators[1].operatorAddress, walletName) // create a text prop, deposit and vote yes - s.submitTextProposal(chainA, "superfluid vote overwrite test") + s.submitTextProposal(chainA, "superfluid vote overwrite test", sdk.NewCoin(appparams.BaseCoinUnit, sdk.NewInt(initialMinDeposit))) s.depositProposal(chainA) s.voteProposal(chainA) // set delegator vote to no diff --git a/tests/e2e/e2e_util_test.go b/tests/e2e/e2e_util_test.go index c478f92f2766706acb251f8cb01a574e8b7d4326..90ac2247a95dd3411f68929f5bafc91615529f14 100644 --- a/tests/e2e/e2e_util_test.go +++ b/tests/e2e/e2e_util_test.go @@ -18,10 +18,9 @@ import ( stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" "github.com/ory/dockertest/v3/docker" - superfluidtypes "github.com/osmosis-labs/osmosis/v10/x/superfluid/types" - "github.com/osmosis-labs/osmosis/v10/tests/e2e/initialization" "github.com/osmosis-labs/osmosis/v10/tests/e2e/util" + superfluidtypes "github.com/osmosis-labs/osmosis/v10/x/superfluid/types" ) func (s *IntegrationTestSuite) ExecTx(chainId string, validatorIndex int, command []string, success string) (bytes.Buffer, bytes.Buffer, error) { @@ -144,26 +143,26 @@ func (s *IntegrationTestSuite) sendIBC(srcChain *chainConfig, dstChain *chainCon s.T().Log("successfully sent IBC tokens") } -func (s *IntegrationTestSuite) submitUpgradeProposal(c *chainConfig) { +func (s *IntegrationTestSuite) submitUpgradeProposal(c *chainConfig, initialDeposit sdk.Coin) { upgradeHeightStr := strconv.Itoa(c.propHeight) s.T().Logf("submitting upgrade proposal on %s container: %s", s.valResources[c.meta.Id][0].Container.Name[1:], s.valResources[c.meta.Id][0].Container.ID) - cmd := []string{"osmosisd", "tx", "gov", "submit-proposal", "software-upgrade", upgradeVersion, fmt.Sprintf("--title=\"%s upgrade\"", upgradeVersion), "--description=\"upgrade proposal submission\"", fmt.Sprintf("--upgrade-height=%s", upgradeHeightStr), "--upgrade-info=\"\"", fmt.Sprintf("--chain-id=%s", c.meta.Id), "--from=val", "-b=block", "--yes", "--keyring-backend=test", "--log_format=json"} + cmd := []string{"osmosisd", "tx", "gov", "submit-proposal", "software-upgrade", upgradeVersion, fmt.Sprintf("--title=\"%s upgrade\"", upgradeVersion), "--description=\"upgrade proposal submission\"", fmt.Sprintf("--upgrade-height=%s", upgradeHeightStr), "--upgrade-info=\"\"", fmt.Sprintf("--chain-id=%s", c.meta.Id), "--from=val", "-b=block", "--yes", "--keyring-backend=test", "--log_format=json", fmt.Sprintf("--deposit=%s", initialDeposit)} s.ExecTx(c.meta.Id, 0, cmd, "code: 0") s.T().Log("successfully submitted upgrade proposal") c.latestProposalNumber = c.latestProposalNumber + 1 } -func (s *IntegrationTestSuite) submitSuperfluidProposal(c *chainConfig, asset string) { +func (s *IntegrationTestSuite) submitSuperfluidProposal(c *chainConfig, asset string, initialDeposit sdk.Coin) { s.T().Logf("submitting superfluid proposal for asset %s on %s container: %s", asset, s.valResources[c.meta.Id][0].Container.Name[1:], s.valResources[c.meta.Id][0].Container.ID) - cmd := []string{"osmosisd", "tx", "gov", "submit-proposal", "set-superfluid-assets-proposal", fmt.Sprintf("--superfluid-assets=%s", asset), fmt.Sprintf("--title=\"%s superfluid asset\"", asset), fmt.Sprintf("--description=\"%s superfluid asset\"", asset), "--from=val", "-b=block", "--yes", "--keyring-backend=test", "--log_format=json", fmt.Sprintf("--chain-id=%s", c.meta.Id)} + cmd := []string{"osmosisd", "tx", "gov", "submit-proposal", "set-superfluid-assets-proposal", fmt.Sprintf("--superfluid-assets=%s", asset), fmt.Sprintf("--title=\"%s superfluid asset\"", asset), fmt.Sprintf("--description=\"%s superfluid asset\"", asset), "--from=val", "-b=block", "--yes", "--keyring-backend=test", "--log_format=json", fmt.Sprintf("--chain-id=%s", c.meta.Id), fmt.Sprintf("--deposit=%s", initialDeposit)} s.ExecTx(c.meta.Id, 0, cmd, "code: 0") s.T().Log("successfully submitted superfluid proposal") c.latestProposalNumber = c.latestProposalNumber + 1 } -func (s *IntegrationTestSuite) submitTextProposal(c *chainConfig, text string) { +func (s *IntegrationTestSuite) submitTextProposal(c *chainConfig, text string, initialDeposit sdk.Coin) { s.T().Logf("submitting text proposal on %s container: %s", s.valResources[c.meta.Id][0].Container.Name[1:], s.valResources[c.meta.Id][0].Container.ID) - cmd := []string{"osmosisd", "tx", "gov", "submit-proposal", "--type=text", fmt.Sprintf("--title=\"%s\"", text), "--description=\"test text proposal\"", "--from=val", "-b=block", "--yes", "--keyring-backend=test", "--log_format=json", fmt.Sprintf("--chain-id=%s", c.meta.Id)} + cmd := []string{"osmosisd", "tx", "gov", "submit-proposal", "--type=text", fmt.Sprintf("--title=\"%s\"", text), "--description=\"test text proposal\"", "--from=val", "-b=block", "--yes", "--keyring-backend=test", "--log_format=json", fmt.Sprintf("--chain-id=%s", c.meta.Id), fmt.Sprintf("--deposit=%s", initialDeposit)} s.ExecTx(c.meta.Id, 0, cmd, "code: 0") s.T().Log("successfully submitted text proposal") c.latestProposalNumber = c.latestProposalNumber + 1