Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.



Introduce the harness.

Table of Contents

Page Properties

AuthorDominik Zajkowski

What is the harness?

It's a tool that allows running test scenarios against an rchain network.

So, what is the harness?

A grpc client extracted from the rchain project and bridged to gatling (

Where can it be found? in the folder templater

It should become part of rchain soon.

How can I use it?

Prerequisite: an rchain network running (e.g. one standalone node).

Three approaches to running the harness:

  1. run it as a test
  2. run it as a standalone application
  3. bypass gatling and run it directly

Ad. 1)

Code Block

This simulation is configured in templater/runner/test/reources/appliaction.conf

Code Block
rnodes=["localhost:40401", ""]

sbt runner/gatling:test

Ad. 2)


This is a typical Main style app. behaves similar to the above simulation but can be run instead of tested.

The params are as follows:

Code Block
set -axe

java -Dhosts="$1" -Dpath=$2 -Dsessions=$3 -Dratio=$4 -Dloops=$5 -jar ./runner.jar 

Ad. 3)


Code Block
object Propose {
  def propose(session: Session)(
      client: ClientWithDetails): (Session, DeployServiceResponse) = {
    (session.remove("client"), client.client.createBlock(Empty()))

object Deploy {
  def deploy(session: Session)(
      client: ClientWithDetails): (Session, DeployServiceResponse) = {
    val (_, contract): (String, String) = session("contract")
      .as[(String, String)]
    val d = DeployData()
    (session.set("client", client), client.client.doDeploy(d))

You can use these in any way.

But I don't have a network!

There is There  a myriad ways of setting up a network:


Dupe Contract

We encountered an issue with the contract:

Code Block
contract @"dupe"(@depth) = {
  if (depth <= 0) { Nil } else { @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) | @"dupe"!(depth-1) }
} |

The scenario was as follows:

10 deploys, 1 propose, 10 threads running "at once", 100 loops. A network of 5 rnodes.

The problem observed was Kamon Http client crashing. I think that this is a GC issue but I did not get the heap dumps to prove itthrowing exceptions. This was most likely due to node running out of memory and becoming unstable.

A good starting point would be to reproduce, make sure it's the heap running out and getting heap dumps.