Open AndrejMitrovic opened 4 years ago
My focus is elsewhere these days, but if you wanted to add faulty-node simulation, it seems to me that there are two good ways of doing it: an easy way and a fancier way.
The easy way is just to add a new field to the Node
struct that indicates in what way it's supposed to be faulty - dropping or delaying messages some portion of the time, producing erroneous results, etc. - and then consulting that field in Node.handle
in order to tweak the outbound value that gets produced there.
The fancier way is to define an abstract node interface that is satisfied by *Node
but also by a variety of other kinds of node, each of which behaves differently in its own particular way from what the protocol strictly requires.
Hi @bobg ,
Interesting project you have here!
Does your code also simulate byzantine / faulty nodes? The protocol itself probably handles it, but I am wondering about the tests. Would it be hard to add a faulty node test, maybe in the
lunch.go
sample code?