Commit 412fcde
fix: create ordered trie when computing roots for transactions, receipts & withdrawals (#225)
**Motivation**
These roots are currently being calculated using `from_sorted_iter` but
without being sorted beforehand. This PR replaces this behavior with
inserting directly into the trie to ensure that it is ordered, then
computing the root (The same fix that has been previously applied to
storage root)
**Description**
Fixes `compute_transactions_root`, `compute_receipts_root` &
`compute_withdrawals_root`
<!-- A clear and concise general description of the changes this PR
introduces -->
**Notes**
After this change, the payloads created by kurtosis local net now pass
the block hash validations in `engine_NewPayloadV3`
<!-- Link to issues: Resolves #111, Resolves #222 -->
Closes None, but is needed for #51
Co-authored-by: Federica Moletta <federicamoletta@MacBook-Pro-de-Federica.local>1 parent a13ca7d commit 412fcde
1 file changed
+21
-51
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
228 | 216 | | |
229 | 217 | | |
230 | 218 | | |
231 | 219 | | |
232 | 220 | | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
250 | 229 | | |
251 | 230 | | |
252 | 231 | | |
253 | 232 | | |
254 | 233 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
269 | 239 | | |
270 | 240 | | |
271 | 241 | | |
| |||
0 commit comments