-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Identify message too big #954
Comments
PR at #955. |
This was discussed today. I think a reasonable solution that doesn't require a protocol upgrade would be to only send the signed peer record if the key is not too big in the current protocol version. This will protect lotus/drand who depend on signed peer records for Peer Exchange through gossipsub. Note that I am not arguing against protocol upgrade; that's probably desirable for other reasons. But the existing protocol can be mostly fixed and still provide signed peer records, except for large RSA keys. |
TL;DR: Identify 1.0: Send signed record if small enough. Peers would use identify 1 unless they absolutely need the signed record. In that case, they'd use identify 1.1. Alternatively, we could just keep the identify 1.0/1.1 split and add a libp2p option for lotus nodes to try 1.1 before 1.0. This would fix your concern @vyzo, right? |
Yes, it would fix the concern. |
Brainstorming other options as I read this thread:
How would identify know if the application layer needs signed records or not? We need a test suite that tests identify with all possible key types/lengths, with and without peer records. |
This has been fixed by sending multiple messages and merging them. |
When users use 4096 bit RSA keys (like we do on one of our bootstrappers), the identify message exceeds 2048 bytes (by about 20 bytes) when the signed envelop is added into the mix. That is:
We're missing a few bytes in this math but this paints the picture.
We should fix this in all of the following ways:
Additionally, we should not use version 2 until we need it as negotiating version 2, then falling back on version 1 adds a round-trip to new connections. We could also revisit #903 but that's really hacky.
The text was updated successfully, but these errors were encountered: