Skip to content

Commit

Permalink
Merge pull request #216 from covalenthq/develop
Browse files Browse the repository at this point in the history
Refiner-DTM-RC:v0.5.3
  • Loading branch information
noslav authored Jun 25, 2024
2 parents 168ef44 + bc40085 commit 987a204
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 25 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/compile-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ name: compile-format
on:
push:
branches:
- "main"
- "main"
pull_request:
branches:
- "main"
- "develop"
branches:
- "main"
- "develop"

env:
MIX_ENV: test
Expand All @@ -18,8 +18,8 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
elixir: [1.14.3]
otp: [24]
elixir: [1.14.5]
otp: [25]
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
Expand All @@ -40,12 +40,11 @@ jobs:

- name: Install Elixir
run: |
wget https://github.com/elixir-lang/elixir/releases/download/v1.14.3/elixir-otp-24.zip
wget https://github.com/elixir-lang/elixir/releases/download/v1.14.5/elixir-otp-25.zip
mkdir einstall
unzip elixir-otp-24.zip -d einstall
unzip elixir-otp-25.zip -d einstall
echo "$PWD/einstall/bin" >> $GITHUB_PATH
- name: Install hex
run: mix local.hex --force

Expand All @@ -54,7 +53,7 @@ jobs:

- name: Install OTP
run: |
wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-20.04/OTP-25.0.4.tar.gz
wget -q -O otp.tar.gz https://repo.hex.pm/builds/otp/ubuntu-20.04/OTP-25.0.tar.gz
mkdir -p .setup-elixir/otp
tar zxf otp.tar.gz -C .setup-elixir/otp --strip-components=1
rm otp.tar.gz
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docker-ci-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ jobs:
continue-on-error: true
- name: Build & Publish the Docker image
run: |
docker buildx create --name builder --use --platform=linux/amd64,linux/arm64 && docker buildx build --platform=linux/amd64,linux/arm64 . -t us-docker.pkg.dev/covalent-project/network/refiner:latest --push
docker buildx create --name builder --use --platform=linux/amd64 && docker buildx build --platform=linux/amd64 . -t us-docker.pkg.dev/covalent-project/network/refiner:latest --push
# docker buildx create --name builder --use --platform=linux/amd64,linux/arm64 && docker buildx build --platform=linux/amd64,linux/arm64 . -t us-docker.pkg.dev/covalent-project/network/refiner:latest --push
- name: Create .env file
run: |
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#===========
#(Elixir) Build Stage
#===========
FROM elixir:1.14.3-otp-24 as builder-elixir
FROM elixir:1.14-otp-25-alpine as builder-elixir

# Install git and build essentials
RUN apk add --no-cache git build-base

RUN mkdir -p /mix
WORKDIR /mix

Expand All @@ -24,14 +28,13 @@ RUN mix local.hex --force && \
#================
#Deployment Stage
#================
FROM elixir:1.14.3-otp-24 as deployer
FROM elixir:1.14-otp-25-alpine as deployer
# RUN mkdir -p /app/test /app/prod

RUN apt-get update && apt-get install -y git bash curl netcat-traditional && apt-get clean && rm -rf /var/lib/apt/lists/*
RUN apk add --no-cache git bash curl netcat-openbsd build-base && rm -rf /var/cache/apk/*

RUN mkdir -p /mix/_build /mix/config /mix/deps /mix/lib /mix/priv node/test /mix/test-data
# used in case alpine image are used
# RUN apk update && apk add --no-cache git=2.36.3-r0 bash=5.1.16-r2 curl=7.83.1-r4 go=1.18.7-r0 make=4.3-r0 gcc=11.2.1_git20220219-r2

WORKDIR /app
RUN mix local.hex --force
RUN mix local.rebar --force
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ services:
echo "evm-server-address:" $EVM_SERVER_URL;
echo "code-test-coverage:" $CODECOV_TOKEN;
echo Waiting for proof-chain to be deployed...;
while ! nc -v -l -k -p 8008;
while ! nc -l -p 8008;
do
sleep 1;
done;
echo Proof-chain contracts deployed!;
echo Uploading test files to local .ipfs...;
curl -F "filedata=@/app/test-data/codec-0.37/encoded/1-20063050" http://ipfs-pinner:3001/upload;
curl -F "filedata=@/app/test-data/codec-0.37/encoded/1-20063085" http://ipfs-pinner:3001/upload;
curl -F "filedata=@/app/mix/test-data/codec-0.37/encoded/1-20063050" http://ipfs-pinner:3001/upload;
curl -F "filedata=@/app/mix/test-data/codec-0.37/encoded/1-20063085" http://ipfs-pinner:3001/upload;
echo Test bsp files uploaded!;
cd /mix;
MIX_ENV=docker mix coveralls.json;
Expand Down
1 change: 1 addition & 0 deletions docker-compose-mbase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ services:
echo "evm-server:" $EVM_SERVER_URL;
echo "ipfs-node:" $IPFS_PINNER_URL;
cd /mix;
MIX_ENV=dev mix deps.get;
MIX_ENV=dev mix release --overwrite;
MIX_ENV=dev mix run --no-halt --eval 'Refiner.ProofChain.BlockSpecimenEventListener.start()';"
environment:
Expand Down
1 change: 1 addition & 0 deletions docker-compose-mbeam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ services:
echo "evm-server:" $EVM_SERVER_URL;
echo "ipfs-node:" $IPFS_PINNER_URL;
cd /mix;
MIX_ENV=prod mix deps.get;
MIX_ENV=prod mix release --overwrite;
MIX_ENV=prod mix run --no-halt --eval 'Refiner.ProofChain.BlockSpecimenEventListener.start()';"
environment:
Expand Down
6 changes: 3 additions & 3 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule Refiner.MixProject do
[
app: :refiner,
version: "0.5.2",
elixir: "~> 1.14.3",
elixir: "~> 1.14.5",
start_permanent: Mix.env() == :prod,
deps: deps(),
test_coverage: [tool: ExCoveralls, export: "cov"],
Expand All @@ -32,7 +32,7 @@ defmodule Refiner.MixProject do
defp deps do
[
# system exec
{:poison, "~> 5.0"},
{:poison, "~> 6.0"},
{:distillery, "~> 2.0"},

# frameworks
Expand All @@ -50,7 +50,7 @@ defmodule Refiner.MixProject do
github: "tsutsu/ethereum_abi",
branch: "feature-parse-events-from-abi-specifications",
override: true},
{:ex_secp256k1, "0.7.2", override: true},
{:ex_secp256k1, "0.7.3", override: true},
{:ex_keccak, "~> 0.7.1", override: true},
{:mnemonic, "~> 0.3"},
{:ex_rlp, "~> 0.6.0", override: true},
Expand Down
6 changes: 3 additions & 3 deletions mix.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"castore": {:hex, :castore, "0.1.22", "4127549e411bedd012ca3a308dede574f43819fe9394254ca55ab4895abfa1a2", [:mix], [], "hexpm", "c17576df47eb5aa1ee40cc4134316a99f5cad3e215d5c77b8dd3cfef12a22cac"},
"certifi": {:hex, :certifi, "2.13.0", "e52be248590050b2dd33b0bb274b56678f9068e67805dca8aa8b1ccdb016bbf6", [:rebar3], [], "hexpm", "8f3d9533a0f06070afdfd5d596b32e21c6580667a492891851b0e2737bc507a1"},
"comeonin": {:hex, :comeonin, "5.3.3", "2c564dac95a35650e9b6acfe6d2952083d8a08e4a89b93a481acb552b325892e", [:mix], [], "hexpm", "3e38c9c2cb080828116597ca8807bb482618a315bfafd98c90bc22a821cc84df"},
"confex": {:hex, :confex, "3.5.0", "163857c73dd8f88a3815663f4bc00bee1b9c65daf40aa6e0d6ef272757fd22c7", [:mix], [], "hexpm", "34a9e31230c7fbb3dbe60db00341d0c84ee44ba3caf84b498f501c0bc8563570"},
"confex": {:hex, :confex, "3.5.1", "c29ea741715de06afe6294ea2e127ee7a54382f2b33656b9ed7eedf3e7b6fcaf", [:mix], [], "hexpm", "c72824a267edc96c09a35f6556f48c139d00393dd1b726b18faeb8efee62c0b0"},
"cors_plug": {:hex, :cors_plug, "3.0.3", "7c3ac52b39624bc616db2e937c282f3f623f25f8d550068b6710e58d04a0e330", [:mix], [{:plug, "~> 1.13", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "3f2d759e8c272ed3835fab2ef11b46bddab8c1ab9528167bd463b6452edf830d"},
"cowboy": {:hex, :cowboy, "2.12.0", "f276d521a1ff88b2b9b4c54d0e753da6c66dd7be6c9fca3d9418b561828a3731", [:make, :rebar3], [{:cowlib, "2.13.0", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "1.8.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "8a7abe6d183372ceb21caa2709bec928ab2b72e18a3911aa1771639bef82651e"},
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.4.0", "f239f68b588efa7707abce16a84d0d2acf3a0f50571f8bb7f56a15865aae820c", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "7d98bac1ee4565d31b62d59f8823dfd8356a169e7fcbb83831b8a5397404c9de"},
Expand All @@ -22,7 +22,7 @@
"etfs": {:hex, :etfs, "0.2.0", "5dba0d765ef673af8ff8367aee1824b06f5ee4fb75ed34d88318f014ae9575ee", [:mix], [], "hexpm", "e80b8d667663e6894525fba9666b372e28a8e07866b242217dc0bab1abc46e07"},
"ex_keccak": {:hex, :ex_keccak, "0.7.5", "f3b733173510d48ae9a1ea1de415e694b2651f35c787e63f33b5ed0013fbfd35", [:mix], [{:rustler, ">= 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.7", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "8a5e1cb7f96fff5e480ff6a121477b90c4fd8c150984086dffd98819f5d83763"},
"ex_rlp": {:hex, :ex_rlp, "0.6.0", "985391d2356a7cb8712a4a9a2deb93f19f2fbca0323f5c1203fcaf64d077e31e", [:mix], [], "hexpm", "7135db93b861d9e76821039b60b00a6a22d2c4e751bf8c444bffe7a042f1abaf"},
"ex_secp256k1": {:hex, :ex_secp256k1, "0.7.2", "33398c172813b90fab9ab75c12b98d16cfab472c6dcbde832b13c45ce1c01947", [:mix], [{:rustler, ">= 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.6", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "f3b1bf56e6992e28b9d86e3bf741a4aca3e641052eb47d13ae4f5f4d4944bdaf"},
"ex_secp256k1": {:hex, :ex_secp256k1, "0.7.3", "489b6fd57fab5a7259ace927d8cb5171aad835e9c7279c2a859a0483cb069415", [:mix], [{:rustler, ">= 0.0.0", [hex: :rustler, repo: "hexpm", optional: true]}, {:rustler_precompiled, "~> 0.7", [hex: :rustler_precompiled, repo: "hexpm", optional: false]}], "hexpm", "ea63159442f4d8143166cd1507da03edc43216d6e7c6bac4b416bdce04f0daa8"},
"excoveralls": {:hex, :excoveralls, "0.16.1", "0bd42ed05c7d2f4d180331a20113ec537be509da31fed5c8f7047ce59ee5a7c5", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dae763468e2008cf7075a64cb1249c97cb4bc71e236c5c2b5e5cdf1cfa2bf138"},
"expo": {:hex, :expo, "0.5.1", "249e826a897cac48f591deba863b26c16682b43711dd15ee86b92f25eafd96d9", [:mix], [], "hexpm", "68a4233b0658a3d12ee00d27d37d856b1ba48607e7ce20fd376958d0ba6ce92b"},
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
Expand Down Expand Up @@ -52,7 +52,7 @@
"plug": {:hex, :plug, "1.16.0", "1d07d50cb9bb05097fdf187b31cf087c7297aafc3fed8299aac79c128a707e47", [:mix], [{:mime, "~> 1.0 or ~> 2.0", [hex: :mime, repo: "hexpm", optional: false]}, {:plug_crypto, "~> 1.1.1 or ~> 1.2 or ~> 2.0", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.3 or ~> 1.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "cbf53aa1f5c4d758a7559c0bd6d59e286c2be0c6a1fac8cc3eee2f638243b93e"},
"plug_cowboy": {:hex, :plug_cowboy, "2.7.1", "87677ffe3b765bc96a89be7960f81703223fe2e21efa42c125fcd0127dd9d6b2", [:mix], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:cowboy_telemetry, "~> 0.3", [hex: :cowboy_telemetry, repo: "hexpm", optional: false]}, {:plug, "~> 1.14", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "02dbd5f9ab571b864ae39418db7811618506256f6d13b4a45037e5fe78dc5de3"},
"plug_crypto": {:hex, :plug_crypto, "2.1.0", "f44309c2b06d249c27c8d3f65cfe08158ade08418cf540fd4f72d4d6863abb7b", [:mix], [], "hexpm", "131216a4b030b8f8ce0f26038bc4421ae60e4bb95c5cf5395e1421437824c4fa"},
"poison": {:hex, :poison, "5.0.0", "d2b54589ab4157bbb82ec2050757779bfed724463a544b6e20d79855a9e43b24", [:mix], [{:decimal, "~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "11dc6117c501b80c62a7594f941d043982a1bd05a1184280c0d9166eb4d8d3fc"},
"poison": {:hex, :poison, "6.0.0", "9bbe86722355e36ffb62c51a552719534257ba53f3271dacd20fbbd6621a583a", [:mix], [{:decimal, "~> 2.1", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm", "bb9064632b94775a3964642d6a78281c07b7be1319e0016e1643790704e739a2"},
"poolboy": {:hex, :poolboy, "1.5.2", "392b007a1693a64540cead79830443abf5762f5d30cf50bc95cb2c1aaafa006b", [:rebar3], [], "hexpm", "dad79704ce5440f3d5a3681c8590b9dc25d1a561e8f5a9c995281012860901e3"},
"ranch": {:hex, :ranch, "2.1.0", "2261f9ed9574dcfcc444106b9f6da155e6e540b2f82ba3d42b339b93673b72a3", [:make, :rebar3], [], "hexpm", "244ee3fa2a6175270d8e1fc59024fd9dbc76294a321057de8f803b1479e76916"},
"redix": {:hex, :redix, "1.0.0", "4f310341744ffceab3031394450a4e603d4d1001a697c3f18ae57ae776cbd3fb", [:mix], [{:castore, "~> 0.1.0", [hex: :castore, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "8c8d9b33b5491737adcd5bb9e0f43b85212a384ac0042f64c156113518266ecb"},
Expand Down

0 comments on commit 987a204

Please sign in to comment.