Commit dead5e9
authored
fix(p2p): remove legacy step field from BlocksByRange request (lambdaclass#365)
## Summary
- Drop the legacy phase-0 `step: u64` field from `BlocksByRangeRequest`.
The leanSpec container has only `(start_slot, count)`; `step` was
deprecated in Altair and explicitly omitted from the lean spec.
- Without this fix, SSZ decode requires 24 bytes while peers (and the
ethereum/hive lean simulator) send the spec-compliant 16-byte encoding,
so every inbound BlocksByRange request fails to decode before reaching
the handler.
- Remove the now-dead `step == 0` validation and simplify
`canonical_blocks_by_range` to walk contiguous slots; update the
existing unit test to the new signature.
## Test plan
- [x] `cargo test -p ethlambda-p2p`
- [x] Verified against hive's `reqresp/blocks_by_range` suite: all 4
tests pass (previously hung at fixture timeout because the SSZ decode
error prevented any response).1 parent c5705af commit dead5e9
2 files changed
Lines changed: 7 additions & 22 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
160 | 159 | | |
161 | 160 | | |
162 | 161 | | |
163 | | - | |
| 162 | + | |
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
| |||
169 | 168 | | |
170 | 169 | | |
171 | 170 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
| 171 | + | |
178 | 172 | | |
179 | 173 | | |
180 | 174 | | |
181 | 175 | | |
182 | 176 | | |
183 | | - | |
184 | 177 | | |
185 | 178 | | |
186 | 179 | | |
| |||
189 | 182 | | |
190 | 183 | | |
191 | 184 | | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
| 185 | + | |
198 | 186 | | |
199 | 187 | | |
200 | 188 | | |
201 | 189 | | |
202 | 190 | | |
203 | 191 | | |
204 | | - | |
205 | 192 | | |
206 | 193 | | |
207 | 194 | | |
| |||
219 | 206 | | |
220 | 207 | | |
221 | 208 | | |
222 | | - | |
| 209 | + | |
223 | 210 | | |
224 | 211 | | |
225 | 212 | | |
226 | 213 | | |
227 | 214 | | |
228 | 215 | | |
229 | | - | |
230 | | - | |
231 | | - | |
| 216 | + | |
| 217 | + | |
232 | 218 | | |
233 | 219 | | |
234 | 220 | | |
| |||
460 | 446 | | |
461 | 447 | | |
462 | 448 | | |
463 | | - | |
| 449 | + | |
464 | 450 | | |
465 | 451 | | |
466 | 452 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | 139 | | |
0 commit comments