mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-21 07:31:03 +00:00
Remove the unused light client requests (#12470)
* Remove the unused light client requests * Add comment about new ids
This commit is contained in:
@@ -151,12 +151,8 @@ where
|
|||||||
self.on_remote_call_request(&peer, r)?,
|
self.on_remote_call_request(&peer, r)?,
|
||||||
Some(schema::v1::light::request::Request::RemoteReadRequest(r)) =>
|
Some(schema::v1::light::request::Request::RemoteReadRequest(r)) =>
|
||||||
self.on_remote_read_request(&peer, 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)) =>
|
Some(schema::v1::light::request::Request::RemoteReadChildRequest(r)) =>
|
||||||
self.on_remote_read_child_request(&peer, r)?,
|
self.on_remote_read_child_request(&peer, r)?,
|
||||||
Some(schema::v1::light::request::Request::RemoteChangesRequest(_r)) =>
|
|
||||||
return Err(HandleRequestError::BadRequest("Not supported.")),
|
|
||||||
None =>
|
None =>
|
||||||
return Err(HandleRequestError::BadRequest("Remote request without request data.")),
|
return Err(HandleRequestError::BadRequest("Remote request without request data.")),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -17,9 +17,8 @@ message Request {
|
|||||||
oneof request {
|
oneof request {
|
||||||
RemoteCallRequest remote_call_request = 1;
|
RemoteCallRequest remote_call_request = 1;
|
||||||
RemoteReadRequest remote_read_request = 2;
|
RemoteReadRequest remote_read_request = 2;
|
||||||
RemoteHeaderRequest remote_header_request = 3;
|
|
||||||
RemoteReadChildRequest remote_read_child_request = 4;
|
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 {
|
oneof response {
|
||||||
RemoteCallResponse remote_call_response = 1;
|
RemoteCallResponse remote_call_response = 1;
|
||||||
RemoteReadResponse remote_read_response = 2;
|
RemoteReadResponse remote_read_response = 2;
|
||||||
RemoteHeaderResponse remote_header_response = 3;
|
// Note: ids 3 and 4 were used in the past. It would be preferable to not re-use them.
|
||||||
RemoteChangesResponse remote_changes_response = 4;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,48 +71,3 @@ message RemoteReadChildRequest {
|
|||||||
// Storage keys.
|
// Storage keys.
|
||||||
repeated bytes keys = 6;
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user