1

At the moment I'm playing around with- or rather "conducting some experiments"- with JPM's quorum.

On my machine I have multiple versions of geth (i.e. goethe) installed.

I'm fairly confident that when I issue the following terminal command:

geth --testnet --rpc --mine

what is executed is the version of goethe that lives in my $GOPATH, i.e.:

/Users/s.matthew.english/go/src/github.com/ethereum/go-ethereum

(sub-question: Is the above conjecture accurate?)

However...

What I want to do is run the JPM quorum version of goethe, that lives in a different directory, namely:

/Users/s.matthew.english/clients/quorum/0.0_quorum/quorum

Is it possible to specify on start-up which version of goethe is executed?


Edit

Even though I was in the quorum directory, the output of which geth was the one on my $GOPATH

enter image description here

  • Workaround ("quick hack") is to just use a docker container – smatthewenglish Aug 20 '17 at 21:28
  • What do you mean by goethe, or have I missed something about release names? Or is that JPM's name for Geth? (I'm reading goethe as Goethe (pron: "Ger-ter"), i.e. the German bloke... ) – Richard Horrocks Aug 21 '17 at 14:06
  • it's a kind of social experiment- I just think it would be funny if I could get many people calling geth as goethe – smatthewenglish Aug 21 '17 at 14:57
1

I'm fairly confident that when I issue the following terminal command: geth --testnet --rpc --mine what is executed is the version of goethe that lives in my $GOPATH

This is a bash command so what program gets executed is determined by the $PATH environment var (only the go compiler is concerned with $GOPATH, not bash).

You can check what gets executed by doing which geth, it will print the full path.

  • thanks for the feedback! so- I just added an update to the OP, even though I was in the quorum directory, which geth output the one on my $GOPATH, maybe I can specify which one to use by putting something in my ~/.zshrc? – smatthewenglish Aug 20 '17 at 21:31
  • 1
    If you want one geth command to give you an option which one to run, you could make an interactive bash script named geth and put it in /usr/local/bin (or somewhere that has high priority in your $PATH). Then in the bash script use the full paths to the particular geth versions. – cdetrio Aug 20 '17 at 21:33
  • 1
    It may be that the directory in your $GOPATH is also included in your $PATH. As to the .zshrc, look at docs on Z shell. – cdetrio Aug 20 '17 at 21:41
  • 1
    The precedence is determined by your $PATH (directories are prioritized by their order in $PATH). – cdetrio Aug 20 '17 at 21:43
  • 1
    The first place the shell finds a geth executable is probably in /Users‌​/s.matthew.english/g‌​o/bin, which is in the $PATH. So that's the one that gets executed. – cdetrio Aug 20 '17 at 21:46
1

Download the binary file for your OS from here: https://geth.ethereum.org

Create a shell/bash file that contains instructions for starting up geth like in this example which I use for the ropsten testnet on Ubuntu. Make any changes as needed for the appropriate network you want to use as well as change/add any flags as needed. Be sure to change the directory path to match your local file system.

#!/usr/bin/env bash

echo "STARTING GETH ROPSTEN TESTNET"

/home/rfikki/projects/ethereum-develop-ropsten/geth \
    --testnet \
    --syncmode "fast" \
    --cache "1024" \
    --port "30303" \
    --identity "Homestead Geth Ropsten Network" \
    --datadir "/home/rfikki/projects/ethereum-develop-ropsten/testnet-data" \
    --jspath "/home/rfikki/projects/ethereum-develop-ropsten/javascript" \
    --unlock "0" \
    --password "/home/rfikki/projects/ethereum-develop-ropsten/password.txt" \
    --shh \
    --rpc \
    --rpcaddr "127.0.0.1" \
    --rpcport "8545" \
    --rpcapi "admin,db,eth,debug,miner,shh,txpool,net,web3,personal" \
    --rpccorsdomain "*" \
    --verbosity 3 \
    --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" \
    console 2>> /home/rfikki/projects/ethereum-develop-ropsten/startup-geth-ropsten.log
  • I tried it with specifying the full path to the directory where I have quorum in stalled, similar to what you've done with /home/rfikki/projects/ethereum-develop-ropsten/geth, but it didn't work – smatthewenglish Aug 20 '17 at 21:22
  • This particular bash file works for me on the Ubuntu OS. – Rocky Fikki Aug 20 '17 at 21:27
  • do you also have a version of goethe installed on your $GOPATH? – smatthewenglish Aug 20 '17 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.