-
Notifications
You must be signed in to change notification settings - Fork 44
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
build(deps): bump ibc to 4.3.0 and wasmd to 0.30.0 #1079
Conversation
Codecov ReportBase: 80.38% // Head: 80.45% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #1079 +/- ##
==========================================
+ Coverage 80.38% 80.45% +0.06%
==========================================
Files 180 180
Lines 15735 15746 +11
==========================================
+ Hits 12649 12668 +19
+ Misses 2529 2522 -7
+ Partials 557 556 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
version string, | ||
) error { | ||
) (string, error) { | ||
if err := ValidateProfilesChannelParams(ctx, am.keeper, order, portID, channelID); err != nil { | ||
return err | ||
return "", err | ||
} | ||
|
||
// Claim channel capability passed back by IBC module | ||
if err := am.keeper.ClaimCapability(ctx, channelCap, host.ChannelCapabilityPath(portID, channelID)); err != nil { | ||
return err | ||
return "", err | ||
} | ||
|
||
return nil | ||
return version, nil | ||
} |
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.
We didn't define the ibc-profiles
port version, so this phase we don't check the version and always return the version from requeset.
See:
https://github.com/cosmos/ibc/blob/0cd3e7de753fc44508f4a76269bc2d71a487c059/spec/core/ics-026-routing-module/README.md#chanopeninit
@@ -372,7 +347,7 @@ func init() { | |||
func NewDesmosApp( | |||
logger log.Logger, db dbm.DB, traceStore io.Writer, loadLatest bool, skipUpgradeHeights map[int64]bool, | |||
homePath string, invCheckPeriod uint, encodingConfig simappparams.EncodingConfig, | |||
appOpts servertypes.AppOptions, baseAppOptions ...func(*baseapp.BaseApp), | |||
appOpts servertypes.AppOptions, wasmEnabledProposals []wasm.ProposalType, baseAppOptions ...func(*baseapp.BaseApp), |
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.
Add wasmEnabledProposals
parameter since wasm sim tests requires enabling all proposal types like:
https://github.com/CosmWasm/wasmd/blob/v0.30.0/app/sim_test.go#L155
// delete persistent tx counter value | ||
ctxA.KVStore(app.keys[wasm.StoreKey]).Delete(wasmtypes.TXCounterPrefix) |
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.
Wasm simulation does not check TxCounter, it must be deleted manually here.
See:
https://github.com/CosmWasm/wasmd/blob/v0.30.0/x/wasm/keeper/ante.go#L24
// set sim params to overwrite wasmd default reflect.wasm path | ||
simParams := simtypes.AppParams{ | ||
wasmsim.OpReflectContractPath: json.RawMessage(`"../testutil/wasm/reflect.wasm"`), | ||
} | ||
|
||
bz, err := json.Marshal(simParams) | ||
if err != nil { | ||
return simtypes.Config{}, nil, "", nil, false, sdkerrors.Wrap(err, "marshal sim custom params") | ||
} | ||
config.ParamsFile = filepath.Join(dir, "sim-params.json") | ||
err = ioutil.WriteFile(config.ParamsFile, bz, 0o600) | ||
if err != nil { | ||
return simtypes.Config{}, nil, "", nil, false, sdkerrors.Wrap(err, "write temp sim params") | ||
} |
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.
No idea why it was needed. The default path should work properly, and the default one does not require to track the test contract ../testutil/wasm/reflect.wasm
version. So I delete it.
@@ -1,14 +1,14 @@ | |||
module github.com/desmos-labs/desmos/v4 | |||
|
|||
go 1.18 | |||
go 1.19 |
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.
The wasmd 0.30.0 requires go 1.19, Desmos should follow the version now.
30a8851
to
fba6c29
Compare
if loadLatest { | ||
if err := app.LoadLatestVersion(); err != nil { | ||
tmos.Exit(err.Error()) | ||
} | ||
} | ||
ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{}) |
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.
What is this used for?
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.
It is used for InitializePinnedCodes
function, which initializes wasmVM caching contracts codes. See:
https://github.com/CosmWasm/wasmd/blob/88e01a98ab8a87b98dc26c03715e6aef5c92781b/x/wasm/keeper/keeper.go#L885
The pinned codes is defined by the proposals, see:
https://github.com/CosmWasm/docs/blob/1629990736eb934c164dfa693299141fd3c2e14a/docs/04-smart-contracts/12-code-pinning.md
I think it was missing to add this part in Desmos, since it is added in wasmd app here:
https://github.com/CosmWasm/wasmd/blob/v0.30.0/app/app.go#L795-L806
@@ -274,6 +275,7 @@ func newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, appOpts serverty | |||
cast.ToUint(appOpts.Get(server.FlagInvCheckPeriod)), | |||
app.MakeTestEncodingConfig(), // Ideally, we would reuse the one created by NewRootCmd. | |||
appOpts, | |||
wasm.DisableAllProposals, |
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.
Shouldn't we get this list from somewhere? Otherwise we will have all proposals always disabled. Or am I missing something?
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.
No, currently it is hard coded, and it requires all the nodes having the same accepted list. Hope they can have the on chain parameter in the future.
Here I use the previous setting which disabled all proposals.
go.mod
Outdated
// Our wasmd branch is: https://github.com/desmos-labs/wasmd v0.28.x-desmos | ||
github.com/CosmWasm/wasmd => github.com/desmos-labs/wasmd v0.29.0-desmos.2 | ||
// Our wasmd branch is: https://github.com/desmos-labs/wasmd v0.30.x-desmos | ||
github.com/CosmWasm/wasmd => github.com/desmos-labs/wasmd v0.23.1-0.20230202060518-edbdd2dcb064 |
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.
It's probably better to tag a version here before merging this PR. So we can use v0.30.0-desmos.1
instead of the commit hash
## Description This PR integrates ibc fee middleware for ibc modules, allowing the relayer operators to receive tokens when submit the ibc transactions. This integration follows [this guide](https://ibc.cosmos.network/main/middleware/ics29-fee/integration.html). Note: The channel to support ibc fee middleware should have the version like: ```json {"fee_version": "ics29-1", "app_version": "ics20-1"} ``` If the version does not include `fee_version`, for example `ics20-1`, then the channel will be considered without middleware, then passing the version onto underlying IBC module and also tagging the channel is not `FeeEnabled`. The channel version is set in relayer side. So it should work properly integrate ibc fee in our side app only. See [here](https://github.com/cosmos/ibc-go/blob/v4.3.0/modules/apps/29-fee/ibc_middleware.go#L34-L82). Depends-On: #1079 --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [x] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] added `!` to the type prefix if API or client breaking change - [x] targeted the correct branch (see [PR Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the guidelines for [building modules](https://docs.cosmos.network/v0.44/building-modules/intro.html) - [ ] included the necessary unit and integration [tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing) - [ ] added a changelog entry to `CHANGELOG.md` - [ ] included comments for [documenting Go code](https://blog.golang.org/godoc) - [ ] updated the relevant documentation or specification - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title - [ ] confirmed `!` in the type prefix if API or client breaking change - [ ] confirmed all author checklist items have been addressed - [ ] reviewed state machine logic - [ ] reviewed API design and naming - [ ] reviewed documentation is accurate - [ ] reviewed tests and test coverage - [ ] manually tested (if applicable)
Description
This PR bumps ibc-go to v4.3.0 and wasmd to v0.30.0.
The ibc-go migration is based on this guide, and the wasmd migration references the app.go file.
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change