Code Monkey home page Code Monkey logo

hm-miner's Introduction

hm-miner: Helium Miner Container

This is the codebase for the Helium miner container used on the Nebra hotspot miners.

We take the base image created by Helium from their Quay repo (built from the GitHub source) and make some customisations to optimise it for use on our hardware including adding a start script and a script to automatically determine the regulatory region (EU868, US915 etc) from the asserted location of the miner.

Miner config file update

In the start-miner.sh script in this repo, you will see that we update the included sys.config file every time the miner container is loaded, using the below code:

wget \
    -O "/opt/miner/releases/$HELIUM_GA_RELEASE/sys.config" \
    "${OVERRIDE_CONFIG_URL:=https://helium-assets.nebra.com/docker.config}"

Our Helium block tracker automatically creates miner snapshots every ~240 blocks and at the same time also updates a docker.config file located on our server with the block height and hash of the snapshot, enabling it to be ingested into the miner.

This enables our miners to sync extremely fast (called "instant sync" by some manufacturers) by downloading very up to date snapshots... ~240 blocks is considered synced to all intents and purposes and usually is close enough to being synced that it will already be able to submit transactions to the current consensus group. Note that this is worst case scenario - as the snapshot is updated every 4 hours - so it will often be more up to date than ~240 blocks (unless you are right at the end of a 4 hour period).

Creating a release with updated miner GA

  • Create a new branch
  • Edit the first line of Dockerfile to point to the new GA release
  • Push and create a new PR

Mr Bump

Mr Bump is a GitHub bot we created to automate some tasks related to the miner software. This includes updating the miner to the latest GA (and tagging / releasing this update) as well as updating the necessary docker-compose.yml files.

Mr Bump is currently used in the following repos:

Pre built containers

This repo automatically builds docker containers and uploads them to two repositories for easy access:

The images are tagged using the docker long and short commit SHAs for that release. The current version deployed to miners can be found in the helium-miner-software repo.

hm-miner's People

Contributors

shawaj avatar ryanteck avatar vpetersson avatar mr-bump avatar

Watchers

James Cloos 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.