You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given the complexity of bitswap, we should add some invariant testing. I'm thinking something like:
Log all events (using zap):
want(type/cancel) sent for X, to peer Y, as part of session Z/broadcast
want(type/cancel) received for X, from peer Y.
sent X to peer Y, responding to want of TYPE.
receive block/want-have/dont-want for X from peer Y in sessions Z(s).
peer added/removed to/from session
latency determined
timeouts
Process the events after the fact to make sure we:
Don't send wants for things we have.
Send cancels.
Send want/haves once.
Don't timeout waiting for something we shouldn't have waited on.
E.g., peer sent us something and we still process a timeout for it.
Etc...
The goal is not to modify the existing tests, just to make sure we aren't violating any invariants when running them. Fortunately for the network, and unfortunately for testing, bitswap is pretty robust against errors so many tests are likely to continue succeeding even when we've technically broken something.
The text was updated successfully, but these errors were encountered:
Given the complexity of bitswap, we should add some invariant testing. I'm thinking something like:
The goal is not to modify the existing tests, just to make sure we aren't violating any invariants when running them. Fortunately for the network, and unfortunately for testing, bitswap is pretty robust against errors so many tests are likely to continue succeeding even when we've technically broken something.
The text was updated successfully, but these errors were encountered: