Skip to content

Commit

Permalink
feature: add rand() - publish v0.1.9-alpha (#191)
Browse files Browse the repository at this point in the history
* ci: update Makefile to run the fhevm-solidity tests instead of python ERC20 test

* ci: update fhevm-solidity version that includes the run_tests.sh script

* ci: use evmos-node v0.1.9-alpha as base image for dev image

* ci: add ability to checkout different evmos folder to take into account change in docker/Dockerfile.evmos-node.developer for instance in the github action env

* ci: add script to run test in fhevm-solidity

---------

Co-authored-by: Levent Demir <[email protected]>
  • Loading branch information
dartdart26 and leventdem authored Sep 8, 2023
1 parent 8456755 commit 7f33437
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
# ZBC_DEVELOPMENT_PATH=../zbc-development
# ZBC_SOLIDITY_PATH=../zbc-solidity
# ZBC_FHE_TOOL_PATH=../zbc-fhe-tool
LOCAL_BUILD=false
#LOCAL_BUILD=true
#LOCAL_BUILD=false
LOCAL_BUILD=true
GOPRIVATE=github.com/zama-ai/*
7 changes: 7 additions & 0 deletions .github/workflows/publish_developer_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
default: "latest"
type: string
required: false
ref_to_evmos:
description: 'Branch, tag or commit SHA1 to checkout Evmos'
required: true
default: "v9.1.0-zama"
type: string

env:
DOCKER_IMAGE: ghcr.io/zama-ai/evmos-dev-node
Expand All @@ -21,6 +26,8 @@ jobs:

- name: Check out evmos
uses: actions/checkout@v3
with:
ref: ${{ inputs.ref_to_evmos }}

- name: Login to GitHub Container Registry
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
Expand Down
18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ FHEVM_DECRYPTIONS_DB_VERSION ?= v0.2.0

FHEVM_SOLIDITY_PATH ?= $(WORKDIR)/fhevm-solidity
FHEVM_SOLIDITY_PATH_EXISTS := $(shell test -d $(FHEVM_SOLIDITY_PATH)/.git && echo "true" || echo "false")
FHEVM_SOLIDITY_VERSION ?= v0.1.9

FHEVM_SOLIDITY_VERSION ?= v0.1.11
ETHERMINT_VERSION := $(shell ./scripts/get_module_version.sh go.mod zama.ai/ethermint)
GO_ETHEREUM_VERSION := $(shell ./scripts/get_module_version.sh go.mod zama.ai/go-ethereum)
UPDATE_GO_MOD = go.mod.updated
Expand Down Expand Up @@ -404,17 +403,12 @@ endif

run_e2e_test:
@cd $(FHEVM_SOLIDITY_PATH) && ci/scripts/prepare_fhe_keys_for_e2e_test.sh $(CURDIR)/volumes/network-public-fhe-keys
@cd $(FHEVM_SOLIDITY_PATH) && npm install
ifeq ($(LOCAL_BUILD),true)
$(info LOCAL_BUILD is set)
@cd $(FHEVM_SOLIDITY_PATH) && ci/scripts/run_ERC20_e2e_test.sh mykey1 $(CURDIR)
else
$(info LOCAL_BUILD is not set)
@cd $(FHEVM_SOLIDITY_PATH) && ci/scripts/run_ERC20_ci_test.sh mykey1 $(CURDIR)
endif
@cd $(FHEVM_SOLIDITY_PATH) && npm ci
## Copy the run_tests.sh script directly in fhevm-solidity for the nxt version
@cp ./scripts/run_tests.sh $(FHEVM_SOLIDITY_PATH)/ci/scripts/
@cd $(FHEVM_SOLIDITY_PATH) && ci/scripts/run_tests.sh
@sleep 5




change_running_node_owner:
ifeq ($(GITHUB_ACTIONS),true)
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.evmos-node.developer
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
FROM ghcr.io/zama-ai/fhevm-decryptions-db:v0.2.0 as oracle-env
FROM ghcr.io/zama-ai/fhevm-tfhe-cli:v0.2.0 as tfhe-cli

FROM ghcr.io/zama-ai/evmos-node:v0.1.8
FROM ghcr.io/zama-ai/evmos-node:v0.1.9-alpha

WORKDIR /config

Expand Down
1 change: 1 addition & 0 deletions docker/Dockerfile.evmos-node.local
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ WORKDIR /config
ADD setup.sh .
RUN chmod +x /config/setup.sh
ADD zama_config.toml .
ADD --chmod=755 faucet.py /usr/local/bin/faucet
RUN mkdir -p /root/.evmosd/zama
RUN touch /root/.evmosd/zama/vm.log

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,6 @@ replace (
replace github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0

// TODO: Remove once our forks are public.
replace github.com/ethereum/go-ethereum v1.10.19 => github.com/zama-ai/go-ethereum v0.1.9
replace github.com/ethereum/go-ethereum v1.10.19 => github.com/zama-ai/go-ethereum v0.1.10

replace github.com/evmos/ethermint v0.19.3 => github.com/zama-ai/ethermint v0.1.2
9 changes: 9 additions & 0 deletions scripts/run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

cp .env.example .env
docker exec -i evmosnodelocal0 faucet $(npx hardhat task:getEthereumAddress)
sleep 8
docker exec -i evmosnodelocal0 faucet $(npx hardhat accounts | grep 0x | sed -n '2p')
sleep 8
docker exec -i evmosnodelocal0 faucet $(npx hardhat accounts | grep 0x | sed -n '3p')
npm test

0 comments on commit 7f33437

Please sign in to comment.