You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/Block-Synchronization-Extension.md
+10-40Lines changed: 10 additions & 40 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,32 +53,17 @@ Request corresponding bodies for each hash.
53
53
* Restriction:
54
54
* MUST include at least one item
55
55
56
-
57
-
### GetStateHead
58
-
59
-
```
60
-
GetStateHead(block_hash)
61
-
```
62
-
63
-
Request corresponding state head for block of `block_hash`.
64
-
65
-
* Identifier: 0x06
66
-
* Restriction: Block number of requested block MUST be multiple of 214.
67
-
68
-
69
56
### GetStateChunk
70
57
71
58
```
72
-
GetStateChunk(block_hash, tree_root)
59
+
GetStateChunk(block_hash, [...chunk_roots])
73
60
```
74
61
75
-
Request entire subtree starting from `tree_root`.
62
+
Request corresponding snapshot chunk for each `chunk_root`.
76
63
77
-
* Identifier: 0x08
64
+
* Identifier: 0x0a
78
65
* Restriction:
79
-
* Block number of requested block MUST be multiple of 214.
80
-
*`tree_root` MUST be included in requested block’s state trie.
81
-
* Depth of `tree_root` inside state trie MUST be equal to 2. (Depth of state root is 0)
66
+
* All values in `[...chunk_roots]` MUST be included in requested block’s state trie.
82
67
83
68
84
69
## Response messages
@@ -113,30 +98,15 @@ Response to `GetBodies` message. Snappy algorithm is used to compress content.
113
98
* If received body is zero-length array, it means either body value is [], or sender doesn’t have body for requested hash
114
99
115
100
116
-
### StateHead
117
-
118
-
```
119
-
StateHead(compressed((key_0, value_0), …) | [])
120
-
```
121
-
122
-
Response to `GetStateHead` message. Key and value included in this messages are raw value stored in state trie. Snappy algorithm is used for compression of content.
123
-
124
-
* Identifier: 0x07
125
-
* Restriction:
126
-
* State root of requested block MUST be included
127
-
* For all nodes with depth of less than 2 included in this message, all of its child MUST also be included.
128
-
* Content MUST be empty array if sender didn’t have requested data
0 commit comments