Skip to content
Trust-based Multi-dimensional Blockchains
Branch: develop
Clone or download
Latest commit a8367d8 May 22, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Fix symbolic lik of executable node jar Mar 4, 2019
config/checkstyle Fix CheckStyle Apr 29, 2019
contracts Merge branch 'develop' into feature/tx_pre_execution May 17, 2019
docker Fix ES client May 17, 2019
docs Rename hash to id Dec 14, 2018
gradle/wrapper Upgrade Versions May 20, 2019
resources/contract Remove Unensessary May 21, 2019
yggdrash-common Use spring active profile constants May 21, 2019
yggdrash-contract-core Add block index to tx May 21, 2019
yggdrash-core/src Merge pull request #189 from yggdrash/feature/run_validator May 22, 2019
yggdrash-gateway/src Edit raw tx to es May 21, 2019
yggdrash-node/src Ignore WebEnv on validator profile May 22, 2019
yggdrash-validator/src Ignore block json in the consensusMessage May 22, 2019
.dockerignore Add a Dockerfile for docker hub automated build Jul 30, 2018
.gitignore Merge branch 'develop' into feature/contact_module Feb 26, 2019
.travis.yml Fix build Fail Mar 26, 2019
Dockerfile Add libatomic1 lib for build Mar 15, 2019
Jenkinsfile Update prod spring profile Aug 24, 2018
LICENSE add LICENSE Apr 5, 2018
README-kr.md Update docker and compose cmd Feb 26, 2019
README.md Update docker and compose cmd Feb 26, 2019
build.gradle Upgrade Versions May 20, 2019
gradle.properties Fix for working with validator Mar 26, 2019
gradlew Fixed error typo. Jul 16, 2018
gradlew.bat gradle init Apr 5, 2018
settings.gradle Move StemContract to other package May 8, 2019

README.md

logo Yggdrash

We will change the world by blockchain.

Build Status Coverage Status codecov Join the chat at https://gitter.im/yggdrash/yggdrash

What is yggdrash?

YGGDRASH is a trust-based multi-dimensional blockchains (branches) built with a vision to “Digitize everything into reality” and to connect everything and any blockchain networks.

Table of contents

Documentation

Learn more by reading the yggdrash technical document and full documentation, visit wiki

Development

This is the implementation written in Java and runs on Linux, OSX and Windows.

Requirements

Yggdrash requires JAVA 1.8+ compiler to build. To install Java, follow this link.

JDK Version sourceCompatibility Build Run
12.ea.31-open 12
11.0.2-zulu 11
11.0.2-open 11
10.0.2-open 10
9.0.4-open 9
8.0.202-zulu 1.8 (recommended)
8.0.201-oracle 1.8

Getting the source

Clone the yggdrash repo:

git clone https://github.com/yggdrash/yggdrash.git
cd yggdrash

If you are unfamiliar with Git, Download ZIP (source code)

Running locally

To run the cloned repository in the spring default profile, simply run:

./gradlew

To run the multiple nodes in IntelliJ IDE, edit the run configuration:

config

Running on Docker

You can fully dockerize the yggdrash node. For more information refer to docker.

Docker is one quick way for running an yggdrash node:

docker run --rm -e SPRING_PROFILES_ACTIVE=local,master,gateway -p 8080:8080 -v $HOME/.yggdrash:/.yggdrash yggdrash/yggdrash-node

Yggdrash node binds to localhost using 8080 for the RESTful API & JSON RPC, and 32918 for the gRPC by default.

You can also use other ports by providing options like -p 8081:8080

The Dockerfile is designed to build automatically the last release of the source code and will publish docker images to dockerhub by release, feel free to fork and build Dockerfile for your own purpose.

Building for production

To optimize the yggdrash application for production, run:

./gradlew -PspringProfiles=prod clean build

To ensure everything worked, run:

yggdrash-node/build/libs/*.jar

To find out usages of all command line options:

  • --spring.profiles.active=value Environment property to specify which profiles are active
    • env: local(default), dev(for test), prod(docker default), debug(for debug logging)
    • role: bootstrap(node discovery bootstrap node), master(block proposer for test), gateway(restful api)
  • --server.address=value JSON RPC & RESTful API services listening address (default: localhost)
  • --server.port=value JSON RPC & RESTful API services listening port (default: 8080)
  • --yggdrash.node.grpc.host=value gRPC service listening address (default: localhost)
  • --yggdrash.node.grpc.port=value gRPC service listening port (default: 32918)
  • --yggdrash.node.max-peers=value maximum number of P2P network peers (default: 25)

Running Tests

To launch yggdrash's tests, run:

./gradlew test

This command would run the integration tests without gradle task caching:

./gradlew test -PspringProfiles=ci --rerun-tasks

APIs

Once yggdrash node started, the blocks can be shown in your browser. e.g. http://localhost:8080/blocks

Using Docker to simplify development (optional)

You can use docker to improve yggdrash development experience. A number of docker-compose configuration are available in the docker folder to launch with third party services.

For example, to start the multiple nodes in a docker container, run:

docker-compose -f docker/docker-compose.yml up -d

To stop it and remove the container, run:

docker-compose -f docker/docker-compose.yml down

Continuous Integration & Continuous Delivery (optional)

Yggdrash should support the following CI systems out of the box:

  • Jenkins: Setting up Jenkins
docker-compose -f docker/jenkins.yml up -d

To configure CI for Yggdrash project in Jenkins, use the following configuration:

* Project name: `Yggdrash`
* Source Code Management
    * Git Repository: `git@github.com:yggdrash/yggdrash.git`
    * Branches to build: `*/master`
    * Additional Behaviours: `Wipe out repository & force clone`
* Build Triggers
    * Poll SCM / Schedule: `H/5 * * * *`
* Build
    * Invoke Gradle script / Use Gradle Wrapper / Tasks: `-PspringProfiles=prod clean build`
    * Execute Shell / Command:
        ````
        ./gradlew bootRun &
        bootPid=$!
        sleep 30s
        kill $bootPid
        ````
* Post-build Actions
    * Publish JUnit test result report / Test Report XMLs: `build/test-results/*.xml`

What tasks/integrations in the Jenkins pipeline file :

  • Perform the build in a Docker container
  • Analyze code with Sonar
  • Build and publish a Docker image

Stay in Touch

Follow @yggdrash, @YggdrashNews and releases are announced via our Yggdrash Official on SNS also. Its team members on Yggdrash Website

License

The Yggdrash is released under version 2.0 of the Apache License.

You can’t perform that action at this time.