Skip to content

Commit

Permalink
Merge branch 'main' into taztingo/1498-ibc-rate-limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Witkowski committed Oct 31, 2023
2 parents 5699d81 + c6e5b7d commit e2d0375
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 12 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5

# Set concurrency for this workflow to cancel in-progress jobs if retriggered.
# The github.ref is only available when triggered by a PR so fall back to github.run_id for other cases.
# The github.run_id is unique for each run, giving each such invocation it's own unique concurrency group.
Expand All @@ -17,21 +17,23 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Go mod vendor
run: |
go mod vendor
- name: Prepare
id: prep
run: |
Expand All @@ -56,24 +58,28 @@ jobs:
created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "Setting output: created=$created"
echo "created=$created" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
target: run
build-args: |
VERSION=${{ steps.prep.outputs.version }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
file: docker/blockchain/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Bump cometbft to v0.34.29 (from v0.34.28) [PR 1649](https://github.com/provenance-io/provenance/pull/1649).
* Add genesis/init for Marker module send deny list addresses. [#1660](https://github.com/provenance-io/provenance/issues/1660)
* Add automatic changelog entries for dependabot. [#1674](https://github.com/provenance-io/provenance/issues/1674)
* Add publishing of docker arm64 container builds [#1634](https://github.com/provenance-io/provenance/issues/1634)
* Ensure IBC marker has matching supply [#1706](https://github.com/provenance-io/provenance/issues/1706).

### Bug Fixes
Expand Down
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -454,11 +454,8 @@ vendor:

# Full build inside a docker container for a clean release build
docker-build: vendor
ifeq ($(UNAME_M),x86_64)
docker build --build-arg VERSION=$(VERSION) --build-arg ARCH=$(UNAME_M) -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
else
docker build --build-arg VERSION=$(VERSION) --build-arg ARCH=aarch64 -t provenance-io/blockchain . -f docker/blockchain/Dockerfile
endif
docker build --build-arg VERSION=$(VERSION) -t provenance-io/blockchain . -f docker/blockchain/Dockerfile


# Quick build using local environment and go platform target options.
docker-build-local: vendor
Expand Down
21 changes: 17 additions & 4 deletions docker/blockchain/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
FROM golang:1.20-bullseye as build
ARG VERSION
ARG ARCH=x86_64

WORKDIR /go/src/github.com/provenance-io/provenance

Expand All @@ -23,21 +22,35 @@ COPY Makefile sims.mk ./

# Build and install provenanced
ENV VERSION=$VERSION
RUN make VERSION=${VERSION} WITH_CLEVELDB=true install
RUN ARCH=$(uname -m) && \
if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then \
echo "Unsupported architecture (required: x86_64 or aarch64): $ARCH"; \
exit 1; \
fi && \
echo "Building and installing provenance for Arch: $ARCH"; \
make VERSION=${VERSION} install

###
FROM debian:bullseye-slim as run
ARG ARCH=x86_64
ENV LD_LIBRARY_PATH="/usr/local/lib"
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y curl jq libleveldb-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/


COPY --from=build /go/src/github.com/provenance-io/provenance/vendor/github.com/CosmWasm/wasmvm/internal/api/libwasmvm.$ARCH.so /usr/local/lib
COPY --from=build /go/src/github.com/provenance-io/provenance/vendor/github.com/CosmWasm/wasmvm/internal/api/libwasmvm.*.so /tmp
COPY --from=build /go/bin/provenanced /usr/bin/provenanced

RUN ARCH=$(uname -m) && \
if [ "$ARCH" != "x86_64" ] && [ "$ARCH" != "aarch64" ]; then \
echo "Unsupported architecture (required: x86_64 or aarch64): $ARCH"; \
exit 1; \
fi && \
cp /tmp/libwasmvm.$ARCH.so /usr/local/lib/. && \
rm /tmp/libwasmvm.*.so

ENV PIO_HOME=/home/provenance
WORKDIR /home/provenance

Expand Down
3 changes: 3 additions & 0 deletions x/oracle/spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ The oracle module provides the Provenance Blockchain with the capability to dyna

One challenge that the Provenance Blockchain faces is supporting each Provenance Blockchain Zone with a unique set of queries. It is not feasible to create an evolving set of queries for each chain. Furthermore, it is not desirable for other parties to request Provenance to build these endpoints for them and then upgrade. This module resolves these issues by enabling Provenance Blockchain zones to manage their own oracle.

## Acknowledgements
We appreciate the substantial contributions made by Strangelove Ventures and Quasar Finance through their work on the [Async ICQ Module](https://github.com/strangelove-ventures/async-icq) and [Interchain Query Demo](https://github.com/quasar-finance/interchain-query-demo). These resources were of paramount importance in informing the development of our oracle module.

## Contents
1. **[Concepts](01_concepts.md)**
2. **[State](02_state.md)**
Expand Down

0 comments on commit e2d0375

Please sign in to comment.