Giter VIP home page Giter VIP logo

balena-ethereum-node's Introduction

⟠ balena-ethereum-node ⟠

Run an ethereum node with one click! 🚀

This project makes deploying an ethereum node to a balenaOS device super simple. The bundle installs:

  • Ethereum's go-client: geth
  • An influxdb database for storing metrics
  • A grafana dashboard for monitoring

dashboard

Supported architectures

The following device types and architectures are supported:

  • Intel Nuc (amd64)
  • Raspberry Pi 4 (aarch64) - WIP

Hardware requirements

Geth requirements specify a minimum of 4GB of RAM and 320GB of SSD disk space available in order to properly sync your node to ethereum's mainnet. In practice, as of February 2022, 320GB is nowhere near enough to run a full node. The initial sync will take up to 500GB, so if you want to have some leeway you'll want to run with at least 1TB of disk space. Based on this the recommended specs are:

  • Fast CPU with 4+ cores
  • 16GB+ RAM
  • Fast SSD with at least 1TB free space
  • 25+ MBit/sec download Internet service

Using a USB drive If you don't have an SSD with enough space you can use an USB SSD drive instead (just make sure to use a USB 3.0 port). The startup script will automatically detect, format, mount the drive and configure geth to use it as the data directory.

WARNING: plugging in a USB drive will format the device, erasing all data on it! Make sure to backup any files you want to keep before doing this.

Installation

There are two ways of deploying this project depending on your needs:

  • joining a public fleet of nodes via balenaHub
  • creating your own private fleet of nodes using balenaCloud

balenaHub

balenaHub allows you to join an existing fleet of devices running this project. Deployment is simple, you just download and flash the image to your device and you're good to go. As you'll be joining an open fleet you won't have the same privileges you would have if you were running your own fleet. The fleet owner controls when updates are released and what configuration the devices run with. On the flip side, you won't need to create an account to join an open fleet. If you want to create and run your own private fleet check out the balenaCloud alternative below.

Read more about balenaHub and open fleets here: https://hub.balena.io/what-is-balenahub. To deploy to your device using balenaHub visit: https://hub.balena.io/tmigone/balena-ethereum-node/

Once your device is done downloading the application, you can access the grafana dashboard to view it's metrics on: http://geth.local or http://geth depending on your machine's operative system.

balenaCloud

If you want to create your own private fleet you can do so using balenaCloud. This will let you control when to update your nodes, what specific configuration you want the node to run with and will give you all the perks of the balenaCloud dashboard: access to device metrics and logs, ssh access, remote management capabilities, etc.

If you are not familiar with balenaCloud you'll need to sign up for a free account here and probably run through the getting started guide before deploying this project. The setup is fairly straightforward, it should take you about 15 minutes to get everything started.

You can then deploy this project to your fleet clicking the button below:

deploy button

Configuration

The following environment variables can be used to customize your node. Read more about how to set variables in balenaCloud here: https://www.balena.io/docs/learn/manage/variables/. Note that they correspond to geth command line options so always check their documentation for up to date information.

Note: This only applies to balenaCloud deployment as only the fleet owner can modify these variables.

Variable Description Geth option Default
GETH_NETWORK Which network to connect the node to. Available networks: mainnet, goerli, rinkeby, ropsten, sepolia One of:
  • --mainnet
  • --goerli
  • --rinkeby
  • --ropsten
  • --sepolia
mainnet
GETH_CACHE Megabytes of memory allocated to internal caching. Can take any numeric value. --cache 1024
GETH_SYNCMODE Blockchain sync mode: snap, full or light. --syncmode snap
GETH_RPC_HTTP Enable the HTTP-RPC server. Either true or false Bundles:
  • --http
  • --http.address 0.0.0.0
  • --http.corsdomain "*"
  • --http.api "$GETH_RPC_API"
true
GETH_RPC_WS Enable the WS-RPC server. Either true or false Bundles:
  • --ws
  • --ws.address 0.0.0.0
  • --ws.origins "*"
  • --ws.api "$GETH_RPC_API"
true
GETH_RPC_API API's offered over the HTTP-RPC and WS-RPC interfaces if enabled. Bundles:
  • --http.apis <value>
  • --ws.apis <value>
eth,net,web3

References

balena-ethereum-node's People

Contributors

tmigone 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.