mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-10 04:07:59 +00:00
Fast sync child trie support. (#9239)
* state machine proofs. * initial implementation * Remove todo. * Extend test and fix import. * fix no proof, with proof ko. * fix start at logic. * Restore response size. * Rework comments. * Add explicit ref * Use compact proof. * ref change * elaborato on empty change set condition. * KeyValueState renaming. * Do not add two time child trie with same root to sync reply. * rust format * Fix merge. * fix warnings and fmt * fmt * update protocol id to V2
This commit is contained in:
@@ -74,22 +74,32 @@ message BlockData {
|
||||
message StateRequest {
|
||||
// Block header hash.
|
||||
bytes block = 1;
|
||||
// Start from this key. Equivalent to <empty bytes> if omitted.
|
||||
bytes start = 2; // optional
|
||||
// Start from this key.
|
||||
// Multiple keys used for nested state start.
|
||||
repeated bytes start = 2; // optional
|
||||
// if 'true' indicates that response should contain raw key-values, rather than proof.
|
||||
bool no_proof = 3;
|
||||
}
|
||||
|
||||
message StateResponse {
|
||||
// A collection of keys-values. Only populated if `no_proof` is `true`
|
||||
repeated StateEntry entries = 1;
|
||||
// A collection of keys-values states. Only populated if `no_proof` is `true`
|
||||
repeated KeyValueStateEntry entries = 1;
|
||||
// If `no_proof` is false in request, this contains proof nodes.
|
||||
bytes proof = 2;
|
||||
}
|
||||
|
||||
// A key value state.
|
||||
message KeyValueStateEntry {
|
||||
// Root of for this level, empty length bytes
|
||||
// if top level.
|
||||
bytes state_root = 1;
|
||||
// A collection of keys-values.
|
||||
repeated StateEntry entries = 2;
|
||||
// Set to true when there are no more keys to return.
|
||||
bool complete = 3;
|
||||
}
|
||||
|
||||
// A key-value pair
|
||||
// A key-value pair.
|
||||
message StateEntry {
|
||||
bytes key = 1;
|
||||
bytes value = 2;
|
||||
|
||||
Reference in New Issue
Block a user