Skip to content

Commit

Permalink
Merge pull request cosmos#319 from CosmWasm/upgrade-wasmvm-to-0-12.0
Browse files Browse the repository at this point in the history
Upgrade wasmvm to 0.12.0
  • Loading branch information
webmaster128 committed Nov 19, 2020
2 parents 807956b + 07855f8 commit 8ee7038
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 22 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Folders we don't want to copy to Docker daemon in `docker build . -t cosmwasm/wasmd:latest`
build/
27 changes: 8 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
# docker build . -t cosmwasm/wasmd:latest
# docker run --rm -it cosmwasm/wasmd:latest /bin/sh
FROM cosmwasm/go-ext-builder:0002-alpine AS rust-builder
FROM golang:1.15-alpine3.12 AS go-builder

RUN apk add git

# copy all code into /code
WORKDIR /code
COPY go.* /code/

# download all deps
RUN go mod download github.com/CosmWasm/wasmvm

# build wasmvm *.a and install it
RUN export GO_WASM_DIR=$(go list -f "{{ .Dir }}" -m github.com/CosmWasm/wasmvm) && \
cd ${GO_WASM_DIR} && \
cargo build --release --features backtraces --example muslc && \
mv ${GO_WASM_DIR}/target/release/examples/libmuslc.a /lib/libwasmvm_muslc.a

# --------------------------------------------------------
FROM cosmwasm/go-ext-builder:0002-alpine AS go-builder
# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
# with some changes to support our toolchain, etc
RUN set -eux; apk add --no-cache ca-certificates build-base;

RUN apk add git
# NOTE: add these to run with LEDGER_ENABLED=true
Expand All @@ -27,7 +14,9 @@ RUN apk add git
WORKDIR /code
COPY . /code/

COPY --from=rust-builder /lib/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
# See https://github.com/CosmWasm/wasmvm/releases
ADD https://github.com/CosmWasm/wasmvm/releases/download/v0.12.0/libwasmvm_muslc.a /lib/libwasmvm_muslc.a
RUN sha256sum /lib/libwasmvm_muslc.a | grep 00ee24fefe094d919f5f83bf1b32948b1083245479dad8ccd5654c7204827765

# force it to use static lib (from above) not standard libgo_cosmwasm.so file
RUN LEDGER_ENABLED=false BUILD_TAGS=muslc make build
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/CosmWasm/wasmd
go 1.15

require (
github.com/CosmWasm/wasmvm v0.12.0-alpha1
github.com/CosmWasm/wasmvm v0.12.0
github.com/cosmos/cosmos-sdk v0.40.0-rc3
github.com/cosmos/iavl v0.15.0-rc4
github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,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.12.0-alpha1 h1:UPaemjM+O/9uQRDCiExXPpcUlMJ5Zo8N/BUvqjheb5A=
github.com/CosmWasm/wasmvm v0.12.0-alpha1/go.mod h1:tbXGE9Jz6sYpiJroGr71OQ5TFOufq/P5LWsruA2u6JE=
github.com/CosmWasm/wasmvm v0.12.0 h1:L9ez6fCg2Co1SgCm0YHjbnewZ8myemu2cm/QL0qR1OE=
github.com/CosmWasm/wasmvm v0.12.0/go.mod h1:tbXGE9Jz6sYpiJroGr71OQ5TFOufq/P5LWsruA2u6JE=
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=
Expand Down

0 comments on commit 8ee7038

Please sign in to comment.