Open carlaKC opened 11 months ago
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.
Can you provide an example of how the file would look for this?
Can you provide an example of how the file would look for this?
The following sim file would:
nodes {
A...
B...
C...
D...
E...
}
activity{
D -> E (100sats / 100 seconds)
}
no_random{
D,
E,
}
Not sure that this is the best way to express it tbh, I specifically want to keep the feature that only specifying nodes
runs random activity (good quick start). Very open to suggestions for other/better ways to express the rest!
I'm trying to think about the implications that this will have in the codebase. Would the no_random
section translate to anything there won't be picked as source, anything there won't be picked as destination, or both?
I guess in the case of the former we can simply filter the node collection to remove whatever is in no_radom
before passing it to the RandomActivityGenerator
, in the case of the latter we can create a exclude
list that will extend the current policy (do not send to yourself) and if you meant both just do both.
All in all, I think it makes sense, it should be less work to define an exclusion list as far as we assume that the default behavior for channels is to be sending payments between them instead of being stale (which it's a reasonable assumption for me at least)
Would the no_random section translate to anything there won't be picked as source, anything there won't be picked as destination, or both?
Both - our current implementation of random activity is that each node sends and receives, so we'd just exclude no_random
completely.
we can simply filter the node collection to remove whatever is in no_radom before passing it to the RandomActivityGenerator
Yeah exactly what I was thinking 👍
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.activity
: run random activity for all of thenodes
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:
Action: run default random activity on A and B.
Defined Activity
sim.json:
Action: run only the defined activity specified between A and B.
Defined and Random Activity
sim.json:
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 specificactivity
flows and then wanting those nodes to be excluded from the random activity.Eg: Running a jamming simulation
D
andE
to run a jamming attack.D
andE
to send random payments.D
andE
inno_random
.