Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Optimisation, n/a] update geth #34

Merged
merged 3 commits into from
Oct 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ To access the Netstats Web UI:
open http://$(docker-machine ip default):3000
```

#### Scaling the number of nodes/containers in the cluster
### Scaling the number of nodes/containers in the cluster

You can scale the number of Ethereum nodes by running:

```
docker-compose scale eth=3
```

Will scale the number of Ethereum nodes upwards (replace 3 with however many nodes
This will scale the number of Ethereum nodes **upwards** (replace 3 with however many nodes
you prefer). These nodes will connect to the P2P network (via the bootstrap node)
by default.

Expand All @@ -76,20 +78,22 @@ As part of the bootstrapping process we bootstrap 10 Ethereum accounts for use
pre-filled with 20 Ether for use in transactions by default.

If you want to change the amount of Ether for those accounts
See ```files/genesis.json```.
See `files/genesis.json`.

## 2. Interact with geth

If you want to start mining or stop mining you need to connect to the node via:
To get attached to the `geth` JavaScript console on the node you can run the following
```
docker exec -it ethereumdocker_eth_1 geth attach ipc://root/.ethereum/devchain/geth.ipc
```
Replace ethereumdocker_geth_1 with the container name you wish to connect to.
Then you can `miner.start()`, and then check to see if it's mining by inspecting `web3.eth.mining`.

See the [Javascript Runtime](https://github.com/ethereum/go-ethereum/wiki/JavaScript-Console) docs for more.

### 2.1 Use existing DAG
### 2.1 Use an existing DAG

To speed up the process, you can use a pre-generated DAG. All you need to do is add something like this
To speed up the process, you can use a [pre-generated DAG](https://github.com/ethereum/wiki/wiki/Ethash-DAG). All you need to do is add something like this
```
ADD dag/full-R23-0000000000000000 /root/.ethash/full-R23-0000000000000000
```
to the monitored-geth-client Dockerfile.
to the `monitored-geth-client` Dockerfile.
11 changes: 7 additions & 4 deletions eth-netstats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
FROM node:7
FROM node:8-alpine

RUN apk add --update git

RUN git clone https://github.com/cubedro/eth-netstats
RUN cd /eth-netstats && npm install
RUN cd /eth-netstats && npm install -g grunt-cli
RUN cd /eth-netstats && grunt

WORKDIR /eth-netstats

RUN npm install
RUN npm install -g grunt-cli
RUN grunt

EXPOSE 3000

CMD ["npm", "start"]
5 changes: 2 additions & 3 deletions monitored-geth-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
FROM ethereum/client-go:v1.6.5
FROM ethereum/client-go

RUN apk update &&\
apk add git nodejs bash perl
RUN apk add --update git bash nodejs nodejs-npm perl

RUN cd /root &&\
git clone https://github.com/cubedro/eth-net-intelligence-api &&\
Expand Down