test_worst_depth_stateroot_recomp()¶
Documentation for tests/benchmark/stateful/bloatnet/depth_benchmarks/test_deep_branch.py::test_worst_depth_stateroot_recomp@892e6d1e.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/benchmark/stateful/bloatnet/depth_benchmarks/test_deep_branch.py::test_worst_depth_stateroot_recomp --gas-benchmark-values 1
BloatNet worst-case SSTORE attack benchmark with pre-deployed contracts.
This test: 1. Derives CREATE2 addresses from initcode_hash + Nick's deployer 2. Deploys AttackOrchestrator that calls attack() on each target 3. Fills blocks with 16M gas transactions attacking contracts 4. Verifies the deepest-slot update through post-state assertions
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
benchmark_test
|
BenchmarkTestFiller
|
The benchmark test filler |
required |
fork
|
Fork
|
The fork to test on |
required |
pre
|
Alloc
|
Pre-state allocation |
required |
gas_benchmark_value
|
int
|
Gas budget for benchmark |
required |
storage_depth
|
int
|
Depth of storage slots in the contract (e.g., 9) |
required |
account_depth
|
int
|
Depth of account address prefix sharing (e.g., 5) |
required |
attack_value
|
int
|
The value to be written to storage in each attack |
required |
Source code in tests/benchmark/stateful/bloatnet/depth_benchmarks/test_deep_branch.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 | |
Parametrized Test Cases¶
This test generates 13 parametrized test cases across 3 forks.