Skip to content

Instantly share code, notes, and snippets.

@brandoncurtis
Last active January 31, 2018 13:32
Show Gist options
  • Save brandoncurtis/82bd45656e4fea3a64fa081a25b33c0f to your computer and use it in GitHub Desktop.
Save brandoncurtis/82bd45656e4fea3a64fa081a25b33c0f to your computer and use it in GitHub Desktop.
Setting up the Venus testnet on Ethermint (a Tendermint EVM chain, part of the Cosmos project)

All of this is prefaced on having Go installed: https://golang.org/doc/install Go is properly installed if echo $GOPATH returns something that makes sense.

Ethermint

First, install Ethermint. Normally I'd do this:

$ go get -u -d github.com/tendermint/ethermint
$ cd $GOPATH/src/github.com/tendermint/ethermint
$ git checkout v0.3.0
$ make install

make will automatically install and run the glide dependency manager, so you don't have to do that manually.

...but this doesn't work, because the dependencies reference a go-ethereum commit hash that no longer exists.

Instead, download and unpack the appropriate prebuilt binary: https://github.com/tendermint/ethermint/releases/tag/v0.3.1

Yes it's tagged v0.3.1, though the binaries are actually for v0.3.0. This is confirmed by querying the version:

$ /opt/tendermint/ethermint version
0.3.0-832cd933

Tendermint

Tendermint v0.15.0 is current, but Ethermint v0.3.0–v0.5.3 still requires Tendermint v0.10.x. Don't bother trying a newer version of Tendermint, because it's not compatible with the testnet configuration files.

  • Tendermint v0.10.5 is the newest in that series
  • Ethermint doesn't include Tendermint as a library-level dependency
  • you'll have to install it and make sure it's in the $PATH
$ go get -u -d github.com/tendermint/tendermint
$ cd $GOPATH/src/github.com/tendermint/tendermint
$ git checkout v0.10.5
$ make install
$ tendermint version
0.10.5-acc161f7

Setting Up Venus Testnet

Tendermint and Ethermint both need some configuration and genesis block information in order to connect to Venus.

$ git clone [email protected]:tendermint/testnets tendermint-testnets
$ ln -s $(pwd)/tendermint-testnets/venus $HOME/.venus
$ ethermint --datadir $HOME/.venus/ init $HOME/.venus/ethermint/genesis.json
$ tendermint --home $HOME/.venus/tendermint/ init

And now you're ready to go!

$ ethermint --with-tendermint --datadir $HOME/.venus/ --rpc --rpcaddr=0.0.0.0 --rpcapi eth,net,web3,personal,admin

If we could use the newer Ethermint v0.5.3, this would automatically starts Tendermint with it.

We're using an old version, so we have to start Ethermint and Tendermint separately:

$ ethermint --datadir $HOME/.venus/ --rpc --rpcaddr=0.0.0.0 --rpcapi eth,net,web3,personal,admin
$ tendermint --home $HOME/.venus/tendermint/ node 

Now you should be syncing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment