Skip to content

Commit

Permalink
Merge pull request #436 from quasar-finance/feature/main_multifile_me…
Browse files Browse the repository at this point in the history
…rge_trial

Feature/main multifile merge trial
  • Loading branch information
arhamchordia authored Aug 9, 2023
2 parents d20f46f + 281438f commit 62be163
Show file tree
Hide file tree
Showing 168 changed files with 22,332 additions and 8,601 deletions.
21 changes: 9 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1

ARG GO_VERSION="1.18"
ARG RUNNER_IMAGE="gcr.io/distroless/static"
ARG GO_VERSION="1.20"
ARG RUNNER_IMAGE="gcr.io/distroless/static-debian11"

# --------------------------------------------------------
# Builder
Expand All @@ -25,12 +25,12 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
go mod download

# Cosmwasm - Download correct libwasmvm version
RUN WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | cut -d ' ' -f 2) && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$(uname -m).a \
-O /lib/libwasmvm_muslc.a && \
RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/CosmWasm/wasmvm | sed 's/.* //') && \
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/libwasmvm_muslc.$ARCH.a \
-O /lib/libwasmvm_muslc.a && \
# verify checksum
wget https://github.com/CosmWasm/wasmvm/releases/download/$WASMVM_VERSION/checksums.txt -O /tmp/checksums.txt && \
sha256sum /lib/libwasmvm_muslc.a | grep $(cat /tmp/checksums.txt | grep $(uname -m) | cut -d ' ' -f 1)
sha256sum /lib/libwasmvm_muslc.a | grep $(cat /tmp/checksums.txt | grep libwasmvm_muslc.$ARCH | cut -d ' ' -f 1)

# Copy the remaining files
COPY . .
Expand All @@ -52,18 +52,15 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-X github.com/cosmos/cosmos-sdk/version.BuildTags='netgo,ledger,muslc' \
-w -s -linkmode=external -extldflags '-Wl,-z,muldefs -static'" \
-trimpath \
-o build/quasarnoded ./cmd/quasarnoded
-o build/quasarnoded \
/quasar/cmd/quasarnoded/main.go


# --------------------------------------------------------
# Runner
# --------------------------------------------------------

FROM alpine:3.17.2 as runner

ENV PACKAGES bash

RUN apk add --no-cache $PACKAGES
FROM ${RUNNER_IMAGE} as runner

COPY --from=builder /quasar/build/quasarnoded /bin/quasarnoded

Expand Down
1 change: 1 addition & 0 deletions LOCALNET.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

# Quasar Local Testnet (localnet)
## NOTE - This feature is as of now deprecated. We will be bringing better localnet support in future.

To run a small network of Quasar nodes locally, first generate their respective configuration:

Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ $(MOCKSDIR)/:
### Tests & Simulation ###
###############################################################################

PACKAGES_UNIT=$(shell go list ./x/epochs/... ./x/qoracle/... | grep -E -v "simapp|e2e" | grep -E -v "x/qoracle/client/cli")
PACKAGES_UNIT=$(shell go list ./x/epochs/... ./x/qoracle/... ./x/tokenfactory/... | grep -E -v "simapp|e2e" | grep -E -v "x/qoracle/client/cli")
PACKAGES_E2E=$(shell go list ./... | grep '/tests/e2e')
PACKAGES_SIM=$(shell go list ./... | grep '/tests/simulator')
TEST_PACKAGES=./...
Expand Down Expand Up @@ -342,6 +342,7 @@ docker-e2e-build:
DOCKER_BUILDKIT=1 docker build \
-t $$chain:local \
-t $$chain:local-distroless \
--build-arg GO_VERSION=$(GO_VERSION) \
--build-arg RUNNER_IMAGE=$(RUNNER_BASE_IMAGE_DISTROLESS) \
--build-arg GIT_VERSION=$(VERSION) \
--build-arg GIT_COMMIT=$(COMMIT) \
Expand Down
Loading

0 comments on commit 62be163

Please sign in to comment.