Merge pull request #447 from CosmWasm/wasmvm_upgrade
Upgrade wasmvm to v0.14.0-beta1
This commit is contained in:
11
Dockerfile
11
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
|
||||
|
||||
|
||||
2
go.mod
2
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
|
||||
|
||||
4
go.sum
4
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=
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
x/wasm/internal/keeper/testdata/burner.wasm
vendored
BIN
x/wasm/internal/keeper/testdata/burner.wasm
vendored
Binary file not shown.
BIN
x/wasm/internal/keeper/testdata/hackatom.wasm
vendored
BIN
x/wasm/internal/keeper/testdata/hackatom.wasm
vendored
Binary file not shown.
BIN
x/wasm/internal/keeper/testdata/hackatom.wasm.gzip
vendored
BIN
x/wasm/internal/keeper/testdata/hackatom.wasm.gzip
vendored
Binary file not shown.
BIN
x/wasm/internal/keeper/testdata/ibc_reflect.wasm
vendored
BIN
x/wasm/internal/keeper/testdata/ibc_reflect.wasm
vendored
Binary file not shown.
Binary file not shown.
BIN
x/wasm/internal/keeper/testdata/reflect.wasm
vendored
BIN
x/wasm/internal/keeper/testdata/reflect.wasm
vendored
Binary file not shown.
BIN
x/wasm/internal/keeper/testdata/staking.wasm
vendored
BIN
x/wasm/internal/keeper/testdata/staking.wasm
vendored
Binary file not shown.
Reference in New Issue
Block a user