diff --git a/Dockerfile b/Dockerfile index 0971ddbf..b493b224 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,24 +15,17 @@ WORKDIR /code COPY . /code/ # See https://github.com/CosmWasm/wasmvm/releases -ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.13.0/libwasmvm_muslc.a /lib/libwasmvm_muslc.a -RUN sha256sum /lib/libwasmvm_muslc.a | grep 39dc389cc6b556280cbeaebeda2b62cf884993137b83f90d1398ac47d09d3900 +ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.14.0-beta1/libwasmvm_muslc.a /lib/libwasmvm_muslc.a +RUN sha256sum /lib/libwasmvm_muslc.a | grep b69cf9ffbdfb2f1bd1e6f730ecee1eb0d06a1473840a24709aec7a7df5907d45 # force it to use static lib (from above) not standard libgo_cosmwasm.so file RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build -# we also (temporarily?) build the testnet binaries here -RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build-coral -RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build-gaiaflex # -------------------------------------------------------- FROM alpine:3.12 COPY --from=go-builder /code/build/wasmd /usr/bin/wasmd -# testnet -COPY --from=go-builder /code/build/corald /usr/bin/corald -COPY --from=go-builder /code/build/gaiaflexd /usr/bin/gaiaflexd - COPY docker/* /opt/ RUN chmod +x /opt/*.sh diff --git a/go.mod b/go.mod index ed2b82ab..1701d2c0 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd go 1.15 require ( - github.com/CosmWasm/wasmvm v0.14.0-alpha2 + github.com/CosmWasm/wasmvm v0.14.0-beta1 github.com/cosmos/cosmos-sdk v0.41.4 github.com/cosmos/iavl v0.15.3 github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b diff --git a/go.sum b/go.sum index 9d6c3efb..365124e6 100644 --- a/go.sum +++ b/go.sum @@ -17,8 +17,8 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03 github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= -github.com/CosmWasm/wasmvm v0.14.0-alpha2 h1:IF+ZNYe6XxKmAZaAzX/Y2dXB1v3l+J0+Vyz69CtojOQ= -github.com/CosmWasm/wasmvm v0.14.0-alpha2/go.mod h1:Id107qllDJyJjVQQsKMOy2YYF98sqPJ2t+jX1QES40A= +github.com/CosmWasm/wasmvm v0.14.0-beta1 h1:ASqXB/2D8CEBmAI/uljRw6eEMbeKXPQtL/wZzKXZGGA= +github.com/CosmWasm/wasmvm v0.14.0-beta1/go.mod h1:Id107qllDJyJjVQQsKMOy2YYF98sqPJ2t+jX1QES40A= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/zstd v1.4.1/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= diff --git a/x/wasm/internal/keeper/query_plugins.go b/x/wasm/internal/keeper/query_plugins.go index 18193355..6dddd522 100644 --- a/x/wasm/internal/keeper/query_plugins.go +++ b/x/wasm/internal/keeper/query_plugins.go @@ -173,12 +173,21 @@ func IBCQuerier(wasm *Keeper, channelKeeper types.ChannelKeeper) func(ctx sdk.Co } if request.ListChannels != nil { portID := request.ListChannels.PortID - var channels wasmvmtypes.IBCEndpoints + channels := make(wasmvmtypes.IBCChannels, 0) channelKeeper.IterateChannels(ctx, func(ch channeltypes.IdentifiedChannel) bool { if portID == "" || portID == ch.PortId { - newChan := wasmvmtypes.IBCEndpoint{ - PortID: ch.PortId, - ChannelID: ch.ChannelId, + newChan := wasmvmtypes.IBCChannel{ + Endpoint: wasmvmtypes.IBCEndpoint{ + PortID: ch.PortId, + ChannelID: ch.ChannelId, + }, + CounterpartyEndpoint: wasmvmtypes.IBCEndpoint{ + PortID: ch.Counterparty.PortId, + ChannelID: ch.Counterparty.ChannelId, + }, + Order: ch.Ordering.String(), + Version: ch.Version, + ConnectionID: ch.ConnectionHops[0], } channels = append(channels, newChan) } diff --git a/x/wasm/internal/keeper/relay.go b/x/wasm/internal/keeper/relay.go index 14ae1506..1aaddc6d 100644 --- a/x/wasm/internal/keeper/relay.go +++ b/x/wasm/internal/keeper/relay.go @@ -66,8 +66,7 @@ func (k Keeper) OnConnectChannel( events := types.ParseEvents(res.Attributes, contractAddr) ctx.EventManager().EmitEvents(events) - // TODO: add submessages support here (and everywhere else) once https://github.com/CosmWasm/cosmwasm/issues/822 is merged - if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, nil, res.Messages); err != nil { + if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, res.Submessages, res.Messages); err != nil { return err } return nil @@ -103,8 +102,7 @@ func (k Keeper) OnCloseChannel( events := types.ParseEvents(res.Attributes, contractAddr) ctx.EventManager().EmitEvents(events) - // TODO: add submessages support here (and everywhere else) once https://github.com/CosmWasm/cosmwasm/issues/822 is merged - if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, nil, res.Messages); err != nil { + if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, res.Submessages, res.Messages); err != nil { return err } return nil @@ -140,8 +138,7 @@ func (k Keeper) OnRecvPacket( events := types.ParseEvents(res.Attributes, contractAddr) ctx.EventManager().EmitEvents(events) - // TODO: add submessages support here (and everywhere else) once https://github.com/CosmWasm/cosmwasm/issues/822 is merged - if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, nil, res.Messages); err != nil { + if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, res.Submessages, res.Messages); err != nil { return nil, err } return res.Acknowledgement, nil @@ -178,8 +175,7 @@ func (k Keeper) OnAckPacket( events := types.ParseEvents(res.Attributes, contractAddr) ctx.EventManager().EmitEvents(events) - // TODO: add submessages support here (and everywhere else) once https://github.com/CosmWasm/cosmwasm/issues/822 is merged - if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, nil, res.Messages); err != nil { + if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, res.Submessages, res.Messages); err != nil { return err } return nil @@ -212,8 +208,7 @@ func (k Keeper) OnTimeoutPacket( events := types.ParseEvents(res.Attributes, contractAddr) ctx.EventManager().EmitEvents(events) - // TODO: add submessages support here (and everywhere else) once https://github.com/CosmWasm/cosmwasm/issues/822 is merged - if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, nil, res.Messages); err != nil { + if err := k.dispatchAll(ctx, contractAddr, contractInfo.IBCPortID, res.Submessages, res.Messages); err != nil { return err } return nil diff --git a/x/wasm/internal/keeper/testdata/burner.wasm b/x/wasm/internal/keeper/testdata/burner.wasm index 16435d69..8a16e6ea 100644 Binary files a/x/wasm/internal/keeper/testdata/burner.wasm and b/x/wasm/internal/keeper/testdata/burner.wasm differ diff --git a/x/wasm/internal/keeper/testdata/hackatom.wasm b/x/wasm/internal/keeper/testdata/hackatom.wasm index 53f9e4b4..fc5a53dd 100644 Binary files a/x/wasm/internal/keeper/testdata/hackatom.wasm and b/x/wasm/internal/keeper/testdata/hackatom.wasm differ diff --git a/x/wasm/internal/keeper/testdata/hackatom.wasm.gzip b/x/wasm/internal/keeper/testdata/hackatom.wasm.gzip index e7db8407..33c0ab92 100644 Binary files a/x/wasm/internal/keeper/testdata/hackatom.wasm.gzip and b/x/wasm/internal/keeper/testdata/hackatom.wasm.gzip differ diff --git a/x/wasm/internal/keeper/testdata/ibc_reflect.wasm b/x/wasm/internal/keeper/testdata/ibc_reflect.wasm index f116143e..76802272 100644 Binary files a/x/wasm/internal/keeper/testdata/ibc_reflect.wasm and b/x/wasm/internal/keeper/testdata/ibc_reflect.wasm differ diff --git a/x/wasm/internal/keeper/testdata/ibc_reflect_send.wasm b/x/wasm/internal/keeper/testdata/ibc_reflect_send.wasm index 19813625..fcb0ce69 100644 Binary files a/x/wasm/internal/keeper/testdata/ibc_reflect_send.wasm and b/x/wasm/internal/keeper/testdata/ibc_reflect_send.wasm differ diff --git a/x/wasm/internal/keeper/testdata/reflect.wasm b/x/wasm/internal/keeper/testdata/reflect.wasm index 3e05896e..7e4fa531 100644 Binary files a/x/wasm/internal/keeper/testdata/reflect.wasm and b/x/wasm/internal/keeper/testdata/reflect.wasm differ diff --git a/x/wasm/internal/keeper/testdata/staking.wasm b/x/wasm/internal/keeper/testdata/staking.wasm index 7b903a0c..43f7445e 100644 Binary files a/x/wasm/internal/keeper/testdata/staking.wasm and b/x/wasm/internal/keeper/testdata/staking.wasm differ