You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
7. You can also run several simulations at once using the `parallel` command-line tool.
31
14
32
-
### Combining the results
15
+
### Haskell simulator
33
16
34
-
8. Execute the `combine-results.sh` script to bundle the results from multiple runs into the `results/` folder.
35
-
-*Nix:* run `./combine-results.sh`.
36
-
-*Without nix:* run `bash combine-results.sh` after installing the required dependencies.
37
-
38
-
### Plot the results in Jupyter
17
+
Instructions for building the Haskell simulator `ols` are availabe in [/simulation/](../../simulator/README.md).
39
18
40
-
9. Start a Jupter notebook server using the command `nix run #../sims/`.
41
-
10. In the web browser, navigate to the relevant experiment folder and open any `.ipynb` files of interest.
19
+
20
+
### Rust simulator
21
+
22
+
Instructions for building the Rust simulator `sim-cli` are available in [/sim-rs/](../../sim-rs/README.md).
23
+
24
+
25
+
### Building the trace processor
26
+
27
+
Instructions for building the trace process `leios-trace-processor` are available in [/analysis/sims/trace-processor/](../../analysis/sims/trace-processor/ReadMe.md).
28
+
29
+
30
+
## Running the simulators
31
+
32
+
Both the Haskell and the Rust simulators read compatible input files (the [configuration file](#configuration-file) and the [network topology file](#network-topology-file), but their command-line flags differ.
33
+
34
+
The simulators output events in JSONL or CBOR format. The output schemas of the two simulators differ somewhat but they coincide for the most useful events.
35
+
36
+
Note that the Rust simulator is multi-threaded and runs much faster than the single-threaded Haskell simulator.
The trace processor summarizes key information from the JSONL output logs into convenient CSV tables. Alternatively, tools like `jq` or `mongodb` can be used to query a simulation output file.
@@ -108,3 +227,48 @@ These instructions are valid for the folders `2025w25/` and onwards.
108
227
| Generated [s]| s | output | When the block was generated. |
109
228
| Transactions | - | output | Number of transactions directly referenced by the block. |
110
229
| Endorses | - | output | The unique identifier for the item that the block endorses. |
230
+
231
+
232
+
## Index of simulation studies
233
+
234
+
The [Simulation Experiments section of the second technical report](../../docs/technical-report-2.md#simulation-experiments) lists each simulation experiment, provides a link to its folder of artifacts, and summarizes its findings.
235
+
236
+
237
+
## Re-reunning simulation studies
238
+
239
+
These instructions are valid for the folders `2025w25/` and onwards. Earlier folders are not as automated.
240
+
241
+
### Running the simulation
242
+
243
+
1. Navigate to the folder for the study, for example `2025w31c/`.
244
+
2. Make sure to have the following tools installed: `yaml2json`, `jq` and `pigz`
245
+
-*Nix:* use the default dev shell of the `sims/` flake `nix develop ..`
246
+
3. Copy or link the Rust simulator `sim-cli` executable to that folder.
247
+
- If you want to reproduce the study, check out the git commit listed in the `sim-cli.hash` file.
248
+
- Build with `cargo build --release` in the [sim-rs](../../sim-rs/) folder.
249
+
- Link with `ln -s ../../../sim-rs/target/release/sim-cli` from the study folder.
250
+
4. Copy of link the Haskell `leios-trace-processor` executable to that folder.
251
+
-*Cabal:* compile using `cabal build all`.
252
+
-*Nix:* compile using `nix build ../..#leios-trace-processor && ln -s result/bin/leios-trace-processor`.
253
+
5. You can execute individual scenarios by executing the `run.sh` script in the relevant folder.
254
+
-*Nix:* run `./run.sh`, which will automatically fetch the package dependencies.
255
+
-*Without Nix:* run `bash run.sh`, but make sure you have the dependent tools already installled, which are listed in the first lines of `run.sh`.
256
+
6. The results folder will contain results:
257
+
-`sim.log.gz`: the simulation log file, but with a few of the minor message types discarded.
0 commit comments