Giter Club home page Giter Club logo

ethnode's Introduction

ethnode, run an Ethereum node for test and development

ethnode is a zero configuration tool to run a local Ethereum node. It supports both Openethereum and Geth.

Try it out:

npm install -g ethnode
ethnode

Or docker:

docker run -it ghcr.io/vrde/ethnode:latest

ethnode automatically:

  • downloads the latest stable version of geth or openethereum
  • configures geth or openethereum to run in a single node network using the clique (Geth) or InstantSeal (Openethereum) consensus engine (transactions are processed instantly)
  • provides 10 unlocked accounts with 100ETH each
  • enables all RPC endpoints (personal, db, eth, net, web3, debug and more)
  • allows CORS from any domain (so you can use it with remix)

By default ethnode runs geth. If you want to run openethereum type ethnode openethereum.

Examples

Start ethnode and store the data in a specific directory

Every time you run ethnode, it creates a new temporary directory to store the data. If you want to persist the data in a specific directory use:

ethnode --workdir=mydata

Start ethnode and allocate 100ETH to one or more target addresses

Sometimes you want to allocate Ether to some specific addresses (maybe some other accounts you have on MetaMask). This is an alternative approach to import a private key to your MetaMask extension.

ethnode --allocate=0xad7b5e515e557b2dc4d0625d206394b502412003,0xecdd5b467e38731bfad4bd75faa45c7d58e41b49

Start ethnode to run some tests and then exit

This is quite handy if you want to have a precommit hook that runs tests before committing, or if you want to integrate with a continuous integration system like travis.

ethnode --execute="truffle test"

Start

FAQ

Why not just running openethereum --config dev?

Openethereum has a nice feature to run it as a private development chain (aka test RPC).

While testing it, I run into some problems, like:

  • address management
  • outdated genesis file
  • the default configuration (--config dev) doesn't:
    • open up CORS
    • unlock the test keys

Why not just running geth --dev?

More or less for the same reasons mentioned above.

Why not ganache-cli?

Ganache sometimes is not enough.

ethnode's People

Contributors

antomor avatar briungri avatar rkachowski avatar timdaub avatar vrde avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.