Skip to content

Commit 78408bb

Browse files
authored
Merge pull request #2231 from CosmWasm/feat/ibc_v2
feat: Implement IBCv2 packet sending and two entry points: Receive & Timeout
2 parents fd586d7 + d3f6f43 commit 78408bb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1024
-217
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
command: |
206206
IN_DOCKER=$(docker run --rm "cosmwasm/wasmd:${CIRCLE_SHA1}" /usr/bin/wasmd query wasm libwasmvm-version)
207207
echo "Runtime libwasmvm-version in docker: $IN_DOCKER"
208-
IN_GOMOD=$(go list -m github.com/CosmWasm/wasmvm/v2 | cut -d" " -f2 | cut -d"v" -f2)
208+
IN_GOMOD=$(go list -m github.com/CosmWasm/wasmvm/v3 | cut -d" " -f2 | cut -d"v" -f2)
209209
echo "wasmvm version in go.mod: $IN_GOMOD"
210210
if [[ "$IN_DOCKER" != "$IN_GOMOD" ]]; then
211211
echo "Mismatch of wasmvm versions detected"

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.55.0...HEAD)
66

7+
- Register IBC v2 route and store the IBC v2 port in ContractInfo [\#2122](https://github.com/CosmWasm/wasmd/issues/2122)
8+
- Add IBC v2 SendPacket message encoding [\#2110](https://github.com/CosmWasm/wasmd/issues/2110)
9+
10+
711
## [v0.55.0](https://github.com/CosmWasm/wasmd/tree/v0.55.0) (2025-03-11)
812

913
[Full Changelog](https://github.com/CosmWasm/wasmd/compare/v0.54.0...v0.55.0)

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ RUN apk add git
1515
WORKDIR /code
1616
COPY . /code/
1717
# See https://github.com/CosmWasm/wasmvm/releases
18-
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.3/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
19-
ADD https://github.com/CosmWasm/wasmvm/releases/download/v2.2.3/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
20-
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 6641730781bb1adc4bdf04a1e0f822b9ad4fb8ed57dcbbf575527e63b791ae41
21-
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 32503fe35a7be202c5f7c3051497d6e4b3cd83079a61f5a0bf72a2a455b6d820
18+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v3.0.0-ibc2.0/libwasmvm_muslc.aarch64.a /lib/libwasmvm_muslc.aarch64.a
19+
ADD https://github.com/CosmWasm/wasmvm/releases/download/v3.0.0-ibc2.0/libwasmvm_muslc.x86_64.a /lib/libwasmvm_muslc.x86_64.a
20+
RUN sha256sum /lib/libwasmvm_muslc.aarch64.a | grep 3bffc027c3467d6535fda10e13767194500208add1321709ebd79d2d507eb561
21+
RUN sha256sum /lib/libwasmvm_muslc.x86_64.a | grep 315605d243c71b2c29543af872fa84224632cfd2096755b34bb1798a0587bc42
2222

2323
# force it to use static lib (from above) not standard libgo_cosmwasm.so file
2424
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build

app/app.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,8 @@ func NewWasmApp(
582582
panic(fmt.Sprintf("error while reading wasm config: %s", err))
583583
}
584584

585+
ibcRouterV2 := ibcapi.NewRouter()
586+
585587
// The last arguments can contain custom message handlers, and custom query handlers,
586588
// if we want to allow any custom callbacks
587589
app.WasmKeeper = wasmkeeper.NewKeeper(
@@ -601,6 +603,7 @@ func NewWasmApp(
601603
wasmtypes.VMConfig{},
602604
wasmkeeper.BuiltInCapabilities(),
603605
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
606+
ibcRouterV2,
604607
wasmOpts...,
605608
)
606609

@@ -642,7 +645,7 @@ func NewWasmApp(
642645
AddRoute(icahosttypes.SubModuleName, icaHostStack)
643646
app.IBCKeeper.SetRouter(ibcRouter)
644647

645-
ibcRouterV2 := ibcapi.NewRouter().
648+
ibcRouterV2 = ibcRouterV2.
646649
AddRoute(ibctransfertypes.PortID, transferv2.NewIBCModule(app.TransferKeeper))
647650
app.IBCKeeper.SetRouterV2(ibcRouterV2)
648651

docs/proto/proto-docs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ ContractInfo stores a WASM contract instance
236236
| `label` | [string](#string) | | Label is optional metadata to be stored with a contract instance. |
237237
| `created` | [AbsoluteTxPosition](#cosmwasm.wasm.v1.AbsoluteTxPosition) | | Created Tx position when the contract was instantiated. |
238238
| `ibc_port_id` | [string](#string) | | |
239+
| `ibc2_port_id` | [string](#string) | | |
239240
| `extension` | [google.protobuf.Any](#google.protobuf.Any) | | Extension is an extension point to store custom metadata within the persistence model. |
240241

241242

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module github.com/CosmWasm/wasmd
33
go 1.23.6
44

55
require (
6-
github.com/CosmWasm/wasmvm/v2 v2.2.3
76
github.com/cosmos/cosmos-proto v1.0.0-beta.5
87
github.com/cosmos/cosmos-sdk v0.50.13
98
github.com/cosmos/gogogateway v1.2.0 // indirect
@@ -43,6 +42,7 @@ require (
4342
cosmossdk.io/x/nft v0.1.1
4443
cosmossdk.io/x/tx v0.13.7
4544
cosmossdk.io/x/upgrade v0.1.4
45+
github.com/CosmWasm/wasmvm/v3 v3.0.0-ibc2.0
4646
github.com/cometbft/cometbft v0.38.15
4747
github.com/cosmos/cosmos-db v1.1.1
4848
github.com/cosmos/ibc-go/v10 v10.1.0
@@ -227,7 +227,6 @@ replace (
227227
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
228228
// See: https://github.com/cosmos/cosmos-sdk/issues/10409
229229
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1
230-
231230
// pin version! 126854af5e6d has issues with the store so that queries fail
232231
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
233232
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25
227227
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
228228
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
229229
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
230-
github.com/CosmWasm/wasmvm/v2 v2.2.3 h1:LVaAdkCMbgfUTSFOANmp2OOU1rIgz4iylow4SFD/lqs=
231-
github.com/CosmWasm/wasmvm/v2 v2.2.3/go.mod h1:bMhLQL4Yp9CzJi9A83aR7VO9wockOsSlZbT4ztOl6bg=
230+
github.com/CosmWasm/wasmvm/v3 v3.0.0-ibc2.0 h1:QoagSm5iYuRSPYDxgRxsa6hVfDppUp4+bOwY7bDuMO0=
231+
github.com/CosmWasm/wasmvm/v3 v3.0.0-ibc2.0/go.mod h1:oknpb1bFERvvKcY7vHRp1F/Y/z66xVrsl7n9uWkOAlM=
232232
github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=
233233
github.com/DataDog/datadog-go v4.8.3+incompatible h1:fNGaYSuObuQb5nzeTQqowRAd9bpDIRRV4/gUtIBjh8Q=
234234
github.com/DataDog/datadog-go v4.8.3+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ=

proto/cosmwasm/wasm/v1/types.proto

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,11 @@ message ContractInfo {
8888
// Created Tx position when the contract was instantiated.
8989
AbsoluteTxPosition created = 5;
9090
string ibc_port_id = 6 [ (gogoproto.customname) = "IBCPortID" ];
91+
string ibc2_port_id = 7 [ (gogoproto.customname) = "IBC2PortID" ];
9192

9293
// Extension is an extension point to store custom metadata within the
9394
// persistence model.
94-
google.protobuf.Any extension = 7
95+
google.protobuf.Any extension = 8
9596
[ (cosmos_proto.accepts_interface) =
9697
"cosmwasm.wasm.v1.ContractInfoExtension" ];
9798
}

tests/e2e/gov_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"testing"
55
"time"
66

7-
wasmvmtypes "github.com/CosmWasm/wasmvm/v2/types"
7+
wasmvmtypes "github.com/CosmWasm/wasmvm/v3/types"
88
ibctesting "github.com/cosmos/ibc-go/v10/testing"
99
"github.com/stretchr/testify/assert"
1010
"github.com/stretchr/testify/require"

tests/e2e/grants_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"testing"
77
"time"
88

9-
wasmvm "github.com/CosmWasm/wasmvm/v2"
9+
wasmvm "github.com/CosmWasm/wasmvm/v3"
1010
ibctesting "github.com/cosmos/ibc-go/v10/testing"
1111
"github.com/stretchr/testify/assert"
1212
"github.com/stretchr/testify/require"

0 commit comments

Comments
 (0)