ergo

Ergo protocol description & reference client implementation

  • 所有者: ergoplatform/ergo
  • 平台:
  • 許可證: Creative Commons Zero v1.0 Universal
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

Ergo

This repository contains the reference implementation of the
Ergo Platform protocol, which is an alternative to
the Bitcoin protocol.

Ergo Platform website: https://ergoplatform.org/

Differences from Bitcoin

Specifications

A White Paper with a brief description is available. A Yellow Paper with detailed specification is underway and will be available shortly. At the moment, there are drafts of the Yellow Paper available,
and currently the reference implementation code should be considered as the specification.

Installation

You can check our Wiki page for node installation and configuration guide.

Also, reference with Node Configuration File wiki page for creating your own configuration file.

Build from sources

In order to build the Ergo node from sources you need JDK (>= 1.8) and SBT to be
installed on your machine.

In order to simply get a single jar run: sbt assembly - assembly would appear in target/scala-2.12/ directory.

If you want to create a package for a specific platform with launching scripts the one of the following
packager commands could be chosen (depending on desired system type you want to build for):

  • universal:packageBin - Generates a universal zip file
  • universal:packageZipTarball - Generates a universal tgz file
  • debian:packageBin - Generates a deb
  • docker:publishLocal - Builds a Docker image using the local Docker server
  • rpm:packageBin - Generates an rpm
  • universal:packageOsxDmg - Generates a DMG file with the same contents as the universal zip/tgz.
  • windows:packageBin - Generates an MSI

The final build command should look like: sbt <packager_command>, example: sbt universal:packageBin.
A resulted package could be found in the target/scala-2.12/<platform_type> directory.

Running the node

The node could be started in a few different ways:

  • In case you have only a jar: java -jar /path/to/ergo-<version>.jar --<networkId> -c /path/to/local.conf
  • Using start script from sbt-native-packager: sh /path/to/bin/ergo --<networkId> -c /path/to/local.conf

Available networkId options: mainnet, testnet, devnet.

You can run special ergo-installer.sh script, that helps you to install Ergo node without a hassle on almost every Linux OS:

curl -s https://raw.githubusercontent.com/ergoplatform/ergo/master/ergo-installer.sh, sh -s -- --api-key=<YOUR_API_KEY>

UI

Node UI (graphical interface) could be accessed at <node_ip>:<api_port>/panel in your browser.

Docker Quick Start

Ergo has officially supported Docker package. To run last Ergo version in mainnet as a console application with logs printed to console:

sudo docker run --rm -p 9030:9030 -p 9053:9053 -v /path/on/host/to/ergo/data:/home/ergo/.ergo ergoplatform/ergo --mainnet

This will connect to Ergo mainnet with default config and open ports 9030 and 9053 on host system. All data will be stored in your host directory /path/on/host/to/ergo/data.

To run specific Ergo version <VERSION> as a service with custom config /path/on/host/system/to/myergo.conf:

sudo docker run -d \
    -p 9030:9030 \
    -p 9053:9053 \
    -v /path/on/host/to/ergo/data:/home/ergo/.ergo \
    -v /path/on/host/system/to/myergo.conf:/etc/myergo.conf \
    ergoplatform/ergo:<VERSION> --<networkId> -c /etc/myergo.conf

Available versions can be found on Ergo Docker image page, for example, v3.1.0.

This will connect to Ergo mainnet or testnet respecting your configuration passed in myergo.conf and network flag --<networkId>. Every default config value would be overwritten with corresponding value in myergo.conf.

This command also would store your data in /path/on/host/to/ergo/data on host system, and open ports 9030 (node communication) and 9053 (REST API) on host system. The /path/on/host/to/ergo/data directory must has 777 permissions or has owner/group numeric id equal to 9052 to be writable by container, as ergo user inside Docker image (please refer to Dockerfile).

Ergo node works normally behind NAT, so you can keep closed your 9030 port, hence other nodes could not discover and connect to yours one, only your node could initiate connections.

It is also a good practice to keep closed REST API port 9053, and connect to your node from inside another container in the same Docker network (this case not covered by this short quick start manual).

Open project in IDE

Your can use IntelliJ IDEA (Community or Ultimate edition) or
VSCode + Metals.
Before opening the project in IDE make sure it can be built with sbt
as described above. You can also run tests using sbt test command.
You may need to fix dependency resolution errors first.

After that you can open the project folder in Idea (File / Open)
which will run Project Import Wizard. The wizard will use SBT configuration
(build.sbt file) to generate Idea's project configuration files.
You can open File / Project Structure... dialog to see project configuration.
If everything is successful you can compile the project in IDE.

FAQ

Frequently Asked Questions

Acknowledgements

YourKit supports open source projects with its full-featured Java Profiler.
YourKit, LLC is the creator of YourKit Java Profiler
and YourKit .NET Profiler,
innovative and intelligent tools for profiling Java and .NET applications.

主要指標

概覽
名稱與所有者ergoplatform/ergo
主編程語言Scala
編程語言Scala (語言數: 9)
平台
許可證Creative Commons Zero v1.0 Universal
所有者活动
創建於2017-06-13 13:23:11
推送於2025-06-19 21:07:18
最后一次提交2025-06-20 00:07:10
發布數183
最新版本名稱v6.0.0-RC7 (發布於 )
第一版名稱v0.1.0 (發布於 )
用户参与
星數504
關注者數42
派生數177
提交數10.6k
已啟用問題?
問題數903
打開的問題數165
拉請求數1076
打開的拉請求數31
關閉的拉請求數211
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?