From 10f7056e6ce90cd030438ec850e55db5d6cfafd0 Mon Sep 17 00:00:00 2001 From: Jitendra Bhurat Date: Mon, 5 Nov 2018 16:12:05 -0500 Subject: [PATCH] Upgrade images (#2) * Fixing Imports * Updating Quorum and Constellation Images --- Makefile | 4 +-- charts/genesis.go | 2 +- charts/log.go | 2 +- charts/static_nodes.go | 2 +- client/log.go | 2 +- cmd/istanbul/main.go | 10 +++--- cmd/istanbul/reinit/cmd.go | 4 +-- cmd/istanbul/setup/cmd.go | 6 ++-- cmd/sendtx/main.go | 2 +- common/log.go | 2 +- common/transactions.go | 2 +- container/blockchain.go | 33 ++++++++++++++----- container/constellation.go | 2 +- container/constellation_test.go | 5 +-- container/ethereum.go | 6 ++-- container/log.go | 2 +- container/utils.go | 2 +- docker/compose/istanbul.go | 2 +- docker/compose/quorum.go | 2 +- docker/service/constellation.go | 11 +++++-- docker/service/quorum.go | 11 +++++-- genesis/genesis.go | 2 +- genesis/log.go | 2 +- genesis/options.go | 2 +- glide.yaml | 2 +- k8s/blockchain.go | 6 ++-- k8s/ethereum.go | 8 ++--- k8s/ethereum_example.go | 6 ++-- k8s/log.go | 2 +- k8s/rich_man.go | 2 +- k8s/transactor.go | 4 +-- metrics/blockchain.go | 4 +-- metrics/client.go | 2 +- metrics/ethereum.go | 6 ++-- metrics/log.go | 2 +- tests/functional/block_sync_test.go | 4 +-- tests/functional/byzantine_faulty_test.go | 4 +-- tests/functional/dynamic_test.go | 4 +-- tests/functional/general_consensus_test.go | 6 ++-- tests/functional/gossip_network_test.go | 4 +-- tests/functional/integration_test.go | 2 +- tests/functional/non_byzantine_faulty_test.go | 4 +-- tests/functional/recoverability_test.go | 4 +-- tests/load/load_test.go | 10 +++--- tests/quorum/functional/block_sync_test.go | 10 +++--- .../functional/byzantine_faulty_test.go | 6 ++-- tests/quorum/functional/dynamic_test.go | 4 +-- .../functional/general_consensus_test.go | 6 ++-- .../quorum/functional/gossip_network_test.go | 4 +-- tests/quorum/functional/integration_test.go | 6 ++-- .../functional/non_byzantine_faulty_test.go | 4 +-- .../functional/private_transaction_test.go | 4 +-- .../quorum/functional/recoverability_test.go | 4 +-- tests/utils.go | 8 +++-- 54 files changed, 149 insertions(+), 113 deletions(-) diff --git a/Makefile b/Makefile index 207ac26e..96f6ef26 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ CURDIR = $(shell pwd) -GOPATH= $(dir $(abspath $(dir $(abspath $(dir ${CURDIR}))))) +#GOPATH= $(dir $(abspath $(dir $(abspath $(dir ${CURDIR}))))) GOBIN = $(CURDIR)/build/bin GO ?= latest @@ -10,7 +10,7 @@ istanbul: load-testing: @echo "Run load testing" - @CURDIR=$(CURDIR) go test -v github.com/getamis/istanbul-tools/tests/load/... --timeout 1h + @CURDIR=$(CURDIR) go test -v github.com/jpmorganchase/istanbul-tools/tests/load/... --timeout 1h clean: rm -rf build/bin/ diff --git a/charts/genesis.go b/charts/genesis.go index 7611e4b7..9c421e6c 100644 --- a/charts/genesis.go +++ b/charts/genesis.go @@ -25,7 +25,7 @@ import ( "github.com/ethereum/go-ethereum/common" - "github.com/getamis/istanbul-tools/genesis" + "github.com/jpmorganchase/istanbul-tools/genesis" ) type GenesisChart struct { diff --git a/charts/log.go b/charts/log.go index cd207f15..3343a5fe 100644 --- a/charts/log.go +++ b/charts/log.go @@ -17,7 +17,7 @@ package charts import ( - logging "github.com/getamis/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/charts/static_nodes.go b/charts/static_nodes.go index 6023cb57..9a661b3e 100644 --- a/charts/static_nodes.go +++ b/charts/static_nodes.go @@ -22,7 +22,7 @@ import ( "path/filepath" "strings" - "github.com/getamis/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/common" ) type StaticNodesChart struct { diff --git a/client/log.go b/client/log.go index 7b2e74ca..29987ccb 100644 --- a/client/log.go +++ b/client/log.go @@ -17,7 +17,7 @@ package client import ( - logging "github.com/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/cmd/istanbul/main.go b/cmd/istanbul/main.go index 6bf42171..af8293b4 100644 --- a/cmd/istanbul/main.go +++ b/cmd/istanbul/main.go @@ -22,10 +22,10 @@ import ( "github.com/urfave/cli" - "github.com/istanbul-tools/cmd/istanbul/extra" - "github.com/istanbul-tools/cmd/istanbul/setup" - "github.com/istanbul-tools/cmd/istanbul/reinit" - "github.com/istanbul-tools/cmd/utils" + "github.com/jpmorganchase/istanbul-tools/cmd/istanbul/extra" + "github.com/jpmorganchase/istanbul-tools/cmd/istanbul/reinit" + "github.com/jpmorganchase/istanbul-tools/cmd/istanbul/setup" + "github.com/jpmorganchase/istanbul-tools/cmd/utils" ) func main() { @@ -37,7 +37,7 @@ func main() { app.Commands = []cli.Command{ extra.ExtraCommand, setup.SetupCommand, - reinit.ReinitCommand, + reinit.ReinitCommand, } if err := app.Run(os.Args); err != nil { diff --git a/cmd/istanbul/reinit/cmd.go b/cmd/istanbul/reinit/cmd.go index 0d6b9d62..cc9882af 100644 --- a/cmd/istanbul/reinit/cmd.go +++ b/cmd/istanbul/reinit/cmd.go @@ -30,8 +30,8 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/rlp" - "github.com/istanbul-tools/genesis" - "github.com/urfave/cli" + "github.com/jpmorganchase/istanbul-tools/genesis" + "github.com/urfave/cli" ) var ( diff --git a/cmd/istanbul/setup/cmd.go b/cmd/istanbul/setup/cmd.go index 39cbe97f..52a29196 100644 --- a/cmd/istanbul/setup/cmd.go +++ b/cmd/istanbul/setup/cmd.go @@ -29,9 +29,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/p2p/discover" - istcommon "github.com/istanbul-tools/common" - "github.com/istanbul-tools/docker/compose" - "github.com/istanbul-tools/genesis" + istcommon "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/docker/compose" + "github.com/jpmorganchase/istanbul-tools/genesis" "github.com/urfave/cli" ) diff --git a/cmd/sendtx/main.go b/cmd/sendtx/main.go index 11a00159..89069809 100644 --- a/cmd/sendtx/main.go +++ b/cmd/sendtx/main.go @@ -20,7 +20,7 @@ import ( "fmt" "os" - "github.com/getamis/istanbul-tools/cmd/utils" + "github.com/jpmorganchase/istanbul-tools/cmd/utils" "github.com/urfave/cli" ) diff --git a/common/log.go b/common/log.go index f399458f..f7df0d6d 100644 --- a/common/log.go +++ b/common/log.go @@ -17,7 +17,7 @@ package common import ( - logging "github.com/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/common/transactions.go b/common/transactions.go index d0b5c536..8d69ac30 100644 --- a/common/transactions.go +++ b/common/transactions.go @@ -24,7 +24,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/istanbul-tools/client" + "github.com/jpmorganchase/istanbul-tools/client" ) var ( diff --git a/container/blockchain.go b/container/blockchain.go index 2eba1d85..bb2ce4f1 100644 --- a/container/blockchain.go +++ b/container/blockchain.go @@ -33,8 +33,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/phayes/freeport" - istcommon "github.com/getamis/istanbul-tools/common" - "github.com/getamis/istanbul-tools/genesis" + istcommon "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/docker/service" + "github.com/jpmorganchase/istanbul-tools/genesis" ) const ( @@ -42,6 +43,8 @@ const ( veryLightScryptN = 2 veryLightScryptP = 1 defaultPassword = "" + + ArbitraryNetworkId = "2018" ) type NodeIncubator interface { @@ -100,6 +103,7 @@ func NewDefaultBlockchain(network *DockerNetwork, numOfValidators int) (bc *bloc Unlock(0), Password("password.txt"), Logging(false), + Verbosity(5), ) } @@ -123,7 +127,10 @@ func NewDefaultBlockchainWithFaulty(network *DockerNetwork, numOfNormal int, num SyncMode("full"), Unlock(0), Password("password.txt"), - Logging(false)} + Logging(false), + Verbosity(5), + NetworkID(ArbitraryNetworkId), + } normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2) copy(normalOpts, commonOpts[:]) normalOpts = append(normalOpts, ImageRepository("quay.io/amis/geth"), ImageTag("istanbul_develop")) @@ -191,13 +198,17 @@ func NewQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork, optio func NewDefaultQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork) (bc *blockchain) { return NewQuorumBlockchain(network, ctn, - ImageRepository("quay.io/amis/quorum"), - ImageTag("feature_istanbul"), + ImageRepository(service.QuorumDockerImage), + ImageTag(service.QuorumDockerImageTag), DataDir("/data"), WebSocket(), WebSocketAddress("0.0.0.0"), WebSocketAPI("admin,eth,net,web3,personal,miner,istanbul"), WebSocketOrigin("*"), + RPCAddress("0.0.0.0"), + RPCPort(8980), + RPC(), + RPCAPI("admin,eth,miner,istanbul"), NAT("any"), NoDiscover(), Etherbase("1a9afb711302c5f83b5902843d1c007a1a137632"), @@ -206,6 +217,8 @@ func NewDefaultQuorumBlockchain(network *DockerNetwork, ctn ConstellationNetwork Unlock(0), Password("password.txt"), Logging(false), + Verbosity(5), + NetworkID(ArbitraryNetworkId), ) } @@ -231,10 +244,12 @@ func NewDefaultQuorumBlockchainWithFaulty(network *DockerNetwork, ctn Constellat Password("password.txt"), Logging(false), IsQuorum(true), + Verbosity(5), + NetworkID(ArbitraryNetworkId), } normalOpts := make([]Option, len(commonOpts), len(commonOpts)+2) copy(normalOpts, commonOpts[:]) - normalOpts = append(normalOpts, ImageRepository("quay.io/amis/quorum"), ImageTag("feature_istanbul")) + normalOpts = append(normalOpts, ImageRepository(service.QuorumDockerImage), ImageTag(service.QuorumDockerImageTag)) faultyOpts := make([]Option, len(commonOpts), len(commonOpts)+3) copy(faultyOpts, commonOpts[:]) faultyOpts = append(faultyOpts, ImageRepository("quay.io/amis/quorum_faulty"), ImageTag("latest"), FaultyMode(1)) @@ -398,6 +413,7 @@ func (bc *blockchain) CreateNodes(num int, options ...Option) (nodes []Ethereum, } opts = append(opts, HostDataDir(dataDir)) opts = append(opts, HostWebSocketPort(freeport.GetPort())) + opts = append(opts, HostRPCPort(freeport.GetPort())) opts = append(opts, HostIP(ips[i])) opts = append(opts, DockerNetworkName(bc.dockerNetwork.Name())) @@ -502,6 +518,7 @@ func (bc *blockchain) setupValidators(ips []net.IP, keys []*ecdsa.PrivateKey, of } opts = append(opts, HostDataDir(dataDir)) opts = append(opts, HostWebSocketPort(freeport.GetPort())) + opts = append(opts, HostRPCPort(freeport.GetPort())) opts = append(opts, Key(keys[i])) opts = append(opts, HostIP(ips[i])) @@ -588,8 +605,8 @@ func NewConstellationNetwork(network *DockerNetwork, numOfValidators int, option func NewDefaultConstellationNetwork(network *DockerNetwork, numOfValidators int) (ctn *constellationNetwork) { return NewConstellationNetwork(network, numOfValidators, - CTImageRepository("quay.io/amis/constellation"), - CTImageTag("latest"), + CTImageRepository(service.ConstellationDockerImage), + CTImageTag(service.ConstellationDockerImageTag), CTWorkDir("/ctdata"), CTLogging(false), CTKeyName("node"), diff --git a/container/constellation.go b/container/constellation.go index 1ffe8b7c..e678e7db 100644 --- a/container/constellation.go +++ b/container/constellation.go @@ -33,7 +33,7 @@ import ( "github.com/docker/docker/client" "github.com/docker/go-connections/nat" - "github.com/getamis/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/common" ) //TODO: refactor this with ethereum options? diff --git a/container/constellation_test.go b/container/constellation_test.go index 25bb7f1d..4da7da56 100644 --- a/container/constellation_test.go +++ b/container/constellation_test.go @@ -20,6 +20,7 @@ import ( "testing" "github.com/docker/docker/client" + "github.com/jpmorganchase/istanbul-tools/docker/service" "github.com/phayes/freeport" ) @@ -43,8 +44,8 @@ func TestConstellationContainer(t *testing.T) { port := freeport.GetPort() ct := NewConstellation(dockerClient, - CTImageRepository("quay.io/amis/constellation"), - CTImageTag("latest"), + CTImageRepository(service.ConstellationDockerImage), + CTImageTag(service.ConstellationDockerImageTag), CTHost(ip, port), CTDockerNetworkName(dockerNetwork.Name()), CTWorkDir("/data"), diff --git a/container/ethereum.go b/container/ethereum.go index d4f583a3..3057731f 100644 --- a/container/ethereum.go +++ b/container/ethereum.go @@ -42,9 +42,9 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/p2p/discover" - "github.com/getamis/istanbul-tools/client" - istcommon "github.com/getamis/istanbul-tools/common" - "github.com/getamis/istanbul-tools/genesis" + "github.com/jpmorganchase/istanbul-tools/client" + istcommon "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/genesis" ) const ( diff --git a/container/log.go b/container/log.go index 1af7511e..cadf61c9 100644 --- a/container/log.go +++ b/container/log.go @@ -17,7 +17,7 @@ package container import ( - logging "github.com/getamis/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/container/utils.go b/container/utils.go index ea30c0c3..f250c0cc 100644 --- a/container/utils.go +++ b/container/utils.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/crypto/sha3" "github.com/ethereum/go-ethereum/rlp" - "github.com/getamis/istanbul-tools/cmd/istanbul/extra" + "github.com/jpmorganchase/istanbul-tools/cmd/istanbul/extra" ) func sigHash(header *types.Header) (hash common.Hash) { diff --git a/docker/compose/istanbul.go b/docker/compose/istanbul.go index 3c173fc5..9ae098c3 100644 --- a/docker/compose/istanbul.go +++ b/docker/compose/istanbul.go @@ -22,7 +22,7 @@ import ( "strings" "text/template" - "github.com/istanbul-tools/docker/service" + "github.com/jpmorganchase/istanbul-tools/docker/service" ) type Compose interface { diff --git a/docker/compose/quorum.go b/docker/compose/quorum.go index eb3d9b90..37758662 100644 --- a/docker/compose/quorum.go +++ b/docker/compose/quorum.go @@ -21,7 +21,7 @@ import ( "fmt" "text/template" - "github.com/istanbul-tools/docker/service" + "github.com/jpmorganchase/istanbul-tools/docker/service" ) type quorum struct { diff --git a/docker/service/constellation.go b/docker/service/constellation.go index 8f4fb951..2c497774 100644 --- a/docker/service/constellation.go +++ b/docker/service/constellation.go @@ -23,6 +23,11 @@ import ( "text/template" ) +var ( + ConstellationDockerImage = "quorumengineering/constellation" + ConstellationDockerImageTag = "latest" +) + type Constellation struct { Identity int Name string @@ -79,9 +84,9 @@ func (c Constellation) String() string { return result.String() } -var constellationTemplate = `{{ .Name }}: +var constellationTemplate = fmt.Sprintf(`{{ .Name }}: hostname: {{ .Name }} - image: quay.io/amis/constellation:latest + image: %s:%s ports: - '{{ .Port }}:{{ .Port }}' volumes: @@ -107,4 +112,4 @@ var constellationTemplate = `{{ .Name }}: networks: app_net: ipv4_address: {{ .IP }} - restart: always` + restart: always`, ConstellationDockerImage, ConstellationDockerImageTag) diff --git a/docker/service/quorum.go b/docker/service/quorum.go index f30ea01f..1cdbca55 100644 --- a/docker/service/quorum.go +++ b/docker/service/quorum.go @@ -22,6 +22,11 @@ import ( "text/template" ) +var ( + QuorumDockerImage = "quorumengineering/quorum" + QuorumDockerImageTag = "2.1.1" +) + type Quorum struct { *Validator Constellation *Constellation @@ -50,9 +55,9 @@ func (q Quorum) String() string { return result.String() } -var quorumTemplate = `{{ .Name }}: +var quorumTemplate = fmt.Sprintf(`{{ .Name }}: hostname: {{ .Name }} - image: quay.io/amis/quorum:feature_istanbul + image: %s:%s ports: - '{{ .Port }}:30303' - '{{ .RPCPort }}:8545' @@ -92,4 +97,4 @@ var quorumTemplate = `{{ .Name }}: app_net: ipv4_address: {{ .IP }} restart: always - {{ .Constellation }}` + {{ .Constellation }}`, QuorumDockerImage, QuorumDockerImageTag) diff --git a/genesis/genesis.go b/genesis/genesis.go index bfd78a53..98fa6a09 100644 --- a/genesis/genesis.go +++ b/genesis/genesis.go @@ -28,7 +28,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/params" - "github.com/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/common" ) const ( diff --git a/genesis/log.go b/genesis/log.go index 25fb7d35..3b50b6b7 100644 --- a/genesis/log.go +++ b/genesis/log.go @@ -17,7 +17,7 @@ package genesis import ( - logging "github.com/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/genesis/options.go b/genesis/options.go index 32788ba7..3357cad5 100644 --- a/genesis/options.go +++ b/genesis/options.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/core" - "github.com/istanbul-tools/cmd/istanbul/extra" + "github.com/jpmorganchase/istanbul-tools/cmd/istanbul/extra" ) type Option func(*core.Genesis) diff --git a/glide.yaml b/glide.yaml index 51a3ab9f..492231ea 100644 --- a/glide.yaml +++ b/glide.yaml @@ -1,4 +1,4 @@ -package: github.com/getamis/istanbul-tools +package: github.com/jpmorganchase/istanbul-tools import: - package: github.com/ethereum/go-ethereum version: istanbul/develop diff --git a/k8s/blockchain.go b/k8s/blockchain.go index 347dda9e..636ea779 100644 --- a/k8s/blockchain.go +++ b/k8s/blockchain.go @@ -24,9 +24,9 @@ import ( "github.com/ethereum/go-ethereum/common" - "github.com/getamis/istanbul-tools/charts" - istcommon "github.com/getamis/istanbul-tools/common" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/charts" + istcommon "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/container" ) func NewBlockchain(numOfValidators int, numOfExtraAccounts int, gaslimit uint64, isQourum bool, options ...Option) (bc *blockchain) { diff --git a/k8s/ethereum.go b/k8s/ethereum.go index ca464273..9fe9077c 100644 --- a/k8s/ethereum.go +++ b/k8s/ethereum.go @@ -32,10 +32,10 @@ import ( ethtypes "github.com/ethereum/go-ethereum/core/types" "github.com/getamis/go-ethereum/crypto" - "github.com/getamis/istanbul-tools/charts" - "github.com/getamis/istanbul-tools/client" - istcommon "github.com/getamis/istanbul-tools/common" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/charts" + "github.com/jpmorganchase/istanbul-tools/client" + istcommon "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/container" ) func NewEthereum(options ...Option) *ethereum { diff --git a/k8s/ethereum_example.go b/k8s/ethereum_example.go index 349999d1..2526fb35 100644 --- a/k8s/ethereum_example.go +++ b/k8s/ethereum_example.go @@ -17,9 +17,9 @@ package k8s import ( - "github.com/getamis/istanbul-tools/charts" - "github.com/getamis/istanbul-tools/common" - "github.com/getamis/istanbul-tools/genesis" + "github.com/jpmorganchase/istanbul-tools/charts" + "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/genesis" ) func ExampleK8SEthereum() { diff --git a/k8s/log.go b/k8s/log.go index 93d91291..22d76fb8 100644 --- a/k8s/log.go +++ b/k8s/log.go @@ -17,7 +17,7 @@ package k8s import ( - logging "github.com/getamis/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/k8s/rich_man.go b/k8s/rich_man.go index 458866c2..72fc8b1c 100644 --- a/k8s/rich_man.go +++ b/k8s/rich_man.go @@ -23,7 +23,7 @@ import ( "github.com/ethereum/go-ethereum/common" - istcommon "github.com/getamis/istanbul-tools/common" + istcommon "github.com/jpmorganchase/istanbul-tools/common" ) type RichMan interface { diff --git a/k8s/transactor.go b/k8s/transactor.go index 5a513222..2f191dd3 100644 --- a/k8s/transactor.go +++ b/k8s/transactor.go @@ -25,8 +25,8 @@ import ( "github.com/ethereum/go-ethereum/crypto" - "github.com/getamis/istanbul-tools/client" - istcommon "github.com/getamis/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/client" + istcommon "github.com/jpmorganchase/istanbul-tools/common" ) type Transactor interface { diff --git a/metrics/blockchain.go b/metrics/blockchain.go index 79058fde..46323c16 100644 --- a/metrics/blockchain.go +++ b/metrics/blockchain.go @@ -27,8 +27,8 @@ import ( "github.com/ethereum/go-ethereum/common" ethtypes "github.com/ethereum/go-ethereum/core/types" - "github.com/getamis/istanbul-tools/client" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/client" + "github.com/jpmorganchase/istanbul-tools/container" ) type SnapshotStopper func() diff --git a/metrics/client.go b/metrics/client.go index ab5cd657..181602e9 100644 --- a/metrics/client.go +++ b/metrics/client.go @@ -24,7 +24,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/getamis/istanbul-tools/client" + "github.com/jpmorganchase/istanbul-tools/client" ) type metricClient struct { diff --git a/metrics/ethereum.go b/metrics/ethereum.go index 10911f8a..669f7eba 100644 --- a/metrics/ethereum.go +++ b/metrics/ethereum.go @@ -22,9 +22,9 @@ import ( "math/big" "time" - "github.com/getamis/istanbul-tools/client" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/k8s" + "github.com/jpmorganchase/istanbul-tools/client" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/k8s" ) type metricEthereum struct { diff --git a/metrics/log.go b/metrics/log.go index ba793684..8f724596 100644 --- a/metrics/log.go +++ b/metrics/log.go @@ -17,7 +17,7 @@ package metrics import ( - logging "github.com/getamis/istanbul-tools/log" + logging "github.com/jpmorganchase/istanbul-tools/log" ) var log = logging.New() diff --git a/tests/functional/block_sync_test.go b/tests/functional/block_sync_test.go index 4e1c7f72..eed14a76 100644 --- a/tests/functional/block_sync_test.go +++ b/tests/functional/block_sync_test.go @@ -24,8 +24,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("Block synchronization testing", func() { diff --git a/tests/functional/byzantine_faulty_test.go b/tests/functional/byzantine_faulty_test.go index 4fe8dc83..c69c8ea3 100644 --- a/tests/functional/byzantine_faulty_test.go +++ b/tests/functional/byzantine_faulty_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TFS-05: Byzantine Faulty", func() { diff --git a/tests/functional/dynamic_test.go b/tests/functional/dynamic_test.go index 1dfa8139..3ce477b0 100644 --- a/tests/functional/dynamic_test.go +++ b/tests/functional/dynamic_test.go @@ -25,8 +25,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TFS-02: Dynamic validators addition/removal testing", func() { diff --git a/tests/functional/general_consensus_test.go b/tests/functional/general_consensus_test.go index b97a549e..dba4b9a5 100644 --- a/tests/functional/general_consensus_test.go +++ b/tests/functional/general_consensus_test.go @@ -28,9 +28,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/genesis" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/genesis" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TFS-01: General consensus", func() { diff --git a/tests/functional/gossip_network_test.go b/tests/functional/gossip_network_test.go index 588ede7c..42e65dcf 100644 --- a/tests/functional/gossip_network_test.go +++ b/tests/functional/gossip_network_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TFS-07: Gossip Network", func() { diff --git a/tests/functional/integration_test.go b/tests/functional/integration_test.go index c1c3264f..3554e4bc 100644 --- a/tests/functional/integration_test.go +++ b/tests/functional/integration_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/container" ) // Example diff --git a/tests/functional/non_byzantine_faulty_test.go b/tests/functional/non_byzantine_faulty_test.go index ef0c3a0f..6224bda8 100644 --- a/tests/functional/non_byzantine_faulty_test.go +++ b/tests/functional/non_byzantine_faulty_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TFS-04: Non-Byzantine Faulty", func() { diff --git a/tests/functional/recoverability_test.go b/tests/functional/recoverability_test.go index 54daf8fa..9896bed6 100644 --- a/tests/functional/recoverability_test.go +++ b/tests/functional/recoverability_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TFS-03: Recoverability testing", func() { diff --git a/tests/load/load_test.go b/tests/load/load_test.go index 60c5b514..270db9f4 100644 --- a/tests/load/load_test.go +++ b/tests/load/load_test.go @@ -27,11 +27,11 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - istcommon "github.com/getamis/istanbul-tools/common" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/k8s" - "github.com/getamis/istanbul-tools/metrics" - "github.com/getamis/istanbul-tools/tests" + istcommon "github.com/jpmorganchase/istanbul-tools/common" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/k8s" + "github.com/jpmorganchase/istanbul-tools/metrics" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("TPS-01: Large amount of transactions", func() { diff --git a/tests/quorum/functional/block_sync_test.go b/tests/quorum/functional/block_sync_test.go index b11376fc..cf2d64c5 100644 --- a/tests/quorum/functional/block_sync_test.go +++ b/tests/quorum/functional/block_sync_test.go @@ -24,8 +24,9 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/docker/service" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("Block synchronization testing", func() { @@ -62,14 +63,15 @@ var _ = Describe("Block synchronization testing", func() { Expect(ok).To(BeTrue()) nodes, err = incubator.CreateNodes(numberOfNodes, - container.ImageRepository("quay.io/amis/geth"), - container.ImageTag("istanbul_develop"), + container.ImageRepository(service.QuorumDockerImage), + container.ImageTag(service.QuorumDockerImageTag), container.DataDir("/data"), container.WebSocket(), container.WebSocketAddress("0.0.0.0"), container.WebSocketAPI("admin,eth,net,web3,personal,miner"), container.WebSocketOrigin("*"), container.NAT("any"), + container.NetworkID(container.ArbitraryNetworkId), ) Expect(err).To(BeNil()) diff --git a/tests/quorum/functional/byzantine_faulty_test.go b/tests/quorum/functional/byzantine_faulty_test.go index 401fce96..de87dbb3 100644 --- a/tests/quorum/functional/byzantine_faulty_test.go +++ b/tests/quorum/functional/byzantine_faulty_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("QFS-05: Byzantine Faulty", func() { @@ -112,7 +112,7 @@ var _ = Describe("QFS-05: Byzantine Faulty", func() { }) }) close(done) - }, 60) + }, 120) }) }) diff --git a/tests/quorum/functional/dynamic_test.go b/tests/quorum/functional/dynamic_test.go index 58056073..2535ff83 100644 --- a/tests/quorum/functional/dynamic_test.go +++ b/tests/quorum/functional/dynamic_test.go @@ -25,8 +25,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("QFS-02: Dynamic validators addition/removal testing", func() { diff --git a/tests/quorum/functional/general_consensus_test.go b/tests/quorum/functional/general_consensus_test.go index d0beb7bf..c2b001b6 100644 --- a/tests/quorum/functional/general_consensus_test.go +++ b/tests/quorum/functional/general_consensus_test.go @@ -28,9 +28,9 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/genesis" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/genesis" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("QFS-01: General consensus", func() { diff --git a/tests/quorum/functional/gossip_network_test.go b/tests/quorum/functional/gossip_network_test.go index 783847d6..0329da68 100644 --- a/tests/quorum/functional/gossip_network_test.go +++ b/tests/quorum/functional/gossip_network_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("QFS-07: Gossip Network", func() { diff --git a/tests/quorum/functional/integration_test.go b/tests/quorum/functional/integration_test.go index c020e44f..fe8cec71 100644 --- a/tests/quorum/functional/integration_test.go +++ b/tests/quorum/functional/integration_test.go @@ -17,19 +17,21 @@ package functional import ( + "fmt" "testing" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/docker/service" ) var dockerNetwork *container.DockerNetwork func TestQuorumIstanbul(t *testing.T) { RegisterFailHandler(Fail) - RunSpecs(t, "Quorum Istanbul Test Suite") + RunSpecs(t, fmt.Sprintf("Quorum Istanbul Test Suite\nUsing %s:%s and %s:%s", service.QuorumDockerImage, service.QuorumDockerImageTag, service.ConstellationDockerImage, service.ConstellationDockerImageTag)) } var _ = BeforeSuite(func() { diff --git a/tests/quorum/functional/non_byzantine_faulty_test.go b/tests/quorum/functional/non_byzantine_faulty_test.go index f72c62a5..adbefd9e 100644 --- a/tests/quorum/functional/non_byzantine_faulty_test.go +++ b/tests/quorum/functional/non_byzantine_faulty_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("QFS-04: Non-Byzantine Faulty", func() { diff --git a/tests/quorum/functional/private_transaction_test.go b/tests/quorum/functional/private_transaction_test.go index 3a8be273..22cd766f 100644 --- a/tests/quorum/functional/private_transaction_test.go +++ b/tests/quorum/functional/private_transaction_test.go @@ -28,8 +28,8 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/types" - "github.com/getamis/istanbul-tools/client" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/client" + "github.com/jpmorganchase/istanbul-tools/container" ) const ( diff --git a/tests/quorum/functional/recoverability_test.go b/tests/quorum/functional/recoverability_test.go index 7e8395bc..781c8c6c 100644 --- a/tests/quorum/functional/recoverability_test.go +++ b/tests/quorum/functional/recoverability_test.go @@ -23,8 +23,8 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" - "github.com/getamis/istanbul-tools/container" - "github.com/getamis/istanbul-tools/tests" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/tests" ) var _ = Describe("QFS-03: Recoverability testing", func() { diff --git a/tests/utils.go b/tests/utils.go index f15c6e7c..4240000a 100644 --- a/tests/utils.go +++ b/tests/utils.go @@ -19,14 +19,18 @@ package tests import ( "sync" - "github.com/getamis/istanbul-tools/container" + "github.com/jpmorganchase/istanbul-tools/container" + "github.com/onsi/ginkgo" ) func WaitFor(geths []container.Ethereum, waitFn func(eth container.Ethereum, wg *sync.WaitGroup)) { wg := new(sync.WaitGroup) for _, g := range geths { wg.Add(1) - go waitFn(g, wg) + go func(_g container.Ethereum) { + defer ginkgo.GinkgoRecover() + waitFn(_g, wg) + }(g) } wg.Wait() }