-
Notifications
You must be signed in to change notification settings - Fork 27
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
[Chainweb Stream Client] Validate wire protocol client-server compatibility #267
Merged
Takadenoshi
merged 26 commits into
master
from
chainweb-stream-client-initial-config-validate
Jun 12, 2023
Merged
[Chainweb Stream Client] Validate wire protocol client-server compatibility #267
Takadenoshi
merged 26 commits into
master
from
chainweb-stream-client-initial-config-validate
Jun 12, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Takadenoshi
commented
May 9, 2023
alber70g
approved these changes
May 17, 2023
Randynamic
approved these changes
May 30, 2023
…tions (but this introduces duplicates)
ee6ffaa
to
54ce94e
Compare
…ubkda:kadena-community/kadena.js into chainweb-stream-client-initial-config-validate
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
…ent-initial-config-validate
…ent-initial-config-validate
…ent-initial-config-validate
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added support for the new initial event that sends server config values.
The server-side and protocol changes are described in the server PR description and the new README section of that PR
The proposed client implementation is to refuse to proceed for most of the incompatibility conditions by firing an
error
event, logging an error to the console and disconnecting. The conditions that error out fatally:(the final two should never happen in production)
The exception is the heartbeat timeout config parameter. If the client heartbeat timeout is set to be smaller than the server, the client will automatically adapt its heartbeat timeout to
SERVER_HEARTBEAT_TIMEOUT + 2500ms
. The reasoning behind this is that changing this configuration value to match the server setting does not violate the developer expectations in any significant way, and it is preferable to (potentially) throwing a fatal error in production.Still a draft as it is pending the version compatibility check, but the changes that are there already are good to review.
--
Regarding the wire protocol version [
(event:initial).config.v
, currently set to0.0.2
] what should the behavior be when the client and server have a different version?I propose versioning the wire protocol by semver 2.0 (e.g. this version change that modifies the
initial
event in a way that breaks backwards compatibility would be a major version bump, but 0.x.y is exempt as unstable)If there is a major version incompatibility, it should error our fatally as above.
Minor version incompatibility should just warn that some features may not be supported.
Patch version incompatibility should just warn (or do nothing.)Patch versions are unlikely to be used as a backwards-compatible bugfix on the protocol level does not make much sense