From 289b30715d097edafd5562f66cb3567a70b2d330 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 28 Oct 2016 20:05:01 +0300 Subject: Godeps, vendor: convert dependency management to trash (#3198) This commit converts the dependency management from Godeps to the vendor folder, also switching the tool from godep to trash. Since the upstream tool lacks a few features proposed via a few PRs, until those PRs are merged in (if), use github.com/karalabe/trash. You can update dependencies via trash --update. All dependencies have been updated to their latest version. Parts of the build system are reworked to drop old notions of Godeps and invocation of the go vet command so that it doesn't run against the vendor folder, as that will just blow up during vetting. The conversion drops OpenCL (and hence GPU mining support) from ethash and our codebase. The short reasoning is that there's noone to maintain and having opencl libs in our deps messes up builds as go install ./... tries to build them, failing with unsatisfied link errors for the C OpenCL deps. golang.org/x/net/context is not vendored in. We expect it to be fetched by the user (i.e. using go get). To keep ci.go builds reproducible the package is "vendored" in build/_vendor. --- cmd/geth/main.go | 44 +------------------------------------------- cmd/geth/usage.go | 1 - cmd/utils/flags.go | 5 ----- 3 files changed, 1 insertion(+), 49 deletions(-) (limited to 'cmd') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index ccc42d3cf..551705208 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -82,22 +82,6 @@ The makedag command generates an ethash DAG in /tmp/dag. This command exists to support the system testing project. Regular users do not need to execute it. -`, - }, - { - Action: gpuinfo, - Name: "gpuinfo", - Usage: "gpuinfo", - Description: ` -Prints OpenCL device info for all found GPUs. -`, - }, - { - Action: gpubench, - Name: "gpubench", - Usage: "benchmark GPU", - Description: ` -Runs quick benchmark on first GPU found. `, }, { @@ -147,7 +131,6 @@ participating. utils.OpposeDAOFork, utils.MinerThreadsFlag, utils.MiningEnabledFlag, - utils.MiningGPUFlag, utils.AutoDAGFlag, utils.TargetGasLimitFlag, utils.NATFlag, @@ -312,7 +295,7 @@ func startNode(ctx *cli.Context, stack *node.Node) { if err := stack.Service(ðereum); err != nil { utils.Fatalf("ethereum service not running: %v", err) } - if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name), ctx.GlobalString(utils.MiningGPUFlag.Name)); err != nil { + if err := ethereum.StartMining(ctx.GlobalInt(utils.MinerThreadsFlag.Name)); err != nil { utils.Fatalf("Failed to start mining: %v", err) } } @@ -348,31 +331,6 @@ func makedag(ctx *cli.Context) error { return nil } -func gpuinfo(ctx *cli.Context) error { - eth.PrintOpenCLDevices() - return nil -} - -func gpubench(ctx *cli.Context) error { - args := ctx.Args() - wrongArgs := func() { - utils.Fatalf(`Usage: geth gpubench `) - } - switch { - case len(args) == 1: - n, err := strconv.ParseUint(args[0], 0, 64) - if err != nil { - wrongArgs() - } - eth.GPUBench(n) - case len(args) == 0: - eth.GPUBench(0) - default: - wrongArgs() - } - return nil -} - func version(c *cli.Context) error { fmt.Println(strings.Title(clientIdentifier)) fmt.Println("Version:", utils.Version) diff --git a/cmd/geth/usage.go b/cmd/geth/usage.go index 2cb6e77e8..4c4e27630 100644 --- a/cmd/geth/usage.go +++ b/cmd/geth/usage.go @@ -128,7 +128,6 @@ var AppHelpFlagGroups = []flagGroup{ Flags: []cli.Flag{ utils.MiningEnabledFlag, utils.MinerThreadsFlag, - utils.MiningGPUFlag, utils.AutoDAGFlag, utils.EtherbaseFlag, utils.TargetGasLimitFlag, diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 1859f735d..5e2dcf8c9 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -170,7 +170,6 @@ var ( Usage: "Updates the chain rules to oppose the DAO hard-fork", } // Miner settings - // TODO: refactor CPU vs GPU mining flags MiningEnabledFlag = cli.BoolFlag{ Name: "mine", Usage: "Enable mining", @@ -180,10 +179,6 @@ var ( Usage: "Number of CPU threads to use for mining", Value: runtime.NumCPU(), } - MiningGPUFlag = cli.StringFlag{ - Name: "minergpus", - Usage: "List of GPUs to use for mining (e.g. '0,1' will use the first two GPUs found)", - } TargetGasLimitFlag = cli.StringFlag{ Name: "targetgaslimit", Usage: "Target gas limit sets the artificial target gas floor for the blocks to mine", -- cgit v1.2.3