Skip to content

Commit

Permalink
Merge branch 'main' into carlos/deps-bump-wasmvm-v2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez authored Mar 18, 2024
2 parents b3cbc37 + 70d78b8 commit 52232dc
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 43 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### API Breaking

* (core/02-client, light-clients) [\#5806](https://github.com/cosmos/ibc-go/pull/5806) Decouple light client routing from their encoding structure.
* (core/04-channel) [\#5991](https://github.com/cosmos/ibc-go/pull/5991) The client CLI `QueryLatestConsensusState` has been removed.

### State Machine Breaking

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ To report a security vulnerability, see our [Coordinated Vulnerability Disclosur

The following audits have been performed on the `ibc-go` source code:

- [ICS27 Interchain Accounts](https://github.com/cosmos/ibc-go/blob/main/docs/audits/27-interchain-accounts/Trail%20of%20Bits%20audit%20-%20Final%20Report.pdf) by Trail of Bits.
- [ICS20 Fungible Token Transfer](https://github.com/informalsystems/audits/tree/dc8b503727adcbb8e29c3d3a25a9070e0bf1ec87/IBC-GO) by Informal Systems.
- ICS27 Interchain Accounts by [Trail of Bits](https://github.com/cosmos/ibc-go/blob/main/docs/audits/27-interchain-accounts/Trail%20of%20Bits%20audit%20-%20Final%20Report.pdf) and [Informal Systems](https://github.com/cosmos/ibc-go/issues/631).
- [ICS08 Wasm Clients](https://github.com/cosmos/ibc-go/blob/main/docs/audits/08-wasm/Ethan%20Frey%20-%20Wasm%20Client%20Review.pdf) by Ethan Frey/Confio.
- [ICS04 Channel upgradability](https://github.com/cosmos/ibc-go/blob/main/docs/audits/04-channel-upgrades/Atredis%20Partners%20-%20Interchain%20Foundation%20IBC-Go%20Channel%20Upgrade%20Feature%20Assessment%20-%20Report%20v1.1.pdf) by Atredis Partners.

Expand Down
2 changes: 2 additions & 0 deletions docs/docs/05-migrations/13-v8-to-v9.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ The functions `GetPortID()`, `GetChannelID()` of the `CounterpartyChannel` type
The functions `GetClientID()`, `GetState()`, `GetCounterparty()`, `GetVersions()`, and `GetDelayPeriod` of the `Connection` type have been removed.
The functions `GetClientID()`, `GetConnectionID()`, and `GetPrefix()` of the `CounterpartyConnection` type have been removed.

The utility function `QueryLatestConsensusState` of `04-channel` CLI has been removed.

### API deprecation notice

The testing package functions `coordinator.Setup`, `coordinator.SetupClients`, `coordinator.SetupConnections`, `coordinator.CreateConnections`, and `coordinator.CreateChannels` have been deprecated and will be removed in v10.
Expand Down
4 changes: 3 additions & 1 deletion modules/apps/callbacks/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -619,9 +619,11 @@ func NewSimApp(
transfer.NewAppModule(app.TransferKeeper),
ibcfee.NewAppModule(app.IBCFeeKeeper),
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
mockModule,

// IBC light clients
ibctm.NewAppModule(tmLightClientModule),
solomachine.NewAppModule(smLightClientModule),
mockModule,
)

// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
Expand Down
39 changes: 0 additions & 39 deletions modules/core/04-channel/client/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ import (
"github.com/cosmos/ibc-go/v8/modules/core/04-channel/types"
host "github.com/cosmos/ibc-go/v8/modules/core/24-host"
ibcclient "github.com/cosmos/ibc-go/v8/modules/core/client"
ibcerrors "github.com/cosmos/ibc-go/v8/modules/core/errors"
"github.com/cosmos/ibc-go/v8/modules/core/exported"
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
)

// QueryChannel returns a channel end.
Expand Down Expand Up @@ -126,42 +123,6 @@ func QueryChannelConsensusState(
return res, nil
}

// QueryLatestConsensusState uses the channel Querier to return the
// latest ConsensusState given the source port ID and source channel ID.
// Deprecated: This function will be removed in a later release of ibc-go.
// NOTE: This function only supports querying latest consensus state of 07-tendermint client state implementations.
func QueryLatestConsensusState(
clientCtx client.Context, portID, channelID string,
) (exported.ConsensusState, clienttypes.Height, clienttypes.Height, error) {
clientRes, err := QueryChannelClientState(clientCtx, portID, channelID, false)
if err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

var clientState exported.ClientState
if err := clientCtx.InterfaceRegistry.UnpackAny(clientRes.IdentifiedClientState.ClientState, &clientState); err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

tmClientState, ok := clientState.(*ibctm.ClientState)
if !ok {
return nil, clienttypes.Height{}, clienttypes.Height{}, errorsmod.Wrapf(ibcerrors.ErrInvalidType, "expected type: %T, got: %T",
ibctm.ClientState{}, clientState)
}

res, err := QueryChannelConsensusState(clientCtx, portID, channelID, tmClientState.LatestHeight, false)
if err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

var consensusState exported.ConsensusState
if err := clientCtx.InterfaceRegistry.UnpackAny(res.ConsensusState, &consensusState); err != nil {
return nil, clienttypes.Height{}, clienttypes.Height{}, err
}

return consensusState, tmClientState.LatestHeight, res.ProofHeight, nil
}

// QueryNextSequenceReceive returns the next sequence receive.
// If prove is true, it performs an ABCI store query in order to retrieve the merkle proof. Otherwise,
// it uses the gRPC query client.
Expand Down
4 changes: 3 additions & 1 deletion modules/light-clients/08-wasm/testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -658,10 +658,12 @@ func NewSimApp(
transfer.NewAppModule(app.TransferKeeper),
ibcfee.NewAppModule(app.IBCFeeKeeper),
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
mockModule,

// IBC light clients
wasm.NewAppModule(app.WasmClientKeeper), // TODO(damian): see if we want to pass the lightclient module here, keeper is used in AppModule.RegisterServices etc
ibctm.NewAppModule(tmLightClientModule),
solomachine.NewAppModule(smLightClientModule),
mockModule,
)

// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
Expand Down
4 changes: 3 additions & 1 deletion testing/simapp/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,11 @@ func NewSimApp(
transfer.NewAppModule(app.TransferKeeper),
ibcfee.NewAppModule(app.IBCFeeKeeper),
ica.NewAppModule(&app.ICAControllerKeeper, &app.ICAHostKeeper),
mockModule,

// IBC light clients
ibctm.NewAppModule(tmLightClientModule),
solomachine.NewAppModule(smLightClientModule),
mockModule,
)

// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
Expand Down

0 comments on commit 52232dc

Please sign in to comment.