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

Merge jbowen93/evmos into celestiaorg/evmos #32

Merged
merged 104 commits into from
Mar 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
c963a5f
Initial Optimint integration
tzdybal Nov 18, 2021
912151a
Makefile: use go install instead of go get
tzdybal Nov 19, 2021
73dd1f3
Update evmosd invocation
tzdybal Nov 19, 2021
1f9e888
Update ethermint to get latest optimint-enabled version
tzdybal Nov 19, 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
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
6106029
update gh action to create debug image
jbowen93 Feb 9, 2022
3089bcc
convert build script to gh action
jbowen93 Feb 9, 2022
49ca56c
regular build
jbowen93 Feb 9, 2022
42db8e0
try optimint head
jbowen93 Feb 9, 2022
a70d897
remove git submodules
jbowen93 Feb 9, 2022
f1ceb29
try checking out the right branch
jbowen93 Feb 9, 2022
9c06779
fix syntax
jbowen93 Feb 9, 2022
7d5b86d
use github replacement
jbowen93 Feb 10, 2022
935229b
tidy
jbowen93 Feb 10, 2022
be36a71
just one platform?
jbowen93 Feb 10, 2022
b35dd1b
diff jobs
jbowen93 Feb 10, 2022
10fbdad
update build and dependencies
jbowen93 Feb 16, 2022
69c53de
update build-debug script to use tomasz's new optimint branch
jbowen93 Feb 28, 2022
d81aee9
Merge branch 'main' into jbowen93/debug-gh-action
jbowen93 Feb 28, 2022
bf875e4
Merge pull request #1 from jbowen93/jbowen93/debug-gh-action
jbowen93 Feb 28, 2022
29c4dbe
updating docker build action
jbowen93 Mar 14, 2022
2265637
Merge pull request #2 from jbowen93/docker-build
jbowen93 Mar 14, 2022
e166b08
fix docker build action
jbowen93 Mar 14, 2022
33091e3
fix go.mod
jbowen93 Mar 14, 2022
01d07b6
update go.mod
jbowen93 Mar 14, 2022
1fbe100
go mod tidy -compat=1.17 -e
jbowen93 Mar 14, 2022
d487e83
remove procps
jbowen93 Mar 14, 2022
d88602e
try alpine
jbowen93 Mar 14, 2022
b5107a5
debug and non debug builds using meta tags
jbowen93 Mar 14, 2022
51be27b
fix syntax
jbowen93 Mar 14, 2022
a299397
don't pull specific ref
jbowen93 Mar 14, 2022
408931d
push images
jbowen93 Mar 14, 2022
4af72c7
add tags and labels
jbowen93 Mar 14, 2022
b9afa14
more minimal tags
jbowen93 Mar 14, 2022
8b80985
try sha tags
jbowen93 Mar 14, 2022
f5ac41d
fix syntax
jbowen93 Mar 14, 2022
c299978
fix syntax
jbowen93 Mar 14, 2022
5694d27
Merge pull request #3 from jbowen93/docker-build
jbowen93 Mar 14, 2022
f7b796c
try ref on push
jbowen93 Mar 15, 2022
f4750ed
try sha
jbowen93 Mar 15, 2022
13ee49b
try actor
jbowen93 Mar 15, 2022
eaa6ead
logs
jbowen93 Mar 15, 2022
f564bbb
hardcode tag
jbowen93 Mar 15, 2022
6018094
try sha tag with fixed perms
jbowen93 Mar 15, 2022
552b852
add flavor
jbowen93 Mar 15, 2022
fd70ab4
add all image types
jbowen93 Mar 15, 2022
a904f1e
add qemu for arm64 builds
jbowen93 Mar 15, 2022
f05e5e7
remove debug suffix
jbowen93 Mar 15, 2022
5770ae1
move debug to suffix
jbowen93 Mar 15, 2022
cbd5856
Merge pull request #4 from jbowen93/docker-build
jbowen93 Mar 15, 2022
8d042ec
use multi platform builds
jbowen93 Mar 16, 2022
5494ed4
add qemu to debug
jbowen93 Mar 16, 2022
5fce2bf
remove comments
jbowen93 Mar 16, 2022
8dd4781
update to use ethermint w/ optimint v0.1.2
jbowen93 Mar 16, 2022
7f5830c
Merge pull request #5 from jbowen93/docker-build
jbowen93 Mar 16, 2022
d74705b
use celestiorg/ethermint v0.11.0+0.1.0-test
jbowen93 Mar 22, 2022
e99ddf2
update docker/Dockerfile to cross compile
jbowen93 Mar 22, 2022
7da9cf2
update docker/debug.Dockerfile to cross compile
jbowen93 Mar 22, 2022
7002743
dont add newest ethermint version to this PR
jbowen93 Mar 22, 2022
44f72ca
Merge pull request #6 from jbowen93/cross-compile
jbowen93 Mar 22, 2022
518972e
use celestiaorg/ethermint v0.11.0+0.1.0-test
jbowen93 Mar 22, 2022
22ac5c3
attempt a more generic file copy
jbowen93 Mar 23, 2022
9b306ce
remove comment
jbowen93 Mar 23, 2022
4f74a52
Merge pull request #7 from jbowen93/docker-build
jbowen93 Mar 23, 2022
606cde6
move debug build to its own action, create docker build and test action
jbowen93 Mar 23, 2022
a5bf8ec
try to export env var
jbowen93 Mar 23, 2022
e55055b
add sha- prefix
jbowen93 Mar 23, 2022
9e0a542
clone ethermint
jbowen93 Mar 23, 2022
9624a40
add newline
jbowen93 Mar 23, 2022
ae49d47
Merge pull request #8 from jbowen93/build-test
jbowen93 Mar 23, 2022
94d36ef
use celestiaorg/ethermint v0.11.0+0.1.0-test
jbowen93 Mar 22, 2022
af66243
Merge branch 'ethermint-v0.11.0+0.1.0' of github.com:jbowen93/evmos i…
jbowen93 Mar 23, 2022
4b1e522
use github.com/celestiaorg/ethermint v0.11.0+0.1.0
jbowen93 Mar 23, 2022
958bcce
Merge pull request #9 from jbowen93/ethermint-v0.11.0+0.1.0
jbowen93 Mar 23, 2022
afe3f65
remove unneeded docker compose manifests
jbowen93 Mar 29, 2022
1df3c1b
remove unused rebuild.sh and build-debug.sh scripts
jbowen93 Mar 29, 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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ 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
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
name: "docker-build"
name: docker-build-debug

on:
push:
branches:
- "main"
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
docker-build:
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
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
go-version: 1.17
- name: "Build"
run: "make build"
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha,suffix=-debug
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
Expand All @@ -34,6 +44,8 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: ghcr.io/celestiaorg/celestia-node:latest
file: docker/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
file: docker/debug.Dockerfile
97 changes: 97 additions & 0 deletions .github/workflows/docker-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: docker-build-test

on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: "ubuntu-latest"
permissions:
contents: write
packages: write
steps:
- name: "Checkout source code"
uses: "actions/checkout@v2"
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=sha
- 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:
context: .
platforms: linux/amd64, linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
file: docker/Dockerfile

test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v2
- name: Clone ephemeral-cluster repo
uses: actions/checkout@v2
with:
repository: celestiaorg/ephemeral-cluster
path: ephemeral-cluster
ref: chain
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: "Setup Cluster"
run: |
export EVMOS_IMAGE_TAG=sha-$(git rev-parse --short "$GITHUB_SHA")
cd ephemeral-cluster
./debug-start-cluster.sh
- name: Clone ethermint repo
uses: actions/checkout@v2
with:
repository: celestiaorg/ethermint
path: ethermint
ref: v0.11.0+0.1.0
- name: move
run: |
mv ethermint ..
- name: "Test Cluster"
run: |
docker ps -a
echo "------------- docker logs core0 -------------"
docker logs core0
echo "------------- docker logs bridge0 -------------"
docker logs bridge0
echo "------------- docker logs light0 -------------"
docker logs light0
echo "------------- docker logs dalc0 -------------"
docker logs dalc0
echo "------------- docker logs evmos0 -------------"
docker logs evmos0
cd /home/runner/work/evmos/ethermint
MODE=rpc HOST=http://127.0.0.1:8545 go test ./tests/rpc/...
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,15 @@ dependency-graph.png

# Node.js
**/node_modules

tests/**/node_modules/*
tests-solidity/**/node_modules/*

# OpenZeppelin contracts
contracts/@openzeppelin/*

# Ethermint
ethermint

# Optimint
optimint

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -198,28 +198,28 @@ $(STATIK):
contract-tools:
ifeq (, $(shell which stringer))
@echo "Installing stringer..."
@go get golang.org/x/tools/cmd/stringer
@go install golang.org/x/tools/cmd/stringer
else
@echo "stringer already installed; skipping..."
endif

ifeq (, $(shell which go-bindata))
@echo "Installing go-bindata..."
@go get github.com/kevinburke/go-bindata/go-bindata
@go install github.com/kevinburke/go-bindata/go-bindata
else
@echo "go-bindata already installed; skipping..."
endif

ifeq (, $(shell which gencodec))
@echo "Installing gencodec..."
@go get github.com/fjl/gencodec
@go install github.com/fjl/gencodec
else
@echo "gencodec already installed; skipping..."
endif

ifeq (, $(shell which protoc-gen-go))
@echo "Installing protoc-gen-go..."
@go get github.com/fjl/gencodec github.com/golang/protobuf/protoc-gen-go
@go install github.com/fjl/gencodec github.com/golang/protobuf/protoc-gen-go
else
@echo "protoc-gen-go already installed; skipping..."
endif
Expand Down Expand Up @@ -269,7 +269,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
37 changes: 37 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM --platform=$BUILDPLATFORM golang:1.17 AS build-env

# Install dependencies
RUN apt-get update
RUN apt-get install git

# Set up env vars
ENV COSMOS_BUILD_OPTIONS nostrip

# Set working directory for the build
WORKDIR /src

COPY . .
RUN go mod download

# Make the binary
RUN env GOOS=$TARGETOS GOARCH=$TARGETARCH make build

# Final image
FROM debian

# Install ca-certificates
RUN apt-get update
RUN apt-get install jq -y

WORKDIR /root

COPY docker/entrypoint.sh .
COPY init.sh .

# Copy over binaries from the build-env
COPY --from=build-env /src/build/evmosd /usr/bin/evmosd

EXPOSE 26656 26657

ENTRYPOINT ["./entrypoint.sh"]
CMD ["evmosd"]
46 changes: 46 additions & 0 deletions docker/debug.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM --platform=$BUILDPLATFORM golang:1.17 AS build-env

# Install dependencies
RUN apt-get update
RUN apt-get install git

# Set up env vars
ENV COSMOS_BUILD_OPTIONS nostrip

# Set working directory for the build
WORKDIR /src

COPY go.mod go.sum ./
RUN go mod download
COPY . .

# Build Delve
RUN env GOOS=$TARGETOS GOARCH=$TARGETARCH go install github.com/go-delve/delve/cmd/dlv@latest

# Add source files
COPY . .

# Make the binary
RUN env GOOS=$TARGETOS GOARCH=$TARGETARCH make build

# Final image
FROM debian

# Install ca-certificates
RUN apt-get update
RUN apt-get install jq -y


WORKDIR /root

COPY docker/entrypoint-debug.sh .
COPY init.sh .

# Copy over binaries from the build-env
COPY --from=build-env /src/build/evmosd /usr/bin/evmosd
COPY --from=build-env /go/bin/dlv /usr/bin/dlv

EXPOSE 26656 26657

ENTRYPOINT ["./entrypoint-debug.sh"]
CMD ["evmosd"]
11 changes: 11 additions & 0 deletions docker/entrypoint-debug.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -e

if [ "$1" = 'dlv' ]; then
./init.sh

exec "$@" "--"
fi

exec "$@"
11 changes: 11 additions & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

set -e

if [ "$1" = 'evmosd' ]; then
./init.sh

exec "$@" "--"
fi

exec "$@"
Loading