Skip to content

Commit

Permalink
improve formatting for simulation.md
Browse files Browse the repository at this point in the history
  • Loading branch information
kingpinXD committed Oct 25, 2024
1 parent cf60f5a commit 5c682e9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/development/SIMULATION_TESTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Zetachain simulation testing
## Overview
The blockchain simulation tests how the blockchain application would behave under real life circumstances by generating
and sending randomized messages.The goal of this is to detect and debug failures that could halt a live chain,by
providing logs and statistics about the operations run by the simulator as well as exporting the latest application
and sending randomized messages.The goal of this is to detect and debug failures that could halt a live chain by
providing logs and statistics about the operations run by the simulator as well as exporting the latest application
state.

## Simulation tests

### Nondeterminism test
Nondeterminism test runs a full application simulation , and produces multiple blocks as per the config
It checks the determinism of the application by comparing the apphash at the end of each run to other runs
The test certifies that , for the same set of operations ( irrespective of what the operations are ), we
The test certifies that, for the same set of operations (regardless of what the operations are), we
would reach the same final state if the initial state is the same
```bash
make test-sim-nondeterminism
```

### Full application simulation test
Full application runs a full app simulation test with the provided configuration.
At the end of the run it tries to export the genesis state to make sure the export works.
At the end of the run, it tries to export the genesis state to make sure the export works.
```bash
make test-sim-full-app
```
Expand All @@ -27,7 +27,7 @@ make test-sim-full-app
The import export simulation test runs a full application simulation
and exports the application state at the end of the run.
This state is then imported into a new simulation.
At the end of the run we compare the keys for the application state for both the simulations
At the end of the run, we compare the keys for the application state for both the simulations
to make sure they are the same.
```bash
make test-sim-import-export
Expand All @@ -41,28 +41,28 @@ make test-sim-after-import

### Multi seed long test
Multi seed long test runs a full application simulation with multiple seeds and multiple blocks.
This runs the test for a longer duration compared to the multi seed short test
This runs the test for a longer duration compared to the multi seed short test.
```bash
make test-sim-multi-seed-long
```

### Multi seed short test
Multi seed short test runs a full application simulation with multiple seeds and multiple blocks.
This runs the test for a shorter duration compared to the multi seed long test
This runs the test for a shorter duration compared to the multi seed long test.
```bash
make test-sim-multi-seed-short
```

### Import Export long test
This test runs the import export simulation test for a longer duration.
It uses the runsim tool to run the same test in parallel threads
It uses the `runsim` tool to run the same test in parallel threads.
```bash
make test-sim-import-export-long
```

### Import and run simulation test long
This test runs the import and run simulation test for a longer duration.
It uses the runsim tool to run the same test in parallel threads
It uses the `runsim` tool to run the same test in parallel threads.
```bash
make test-sim-after-import-long
```
Expand Down

0 comments on commit 5c682e9

Please sign in to comment.