-
Notifications
You must be signed in to change notification settings - Fork 277
Description
I imagine we've all seen it: the tests pass, but a stray traceback for an unhandled InvalidSignature appears in the console.
As of #1741, this error is sometimes raised (if it occurs from a seednode) - in fact, it can cause the test suite to hang entirely.
Essentially, the problem is this (I initially thought it was limited to tests, now I think it's possible that this will occur in production):
Sometimes, a Learner begins to discover just as fixtures are being torn down and re-built for a subsequent test. The old Ursula (whom the Learner thought it was discovering) is gone, and a new one is now operating at the port in question. When the Learner connects, it is able to successfully get_nodes_via_rest, but the signature on the node payload is from the new Ursula, and thus does not match the stamp of the previous one. Thus, InvalidSignature.
Obviously this is a symptom of a deeper problem. Any Character which stops needs to actively cancel its activities (not just abort subsequent iterations).