Quickstart of the Simulator
July 3, 2025 ยท View on GitHub
Table of Contents
Configuration
Refer to the Configuration for configuration options.
Running locally
- Simulator subproject qualifier:
:simulator - Assuming your working directory is the repo root
NOTE: one may use the
-pflag for./gradlewin order to avoid specifying the target subproject repeatedly on each task when running multiple tasks. When running only a single task, however, it is recommended to use the project qualifier (i.e.:simulator:) for both simplicity and clarity.
Build the Simulator
NOTE: if you have not done so already, it is generally recommended to build the entire repo first:
./gradlew clean build -x test
-
To quickly build the Simulator sources (without running tests), do the following:
./gradlew -p simulator clean build -x test
Run the Server first
Usually, you would want to run the Server first, refer to the Quickstart of the Server for a quick guide on how to get started with the application.
Run the Simulator
-
To start the Simulator, do the following:
./gradlew :simulator:run
Run the Simulator with Debug
-
To start the Simulator with debug enabled, do the following:
./gradlew :simulator:run --debug-jvm -
Attach your remote jvm debugger to port 5005.
Viewing Metrics
The simulator can run in two modes (Publisher and Consumer) and provides metrics for both configurations. To view the metrics:
-
Start the Block Node server and simulator first:
./gradlew startDockerContainer -
Access the metrics:
- Open Grafana at http://localhost:4000
- Navigate to Dashboards
- You'll find two dashboards:
- Block Stream Simulator Publisher: Shows metrics for the publisher instance
- Block Stream Simulator Consumer: Shows metrics for the consumer instance