diff --git a/README.md b/README.md index c99d495f..5f282536 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` +`GO111MODULE=off go get -d github.com/vulcanize/ipld-eth-server/v3` -`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server` +`cd $GOPATH/src/github.com/vulcanize/ipld-eth-server/v3@v3.x.x` Then, build the binary: diff --git a/cmd/root.go b/cmd/root.go index f5d6401c..4683f170 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/pkg/prom" + "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" ) var ( diff --git a/cmd/serve.go b/cmd/serve.go index 04f5ec35..4ba7f17c 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/pkg/eth" - fill "github.com/vulcanize/ipld-eth-server/pkg/fill" - "github.com/vulcanize/ipld-eth-server/pkg/graphql" - srpc "github.com/vulcanize/ipld-eth-server/pkg/rpc" - s "github.com/vulcanize/ipld-eth-server/pkg/serve" - v "github.com/vulcanize/ipld-eth-server/version" + "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" ) var ErrNoRpcEndpoints = errors.New("no rpc endpoints is available") diff --git a/cmd/subscribe.go b/cmd/subscribe.go index c8d9f7a1..cd3cc2cc 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/pkg/client" - "github.com/vulcanize/ipld-eth-server/pkg/eth" - w "github.com/vulcanize/ipld-eth-server/pkg/serve" + "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" ) // subscribeCmd represents the subscribe command diff --git a/cmd/validate.go b/cmd/validate.go index 18c5c7d3..3c95edbf 100644 --- a/cmd/validate.go +++ b/cmd/validate.go @@ -25,7 +25,7 @@ import ( validator "github.com/vulcanize/eth-ipfs-state-validator/v3/pkg" ipfsethdb "github.com/vulcanize/ipfs-ethdb/v3/postgres" - s "github.com/vulcanize/ipld-eth-server/pkg/serve" + s "github.com/vulcanize/ipld-eth-server/v3/pkg/serve" ) const GroupName = "statedb-validate" diff --git a/cmd/version.go b/cmd/version.go index 5c01ae83..f2939e44 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/version" + v "github.com/vulcanize/ipld-eth-server/v3/version" ) // versionCmd represents the version command diff --git a/documentation/apis.md b/documentation/apis.md index 09ccdd81..13eced40 100644 --- a/documentation/apis.md +++ b/documentation/apis.md @@ -12,7 +12,7 @@ We can expose a number of different APIs for remote access to ipld-eth-server da ipld-eth-server stores all processed data in Postgres using PG-IPFS, this includes all of the IPLD objects. [Postgraphile](https://www.graphile.org/postgraphile/) can be used to expose GraphQL endpoints for the Postgres tables. -e.g. +e.g. `postgraphile --plugins @graphile/pg-pubsub --subscriptions --simple-subscriptions -c postgres://localhost:5432/vulcanize_public?sslmode=disable -s public,btc,eth -a -j` @@ -33,16 +33,16 @@ by ipld-eth-server to filter and return a requested subset of chain data to the An example of how to subscribe to a real-time Ethereum data feed from ipld-eth-server using the `Stream` RPC method is provided below ```go - package main + package main import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/spf13/viper" - - "github.com/vulcanize/ipld-eth-server/pkg/client" - "github.com/vulcanize/ipld-eth-server/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/watch" + + "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" ) config, _ := eth.NewEthSubscriptionConfig() @@ -153,16 +153,16 @@ the addresses in the `addresses` fields are pre-hashed ETH addresses. An example of how to subscribe to a real-time Bitcoin data feed from ipld-eth-server using the `Stream` RPC method is provided below ```go - package main + package main import ( "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/rpc" "github.com/spf13/viper" - - "github.com/vulcanize/ipld-eth-server/pkg/btc" - "github.com/vulcanize/ipld-eth-server/pkg/client" - "github.com/vulcanize/ipld-eth-server/pkg/watch" + + "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" ) config, _ := btc.NewBtcSubscriptionConfig() diff --git a/go.mod b/go.mod index 69b9ed70..aa292c91 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/vulcanize/ipld-eth-server +module github.com/vulcanize/ipld-eth-server/v3 go 1.15 diff --git a/main.go b/main.go index 6bc9b782..724af69e 100644 --- a/main.go +++ b/main.go @@ -18,7 +18,7 @@ package main import ( "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/cmd" + "github.com/vulcanize/ipld-eth-server/v3/cmd" ) func main() { diff --git a/pkg/client/client.go b/pkg/client/client.go index 729c1185..c470ff41 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -20,11 +20,10 @@ package client import ( "context" - "github.com/vulcanize/ipld-eth-server/pkg/eth" - "github.com/ethereum/go-ethereum/rpc" - "github.com/vulcanize/ipld-eth-server/pkg/serve" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v3/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 340d1ec2..34451e95 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/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v3/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 f76ea6ba..b3ef9d9f 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/pkg/shared" - ethServerShared "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var ( diff --git a/pkg/eth/backend.go b/pkg/eth/backend.go index b26b2538..8b12ca44 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/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" ) var ( diff --git a/pkg/eth/cid_retriever.go b/pkg/eth/cid_retriever.go index b0875382..bcebcde7 100644 --- a/pkg/eth/cid_retriever.go +++ b/pkg/eth/cid_retriever.go @@ -27,7 +27,7 @@ import ( "github.com/lib/pq" log "github.com/sirupsen/logrus" - "github.com/vulcanize/ipld-eth-server/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v3/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 b8b28f34..abe56659 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var ( diff --git a/pkg/eth/eth_state_test.go b/pkg/eth/eth_state_test.go index 887e6d35..999ee3c9 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/pkg/shared" - ethServerShared "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var ( diff --git a/pkg/eth/filterer_test.go b/pkg/eth/filterer_test.go index 6894f99c..21cabc54 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var ( diff --git a/pkg/eth/ipld_fetcher.go b/pkg/eth/ipld_fetcher.go index fbef10bd..8396d368 100644 --- a/pkg/eth/ipld_fetcher.go +++ b/pkg/eth/ipld_fetcher.go @@ -25,7 +25,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/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v3/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 dc93be77..5ac47009 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var _ = Describe("IPLDFetcher", func() { diff --git a/pkg/eth/test_helpers/test_data.go b/pkg/eth/test_helpers/test_data.go index 5a0af7dc..650b7cbc 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/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" ) // Test variables diff --git a/pkg/fill/service.go b/pkg/fill/service.go index def311e9..cd3d3df6 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/pkg/serve" + "github.com/vulcanize/ipld-eth-server/v3/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 83b3990a..439635f7 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/pkg/eth/test_helpers" - fill "github.com/vulcanize/ipld-eth-server/pkg/fill" - "github.com/vulcanize/ipld-eth-server/pkg/serve" - "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var _ = Describe("Service", func() { diff --git a/pkg/graphql/graphql.go b/pkg/graphql/graphql.go index 0a746a78..465bf286 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/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" ) var ( diff --git a/pkg/graphql/graphql_test.go b/pkg/graphql/graphql_test.go index 00cc381a..50375b3a 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/eth/test_helpers" - "github.com/vulcanize/ipld-eth-server/pkg/graphql" - "github.com/vulcanize/ipld-eth-server/pkg/shared" - ethServerShared "github.com/vulcanize/ipld-eth-server/pkg/shared" + "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" ) var _ = Describe("GraphQL", func() { diff --git a/pkg/graphql/service.go b/pkg/graphql/service.go index c831fde7..10ea5981 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/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" ) // Service encapsulates a GraphQL service. diff --git a/pkg/net/api_test.go b/pkg/net/api_test.go index 0a8f7206..f47829c7 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/pkg/net" + "github.com/vulcanize/ipld-eth-server/v3/pkg/net" ) var _ = Describe("API", func() { diff --git a/pkg/rpc/ipc.go b/pkg/rpc/ipc.go index 7b8e1c28..eedf5184 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/pkg/prom" + "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" ) var ( diff --git a/pkg/rpc/ws.go b/pkg/rpc/ws.go index 65ae2642..a19d5cc1 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/pkg/prom" + "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" ) // StartWSEndpoint starts a websocket endpoint. diff --git a/pkg/serve/api.go b/pkg/serve/api.go index 8d1177bc..4a9dfbde 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/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v3/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 930ea309..14fdd19b 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/pkg/prom" - ethServerShared "github.com/vulcanize/ipld-eth-server/pkg/shared" + "github.com/vulcanize/ipld-eth-server/v3/pkg/prom" + ethServerShared "github.com/vulcanize/ipld-eth-server/v3/pkg/shared" ) // Env variables diff --git a/pkg/serve/service.go b/pkg/serve/service.go index 91606073..b22963cc 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/pkg/eth" - "github.com/vulcanize/ipld-eth-server/pkg/net" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + "github.com/vulcanize/ipld-eth-server/v3/pkg/net" ) const ( diff --git a/test/direct_proxy_integration_test.go b/test/direct_proxy_integration_test.go index 68255213..69c4746e 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/pkg/eth" - integration "github.com/vulcanize/ipld-eth-server/test" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + integration "github.com/vulcanize/ipld-eth-server/v3/test" ) var _ = Describe("Integration test", func() { diff --git a/test/integration_test.go b/test/integration_test.go index e5cf6acd..fa5eb6b1 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/pkg/eth" - integration "github.com/vulcanize/ipld-eth-server/test" + "github.com/vulcanize/ipld-eth-server/v3/pkg/eth" + integration "github.com/vulcanize/ipld-eth-server/v3/test" ) const nonExistingBlockHash = "0x111111111111111111111111111111111111111111111111111111111111111" diff --git a/test/watch_address_integration_test.go b/test/watch_address_integration_test.go index 8c0f11f4..b8e5f049 100644 --- a/test/watch_address_integration_test.go +++ b/test/watch_address_integration_test.go @@ -14,7 +14,7 @@ import ( sdtypes "github.com/ethereum/go-ethereum/statediff/types" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - integration "github.com/vulcanize/ipld-eth-server/test" + integration "github.com/vulcanize/ipld-eth-server/v3/test" ) var ( diff --git a/test/watched_address_gap_filling_service_integration_test.go b/test/watched_address_gap_filling_service_integration_test.go index 8e33446f..d507261c 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/test" + integration "github.com/vulcanize/ipld-eth-server/v3/test" ) var _ = Describe("Watched address gap filling service integration test", func() {