Refactor to use plugeth-statediff #1

Merged
roysc merged 5 commits from refactor-for-plugin into v5 2023-09-20 06:16:57 +00:00
4 changed files with 26 additions and 14 deletions
Showing only changes of commit fcdbf024ae - Show all commits

View File

@ -2,6 +2,10 @@ name: Run tests
on: on:
- pull_request - pull_request
env:
# Needed until we can incorporate docker startup into the executor container
DOCKER_HOST: unix:///var/run/dind.sock
jobs: jobs:
unit-tests: unit-tests:
name: Run unit tests name: Run unit tests
@ -12,15 +16,23 @@ jobs:
with: with:
go-version-file: 'go.mod' go-version-file: 'go.mod'
check-latest: true check-latest: true
- name: "Run DB container" - name: Run dockerd
run: |
dockerd -H $DOCKER_HOST --userland-proxy=false &
sleep 5
- name: Run DB container
working-directory: ./test working-directory: ./test
run: docker compose up --wait --quiet-pull
- name: Set Gitea access token
env:
TOKEN: ${{ secrets.CICD_REPO_TOKEN }}
run: | run: |
docker compose up -d --quiet-pull git config --global url."https://$TOKEN:@git.vdb.to/".insteadOf https://git.vdb.to/
- name: "Build and run tests"
run: |
until [[ "$(docker inspect test-ipld-eth-db | jq -r '.[0].State.Status')" = 'running' ]]
do sleep 1; done &
- name: Build and run tests
run: |
until [[ "$(docker inspect -f '{{.State.Status}}' test-ipld-eth-db)" = 'running' ]]
do sleep 1; done &
go build ./... go build ./...
wait $! wait $!
go test -v ./... go test -p 1 -v ./...

6
go.mod
View File

@ -5,7 +5,7 @@ go 1.19
require ( require (
github.com/VictoriaMetrics/fastcache v1.12.1 github.com/VictoriaMetrics/fastcache v1.12.1
github.com/cerc-io/ipfs-ethdb/v5 v5.0.0-alpha github.com/cerc-io/ipfs-ethdb/v5 v5.0.0-alpha
github.com/cerc-io/plugeth-statediff v0.0.0-00010101000000-000000000000 github.com/cerc-io/plugeth-statediff v0.1.1
github.com/davecgh/go-spew v1.1.1 github.com/davecgh/go-spew v1.1.1
github.com/ethereum/go-ethereum v1.11.6 github.com/ethereum/go-ethereum v1.11.6
github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d
@ -114,8 +114,8 @@ require (
) )
replace ( replace (
github.com/cerc-io/eth-testing => git.vdb.to/cerc-io/eth-testing v0.1.2-0.20230909172706-0d908a1e61f6 github.com/cerc-io/eth-testing => git.vdb.to/cerc-io/eth-testing v0.2.1
github.com/cerc-io/plugeth-statediff => git.vdb.to/cerc-io/plugeth-statediff v0.1.1-0.20230910102119-e43cbb30f919 github.com/cerc-io/plugeth-statediff => git.vdb.to/cerc-io/plugeth-statediff v0.1.1
github.com/ethereum/go-ethereum => git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1 github.com/ethereum/go-ethereum => git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1
github.com/openrelayxyz/plugeth-utils => git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230706160122-cd41de354c46 github.com/openrelayxyz/plugeth-utils => git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230706160122-cd41de354c46
) )

6
go.sum
View File

@ -1,8 +1,8 @@
git.vdb.to/cerc-io/eth-testing v0.1.2-0.20230909172706-0d908a1e61f6 h1:kAvdKNfJmzIHk8/cEGuXnKCU4Xfy42nr2a2zg3IVthE= git.vdb.to/cerc-io/eth-testing v0.2.1 h1:IZAX7DVgzPkSmu1xdKZ5aOemdEYbvtgae7GUl/TUNtQ=
git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1 h1:KLjxHwp9Zp7xhECccmJS00RiL+VwTuUGLU7qeIctg8g= git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1 h1:KLjxHwp9Zp7xhECccmJS00RiL+VwTuUGLU7qeIctg8g=
git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1/go.mod h1:cYXZu70+6xmDgIgrTD81GPasv16piiAFJnKyAbwVPMU= git.vdb.to/cerc-io/plugeth v0.0.0-20230808125822-691dc334fab1/go.mod h1:cYXZu70+6xmDgIgrTD81GPasv16piiAFJnKyAbwVPMU=
git.vdb.to/cerc-io/plugeth-statediff v0.1.1-0.20230910102119-e43cbb30f919 h1:3V3tyfxxqFzKSBDpgrB152eZTXkdXmL11eF/p/uypdM= git.vdb.to/cerc-io/plugeth-statediff v0.1.1 h1:qKygQwZO2vECySFpgfaiXwWn275jIV//pwsuNfeCXLo=
git.vdb.to/cerc-io/plugeth-statediff v0.1.1-0.20230910102119-e43cbb30f919/go.mod h1:w4RAbFqYCT+xHQNtgolCJ0pUnOzAbAPKlMzdpUQeRmg= git.vdb.to/cerc-io/plugeth-statediff v0.1.1/go.mod h1:61WPXOqJshEkxzalwyyLukTiIBG+Z7WyfvRdhVLfBF8=
git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230706160122-cd41de354c46 h1:KYcbbne/RXd7AuxbUd/3hgk1jPN+33k2CKiNsUsMCC0= git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230706160122-cd41de354c46 h1:KYcbbne/RXd7AuxbUd/3hgk1jPN+33k2CKiNsUsMCC0=
git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230706160122-cd41de354c46/go.mod h1:VpDN61dxy64zGff05F0adujR5enD/JEdXBkTQ+PaIsQ= git.vdb.to/cerc-io/plugeth-utils v0.0.0-20230706160122-cd41de354c46/go.mod h1:VpDN61dxy64zGff05F0adujR5enD/JEdXBkTQ+PaIsQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=

View File

@ -5,7 +5,7 @@ services:
restart: on-failure restart: on-failure
depends_on: depends_on:
- ipld-eth-db - ipld-eth-db
image: git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:v5.0.2-alpha image: git.vdb.to/cerc-io/ipld-eth-db/ipld-eth-db:v5.0.5-alpha
environment: environment:
DATABASE_USER: "vdbm" DATABASE_USER: "vdbm"
DATABASE_NAME: "cerc_testing" DATABASE_NAME: "cerc_testing"