🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@chainsafe/geth-dev-assistant

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/geth-dev-assistant

Configuration utility for geth's `--dev` ephemeral POA network.

latest
Source
npmnpm
Version
0.1.11
Version published
Maintainers
2
Created
Source

geth-dev-assistant

Quickly configure and launch a geth --dev ephemeral POA network. Helpful when using geth in CI.

Screen Shot 2019-05-18 at 12 06 40 AM

  • 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

npm install --save-dev geth-dev-assistant

Run

npx geth-dev-assistant [options]

Usage Example

npx geth-dev-assistant \
    --tag 'latest' \
    --accounts 5 \
    --balance 50 \
    --gasLimit 12000000

# Run tests
npx mocha

# Clean-up
docker stop geth-client

Options

OptionDescriptionTypeDefault
accountsnumber of accounts to create / unlocknumber0 (use default acct)
passwordfor geth accountsstring"left-hand-of-darkness"
balancenew account starting balances (in ETH)number100
gasLimitblock gas limit target to mine towardsnumber(varies by geth version)
launchpull and launch a geth docker instancebooltrue
reporoot docker repo (useful for forks)string'ethereum/client-go'
taggeth version / docker tag to fetchstring'stable'
offlinedo not pull image from docker hubboolfalse
sleepmax seconds to wait for geth to spin upnumber10
periodautomining intervalnumber0 (insta-mine)
porthttp port to connect to client withnumber8545
helpshow helpboolfalse

Other resources

  • A POA network setup using genesis.json at 0xProject.
  • ethnode a zero config tool to run a local Ethereum dev node (geth & parity!)
  • Geth client options wiki

Keywords

go

FAQs

Package last updated on 06 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts