From 025b1c7c9e5b64457eea60eed6adafa511187469 Mon Sep 17 00:00:00 2001 From: Abdul Rabbani Date: Wed, 18 May 2022 14:45:55 -0400 Subject: [PATCH 1/4] Combine the build and push steps. --- .github/workflows/on-master.yaml | 25 ------------------------- .github/workflows/publish.yaml | 19 ++++++++++++++++++- 2 files changed, 18 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/on-master.yaml diff --git a/.github/workflows/on-master.yaml b/.github/workflows/on-master.yaml deleted file mode 100644 index aa7c66e6..00000000 --- a/.github/workflows/on-master.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Docker Compose Build - -on: - push: - branches: - - master - -jobs: - build: - name: Run docker build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Get the version - id: vars - run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) - - name: Run docker build - run: make docker-build - - name: Tag docker image - run: docker tag vulcanize/ipld-eth-server docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} - - name: Docker Login - run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin - - name: Docker Push - run: docker push docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} - diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 42450ce7..2315bc22 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,9 +3,27 @@ on: release: types: [published] jobs: + build: + name: Run docker build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Get the version + id: vars + run: echo ::set-output name=sha::$(echo ${GITHUB_SHA:0:7}) + - name: Run docker build + run: make docker-build + - name: Tag docker image + run: docker tag vulcanize/ipld-eth-server docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} + - name: Docker Login + run: echo ${{ secrets.GITHUB_TOKEN }} | docker login https://docker.pkg.github.com -u vulcanize --password-stdin + - name: Docker Push + run: docker push docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} + push_to_registries: name: Push Docker image to Docker Hub runs-on: ubuntu-latest + needs: build steps: - name: Get the version id: vars @@ -22,4 +40,3 @@ jobs: run: docker tag docker.pkg.github.com/vulcanize/ipld-eth-server/ipld-eth-server:${{steps.vars.outputs.sha}} vulcanize/ipld-eth-server:${{steps.vars.outputs.tag}} - name: Docker Push to Docker Hub run: docker push vulcanize/ipld-eth-server:${{steps.vars.outputs.tag}} - From 0b12c3c32997f872947588b987e5469e96c5e314 Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Fri, 20 May 2022 17:50:53 +0530 Subject: [PATCH 2/4] Update stack-orchestrator commit hash for running tests --- .github/workflows/on-pr.yaml | 6 +++--- test/README.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 8bd54f6c..405e3611 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -60,7 +60,7 @@ jobs: integrationtest: name: Run integration tests env: - STACK_ORCHESTRATOR_REF: 38545ad36144800d16d61e53050bb8e784729f26 + STACK_ORCHESTRATOR_REF: 35c677433aee5fafdf74eb3c251a453691b818d0 GO_ETHEREUM_REF: ef8c9f2580dd577a7c5eca538fb0ed64d53dc4a4 GOPATH: /tmp/go DB_WRITE: true @@ -127,7 +127,7 @@ jobs: integrationtest_forwardethcalls: name: Run integration tests for direct proxy fall-through of eth_calls env: - STACK_ORCHESTRATOR_REF: 38545ad36144800d16d61e53050bb8e784729f26 + STACK_ORCHESTRATOR_REF: 35c677433aee5fafdf74eb3c251a453691b818d0 GO_ETHEREUM_REF: ef8c9f2580dd577a7c5eca538fb0ed64d53dc4a4 GOPATH: /tmp/go DB_WRITE: false @@ -194,7 +194,7 @@ jobs: integrationtest_watchedaddress_gapfillingservice: name: Run integration tests for watched addresses with gap filling service enabled env: - STACK_ORCHESTRATOR_REF: 38545ad36144800d16d61e53050bb8e784729f26 + STACK_ORCHESTRATOR_REF: 35c677433aee5fafdf74eb3c251a453691b818d0 GO_ETHEREUM_REF: ef8c9f2580dd577a7c5eca538fb0ed64d53dc4a4 GOPATH: /tmp/go DB_WRITE: true diff --git a/test/README.md b/test/README.md index c740b286..05157170 100644 --- a/test/README.md +++ b/test/README.md @@ -4,16 +4,16 @@ - Clone [stack-orchestrator](https://github.com/vulcanize/stack-orchestrator) and [go-ethereum](https://github.com/vulcanize/go-ethereum) repositories. -- Checkout [v3 release](https://github.com/vulcanize/go-ethereum/releases/tag/v1.10.17-statediff-3.2.0) in go-ethereum repo. +- Checkout [v4 release](https://github.com/vulcanize/go-ethereum/releases/tag/v1.10.17-statediff-4.0.1-alpha) in go-ethereum repo. ```bash # In go-ethereum repo. - git checkout v1.10.17-statediff-3.2.0 + git checkout v1.10.17-statediff-4.0.1-alpha ``` - Checkout working commit in stack-orchestrator repo. ```bash # In stack-orchestrator repo. - git checkout fcbc74451c5494664fe21f765e89c9c6565c07cb + git checkout 35c677433aee5fafdf74eb3c251a453691b818d0 ``` ## Run From 8b8f644b2afae4838d1ba6652c5e91c6ad1c6ed6 Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Fri, 20 May 2022 18:35:16 +0530 Subject: [PATCH 3/4] Update instructions to run integration tests locally --- .github/workflows/on-pr.yaml | 6 ++++++ test/README.md | 32 ++++++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/on-pr.yaml b/.github/workflows/on-pr.yaml index 405e3611..b7dad7b7 100644 --- a/.github/workflows/on-pr.yaml +++ b/.github/workflows/on-pr.yaml @@ -98,6 +98,7 @@ jobs: run: | echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh + echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh @@ -115,6 +116,7 @@ jobs: -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ + -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ --env-file "$GITHUB_WORKSPACE/config.sh" \ up -d --build - name: Test @@ -165,6 +167,7 @@ jobs: run: | echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh + echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh @@ -182,6 +185,7 @@ jobs: -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ + -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ --env-file "$GITHUB_WORKSPACE/config.sh" \ up -d --build - name: Test @@ -232,6 +236,7 @@ jobs: run: | echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh + echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh @@ -251,6 +256,7 @@ jobs: -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ + -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \ --env-file "$GITHUB_WORKSPACE/config.sh" \ up -d --build - name: Test diff --git a/test/README.md b/test/README.md index 05157170..3c5030bf 100644 --- a/test/README.md +++ b/test/README.md @@ -27,7 +27,18 @@ - Run integration tests: - - Update (Replace existing content) config file [config.sh](https://github.com/vulcanize/stack-orchestrator/blob/main/config.sh) in stack-orchestrator repo: + - In stack-orchestrator repo, create config file: + + ```bash + cd helper-scripts + + ./create-config.sh + ``` + + A `config.sh` will be created in the root directory. + + - Update/Edit the generated config file with: + ```bash #!/bin/bash @@ -37,13 +48,17 @@ # Path to ipld-eth-server repo. vulcanize_ipld_eth_server=~/ipld-eth-server/ + # Path to test contract. + vulcanize_test_contract=~/ipld-eth-server/test/contract + db_write=true eth_forward_eth_calls=false eth_proxy_on_error=false eth_http_path="go-ethereum:8545" - ``` + ``` - Run stack-orchestrator: + ```bash # In stack-orchestrator root directory. cd helper-scripts @@ -53,17 +68,20 @@ -d ../docker/latest/docker-compose-db.yml \ -d ../docker/local/docker-compose-go-ethereum.yml \ -d ../docker/local/docker-compose-ipld-eth-server.yml \ + -d ../docker/local/docker-compose-contract.yml \ -v remove \ -p ../config.sh ``` - Run test: + ```bash # In ipld-eth-server root directory. ./scripts/run_integration_test.sh ``` - - Update `config.sh` file: + - Update stack-orchestrator `config.sh` file: + ```bash #!/bin/bash @@ -73,6 +91,9 @@ # Path to ipld-eth-server repo. vulcanize_ipld_eth_server=~/ipld-eth-server/ + # Path to test contract. + vulcanize_test_contract=~/ipld-eth-server/test/contract + db_write=false eth_forward_eth_calls=true eth_proxy_on_error=false @@ -86,7 +107,7 @@ ./scripts/run_integration_test_forward_eth_calls.sh ``` - - Update `config.sh` file: + - Update stack-orchestrator `config.sh` file: ```bash #!/bin/bash @@ -96,6 +117,9 @@ # Path to ipld-eth-server repo. vulcanize_ipld_eth_server=~/ipld-eth-server/ + # Path to test contract. + vulcanize_test_contract=~/ipld-eth-server/test/contract + db_write=true eth_forward_eth_calls=false eth_proxy_on_error=false From ace12fbc35c457ccd00730ffec087a4ba86cb7e7 Mon Sep 17 00:00:00 2001 From: prathamesh0 Date: Fri, 20 May 2022 18:46:36 +0530 Subject: [PATCH 4/4] Update module path for v4 --- README.md | 4 +-- cmd/root.go | 2 +- cmd/serve.go | 12 ++++----- cmd/subscribe.go | 6 ++--- cmd/validate.go | 2 +- cmd/version.go | 2 +- documentation/apis.md | 12 ++++----- go.mod | 3 +-- main.go | 2 +- pkg/client/client.go | 4 +-- pkg/eth/api.go | 2 +- pkg/eth/api_test.go | 8 +++--- pkg/eth/backend.go | 2 +- pkg/eth/cid_retriever.go | 2 +- pkg/eth/cid_retriever_test.go | 6 ++--- pkg/eth/eth_state_test.go | 8 +++--- pkg/eth/filterer_test.go | 6 ++--- pkg/eth/ipld_fetcher.go | 2 +- pkg/eth/ipld_fetcher_test.go | 6 ++--- pkg/eth/test_helpers/test_data.go | 2 +- pkg/fill/service.go | 2 +- pkg/fill/service_test.go | 8 +++--- pkg/graphql/graphql.go | 2 +- pkg/graphql/graphql_test.go | 10 ++++---- pkg/graphql/service.go | 2 +- pkg/net/api_test.go | 2 +- pkg/rpc/ipc.go | 2 +- pkg/rpc/ws.go | 2 +- pkg/serve/api.go | 2 +- pkg/serve/config.go | 4 +-- pkg/serve/service.go | 4 +-- test/direct_proxy_integration_test.go | 4 +-- test/integration_test.go | 4 +-- test/watch_address_integration_test.go | 25 +++++++++---------- ...ss_gap_filling_service_integration_test.go | 2 +- 35 files changed, 83 insertions(+), 85 deletions(-) diff --git a/README.md b/README.md index 5f282536..41422abe 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,9 @@ External dependency ## Install Start by downloading ipld-eth-server and moving into the repo: -`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v3` +`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v4` -`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v3@v3.x.x` +`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v4@v4.x.x` Then, build the binary: diff --git a/cmd/root.go b/cmd/root.go index 4683f170..3327f3c5 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -27,7 +27,7 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" + "github.com/vulcanize/ipld-eth-server/v4/pkg/prom" ) var ( diff --git a/cmd/serve.go b/cmd/serve.go index 4ba7f17c..fd8ec91d 100644 --- a/cmd/serve.go +++ b/cmd/serve.go @@ -32,12 +32,12 @@ import ( "github.com/spf13/viper" "github.com/vulcanize/gap-filler/pkg/mux" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - fill "github.com/vulcanize/ipld-eth-server/v3/pkg/fill" - "github.com/vulcanize/ipld-eth-server/v3/pkg/graphql" - srpc "github.com/vulcanize/ipld-eth-server/v3/pkg/rpc" - s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" - v "github.com/vulcanize/ipld-eth-server/v3/version" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + fill "github.com/vulcanize/ipld-eth-server/v4/pkg/fill" + "github.com/vulcanize/ipld-eth-server/v4/pkg/graphql" + srpc "github.com/vulcanize/ipld-eth-server/v4/pkg/rpc" + s "github.com/vulcanize/ipld-eth-server/v4/pkg/serve" + v "github.com/vulcanize/ipld-eth-server/v4/version" ) var ErrNoRpcEndpoints = errors.New("no rpc endpoints is available") diff --git a/cmd/subscribe.go b/cmd/subscribe.go index cd3cc2cc..50b2c5f0 100644 --- a/cmd/subscribe.go +++ b/cmd/subscribe.go @@ -27,9 +27,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" - "github.com/vulcanize/ipld-eth-server/v3/pkg/client" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - w "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" + "github.com/vulcanize/ipld-eth-server/v4/pkg/client" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + w "github.com/vulcanize/ipld-eth-server/v4/pkg/serve" ) // subscribeCmd represents the subscribe command diff --git a/cmd/validate.go b/cmd/validate.go index 04338a4a..12acf579 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -25,7 +25,7 @@ import ( validator "github.com/vulcanize/eth-ipfs-state-validator/v4/pkg" ipfsethdb "github.com/vulcanize/ipfs-ethdb/v4/postgres" - s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" + s "github.com/vulcanize/ipld-eth-server/v4/pkg/serve" ) const GroupName = "statedb-validate" diff --git a/cmd/version.go b/cmd/version.go index f2939e44..c794915d 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -19,7 +19,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" - v "github.com/vulcanize/ipld-eth-server/v3/version" + v "github.com/vulcanize/ipld-eth-server/v4/version" ) // versionCmd represents the version command diff --git a/documentation/apis.md b/documentation/apis.md index 13eced40..e8db74c0 100644 --- a/documentation/apis.md +++ b/documentation/apis.md @@ -40,9 +40,9 @@ An example of how to subscribe to a real-time Ethereum data feed from ipld-eth-s "github.com/ethereum/go-ethereum/rpc" "github.com/spf13/viper" - "github.com/vulcanize/ipld-eth-server/v3/pkg/client" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/watch" + "github.com/vulcanize/ipld-eth-server/v4/pkg/client" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/watch" ) config, _ := eth.NewEthSubscriptionConfig() @@ -160,9 +160,9 @@ An example of how to subscribe to a real-time Bitcoin data feed from ipld-eth-se "github.com/ethereum/go-ethereum/rpc" "github.com/spf13/viper" - "github.com/vulcanize/ipld-eth-server/v3/pkg/btc" - "github.com/vulcanize/ipld-eth-server/v3/pkg/client" - "github.com/vulcanize/ipld-eth-server/v3/pkg/watch" + "github.com/vulcanize/ipld-eth-server/v4/pkg/btc" + "github.com/vulcanize/ipld-eth-server/v4/pkg/client" + "github.com/vulcanize/ipld-eth-server/v4/pkg/watch" ) config, _ := btc.NewBtcSubscriptionConfig() diff --git a/go.mod b/go.mod index f52ce67f..ef9eae11 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/vulcanize/ipld-eth-server/v3 +module github.com/vulcanize/ipld-eth-server/v4 go 1.15 @@ -9,7 +9,6 @@ require ( github.com/ipfs/go-cid v0.0.7 github.com/ipfs/go-ipfs-blockstore v1.0.1 github.com/ipfs/go-ipfs-ds-help v1.0.0 - github.com/ipfs/go-ipld-format v0.2.0 github.com/jmoiron/sqlx v1.3.5 github.com/joho/godotenv v1.4.0 github.com/lib/pq v1.10.5 diff --git a/main.go b/main.go index 724af69e..72fb53c8 100644 --- a/main.go +++ b/main.go @@ -18,7 +18,7 @@ package main import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/cmd" + "github.com/vulcanize/ipld-eth-server/v4/cmd" ) func main() { diff --git a/pkg/client/client.go b/pkg/client/client.go index c470ff41..656a564d 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -22,8 +22,8 @@ import ( "github.com/ethereum/go-ethereum/rpc" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/serve" ) // Client is used to subscribe to the ipld-eth-server ipld data stream diff --git a/pkg/eth/api.go b/pkg/eth/api.go index 34451e95..5c05e1c5 100644 --- a/pkg/eth/api.go +++ b/pkg/eth/api.go @@ -42,7 +42,7 @@ import ( "github.com/ethereum/go-ethereum/statediff" "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) // APIName is the namespace for the watcher's eth api diff --git a/pkg/eth/api_test.go b/pkg/eth/api_test.go index b3ef9d9f..305c8e52 100644 --- a/pkg/eth/api_test.go +++ b/pkg/eth/api_test.go @@ -36,10 +36,10 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" - ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" + ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var ( diff --git a/pkg/eth/backend.go b/pkg/eth/backend.go index 5cc1f878..20c3b153 100644 --- a/pkg/eth/backend.go +++ b/pkg/eth/backend.go @@ -48,7 +48,7 @@ import ( ethServerShared "github.com/ethereum/go-ethereum/statediff/indexer/shared" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var ( diff --git a/pkg/eth/cid_retriever.go b/pkg/eth/cid_retriever.go index f2414acb..c7968594 100644 --- a/pkg/eth/cid_retriever.go +++ b/pkg/eth/cid_retriever.go @@ -28,7 +28,7 @@ import ( "github.com/lib/pq" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) // Retriever interface for substituting mocks in tests diff --git a/pkg/eth/cid_retriever_test.go b/pkg/eth/cid_retriever_test.go index c4c13ce6..5488cb93 100644 --- a/pkg/eth/cid_retriever_test.go +++ b/pkg/eth/cid_retriever_test.go @@ -29,9 +29,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var ( diff --git a/pkg/eth/eth_state_test.go b/pkg/eth/eth_state_test.go index 999ee3c9..95f46c5e 100644 --- a/pkg/eth/eth_state_test.go +++ b/pkg/eth/eth_state_test.go @@ -37,10 +37,10 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" - ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" + ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var ( diff --git a/pkg/eth/filterer_test.go b/pkg/eth/filterer_test.go index 73b428cc..4ce73f16 100644 --- a/pkg/eth/filterer_test.go +++ b/pkg/eth/filterer_test.go @@ -25,9 +25,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var ( diff --git a/pkg/eth/ipld_fetcher.go b/pkg/eth/ipld_fetcher.go index 9e539b8c..e8b459d5 100644 --- a/pkg/eth/ipld_fetcher.go +++ b/pkg/eth/ipld_fetcher.go @@ -26,7 +26,7 @@ import ( "github.com/ethereum/go-ethereum/statediff/indexer/models" "github.com/jmoiron/sqlx" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) // Fetcher interface for substituting mocks in tests diff --git a/pkg/eth/ipld_fetcher_test.go b/pkg/eth/ipld_fetcher_test.go index 5ac47009..10ac52e2 100644 --- a/pkg/eth/ipld_fetcher_test.go +++ b/pkg/eth/ipld_fetcher_test.go @@ -23,9 +23,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var _ = Describe("IPLDFetcher", func() { diff --git a/pkg/eth/test_helpers/test_data.go b/pkg/eth/test_helpers/test_data.go index f1154470..96d525d7 100644 --- a/pkg/eth/test_helpers/test_data.go +++ b/pkg/eth/test_helpers/test_data.go @@ -38,7 +38,7 @@ import ( "github.com/multiformats/go-multihash" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" ) // Test variables diff --git a/pkg/fill/service.go b/pkg/fill/service.go index cd3d3df6..6f239797 100644 --- a/pkg/fill/service.go +++ b/pkg/fill/service.go @@ -28,7 +28,7 @@ import ( "github.com/jmoiron/sqlx" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" + "github.com/vulcanize/ipld-eth-server/v4/pkg/serve" ) // WatchedAddress type is used to process currently watched addresses diff --git a/pkg/fill/service_test.go b/pkg/fill/service_test.go index 439635f7..1511200a 100644 --- a/pkg/fill/service_test.go +++ b/pkg/fill/service_test.go @@ -28,10 +28,10 @@ import ( sdtypes "github.com/ethereum/go-ethereum/statediff/types" "github.com/jmoiron/sqlx" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - fill "github.com/vulcanize/ipld-eth-server/v3/pkg/fill" - "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + fill "github.com/vulcanize/ipld-eth-server/v4/pkg/fill" + "github.com/vulcanize/ipld-eth-server/v4/pkg/serve" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var _ = Describe("Service", func() { diff --git a/pkg/graphql/graphql.go b/pkg/graphql/graphql.go index 465bf286..9c8431e4 100644 --- a/pkg/graphql/graphql.go +++ b/pkg/graphql/graphql.go @@ -33,7 +33,7 @@ import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" ) var ( diff --git a/pkg/graphql/graphql_test.go b/pkg/graphql/graphql_test.go index 50375b3a..535c84f5 100644 --- a/pkg/graphql/graphql_test.go +++ b/pkg/graphql/graphql_test.go @@ -35,11 +35,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/v3/pkg/graphql" - "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" - ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth/test_helpers" + "github.com/vulcanize/ipld-eth-server/v4/pkg/graphql" + "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" + ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) var _ = Describe("GraphQL", func() { diff --git a/pkg/graphql/service.go b/pkg/graphql/service.go index 10ea5981..4df31762 100644 --- a/pkg/graphql/service.go +++ b/pkg/graphql/service.go @@ -29,7 +29,7 @@ import ( "github.com/graph-gophers/graphql-go/relay" "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" ) // Service encapsulates a GraphQL service. diff --git a/pkg/net/api_test.go b/pkg/net/api_test.go index f47829c7..70f249f6 100644 --- a/pkg/net/api_test.go +++ b/pkg/net/api_test.go @@ -20,7 +20,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/net" + "github.com/vulcanize/ipld-eth-server/v4/pkg/net" ) var _ = Describe("API", func() { diff --git a/pkg/rpc/ipc.go b/pkg/rpc/ipc.go index eedf5184..f3434331 100644 --- a/pkg/rpc/ipc.go +++ b/pkg/rpc/ipc.go @@ -25,7 +25,7 @@ import ( "github.com/ethereum/go-ethereum/p2p/netutil" "github.com/ethereum/go-ethereum/rpc" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" + "github.com/vulcanize/ipld-eth-server/v4/pkg/prom" ) var ( diff --git a/pkg/rpc/ws.go b/pkg/rpc/ws.go index a19d5cc1..068653c8 100644 --- a/pkg/rpc/ws.go +++ b/pkg/rpc/ws.go @@ -24,7 +24,7 @@ import ( "github.com/ethereum/go-ethereum/node" "github.com/ethereum/go-ethereum/rpc" - "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" + "github.com/vulcanize/ipld-eth-server/v4/pkg/prom" ) // StartWSEndpoint starts a websocket endpoint. diff --git a/pkg/serve/api.go b/pkg/serve/api.go index 4a9dfbde..a59bcca7 100644 --- a/pkg/serve/api.go +++ b/pkg/serve/api.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/statediff/types" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" ) // APIName is the namespace used for the state diffing service API diff --git a/pkg/serve/config.go b/pkg/serve/config.go index 14fdd19b..a4d4c9a2 100644 --- a/pkg/serve/config.go +++ b/pkg/serve/config.go @@ -32,8 +32,8 @@ import ( "github.com/jmoiron/sqlx" "github.com/spf13/viper" - "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" - ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v4/pkg/prom" + ethServerShared "github.com/vulcanize/ipld-eth-server/v4/pkg/shared" ) // Env variables diff --git a/pkg/serve/service.go b/pkg/serve/service.go index b22963cc..f556ba10 100644 --- a/pkg/serve/service.go +++ b/pkg/serve/service.go @@ -31,8 +31,8 @@ import ( "github.com/jmoiron/sqlx" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - "github.com/vulcanize/ipld-eth-server/v3/pkg/net" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v4/pkg/net" ) const ( diff --git a/test/direct_proxy_integration_test.go b/test/direct_proxy_integration_test.go index 69c4746e..2e6faaa0 100644 --- a/test/direct_proxy_integration_test.go +++ b/test/direct_proxy_integration_test.go @@ -13,8 +13,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - integration "github.com/vulcanize/ipld-eth-server/v3/test" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + integration "github.com/vulcanize/ipld-eth-server/v4/test" ) var _ = Describe("Integration test", func() { diff --git a/test/integration_test.go b/test/integration_test.go index fa5eb6b1..69b019d4 100644 --- a/test/integration_test.go +++ b/test/integration_test.go @@ -16,8 +16,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" - integration "github.com/vulcanize/ipld-eth-server/v3/test" + "github.com/vulcanize/ipld-eth-server/v4/pkg/eth" + integration "github.com/vulcanize/ipld-eth-server/v4/test" ) const nonExistingBlockHash = "0x111111111111111111111111111111111111111111111111111111111111111" diff --git a/test/watch_address_integration_test.go b/test/watch_address_integration_test.go index b8e5f049..d9b3223e 100644 --- a/test/watch_address_integration_test.go +++ b/test/watch_address_integration_test.go @@ -10,11 +10,10 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" "github.com/ethereum/go-ethereum/rpc" - "github.com/ethereum/go-ethereum/statediff/types" sdtypes "github.com/ethereum/go-ethereum/statediff/types" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - integration "github.com/vulcanize/ipld-eth-server/v3/test" + integration "github.com/vulcanize/ipld-eth-server/v4/test" ) var ( @@ -229,8 +228,8 @@ var _ = Describe("WatchAddress integration test", func() { Context("one contract being watched", func() { It("indexes state only for the watched contract", func() { - operation := types.Add - args := []types.WatchAddressArg{ + operation := sdtypes.Add + args := []sdtypes.WatchAddressArg{ { Address: contract1.Address, CreatedAt: uint64(contract1.BlockNumber), @@ -311,8 +310,8 @@ var _ = Describe("WatchAddress integration test", func() { Context("contract added to a non-empty watch-list", func() { It("indexes state only for the watched contracts", func() { - operation := types.Add - args := []types.WatchAddressArg{ + operation := sdtypes.Add + args := []sdtypes.WatchAddressArg{ { Address: contract2.Address, CreatedAt: uint64(contract2.BlockNumber), @@ -395,8 +394,8 @@ var _ = Describe("WatchAddress integration test", func() { Context("contract removed from the watch-list", func() { It("indexes state only for the watched contract", func() { - operation := types.Remove - args := []types.WatchAddressArg{ + operation := sdtypes.Remove + args := []sdtypes.WatchAddressArg{ { Address: contract1.Address, CreatedAt: uint64(contract1.BlockNumber), @@ -477,8 +476,8 @@ var _ = Describe("WatchAddress integration test", func() { Context("list of watched addresses set", func() { It("indexes state only for the watched contracts", func() { - operation := types.Set - args := []types.WatchAddressArg{ + operation := sdtypes.Set + args := []sdtypes.WatchAddressArg{ { Address: contract1.Address, CreatedAt: uint64(contract1.BlockNumber), @@ -565,8 +564,8 @@ var _ = Describe("WatchAddress integration test", func() { Context("list of watched addresses cleared", func() { It("indexes state for all the contracts", func() { - operation := types.Clear - args := []types.WatchAddressArg{} + operation := sdtypes.Clear + args := []sdtypes.WatchAddressArg{} ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args) Expect(ipldErr).ToNot(HaveOccurred()) @@ -659,7 +658,7 @@ var _ = Describe("WatchAddress integration test", func() { }) It("returns an error on args of invalid type", func() { - operation := types.Add + operation := sdtypes.Add args := []string{"WrongArg"} gethErr := gethRPCClient.Call(nil, gethMethod, operation, args) diff --git a/test/watched_address_gap_filling_service_integration_test.go b/test/watched_address_gap_filling_service_integration_test.go index d507261c..7cb3fa8d 100644 --- a/test/watched_address_gap_filling_service_integration_test.go +++ b/test/watched_address_gap_filling_service_integration_test.go @@ -14,7 +14,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - integration "github.com/vulcanize/ipld-eth-server/v3/test" + integration "github.com/vulcanize/ipld-eth-server/v4/test" ) var _ = Describe("Watched address gap filling service integration test", func() {