Skip to content
This repository has been archived by the owner on Jun 29, 2019. It is now read-only.

LoopringSecondary/lightcone_legacy

Repository files navigation

Build Status

Lightcone Relayer 1.0

This relayer is implemented to support Loopring Protocol 2.x. A new version is being worked on for Loopring Protocol 3.0.

Compile

  • Compile all, run sbt test:compile

  • Remove all unused imports, run sbt fix

  • Compile subproject, run sbt $projectName/test:compile

Make sure to use test:compile instead of compile so all tests compile.

  • Before committing to git, use sbt check.
  • Check scala styles for optimization and refactoring, use sbt scapegoat.

Dockerize

You must have Docker and Docker-Compose installed.

  • To create a docker image file for the runnable program (in subproject relayer), run sbt docker. A docker image with name "org.loopring/lightcone_relayer:latest" will be generated.
  • To publish the docker image, use sbt dockerPush.
  • To run in docker, run docker run --add-host mysql-host:xx.xx.xx.xx --add-host ethereum-host:xx.xx.xx.xx -P -v /xxx/log:/log --shm-size 358716160 -d org.loopring/lightcone_relayer:latest
  • To run in docker-compose, run docker-compose up --scale worker=3

Test

  • You need to install docker to run all tests
  • To run tests under specific subproject, run sbt $projectName/test
  • To run only modified and failed tests, run sbt testQuick
  • To generate test coverage report, run sbt coverageReport