Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker files to work with ephemeral cluster #10

Draft
wants to merge 57 commits into
base: tzdybal/optimint
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
d925959
intrarelayer: rename `EnableEVMHook` parameter JSON (#99)
danburck Nov 18, 2021
7091093
fix: add missing `convert-erc20` cmd (#102)
giansalex Nov 20, 2021
b3708c1
docs: intrarelayer spec (#101)
danburck Nov 22, 2021
85dbde7
build(deps): bump actions/cache from 2.1.6 to 2.1.7 (#108)
dependabot[bot] Nov 23, 2021
440120d
cmd: update testnet command (#105)
fedekunze Nov 23, 2021
5560fe8
intrarelayer: add IBC validation (#107)
ramacarlucho Nov 23, 2021
e450351
fix: intrarelayer nonce and update contract (#109)
fedekunze Nov 23, 2021
7cd5842
deps: bump ethermint to `v0.8.1` (#110)
fedekunze Nov 23, 2021
b3a9923
docs: update version (#112)
fedekunze Nov 23, 2021
75854c1
ci: enable gosec sarif upload (#113)
prajjwol Nov 24, 2021
c3a6011
fix: gosec vulnerabilities (#114)
danburck Nov 25, 2021
cf35eef
ci: backport PRs (#117)
fedekunze Nov 25, 2021
0effbfa
build: fix docker-build command (#116)
prajjwol Nov 25, 2021
af9c200
docs: seeds (#123)
fedekunze Nov 26, 2021
cc84288
app: only log TPS if value > 0 (#122)
odeke-em Nov 26, 2021
7867b56
docs: reset metamask account (#125)
fedekunze Nov 26, 2021
5600b50
app: add IBC-go testing interface (#128)
fedekunze Nov 28, 2021
87c899a
ci: build docker containers and push to docker hub (#126)
prajjwol Nov 28, 2021
dd138a2
docs: grammar fix (#130)
git-sgmoore Nov 29, 2021
034514e
fixing little typo (06_events.md) (#131)
McDaan Nov 29, 2021
469b30d
docs: add use cases to intrarelayer spec abstract (#133)
danburck Nov 30, 2021
e3972fd
build(deps): bump Ethermint version to v0.9.0 (#135)
danburck Dec 1, 2021
cced9ed
Bug(Intrarelayer): Add validation of "intrarelayer/" prefix for Coin …
danburck Dec 1, 2021
3983688
ci: rename docker hub account tharsislabs -> tharsishq (#136)
prajjwol Dec 1, 2021
587f351
fix: intrarelayer proposals are not registered (#121)
hanchon Dec 1, 2021
4b89a8e
docs(evmos): update latest version to v0.4.0 (#139)
danburck Dec 2, 2021
e05daa3
Add docker files to work with ephemeral cluster
jbowen93 Jan 25, 2022
4c8317b
update init and copy it into docker container
jbowen93 Jan 25, 2022
cc98dcd
update init.sh and use in entrypoint.sh
jbowen93 Jan 26, 2022
54b8d35
update optimint and ethermint dependencies
jbowen93 Jan 26, 2022
ef359c2
WIP
jbowen93 Feb 2, 2022
7c94a90
wip w/ local optimint and ethermint
jbowen93 Feb 2, 2022
9e84eb0
remove large file
jbowen93 Feb 2, 2022
348fb79
wip
jbowen93 Feb 4, 2022
4b0c257
working debug w/ local dirs
jbowen93 Feb 8, 2022
4fa4db0
Add working tarball and associated changes
jbowen93 Feb 9, 2022
e36a80a
Add working build script and remove tarball
jbowen93 Feb 9, 2022
1de1015
add docker build gh action
jbowen93 Feb 9, 2022
b9dfb41
Merge pull request #12 from jbowen93/jbowen93/gh-action
jbowen93 Feb 9, 2022
1217854
Initial Optimint integration
tzdybal Nov 18, 2021
5da1251
Makefile: use go install instead of go get
tzdybal Nov 19, 2021
e5c7921
Update evmosd invocation
tzdybal Nov 19, 2021
672f606
Update ethermint to get latest optimint-enabled version
tzdybal Nov 19, 2021
f71dd1b
Add docker files to work with ephemeral cluster
jbowen93 Jan 25, 2022
b39938d
update init and copy it into docker container
jbowen93 Jan 25, 2022
d433031
update init.sh and use in entrypoint.sh
jbowen93 Jan 26, 2022
c3c245a
update optimint and ethermint dependencies
jbowen93 Jan 26, 2022
6508b13
WIP
jbowen93 Feb 2, 2022
8ba1366
wip w/ local optimint and ethermint
jbowen93 Feb 2, 2022
69b7c78
remove large file
jbowen93 Feb 2, 2022
dae00ba
wip
jbowen93 Feb 4, 2022
24a1964
working debug w/ local dirs
jbowen93 Feb 8, 2022
c5e5078
Add working tarball and associated changes
jbowen93 Feb 9, 2022
68fb571
Add working build script and remove tarball
jbowen93 Feb 9, 2022
2c96c14
working build.sh
jbowen93 Feb 9, 2022
60da723
Merge branch 'jbowen93/docker' of github.com:jbowen93/evmos into jbow…
jbowen93 Feb 9, 2022
ffc0e0b
Merge branch 'celestiaorg:main' into jbowen93/docker
jbowen93 Feb 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ client/docs/* linguist-documentation
docs/* linguist-documentation
x/**/spec/* linguist-documentation
**/*.pb.go linguist-generated
**/*.pb.gw.go linguist-generated
**/*.pb.gw.go linguist-generated
.tgz filter=lfs diff=lfs merge=lfs -text
39 changes: 39 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "docker-build"

on:
push:
branches:
- "main"
workflow_dispatch:

jobs:
docker-build:
runs-on: "ubuntu-latest"
permissions:
contents: write
packages: write
steps:
- name: "Checkout source code"
uses: "actions/checkout@v2"
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: "Build"
run: "make build"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/celestiaorg/celestia-node:latest
file: docker/Dockerfile
43 changes: 43 additions & 0 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Push to Docker Hub

on:
push:
tags:
- "v*.*.*"

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Git fetch everything
run: git fetch --prune --unshallow
-
name: Get Github tag
id: meta
run: |
echo "::set-output name=tag::$(git describe --always --tags --match='v*')"
-
name: Set up QEMU
uses: docker/setup-qemu-action@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Login to DockerHub
uses: docker/login-action@v1
with:
registry: docker.io
username: tharsishq
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64, linux/386, linux/arm64
tags: tharsishq/evmos:latest, tharsishq/evmos:${{ steps.meta.outputs.tag }}
26 changes: 20 additions & 6 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
name: Run Gosec
on:
pull_request:
push:
branches:
- main
pull_request:
branches:
- '**'

jobs:
tests:
Gosec:
runs-on: ubuntu-latest
env:
GO111MODULE: on
steps:
- name: Checkout Source
uses: actions/checkout@v2
uses: actions/[email protected]
- name: Get Diff
uses: technote-space/get-diff-action@v5
with:
PATTERNS: |
**/*.go
go.mod
go.sum
- name: Run Gosec Security Scanner
uses: informalsystems/gosec@master
with:
args: ./...
# we let the report trigger content trigger a failure using the GitHub Security features.
args: '-no-fail -fmt sarif -out results.sarif ./...'
if: "env.GIT_DIFF_FILTERED != ''"
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v1
with:
# Path to SARIF file relative to the root of the repository
sarif_file: results.sarif
if: "env.GIT_DIFF_FILTERED != ''"
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install tparse
run: |
export GO111MODULE="on" && go get github.com/mfridman/tparse@latest
- uses: actions/[email protected].6
- uses: actions/[email protected].7
with:
path: ~/go/bin
key: ${{ runner.os }}-go-tparse-binary
Expand Down
18 changes: 18 additions & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
"default": true
"MD001": false
"MD004": false
"MD007":
"indent": 4
"MD013": false
"MD024":
"siblings_only": true
"MD025": false
"MD026":
"punctuation": ".;:"
"MD029": false
"MD033": false
"MD034": false
"MD036": false
"MD040": false
"MD041": false
"no-hard-tabs": false
3 changes: 3 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CHANGELOG.md
docs/api/proto-docs.md
docs/node_modules
18 changes: 17 additions & 1 deletion .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
queue_rules:
- name: default
conditions:
- "#approved-reviews-by>1"

pull_request_rules:
- name: automerge to base branch with label automerge and branch protection passing
- name: automerge to the base branch with label automerge and branch protection passing
conditions:
- "#approved-reviews-by>1"
- base=main
- label=automerge
actions:
queue:
name: default
merge:
method: squash
strict: true
commit_message: title+body
- name: backport patches to v0.3.x branch
conditions:
- base=main
- label=backport/0.3.x
actions:
backport:
branches:
- release/v0.3.x
40 changes: 37 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,40 @@ Ref: https://keepachangelog.com/en/1.0.0/

## Unreleased

## State Machine Breaking

* (intrarelayer) [\#119](https://github.com/tharsis/evmos/issues/119) Register `x/intrarelayer` proposal types on governance module.

### Improvements

* (app) [\#128](https://github.com/tharsis/evmos/pull/128) Add ibc-go `TestingApp` interface.
* (ci) [\#117](https://github.com/tharsis/evmos/pull/117) Enable automatic backport of PRs.
* (deps) [\#135](https://github.com/tharsis/evmos/pull/135) Bump Ethermint version to [`v0.9.0`](https://github.com/tharsis/ethermint/releases/tag/v0.9.0)
* (ci) [\#136](https://github.com/tharsis/evmos/pull/136) Deploy `evmos` docker container to [docker hub](https://hub.docker.com/u/tharsishq) for every versioned releases

### Bug Fixes

* (build) [\#116](https://github.com/tharsis/evmos/pull/116) Fix `build-docker` command

## [v0.3.0] - 2021-11-24

### API Breaking

* (intrarelayer) [\#99](https://github.com/tharsis/evmos/pull/99) Rename `enable_e_v_m_hook` json parameter to `enable_evm_hook`.

### Improvements

* (deps) [\#110](https://github.com/tharsis/evmos/pull/110) Bump Ethermint version to [`v0.8.1`](https://github.com/tharsis/ethermint/releases/tag/v0.8.1)
* (intrarelayer) [\#107](https://github.com/tharsis/evmos/pull/107) Add IBC validation
* (cmd) [\#105](https://github.com/tharsis/evmos/pull/105) Improve testnet command to include JSON-RPC client.

## Bug Fixes

* (intrarelayer) [\#109](https://github.com/tharsis/evmos/pull/109) Fix hardcoded intrarelayer nonce and `UpdateTokenPairERC20` proposal to support ERC20s with 0 decimals.
* (intrarelayer) [\#102](https://github.com/tharsis/evmos/pull/102) Add `convert-erc20` cmd

## [v0.2.0] - 2021-11-17

### Features

* (intrarelayer) [\#82](https://github.com/tharsis/evmos/pull/82) Intrarelayer module
Expand All @@ -53,7 +87,7 @@ Ref: https://keepachangelog.com/en/1.0.0/

* (deps) [\#64](https://github.com/tharsis/evmos/pull/64) Bump Ethermint version to `v0.7.2`

## Bug Fixes
### Bug Fixes

* (cmd) [\#41](https://github.com/tharsis/evmos/pull/41) Fix `debug` command.

Expand All @@ -65,13 +99,13 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [v0.1.1] - 2021-10-07

## Bug Fixes
### Bug Fixes

* (build) [\#30](https://github.com/tharsis/evmos/pull/30) Fix `version` command.

## [v0.1.0] - 2021-10-07

## Improvements
### Improvements

* (cmd) [\#26](https://github.com/tharsis/evmos/pull/26) Use config on genesis accounts.
* (deps) [\#28](https://github.com/tharsis/evmos/pull/28) Bump Ethermint version to `v0.7.0`
27 changes: 10 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,23 @@
FROM golang:alpine AS build-env
FROM golang:stretch AS build-env

# Set up dependencies
ENV PACKAGES git build-base

# Set working directory for the build
WORKDIR /go/src/github.com/tharsis/evmos

# Install dependencies
RUN apk add --update $PACKAGES
RUN apk add linux-headers
RUN apt update
RUN apt install git -y

# Add source files
COPY . .

# Make the binary
RUN make build

# Final image
FROM alpine
FROM golang:stretch

RUN apt update
RUN apt install ca-certificates jq -y

# Install ca-certificates
RUN apk add --update ca-certificates jq
WORKDIR /root

# Copy over binaries from the build-env
COPY --from=build-env /go/src/github.com/tharsis/evmos/build/evmosd /usr/bin/evmosd

# Run evmosd by default
CMD ["evmosd"]
EXPOSE 26656 26657 1317 9090

CMD ["evmosd"]
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ SIMAPP = ./app
HTTPS_GIT := https://github.com/tharsis/evmos.git
DOCKER := $(shell which docker)
DOCKER_BUF := $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace bufbuild/buf
NAMESPACE := tharsishq
PROJECT := evmos
DOCKER_IMAGE := $(NAMESPACE)/$(PROJECT)
COMMIT_HASH := $(shell git rev-parse --short=7 HEAD)
DOCKER_TAG := $(COMMIT_HASH)

export GO111MODULE = on

Expand Down Expand Up @@ -118,19 +123,23 @@ $(BUILD_TARGETS): go.sum $(BUILDDIR)/
$(BUILDDIR)/:
mkdir -p $(BUILDDIR)/

docker-build:
build-docker:
# TODO replace with kaniko
docker build -t ${DOCKER_IMAGE}:${DOCKER_TAG} .
docker tag ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_IMAGE}:latest
# docker tag ${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_IMAGE}:${COMMIT_HASH}
# update old container
docker rm evmos || true
# create a new container from the latest image
docker create --name evmos -t -i tharsis/evmos:latest evmos
docker create --name evmos -t -i ${DOCKER_IMAGE}:latest evmos
# move the binaries to the ./build directory
mkdir -p ./build/
docker cp evmos:/usr/bin/evmosd ./build/

push-docker: build-docker
docker push ${DOCKER_IMAGE}:${DOCKER_TAG}
docker push ${DOCKER_IMAGE}:latest

$(MOCKS_DIR):
mkdir -p $(MOCKS_DIR)

Expand Down Expand Up @@ -245,7 +254,7 @@ docs-tools-stamp: docs-tools
go.sum: go.mod
echo "Ensure dependencies have not been modified ..." >&2
go mod verify
go mod tidy
go mod tidy -e

###############################################################################
### Documentation ###
Expand Down
Loading