Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
polkadot-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
parity
Mirrored projects
polkadot-sdk
Commits
d61b0866
Commit
d61b0866
authored
2 years ago
by
Pierre Krieger
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove the unused light client requests (#12470)
* Remove the unused light client requests * Add comment about new ids
parent
5f18aaad
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
substrate/client/network/light/src/light_client_requests/handler.rs
+0
-4
0 additions, 4 deletions
...client/network/light/src/light_client_requests/handler.rs
substrate/client/network/light/src/schema/light.v1.proto
+2
-49
2 additions, 49 deletions
substrate/client/network/light/src/schema/light.v1.proto
with
2 additions
and
53 deletions
substrate/client/network/light/src/light_client_requests/handler.rs
+
0
−
4
View file @
d61b0866
...
...
@@ -151,12 +151,8 @@ where
self
.on_remote_call_request
(
&
peer
,
r
)
?
,
Some
(
schema
::
v1
::
light
::
request
::
Request
::
RemoteReadRequest
(
r
))
=>
self
.on_remote_read_request
(
&
peer
,
r
)
?
,
Some
(
schema
::
v1
::
light
::
request
::
Request
::
RemoteHeaderRequest
(
_r
))
=>
return
Err
(
HandleRequestError
::
BadRequest
(
"Not supported."
)),
Some
(
schema
::
v1
::
light
::
request
::
Request
::
RemoteReadChildRequest
(
r
))
=>
self
.on_remote_read_child_request
(
&
peer
,
r
)
?
,
Some
(
schema
::
v1
::
light
::
request
::
Request
::
RemoteChangesRequest
(
_r
))
=>
return
Err
(
HandleRequestError
::
BadRequest
(
"Not supported."
)),
None
=>
return
Err
(
HandleRequestError
::
BadRequest
(
"Remote request without request data."
)),
};
...
...
This diff is collapsed.
Click to expand it.
substrate/client/network/light/src/schema/light.v1.proto
+
2
−
49
View file @
d61b0866
...
...
@@ -17,9 +17,8 @@ message Request {
oneof
request
{
RemoteCallRequest
remote_call_request
=
1
;
RemoteReadRequest
remote_read_request
=
2
;
RemoteHeaderRequest
remote_header_request
=
3
;
RemoteReadChildRequest
remote_read_child_request
=
4
;
RemoteChangesRequest
remote_changes_request
=
5
;
// Note: ids 3 and 5 were used in the past. It would be preferable to not re-use them.
}
}
...
...
@@ -28,8 +27,7 @@ message Response {
oneof
response
{
RemoteCallResponse
remote_call_response
=
1
;
RemoteReadResponse
remote_read_response
=
2
;
RemoteHeaderResponse
remote_header_response
=
3
;
RemoteChangesResponse
remote_changes_response
=
4
;
// Note: ids 3 and 4 were used in the past. It would be preferable to not re-use them.
}
}
...
...
@@ -73,48 +71,3 @@ message RemoteReadChildRequest {
// Storage keys.
repeated
bytes
keys
=
6
;
}
// Remote header request.
message
RemoteHeaderRequest
{
// Block number to request header for.
bytes
block
=
2
;
}
// Remote header response.
message
RemoteHeaderResponse
{
// Header. None if proof generation has failed (e.g. header is unknown).
bytes
header
=
2
;
// optional
// Header proof.
bytes
proof
=
3
;
}
/// Remote changes request.
message
RemoteChangesRequest
{
// Hash of the first block of the range (including first) where changes are requested.
bytes
first
=
2
;
// Hash of the last block of the range (including last) where changes are requested.
bytes
last
=
3
;
// Hash of the first block for which the requester has the changes trie root. All other
// affected roots must be proved.
bytes
min
=
4
;
// Hash of the last block that we can use when querying changes.
bytes
max
=
5
;
// Storage child node key which changes are requested.
bytes
storage_key
=
6
;
// optional
// Storage key which changes are requested.
bytes
key
=
7
;
}
// Remote changes response.
message
RemoteChangesResponse
{
// Proof has been generated using block with this number as a max block. Should be
// less than or equal to the RemoteChangesRequest::max block number.
bytes
max
=
2
;
// Changes proof.
repeated
bytes
proof
=
3
;
// Changes tries roots missing on the requester' node.
repeated
Pair
roots
=
4
;
// Missing changes tries roots proof.
bytes
roots_proof
=
5
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment