Rewrite the light client JSON-RPC server#1685
Merged
tomaka merged 41 commits intosmol-dot:mainfrom Mar 11, 2024
Merged
Conversation
Contributor
Author
|
Note that I've been trying to keep the existing behavior as much as possible. However, I remember instinctively changing some return values w.r.t. the new JSON-RPC API to better match the spec, but maybe not all of them. Unfortunately, I don't remember exactly what I've changed, so I don't know what to put in the CHANGELOG. |
Contributor
Author
|
While it's not unlikely that some bugs are being introduced, I'm reasonably confident in the code of this module, and thus I'm going to merge this once CI passes. |
This file contains hidden or 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
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.
cc #1415
This PR rewrites the light client JSON-RPC server in order to get rid of the
json_rpc::servicesmodule of the library. This module was badly designed and is to be replaced with #1436.Once #1436 is finished and merged, the code in this PR will be split into multiple different JSON-RPC servers (the idea right now being: one for the legacy API, one for the new API, one for transactions) that are merged together through the
ServersMultiplexer.The new code in this PR removes the security properties of the JSON-RPC server. They were never actually documented anywhere, and smoldot doesn't need to have a secure JSON-RPC server at the moment. These security properties will be restored after #1436.
Work time: 45h