go-libp2p
go-libp2p copied to clipboard
feat: catch panics in identify
We haven't seen any panics in identify, but I'm going through and adding panic handlers to libp2p handlers because the benefits often outweigh the risk:
- Risk: We might continue with corrupted state. In this case, that means continuing with a corrupted peerstore, which likely doesn't have a huge impact on anything. If something is really wrong, we'll crash somewhere else.
- Benefit: if we panic when processing an identify response, we won't crash the entire node.
Part of #1389
2022-09-16 conversation: we need to evaluate if this is the right place to do this or determine if our panic handlers in serialization functions are sufficient.
Closing since we've done a major refactor of Identify.