Skip to content

Commit 1c1ac21

Browse files
Lane Rettigaxic
authored andcommitted
Separate out instructions on syncing the testnet
1 parent bc39ac1 commit 1c1ac21

1 file changed

Lines changed: 31 additions & 25 deletions

File tree

README.md

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -158,55 +158,37 @@ Aleth supports EVMC out of the box, but geth not yet.
158158
> cmake --build .
159159
```
160160

161-
1. Download the [genesis file](ewasm-testnet-geth-config.json) and use it to initialize geth:
162-
163-
```sh
164-
> wget https://raw.githubusercontent.com/ewasm/testnet/master/ewasm-testnet-geth-config.json
165-
> ./build/bin/geth --datadir /tmp/ewasm-node/4201/ init ewasm-testnet-geth-config.json
166-
```
167-
168-
Note that the `/tmp/ewasm-node/4201` directory name above is arbitrary. It just needs to be unique.
169-
170-
1. Run geth with hera and connect to the testnet:
161+
1. Run geth with hera:
171162

172163
Use `--vm.ewasm` flag in `geth` to plug in an EVMC VM shared library. Point it to the Hera shared library that you built a moment ago.
173164
Additional EVMC options can be provided after a comma.
174165
Hera options are documented in [hera](https://github.com/ewasm/hera).
175166

176-
Note also the `--etherbase`, `--networkid`, and `--bootnodes` commands, below, and copy them verbatim as these are required to connect to and sync with the Ewasm testnet.
177-
178167
The `--vmodule` argument sets the verbosity for the `eth` and `p2p` modules, which will provide lots of juicy debugging information on your node's connection to the other testnet peers, and on its mining, accepting, and propagating blocks. Feel free to reduce verbosity or turn this off.
179168

180-
Finally, if you want your node to participate in mining, add the arguments `--mine --miner.threads 1`.
169+
Finally, if you want your node to mine, add the arguments `--mine --miner.threads 1`.
181170

182171
Check out the geth [CLI wiki page](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options) for more information on these commands, or just run `geth --help`.
183172

184-
Here's the recommended configuration for connecting your node to the Ewasm testnet:
173+
Here's the recommended configuration for running a node locally:
185174

186175
```sh
187176
> ./build/bin/geth \
188177
--vm.ewasm="/path/to/libhera.so,metering=true,fallback=true" \
189178
--datadir /tmp/ewasm-node/4201/ \
190-
--etherbase 031159dF845ADe415202e6DA299223cb640B9DB0 \
191179
--rpc --rpcapi "web3,net,eth,debug" \
192-
--rpcvhosts="*" --rpcaddr "0.0.0.0" \
180+
--rpcvhosts=* --rpcaddr "0.0.0.0" \
193181
--rpccorsdomain "*" \
194-
--vmodule "miner=12,rpc=12" \
195-
--mine --miner.threads 1 \
196-
--nodiscover \
197-
--networkid 66 \
198-
--bootnodes "enode://53458e6bf0353f3378e115034cf6c6039b9faed52548da9030b37b4672de4a8fd09f869c48d16f9f10937e7398ae0dbe8b9d271408da7a0cf47f42a09e662827@23.101.78.254:30303"
182+
--vmodule "eth=12,p2p=12" \
183+
--nodiscover
199184
```
200185

201-
*NOTE*: don't forget to specify `networkId` with the same value as the value of `chainID` in the genesis configuration, this is to avoid [Metamask error `Invalid Sender`](https://github.com/MetaMask/metamask-extension/issues/3673).
202-
203186
Note that if you want your node to be automatically restarted if it dies, and to survive system reboots, you'll want to use a tool such as [pm2](http://pm2.keymetrics.io/):
204187

205188
```sh
206189
> npm install -g pm2
207190
```
208191

209-
210192
### geth + Wagon
211193

212194
**NOTE: this client currently is not supported fully and the instructions here may be wrong.**
@@ -246,7 +228,6 @@ This section describes how to run geth node with the [Wagon](http://github.com/g
246228
--bootnodes "enode://53458e6bf0353f3378e115034cf6c6039b9faed52548da9030b37b4672de4a8fd09f869c48d16f9f10937e7398ae0dbe8b9d271408da7a0cf47f42a09e662827@23.101.78.254:30303"
247229
```
248230

249-
250231
### Aleth (cpp-ethereum) + Hera
251232

252233
**NOTE: this client currently is not supported fully and the instructions here may be wrong.**
@@ -256,6 +237,31 @@ Support for aleth (formerly, cpp-ethereum) is a work in progress and more inform
256237

257238
## Syncing to the testnet
258239

240+
In order to sync to the testnet, you'll need the proper genesis configuration.
241+
242+
1. Follow the steps above to download and build geth+Hera.
243+
244+
1. Download the [genesis file](ewasm-testnet-geth-config.json) and use it to initialize geth:
245+
246+
```sh
247+
> wget https://raw.githubusercontent.com/ewasm/testnet/master/ewasm-testnet-geth-config.json
248+
> ./build/bin/geth --datadir /tmp/ewasm-node/4201/ init ewasm-testnet-geth-config.json
249+
```
250+
251+
Note that the `/tmp/ewasm-node/4201` directory name above is arbitrary. It just needs to be unique.
252+
253+
Note also the `--etherbase`, `--networkid`, and `--bootnodes` commands, below, and copy them verbatim as these are required to connect to and sync with the Ewasm testnet.
254+
255+
Don't forget to specify `networkId` with the same value as the value of `chainID` in the genesis configuration to avoid [Metamask error `Invalid Sender`](https://github.com/MetaMask/metamask-extension/issues/3673).
256+
257+
Run geth as above, but add the following commandline args:
258+
259+
```sh
260+
--etherbase a8c3eeb2915373139bcfc287d4ae9e660d734881 \
261+
--networkid 66 \
262+
--bootnodes "enode://53458e6bf0353f3378e115034cf6c6039b9faed52548da9030b37b4672de4a8fd09f869c48d16f9f10937e7398ae0dbe8b9d271408da7a0cf47f42a09e662827@23.101.78.254:30303"
263+
```
264+
259265

260266
### Enabling ethstats
261267

0 commit comments

Comments
 (0)