Commit 0d6d79f
core: add code to witness when state object is accessed (#30698)
I think the core code should generally be agnostic about the witness and
the statedb layer should determine what elements need to be included in
the witness. Because code is accessed via `GetCode`, and
`GetCodeLength`, the statedb will always know when it needs to add that
code into the witness.
The edge case is block hashes, so we continue to add them manually in
the implementation of `BLOCKHASH`.
It probably makes sense to refactor statedb so we have a wrapped
implementation that accumulates the witness, but this is a simpler
change that makes #30078 less aggressive.1 parent b1defd4 commit 0d6d79f
3 files changed
+6
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
344 | 347 | | |
345 | 348 | | |
346 | 349 | | |
| |||
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | 216 | | |
220 | 217 | | |
221 | 218 | | |
| |||
283 | 280 | | |
284 | 281 | | |
285 | 282 | | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | 283 | | |
290 | 284 | | |
291 | 285 | | |
| |||
333 | 327 | | |
334 | 328 | | |
335 | 329 | | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | 330 | | |
340 | 331 | | |
341 | 332 | | |
| |||
391 | 382 | | |
392 | 383 | | |
393 | 384 | | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | 385 | | |
398 | 386 | | |
399 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 343 | | |
348 | 344 | | |
349 | 345 | | |
| |||
383 | 379 | | |
384 | 380 | | |
385 | 381 | | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | 382 | | |
390 | 383 | | |
391 | 384 | | |
| |||
0 commit comments