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

feat(deps): bump to last rdk version + tests fix #190

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/dymensionxyz/dymension-rdk/testutil/utils"
rollappparamstypes "github.com/dymensionxyz/dymension-rdk/x/rollappparams/types"
"github.com/dymensionxyz/dymint/version"
"github.com/tendermint/tendermint/crypto/encoding"
"github.com/tendermint/tendermint/libs/log"
"github.com/tendermint/tendermint/proto/tendermint/crypto"
Expand Down Expand Up @@ -92,6 +93,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *types2.ValidatorSet, genAccs [
app, genesisState := setup(true, 5)
genesisState = genesisStateWithValSet(t, app, genesisState, valSet, genAccs, balances...)

version.DRS = "1"
genesisState = setRollappVersion(app.appCodec, genesisState, 1)

denomMD := banktypes.Metadata{
Expand Down Expand Up @@ -126,7 +128,7 @@ func SetupWithGenesisValSet(t *testing.T, valSet *types2.ValidatorSet, genAccs [
ConsensusParams: utils.DefaultConsensusParams,
AppStateBytes: stateBytes,
ChainId: TestChainID,
GenesisChecksum: "notwmpty",
GenesisChecksum: "notempty",
},
)

Expand Down
16 changes: 9 additions & 7 deletions app/upgrades/drs-2/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ func CreateUpgradeHandler(
configurator module.Configurator,
) upgradetypes.UpgradeHandler {
return func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
da := rpKeeper.DA(ctx)
version := uint32(2)
params := rollappparamstypes.DefaultParams()
params.Da = da
params.DrsVersion = version

rpKeeper.SetParams(ctx, params)
//migrate rollapp params with missing min-gas-prices and updating drs to 2
err := rpKeeper.SetVersion(ctx, uint32(2))
if err != nil {
return nil, err
}
err = rpKeeper.SetMinGasPrices(ctx, rollappparamstypes.DefaultParams().MinGasPrices)
if err != nil {
return nil, err
}

return mm.RunMigrations(ctx, configurator, fromVM)
}
Expand Down
2 changes: 2 additions & 0 deletions e2e/testing/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/cosmos/ibc-go/v6/testing/mock"
rollappparamstypes "github.com/dymensionxyz/dymension-rdk/x/rollappparams/types"
seqtypes "github.com/dymensionxyz/dymension-rdk/x/sequencers/types"
"github.com/dymensionxyz/dymint/version"
"github.com/golang/protobuf/proto" //nolint:staticcheck
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
Expand Down Expand Up @@ -248,6 +249,7 @@ func NewTestChain(t *testing.T, chainIdx int, opts ...interface{}) *TestChain {
}
}
genState[slashingTypes.ModuleName] = rollApp.AppCodec().MustMarshalJSON(slashingTypes.NewGenesisState(slashingTypes.DefaultParams(), signInfo, nil))
version.DRS = "1"

rollappParamsState := rollappparamstypes.DefaultGenesisState()
rollappParamsState.Params.DrsVersion = 1
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ require (
github.com/cosmos/gogoproto v1.5.0
github.com/cosmos/ibc-go/v6 v6.3.0
github.com/dvsekhvalnov/jose2go v1.5.0
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241211172411-14119cc73f17
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241213113333-2a07ba36444a
github.com/ethereum/go-ethereum v1.12.0
github.com/evmos/evmos/v12 v12.1.6
github.com/gogo/protobuf v1.3.3
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -573,12 +573,10 @@ github.com/dymensionxyz/cosmos-sdk v0.46.17-0.20241128210616-e9dfe47b8c73 h1:A0O
github.com/dymensionxyz/cosmos-sdk v0.46.17-0.20241128210616-e9dfe47b8c73/go.mod h1:VPUuzF+l+ekSGPV7VVB8m0OMQfwp3QdKWNZjvkU3A1U=
github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd h1:V89QyOFM84o9w0iFdctMU6So8SS/Xt32JWAXGqJduT0=
github.com/dymensionxyz/cosmosclient v0.4.2-beta.0.20241121093220-e0d7ad456fbd/go.mod h1:3weqpVj/TqTFpC0LjEB3H+HZSpm7BrQ1QkEg1Ahy6KY=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241211144227-68ba9bcc36c0 h1:wOF+zJzyNNLmnOxOSoax+OF5o6BSn6tKy6TqZafPzc4=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241211144227-68ba9bcc36c0/go.mod h1:L6vBXdlUPxHFUz3kjWwXdOun0uX3SrsD9KkpxWQkUy4=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241211172411-14119cc73f17 h1:D12T30p6UH5ccXbcC2diUAq3RMD3qbw3uBwlzYbfJsw=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241211172411-14119cc73f17/go.mod h1:L6vBXdlUPxHFUz3kjWwXdOun0uX3SrsD9KkpxWQkUy4=
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c h1:y6RSUu2GnWZaV6TRZIZaKRUH6+JTLMWpAPIPXFMWVqM=
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241210155059-b7f6555f960c/go.mod h1:C3VbfePK85aRCdA1iHzB2AYD+n1gKR9Pw+wm3wQUXvE=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611 h1:uQuoHQ/q74Sk5hEHviry/34/VRzkbdCBKo9A5gXlMsQ=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20241212094010-b3df828e7611/go.mod h1:L6vBXdlUPxHFUz3kjWwXdOun0uX3SrsD9KkpxWQkUy4=
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241213113333-2a07ba36444a h1:6NKKbfOxjcPun7UZ0Aj8sjGjtPHZFn0nKlFbbQelpzQ=
github.com/dymensionxyz/dymint v1.2.0-rc01.0.20241213113333-2a07ba36444a/go.mod h1:C3VbfePK85aRCdA1iHzB2AYD+n1gKR9Pw+wm3wQUXvE=
github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2 h1:aVP3off7u2vsvRH7lHAUPTLdf9/AfnzC/rvvi0wC/co=
github.com/dymensionxyz/evmos/v12 v12.1.6-dymension-v0.4.2/go.mod h1:CI6D89pkoiIm4BjoMFNnEaCLdKBEobLuwvhS0c1zh7Y=
github.com/dymensionxyz/gerr-cosmos v1.0.0 h1:oi91rgOkpJWr41oX9JOyjvvBnhGY54tj513x8VlDAEc=
Expand Down
1 change: 0 additions & 1 deletion x/cwerrors/keeper/sudo_errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ func (s *KeeperTestSuite) TestGetErrorsByContractAddress() {
contractAddr2.String(),
contractAdminAcc.Address.String(),
)

// Set errors for block 1
// 2 errors for contract1
// 1 error for contract2
Expand Down
Loading