Coder Social home page Coder Social logo

blockchain-node's Introduction

blockchain-node

Build status

This is an Erlang application that is a Helium Blockchain node. It follows the blockchain and exposes functionality using a JSONRPC 2.0 API.

Documentation

See API endpoint documentation (in markdown format).

Developer Usage

  • Clone this repository

  • Run make && make release in the top level folder

  • Run make start to start the application. Logs will be at _build/dev/rel/blockchain_node/log/*.

Once started the application will start syncing the blockchain and loading blocks. If this is done from scratch it can take a number of days to download all blocks from the network and aobsorb them in the local ledger.

File Descriptors

The application uses a lot of file descriptors for network communication and local storage. If you see errors related to too many open files or nofile, stop the application and increase the file descriptor limit.

macOS

You may see an error similar to the following:

{error,"IO error: While open a file for appending: data/blockchain.db/020311.sst: Too many open files"}

Check this Superuser answer for a workaround.

Linux

Update your /etc/security/limits.conf to increase your file limits. An example of what to add can be seen here.

Installing Ubuntu Required Packages

If running on Ubuntu, you will need the following packages installed before running make release:

wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
sudo dpkg -i erlang-solutions_2.0_all.deb
sudo apt-get update
sudo apt install esl-erlang=1:22.3.4.1-1 cmake libsodium-dev libssl-dev build-essential
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

If you already have rust installed, please ensure it is at least at verion 1.51 or upgrade to the latest stable using rustup update stable

Using Docker

Building the Docker Image

make docker-build

Running the Docker Container

make docker-start

Updating Docker

Navigate to your copy of the blockchain-node repository.

cd /path/to/blockchain-node

Stop the Node.

make docker-stop

Update the repository.

git pull

Remove the existing Docker container.

make docker-clean

Rebuild the Docker image.

make docker-build

Run the updated Docker container.

make docker-start

Log the Node output.

tail -f $HOME/node_data/log/console.log

blockchain-node's People

Contributors

abhay avatar anthonyra avatar evanmcc avatar jadeallenx avatar ke6jjj avatar madninja avatar olb1ue avatar simewu avatar syuan100 avatar vagabond avatar varshard avatar vihu avatar xandkar 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.