azeroz / artemis

Java Implementation of the Ethereum 2.0 Beacon Chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

artemis

Build Status License Gitter chat

Implementation of the Ethereum 2.0 Beacon Chain.

Based on the (evolving) specification.

Build Instructions

To build, clone this repo and run with gradle like so:

$ git clone --recursive https://github.com/PegaSysEng/artemis.git
$ cd artemis
$ ./gradlew

After a successful build, distribution packages will be available in build/distributions.

Run Demo

After building, follow these instructions:

$ cd scripts
$ sh run.sh [NUMBER OF NODES]

Note: You will need tmux installed for this demo to work

Code Style

We use Google's Java coding conventions for the project. To reformat code, run:

$ ./gradlew spotlessApply

Code style will be checked automatically during a build.

Testing

All the unit tests are run as part of the build, but can be explicitly triggered with:

$ ./gradlew test

Run Options

To view the run menu:

$ ./gradlew run --args='-h'

Usage: Artemis [-hV] [-c=<FILENAME>] [-l=<LOG VERBOSITY LEVEL>]
-c, --config=<FILENAME>   Path/filename of the config file
-h, --help                Show this help message and exit.
-l, --logging=<LOG VERBOSITY LEVEL>
                          Logging verbosity levels: OFF, FATAL, WARN, INFO, DEBUG,
                            TRACE, ALL (default: INFO).
-V, --version             Print version information and exit.

You can run the executable from the CLI with this command:

$ ./gradlew run

Refer to config/config.toml for a set of default configuration settings.

To run and send formatted output to a json file:

[output]
outputFile = "artemis.json"
providerType = "JSON"

Then run:

$ ./gradlew run

To run and send formatted output to a csv file:

[output]
outputFile = "artemis.csv"
providerType = "CSV"

Then run:

$ ./gradlew run

To run with loggin level set to DEBUG

$ ./gradlew run --args='-l=DEBUG'

To profile and/or generate flow diagrams for Artemis:

Setup:

$ source artemis.env 

Run:

Terminal 1:

$ flow

Terminal 2:

$ ./gradlew run -PgenerateFlow

About

Java Implementation of the Ethereum 2.0 Beacon Chain

License:Apache License 2.0


Languages

Language:Java 98.9%Language:Shell 1.0%Language:Dockerfile 0.2%