GithubHelp home page GithubHelp logo

0xtr3 / core-rs-albatross Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nimiq/core-rs-albatross

0.0 0.0 0.0 40.39 MB

Rust implementation of the Albatross protocol

Home Page: https://nimiq.com

License: Other

Shell 0.21% JavaScript 0.13% Python 1.51% Rust 97.36% TypeScript 0.52% Makefile 0.02% HTML 0.03% Dockerfile 0.06% Jinja 0.15%

core-rs-albatross's Introduction

Nimiq Proof-of-Stake

nimiq

Rust implementation of the Nimiq Proof-of-Stake blockchain.

Build Status dependency status

Nimiq is a frictionless payment protocol for the web.

This repository is currently under development. It contains the implementation of the Nimiq Proof-of-Stake protocol based on the Albatross consensus algorithm.

Nimiq Proof-of-Stake was conceived with performance in mind without sacrificing security.

Currently, the protocol can be exercised in an environment aimed for developers where bugs are expected to happen. For more detailed information about how to connect and use the testnet network, please refer to the Testnet section.

Table of Contents

Background

System requirements

  • 64-bit computing architecture.
  • 2 or more CPU cores
  • 2GB of available RAM memory
  • 5GB of free disk space, an SSD is highly recommended (100GB or more is required for history nodes)
  • File systems with sparse file support.
  • It is highly recommended to run a clock synchronization protocol such as NTP. This is needed to properly accept blocks according to the timestamp and it is especially important for validators in order to produce blocks in the expected timestamps.

Installation

Besides Rust stable itself, the following packages are required to be able to compile the source code:

  • clang
  • cmake
  • libssl-dev (in Debian/Ubuntu) or openssl-devel (in Fedora/Red Hat)
  • pkg-config

After installing the previous packages, compiling the project is achieved through cargo:

git clone https://github.com/nimiq/core-rs-albatross
cd core-rs-albatross
cargo build --release

If you want to install the client onto your system (into $HOME/.cargo/bin), run:

cargo install --path client/

Alternatively, you can install it directly from git:

cargo install --git https://github.com/nimiq/core-rs-albatross.git

Software Integrity and Authenticity

You can refer to the documentation to learn more about reproducing Nimiq software for yourself as well as checking software signatures in order to verify the integrity and authenticity of software.

Usage

After installation, you can run the client directly, like this:

cargo run --release --bin nimiq-client

Configuration

By default the client will look for a configuration file in $HOME/.nimiq/client.toml. In order to create this file yourself, you can use the example config file as follow:

cargo run --release --bin nimiq-client                         # Run the client. This will create the example config file.
cp $HOME/.nimiq/client.example.toml $HOME/.nimiq/client.toml   # Create your config from the example.
nano $HOME/.nimiq/client.toml                                  # Edit the config. Explanations are included in the file.

If you want to directly specify your own configuration file when running the client, you can do so as follow:

cargo run --release --bin nimiq-client -- -c path/to/client.toml

Please take a look at the client.example.toml for all the configuration options.

Testnet

The testnet network is currently in a phase open to the general public to use. Its main purpose is to invite everyone to exercise and test the Nimiq Proof-of-Stake functionality and we invite people to file and report any issues through our GitHub repository.

Getting funds

There are two ways of getting funds:

curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "address=NQXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX" https://faucet.pos.nimiq-testnet.com/tapit

Becoming a validator

Check this guide for steps on becoming a validator.

Docker

Use docker pull ghcr.io/nimiq/core-rs-albatross:latest to pull the latest docker image. Then mount a volume to configure the client:

mkdir data
cp ./lib/src/config/config_file/client.example.toml data/client.toml

Note that you can modify the client configuration and this is a must if you are running a validator. For more documentation on the configuration file, check the configuration section of this guide.

Once the data directory is created and ready, you can run the client with:

docker run -v $(pwd)/data:/home/nimiq/.nimiq -p 8443:8443 -p 8648:8648 -p 9100:9100 --name nimiq-rpc --rm ghcr.io/nimiq/core-rs-albatross:latest

Overview of exposed ports:

Port Description
8443 Incoming connections port
8648 RPC port
9100 Metrics port

Contributing

If you'd like to contribute to the development of Nimiq please follow our Code of Conduct and Contributing Guidelines.

Small note: When editing the README, please conform to the standard-readme specification.

License

This project is licensed under the Apache License 2.0.

core-rs-albatross's People

Contributors

dependabot[bot] avatar jsdanielh avatar paberr avatar styppo avatar brunoffranca avatar jgraef avatar hrxi avatar viquezclaudio avatar sisou avatar nibhar avatar jeffesquivels avatar ii-cruz avatar fiaxh avatar riptl avatar eligioo avatar mar-v-in avatar onmax avatar 0xtr3 avatar faberto avatar sdschmidt avatar redmaner avatar cud4m avatar syvb avatar albermonte avatar antonleviathan avatar burtonqin avatar curdbecker avatar rex4539 avatar josefschabasser avatar maestroi 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.