bitcoin-dev-project / bitcoin-dev-project/sim-ln

Feature: Allow random and defined activity simulation

Open
#161 4 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Rust
Stars
80
Forks
40
Avg merge
18h 49m
Merged PRs (30d)
2

Description

Right now, the type of activity that we will simulate is determined by the `sim-file`:
* `activity` specified: run the user-defined set of activities.
* No `activity`: run random activity for all of the `nodes` provided.

We should allow users to specify *both* random and defined activity to support more complicated use cases, while still preserving the "easy start" nature of just being able to specify `nodes` for random activity.

## Suggested Sim File Interpretation

### Random Activity - All Nodes
sim.json:
```
nodes {
A ...
B ...
}
```

**Action**: run default random activity on A and B.

### Defined Activity
sim.json:
```
nodes {
A ...
B ....
}
activity{
A -> B 10 sats
}
```

**Action**: run only the defined activity specified between A and B.

### Defined and Random Activity
sim.json:
```
nodes {
A ...
B ....
C ....
}
activity{
A -> B 10 sats
}
no_random{
B
}
```

**Action**: run defined activity specified between A and B *and* random activity between A and C.

Rationale for `no_random` is that I think the likely use case is specifying a few specific `activity` flows and then wanting those nodes to be excluded from the random activity.

Eg: Running a jamming simulation
- I want `D` and `E` to run a jamming attack.
- I don't want `D` and `E` to send random payments.
- I want all other nodes to be processing random payments, so I just set `D` and `E` in `no_random`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.