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

DNM: Maintenance branch - Juno v10.0.2 (Juno V10) #290

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 35 additions & 2 deletions app/app.go
Expand Up @@ -99,6 +99,7 @@ import (
"github.com/CosmWasm/wasmd/x/wasm"
wasmclient "github.com/CosmWasm/wasmd/x/wasm/client"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types"
"github.com/prometheus/client_golang/prometheus"

ica "github.com/cosmos/ibc-go/v3/modules/apps/27-interchain-accounts"
Expand Down Expand Up @@ -838,11 +839,43 @@ func (app *App) RegisterTendermintService(clientCtx client.Context) {
}

// RegisterUpgradeHandlers returns upgrade handlers

// RegisterUpgradeHandlers returns upgrade handlers
func (app *App) RegisterUpgradeHandlers(cfg module.Configurator) {
app.UpgradeKeeper.SetUpgradeHandler("v10",
func(ctx sdk.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
// transfer module consensus version has been bumped to 2

// update ICA Host to catch missed msg
// enumerate all because it's easier to reason about
newIcaHostParams := icahosttypes.Params{
HostEnabled: true,
AllowMessages: []string{
sdk.MsgTypeURL(&ibctransfertypes.MsgTransfer{}), // missed but asked for

sdk.MsgTypeURL(&banktypes.MsgSend{}),
sdk.MsgTypeURL(&stakingtypes.MsgDelegate{}),
sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), // this was missed last time

Choose a reason for hiding this comment

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

Suggested change
sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), // this was missed last time
sdk.MsgTypeURL(&stakingtypes.MsgUndelegate{}), // this was missed last time
sdk.MsgTypeURL(&ibctransfertypes.MsgTransfer{}),

Would it be possible to allow ICA IBC transfers as well?

For reference, these are the allow messages on the cosmos hub

allow_messages:
- /cosmos.authz.v1beta1.MsgExec
- /cosmos.authz.v1beta1.MsgGrant
- /cosmos.authz.v1beta1.MsgRevoke
- /cosmos.bank.v1beta1.MsgSend
- /cosmos.bank.v1beta1.MsgMultiSend
- /cosmos.distribution.v1beta1.MsgSetWithdrawAddress
- /cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission
- /cosmos.distribution.v1beta1.MsgFundCommunityPool
- /cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward
- /cosmos.feegrant.v1beta1.MsgGrantAllowance
- /cosmos.feegrant.v1beta1.MsgRevokeAllowance
- /cosmos.gov.v1beta1.MsgVoteWeighted
- /cosmos.gov.v1beta1.MsgSubmitProposal
- /cosmos.gov.v1beta1.MsgDeposit
- /cosmos.gov.v1beta1.MsgVote
- /cosmos.staking.v1beta1.MsgEditValidator
- /cosmos.staking.v1beta1.MsgDelegate
- /cosmos.staking.v1beta1.MsgUndelegate
- /cosmos.staking.v1beta1.MsgBeginRedelegate
- /cosmos.staking.v1beta1.MsgCreateValidator
- /cosmos.vesting.v1beta1.MsgCreateVestingAccount
- /ibc.applications.transfer.v1.MsgTransfer
- /tendermint.liquidity.v1beta1.MsgCreatePool
- /tendermint.liquidity.v1beta1.MsgSwapWithinBatch
- /tendermint.liquidity.v1beta1.MsgDepositWithinBatch
- /tendermint.liquidity.v1beta1.MsgWithdrawWithinBatch

Copy link
Collaborator Author

@the-frey the-frey Sep 26, 2022

Choose a reason for hiding this comment

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

Sorry didn't see this - what's the concrete use case for IBC transfers? Ok with adding it, but might have missed this release now unless there's a burning need.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For ref, IBC transfers have been added - f2f9de4

sdk.MsgTypeURL(&stakingtypes.MsgBeginRedelegate{}),
sdk.MsgTypeURL(&stakingtypes.MsgCreateValidator{}),
sdk.MsgTypeURL(&stakingtypes.MsgEditValidator{}),
sdk.MsgTypeURL(&distrtypes.MsgWithdrawDelegatorReward{}),
sdk.MsgTypeURL(&distrtypes.MsgSetWithdrawAddress{}),
sdk.MsgTypeURL(&distrtypes.MsgWithdrawValidatorCommission{}),
sdk.MsgTypeURL(&distrtypes.MsgFundCommunityPool{}),
sdk.MsgTypeURL(&govtypes.MsgVote{}),
sdk.MsgTypeURL(&govtypes.MsgVoteWeighted{}), // required by quick
sdk.MsgTypeURL(&authz.MsgExec{}),
sdk.MsgTypeURL(&authz.MsgGrant{}),
sdk.MsgTypeURL(&authz.MsgRevoke{}),
// wasm msgs here
// note we only support these three for now
sdk.MsgTypeURL(&wasmtypes.MsgStoreCode{}),
sdk.MsgTypeURL(&wasmtypes.MsgInstantiateContract{}),
sdk.MsgTypeURL(&wasmtypes.MsgExecuteContract{}),
},
}
app.ICAHostKeeper.SetParams(ctx, newIcaHostParams)

// mint module consensus version bumped
return app.mm.RunMigrations(ctx, cfg, fromVM)
})
}
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Expand Up @@ -11,5 +11,5 @@ services:
- 26656:26656 # p2p
- 26657:26657 # rpc
environment:
- GAS_LIMIT=${GAS_LIMIT:-100000000}
- GAS_LIMIT=${GAS_LIMIT:-10000000}
- STAKE_TOKEN=${STAKE_TOKEN:-ujunox}
12 changes: 6 additions & 6 deletions go.mod
Expand Up @@ -3,9 +3,9 @@ module github.com/CosmosContracts/juno/v10
go 1.18

require (
github.com/CosmWasm/wasmd v0.29.0-rc0
github.com/cosmos/cosmos-sdk v0.45.8
github.com/cosmos/ibc-go/v3 v3.2.1
github.com/CosmWasm/wasmd v0.28.0
github.com/cosmos/cosmos-sdk v0.45.6
github.com/cosmos/ibc-go/v3 v3.0.0
github.com/gogo/protobuf v1.3.3
github.com/golang/protobuf v1.5.2
github.com/gorilla/mux v1.8.0
Expand All @@ -15,7 +15,7 @@ require (
github.com/spf13/cast v1.5.0
github.com/spf13/cobra v1.5.0
github.com/stretchr/testify v1.8.0
github.com/tendermint/tendermint v0.34.21
github.com/tendermint/tendermint v0.34.20
github.com/tendermint/tm-db v0.6.7
google.golang.org/genproto v0.0.0-20220725144611-272f38e5d71b
google.golang.org/grpc v1.48.0
Expand Down Expand Up @@ -43,7 +43,6 @@ require (
github.com/cosmos/iavl v0.19.1 // indirect
github.com/cosmos/ledger-cosmos-go v0.11.1 // indirect
github.com/cosmos/ledger-go v0.9.3 // indirect
github.com/creachadair/taskgroup v0.3.2 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
Expand Down Expand Up @@ -114,7 +113,6 @@ require (
github.com/zondax/hid v0.9.0 // indirect
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect
golang.org/x/net v0.0.0-20220906165146-f3363e06e74c // indirect
golang.org/x/sys v0.0.0-20220907062415-87db552b00fd // indirect
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035 // indirect
Expand All @@ -126,6 +124,8 @@ require (
)

replace (
github.com/CosmWasm/wasmvm => github.com/CosmWasm/wasmvm v1.0.0
github.com/cosmos/iavl => github.com/cosmos/iavl v0.17.3
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
google.golang.org/grpc => google.golang.org/grpc v1.33.2
)