README.md

Agate Blockchain

In the master branch there is a code with functions that is under development. The latest release for each network can be found in the Releases section, you can switch to the corresponding tag and build the application.

Logging

By default all logs are written to the STDOUT. If you want to write logs, for example,
to JSON files, you should define your own logging configuration and specify a path to it in conf/application.ini:

-Dlogback.configurationFile=/path/to/your/logback.xml

Debugging

Integration tests run in a forked JVM. To debug test suite code launched by SBT, you will need to add remote debug
options to javaOptions in IntegrationTest configuration:

javaOptions in IntegrationTest+="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"

Debugging a node inside a container is a little more complicated: you will need to modify the Agate_OPTS environment
variable before starting a container.

Running Tests from IDE

You can run integration test suites from your preferred IDE. The only requirement is to have Docker image pre-built and
have docker.imageId system property defined for the run configuration. The easiest way to build an image is to issue
sbt docker command. You'll find the image ID in the SBT output:

In this example, e243fa08d496 is the image ID you need. Make sure to re-build the image whenever the node code (not
the tests) is changed. If you run the tests from SBT, there's no need to manually rebuild the image, SBT will handle
this automatically.

Collecting performance metrics

Note: all required tools will be installed though Docker for simplicity.

By default all metrics are disabled. So specify Kamon settings through Java Properties and run the node
with a desired config. For example, we ran Graphite locally and it accepts StatsD information on the 9999 port:

Acknowledgement

We use YourKit full-featured Java Profiler to make Agate node faster. YourKit, LLC is the creator of innovative and intelligent tools for profiling Java and .NET applications.
Take a look at YourKit's leading software products:
YourKit Java Profiler and
YourKit .NET Profiler.