Skip to content
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

feat(DHT): NET-1436: Cut off connections to all application versions before v102.0.0 #3053

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

juslesan
Copy link
Contributor

Summary

Cut off connections to all application versions before v102.0.0

Changes

  • Renamed handshake error UNSUPPORTED_PROTOCOL_VERSION -> UNSUPPORTED_VERSION. Version incompatibilities are handled similarly between protocol and application versions.

@juslesan juslesan requested review from harbu and teogeb March 18, 2025 10:55
Copy link

linear bot commented Mar 18, 2025

@github-actions github-actions bot added the dht Related to DHT package label Mar 18, 2025
Copy link
Contributor

@teogeb teogeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have two separate enums: UNSUPPORTED_PROTOCOL_VERSION (i.e. the current) and new UNSUPPORTED_APPLICATION_VERSION? It would give us more detailed information why a handshake fails.

@juslesan
Copy link
Contributor Author

juslesan commented Mar 18, 2025

Could we have two separate enums: UNSUPPORTED_PROTOCOL_VERSION (i.e. the current) and new UNSUPPORTED_APPLICATION_VERSION? It would give us more detailed information why a handshake fails.

We could but older versions would not support the new failing UNSUPPORTED_APPLICATION_VERSION error. The behavior on how to handle unsupported version is the same for both cases so there is no requirement to add the new field to break backwards compatibility @teogeb

@teogeb
Copy link
Contributor

teogeb commented Mar 18, 2025

Could we have two separate enums: UNSUPPORTED_PROTOCOL_VERSION (i.e. the current) and new UNSUPPORTED_APPLICATION_VERSION? It would give us more detailed information why a handshake fails.

We could but older versions would not support the new failing UNSUPPORTED_APPLICATION_VERSION error. The behavior on how to handle unsupported version is the same for both cases so there is no requirement to add the new field to break backwards compatibility @teogeb

What would happen in practice if a new client would send an error code 3 (the new UNSUPPORTED_APPLICATION_VERSION) which old nodes don't know about?

@juslesan
Copy link
Contributor Author

Could we have two separate enums: UNSUPPORTED_PROTOCOL_VERSION (i.e. the current) and new UNSUPPORTED_APPLICATION_VERSION? It would give us more detailed information why a handshake fails.

We could but older versions would not support the new failing UNSUPPORTED_APPLICATION_VERSION error. The behavior on how to handle unsupported version is the same for both cases so there is no requirement to add the new field to break backwards compatibility @teogeb

What would happen in practice if a new client would send an error code 3 (the new UNSUPPORTED_APPLICATION_VERSION) which old nodes don't know about?

Don't know for sure but I would expect that the connection will eventually be cleaned up after a timeout. But there could be some undefined behavior that leads to problems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dht Related to DHT package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants