https://github.com/cgewecke/geth-dev-assistant
Quickly configure and launch a geth --dev ephemeral POA network.
https://github.com/cgewecke/geth-dev-assistant
Last synced: about 1 month ago
JSON representation
Quickly configure and launch a geth --dev ephemeral POA network.
- Host: GitHub
- URL: https://github.com/cgewecke/geth-dev-assistant
- Owner: cgewecke
- License: mit
- Created: 2019-05-16T00:06:10.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-24T00:42:17.000Z (over 2 years ago)
- Last Synced: 2025-04-21T09:21:35.827Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 343 KB
- Stars: 11
- Watchers: 3
- Forks: 6
- Open Issues: 15
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geth-dev-assistant
Quickly configure and launch a geth `--dev` ephemeral POA network.
Helpful when using geth in CI.
+ Pulls a specified geth docker image from Docker Hub
+ Launches a docker geth instance as a background process
+ Waits until geth is ready to receive calls over http / websockets
+ (Optionally) creates, unlocks and funds some password generated accounts
+ (Optionally) mines blocks with no-op txs until a gas limit target is reached.Geth `--dev` seeds with a single funded account and has a relatively low default block gas limit
(~ 10 mil). If the client's mining period is set to 0, it needs to be spun with transactions
before a higher gas limit target is reached.### Install
```shell
npm install --save-dev geth-dev-assistant
```### Run
```shell
npx geth-dev-assistant [options]
```### Usage Example
```shell
npx geth-dev-assistant \
--tag 'latest' \
--accounts 5 \
--balance 50 \
--gasLimit 12000000# Run tests
npx mocha# Clean-up
docker stop geth-client
```### Options
| Option | Description | Type | Default |
| -------- | ------------------------------------------- | ------ | ---------------------- |
| accounts | number of accounts to create / unlock | number | 0 (use default acct) |
| password | for geth accounts | string | "left-hand-of-darkness" |
| balance | new account starting balances (in ETH) | number | 100 |
| gasLimit | block gas limit target to mine towards | number | (varies by geth version)|
| launch | pull and launch a geth docker instance | bool | true |
| repo | root docker repo (useful for forks) | string | 'ethereum/client-go' |
| tag | geth version / docker tag to fetch | string | 'stable' |
| offline | do not pull image from docker hub | bool | false |
| sleep | max seconds to wait for geth to spin up | number | 10 |
| period | automining interval | number | 0 (insta-mine) |
| port | http port to connect to client with | number | 8545 |
| help | show help | bool | false |### Other resources
+ A POA network setup using genesis.json [at 0xProject](https://github.com/0xProject/0x-monorepo/blob/development/packages/devnet/genesis.json).
+ [ethnode](https://github.com/vrde/ethnode) a zero config tool to run a local Ethereum dev node (geth & parity!)
+ Geth client options [wiki](https://github.com/ethereum/go-ethereum/wiki/Command-Line-Options)