Ethereum Test Types package¶
Common definitions and types.
EOA
¶
Bases: Address
An Externally Owned Account (EOA) is an account controlled by a private key.
The EOA is defined by its address and (optionally) by its corresponding private key.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | |
__new__(address=None, *, key=None, nonce=0)
¶
Init the EOA.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |
get_nonce()
¶
Return current nonce of the EOA and increments it by one.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
102 103 104 105 106 | |
copy()
¶
Return copy of the EOA.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
108 109 110 | |
Alloc
¶
Bases: Alloc
Allocation of accounts in the state, pre and post test execution.
Doubles as a PreState provider for the spec's state transition: once
any PreState method is called the instance transitions from
CONSTRUCTION to LIVE (a code-hash → bytes cache is built once) and
further free mutations via __setitem__/__delitem__ are rejected.
The only mutation entry point in LIVE is apply_diff, which patches
self.root and updates the cache in lockstep. freeze locks the
allocation for read-only assertion use.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 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 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 | |
UnexpectedAccountError
dataclass
¶
Bases: Exception
Unexpected account found in the allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
161 162 163 164 165 166 167 168 169 170 171 172 173 | |
__str__()
¶
Print exception string.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
168 169 170 171 172 173 | |
MissingAccountError
dataclass
¶
Bases: Exception
Expected account not found in the allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
175 176 177 178 179 180 181 182 183 | |
__str__()
¶
Print exception string.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
181 182 183 | |
CollisionError
dataclass
¶
Bases: Exception
Different accounts at the same address.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
to_json()
¶
Dump to json object.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
193 194 195 196 197 198 199 200 201 202 203 | |
from_json(obj)
classmethod
¶
Parse from a json dict.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
205 206 207 208 209 210 211 212 213 214 215 216 | |
__str__()
¶
Print exception string.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
218 219 220 221 222 223 | |
KeyCollisionMode
¶
Bases: Enum
Mode for handling key collisions when merging allocations.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
225 226 227 228 229 230 | |
merge(alloc_1, alloc_2, key_collision_mode=KeyCollisionMode.OVERWRITE, state_commitment=None)
classmethod
¶
Return merged allocation of two sources.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | |
__iter__()
¶
Return iterator over the allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
278 279 280 | |
items()
¶
Return iterator over the allocation items.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
282 283 284 | |
__getitem__(address)
¶
Return account associated with an address.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
286 287 288 289 290 291 292 | |
__setitem__(address, account)
¶
Set account associated with an address.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
294 295 296 297 298 299 300 301 302 303 | |
__delitem__(address)
¶
Delete account associated with an address.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
305 306 307 308 309 310 311 312 | |
__eq__(other)
¶
Return True if both allocations are equal.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
314 315 316 317 318 | |
__contains__(address)
¶
Check if an account is in the allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
320 321 322 323 324 325 326 | |
get(address)
¶
Get an account if it's present in the allocation, otherwise None.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
328 329 330 331 332 333 | |
empty_accounts()
¶
Return list of addresses of empty accounts.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
335 336 337 338 339 | |
state_root()
¶
Return state root of the allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
341 342 343 | |
verify_post_alloc(got_alloc)
¶
Verify that the allocation matches the expected post in the test. Raises exception on unexpected values.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
get_alloc_grouping_hash()
¶
Return the grouping hash if the allocation belongs to a particular
group, otherwise None.
Method can be overloaded by other implementations of the Alloc to return the appropriate group.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
370 371 372 373 374 375 376 377 378 | |
calculate_diff(base_alloc)
¶
Calculate the state difference between self and a base.
Returns an Alloc containing only the accounts that: - Changed between base and self (balance, nonce, storage, code) - Were created during test execution (new accounts) - Were deleted during test execution (represented as None)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
base_alloc
|
Alloc
|
Genesis pre-allocation state |
required |
Returns:
| Type | Description |
|---|---|
Alloc
|
Alloc containing only the state differences for efficient storage |
Source code in packages/testing/src/execution_testing/test_types/account_types.py
380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 | |
get_account_optional(address)
¶
Return the spec-side Account at address, or None.
Conforms to ethereum.state.PreState.get_account_optional.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 | |
get_storage(address, key)
¶
Return the storage value at key for address, or U256(0).
Conforms to ethereum.state.PreState.get_storage.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
get_code(code_hash)
¶
Return the bytecode for code_hash.
Conforms to ethereum.state.PreState.get_code.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
543 544 545 546 547 548 549 550 551 552 | |
compute_state_root(block_diff)
¶
Compute the state root after applying block_diff to the
pre-state.
Conforms to ethereum.state.PreState.compute_state_root.
Builds the trie inline; Alloc does not cache Trie
instances.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
554 555 556 557 558 559 560 561 562 563 564 565 | |
apply_diff(diff)
¶
Apply a BlockDiff to mutate the allocation in place.
The only mutation entry point in the LIVE phase. Writes bypass
__setitem__ intentionally — _code_store is updated additively
in lockstep with self.root.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 | |
freeze()
¶
Lock the allocation: no further mutations allowed.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
657 658 659 | |
state_commitment()
¶
Return the commitment scheme this allocation is committed under, or
None if it has not been seeded from a fork yet.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
661 662 663 664 665 666 | |
migrate_state_commitment(commitment)
¶
Switch the commitment scheme used to compute the state root.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
668 669 670 671 672 673 674 675 676 677 678 | |
deterministic_deploy_contract(*, deploy_code, salt=0, initcode=None, storage=None, label=None)
¶
Deploy a contract to the allocation at a deterministic location using a deterministic deployment proxy.
The initcode is not executed during test filling; it is executed only
when the tests run on live networks. Therefore, if the initcode
performs modifications to the storage, these must be specified using
the storage parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
deploy_code
|
BytesConvertible
|
Contract code to deploy. |
required |
salt
|
Hash | int
|
Salt to use for deterministic deployment. |
0
|
initcode
|
BytesConvertible | None
|
Initcode to use for deterministic deployment.
If |
None
|
storage
|
Storage | StorageRootType | None
|
The expected storage state of the deployed contract after initcode execution. |
None
|
label
|
str | None
|
Label to use for the contract. |
None
|
Source code in packages/testing/src/execution_testing/test_types/account_types.py
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 | |
deploy_contract(code, *, storage=None, balance=0, nonce=1, address=None, label=None, stub=None)
¶
Deploy a contract to the allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | |
stub_eoa(label)
¶
Return the EOA for a key-bearing stub.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
729 730 731 732 733 | |
fund_eoa(amount=None, label=None, storage=None, code=None, delegation=None, nonce=None)
¶
Add a previously unused EOA to the pre-alloc with the balance specified
by amount.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | |
fund_address(address, amount, *, minimum_balance=False)
¶
Fund an address with a given amount.
Add a funded account to the pre-allocation.
The address must not already exist in the pre-allocation. To set the
balance of an account, use the amount parameter in fund_eoa() or
the balance parameter in deploy_contract() at creation time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
address
|
Address
|
Address to fund |
required |
amount
|
NumberConvertible
|
Amount to fund in Wei |
required |
minimum_balance
|
bool
|
If set to True, account will be checked to have a
minimum balance of |
False
|
Source code in packages/testing/src/execution_testing/test_types/account_types.py
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 | |
nonexistent_account()
¶
Return the address of a previously unused nonexistent account.
The address is guaranteed to not be a precompile or a system contract. No account is created — it remains nonexistent in the pre-state.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
779 780 781 782 783 784 785 786 787 788 | |
expect_account_state(addresses, *, is_existing_account=True, is_contract=False, min_balance=None, code_prefix=None)
¶
Register start-block expectation(s) for predeployed account(s).
Accepts a single address or a range; labels ride on the addresses themselves. Used only by fill-stateful; ignored by other allocations.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 | |
verify_deployed_accounts(block_number)
¶
Verify predeployed-account expectations at block_number.
No-op unless fill-stateful allocation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
807 808 809 810 811 812 | |
AllocGroupHash
¶
Bases: FixedSizeBytes[8]
Class that helps represent hashes used to group allocs.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
from_preimage(x)
classmethod
¶
Perform a hash (sha256) then truncate the output to get the alloc hash.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
116 117 118 119 120 121 122 123 124 | |
__xor__(other)
¶
Alloc hashes are usually combination of multiple inputs via XOR operation.
Source code in packages/testing/src/execution_testing/test_types/account_types.py
126 127 128 129 130 131 132 133 134 135 | |
Blob
¶
Bases: CamelModel
Class representing a full blob.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 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 | |
trusted_setup()
classmethod
¶
Set trusted setup if it is not already set.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
67 68 69 70 71 72 73 74 75 76 77 | |
get_filename(fork, seed)
staticmethod
¶
Return filename this blob would have as string (with .json extension).
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | |
get_filepath(fork, seed)
staticmethod
¶
Return the Path to the blob that would be created with these parameters.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
95 96 97 98 99 100 101 | |
from_fork(fork, seed=0, timestamp=0)
staticmethod
¶
Construct Blob instances. Fork logic is encapsulated within nested functions.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 | |
from_file(file_name)
staticmethod
¶
Read a .json file and reconstruct object it represents.
You can load a blob only via its filename (with or without .json extension).
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
write_to_file()
¶
Take a blob object, serialize it and write it to disk as json.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | |
verify_cell_kzg_proof_batch(cell_indices)
¶
Check whether all cell proofs are valid and returns True only if that is the case.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 | |
delete_cells_then_recover_them(deletion_indices)
¶
Simulate the cell recovery process in user-specified scenario.
Note: Requirement for successful reconstruction is having at least N of the 2N cells.
Theoretical Usage: You pass a cell list with to 128 elements to this function along with a list of deletion indices. These cells will be deleted and then the ckzg recovery mechanism is used to repair the missing cells. If no assertion is triggered the reconstruction was successful.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | |
ProofCorruptionMode
¶
Bases: Enum
Define what the proof corruption modes do.
For Osaka and later each Bytes object in the list is manipulated this way.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
440 441 442 443 444 445 446 447 448 449 450 451 | |
corrupt_proof(mode)
¶
Corrupt the proof field, supports different corruption modes.
Source code in packages/testing/src/execution_testing/test_types/blob_types.py
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 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 | |
BalAccountAbsentValues
¶
Bases: CamelModel
Represents explicit absent value expectations for a specific account in a block.
This class specifies specific changes that should NOT exist in the BAL for a given account.
IMPORTANT: This class is for checking that specific values are absent, NOT for checking that entire categories are empty. For complete absence checks (e.g., "no nonce changes at all"), use BalAccountExpectation with empty lists instead.
The validation works by checking that none of the specified explicit changes exist in the actual BAL.
Example
Forbid specific nonce change at tx 1 with post_nonce=5, and specific¶
storage change¶
absent_values = BalAccountAbsentValues( nonce_changes=[ # Forbid exact nonce change at this tx BalNonceChange(block_access_index=1, post_nonce=5), ], storage_changes=[ BalStorageSlot( slot=0x42, slot_changes=[ # Forbid exact storage change at this slot and tx BalStorageChange(block_access_index=2, post_value=0x99) ], ) ], )
For checking complete absence
Use BalAccountExpectation with empty lists instead¶
expectation = BalAccountExpectation( nonce_changes=[], # Expect NO nonce changes at all storage_changes=[], # Expect NO storage changes at all )
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_absent_values.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
validate_specific_absences_only()
¶
Ensure absence fields contain specific values, not empty checks.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_absent_values.py
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
validate_against(account)
¶
Validate that the account does not contain the forbidden changes specified in this object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
account
|
BalAccountChange
|
The BalAccountChange to validate against |
required |
Raises:
| Type | Description |
|---|---|
BlockAccessListValidationError
|
If any forbidden changes are found |
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_absent_values.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | |
BalAccountChange
¶
Bases: CamelModel, RLPSerializable
Represents all changes to a specific account in a block.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_changes.py
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | |
BalAccountExpectation
¶
Bases: CamelModel
Represents expected changes to a specific account in a block.
Same as BalAccountChange but without the address field, used for expectations.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
empty()
classmethod
¶
Create an expectation that validates the account has NO changes.
This is distinct from BalAccountExpectation() with no fields set,
which is ambiguous and clashes with model_fields_set logic, and
will raise a clarifying error if used in expectations.
Returns:
| Type | Description |
|---|---|
BalAccountExpectation
|
A BalAccountExpectation instance with all change lists empty. |
BalAccountExpectation
|
This uses a classvar to facilitate identity checks across |
BalAccountExpectation
|
multiple expectation instances. |
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 | |
BalBalanceChange
¶
Bases: CamelModel, RLPSerializable
Represents a balance change in the block access list.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_changes.py
35 36 37 38 39 40 41 42 43 44 45 46 | |
BalCodeChange
¶
Bases: CamelModel, RLPSerializable
Represents a code change in the block access list.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_changes.py
49 50 51 52 53 54 55 56 57 58 | |
BalNonceChange
¶
Bases: CamelModel, RLPSerializable
Represents a nonce change in the block access list.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_changes.py
21 22 23 24 25 26 27 28 29 30 31 32 | |
BalStorageChange
¶
Bases: CamelModel, RLPSerializable
Represents a change to a specific storage slot.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_changes.py
61 62 63 64 65 66 67 68 69 70 71 72 | |
BalStorageSlot
¶
Bases: CamelModel, RLPSerializable
Represents all changes to a specific storage slot.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/account_changes.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
BlockAccessList
¶
Bases: EthereumTestRootModel[List[BalAccountChange]]
Block Access List for t8n tool communication and fixtures.
This model represents the BAL exactly as defined in EIP-7928 - it is itself a list of account changes (root model), not a container.
Used for: - Communication with t8n tools - Fixture generation - RLP encoding for hash verification
Example
bal = BlockAccessList([ BalAccountChange(address=alice, nonce_changes=[...]), BalAccountChange(address=bob, balance_changes=[...]) ])
Source code in packages/testing/src/execution_testing/test_types/block_access_list/t8n.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
from_rlp(data)
classmethod
¶
Decode an RLP-encoded block access list into a BlockAccessList.
The RLP structure per EIP-7928 is: [ [address, storage_changes, storage_reads, balance_changes, nonce_changes, code_changes], ... ]
Source code in packages/testing/src/execution_testing/test_types/block_access_list/t8n.py
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
to_list()
¶
Return the list for RLP encoding per EIP-7928.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/t8n.py
159 160 161 | |
with_rlp_override(rlp)
¶
Return a BAL with the same contents whose serialization is rlp,
mirroring RLPSerializable.rlp_override.
A fresh instance is built rather than a copy so that no cached canonical encoding is carried over.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/t8n.py
163 164 165 166 167 168 169 170 171 172 173 174 | |
has_rlp_override
property
¶
Return whether rlp is an override rather than the encoding.
rlp
cached
property
¶
Return the RLP encoded block access list for hash verification.
rlp_hash
cached
property
¶
Return the hash of the RLP encoded block access list.
validate_structure()
¶
Validate BAL structure follows EIP-7928 requirements.
Checks: - Addresses are in lexicographic (ascending) order - Transaction indices are sorted and unique within each change list - Storage slots are in ascending order - Storage reads are in ascending order
Raises:
| Type | Description |
|---|---|
BlockAccessListValidationError
|
If validation fails |
Source code in packages/testing/src/execution_testing/test_types/block_access_list/t8n.py
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | |
BlockAccessListExpectation
¶
Bases: CamelModel
Block Access List expectation model for test writing.
This model is used to define expected BAL values in tests. It supports: - Partial validation (only checks explicitly set fields) - Convenient test syntax with named parameters - Verification against actual BAL from t8n - Explicit exclusion of addresses (using None values)
Example
In test definition¶
expected_block_access_list = BlockAccessListExpectation( account_expectations={ alice: BalAccountExpectation( nonce_changes=[ BalNonceChange(block_access_index=1, post_nonce=1) ] ), bob: None, # Bob should NOT be in the BAL } )
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 | |
modify(*modifiers)
¶
Create a new expectation with a modifier for invalid test cases.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modifiers
|
Callable[[BlockAccessList], BlockAccessList]
|
One or more functions that take and return a BlockAccessList |
()
|
Returns:
| Type | Description |
|---|---|
BlockAccessListExpectation
|
A new BlockAccessListExpectation instance with |
BlockAccessListExpectation
|
the modifiers applied |
Example
from execution_testing.test_types.block_access_list. modifiers import remove_nonces
expectation = BlockAccessListExpectation( account_expectations={...} ).modify(remove_nonces(alice))
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
modify_if_invalid_test(t8n_bal)
¶
Apply the modifier to the given BAL if this is an invalid test case.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t8n_bal
|
BlockAccessList
|
The BlockAccessList from t8n tool |
required |
Returns:
| Type | Description |
|---|---|
BlockAccessList
|
The potentially transformed BlockAccessList for the fixture |
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 | |
modify_rlp(modifier)
¶
Create a new expectation that re-encodes the BAL carried by the engine payload, leaving the header commitment canonical.
Use this for encoding-level invalid cases; modify changes the
BAL's contents and so also moves the header hash.
Only the engine payload can carry the re-encoding, so the test must
be marked blockchain_test_engine_only.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
modified_rlp(bal)
¶
Return the re-encoded payload BAL, or None if unmodified.
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
220 221 222 223 224 225 226 227 228 229 230 231 | |
has_modifier
property
¶
Return whether this expectation rewrites the BAL.
has_rlp_modifier
property
¶
Return whether this expectation re-encodes the payload BAL.
verify_against(actual_bal)
¶
Verify that the actual BAL from the client matches this expected BAL.
Validation steps: 1. Verify address expectations - presence or explicit absence 2. Verify expected changes within accounts match actual changes
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
actual_bal
|
BlockAccessList
|
The BlockAccessList model from the client |
required |
Raises:
| Type | Description |
|---|---|
BlockAccessListValidationError
|
If verification fails |
Source code in packages/testing/src/execution_testing/test_types/block_access_list/expectations.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 | |
Environment
¶
Bases: EnvironmentGeneric[ZeroPaddedHexNumber]
Structure used to keep track of the context in which a block must be executed.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 | |
strip_computed_fields(data)
classmethod
¶
Strip computed fields that are not valid input fields.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
146 147 148 149 150 151 152 153 | |
parent_hash
cached
property
¶
Obtains the latest hash according to the highest block number in
block_hashes.
set_fork_requirements(fork)
¶
Fill required fields in an environment depending on the fork.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
for_fork(fork, **kwargs)
classmethod
¶
Build an environment from only the fields the fork's header has.
Use it when one pinned context spans forks whose headers differ:
the pins the fork lacks are dropped instead of raising in
check_fork_fields.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
check_fork_fields(fork)
¶
Raise if a set field is one the fork's block header lacks.
Serializing such a field into a fixture would misstate the block context, so the test has to state its intent instead.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 | |
canonical_json()
¶
Return the canonical JSON encoding of this model.
Keys are alias-cased and sorted, and unset fields are excluded, so two equal models encode identically and the encoding is stable across processes: usable as a grouping key or a hash pre-image.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
280 281 282 283 284 285 286 287 288 289 290 291 | |
__eq__(other)
¶
Check if two environment objects are equal.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
293 294 295 296 297 298 299 300 301 302 303 304 | |
EnvironmentDefaults
dataclass
¶
Default environment values.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
53 54 55 56 57 58 59 60 | |
Withdrawal
¶
Bases: WithdrawalGeneric[HexNumber], SSZModel
Withdrawal type; also the consensus-layer SSZ container.
Source code in packages/testing/src/execution_testing/test_types/block_types.py
98 99 100 101 102 103 | |
ChainConfig
¶
Bases: CamelModel
Chain configuration.
Source code in packages/testing/src/execution_testing/test_types/chain_config_types.py
21 22 23 24 25 26 27 | |
ChainConfigDefaults
¶
Default values for the chain configuration.
Can be modified by modules that import this module and want to override the default values.
Source code in packages/testing/src/execution_testing/test_types/chain_config_types.py
10 11 12 13 14 15 16 17 18 | |
TestParameterGroup
¶
Bases: BaseModel
Base class for grouping test parameters in a dataclass. Provides a generic repr method to generate clean test ids, including only non-default optional fields.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
__repr__()
¶
Generate repr string, intended to be used as a test id, based on the class name and the values of the non-default optional fields.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
add_kzg_version(b_hashes, kzg_version)
¶
Add KZG version to each blob hash.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 | |
ceiling_division(a, b)
¶
Calculate ceil without using floating point. Used by many of the EVM's formulas.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
51 52 53 54 55 56 | |
compute_create2_address(address, salt, initcode)
¶
Compute address of the resulting contract created using the CREATE2
opcode.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 | |
compute_create_address(*, address, nonce=None, salt=0, initcode=b'', opcode=Op.CREATE)
¶
Compute address of the resulting contract created using a transaction or
the CREATE opcode.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 | |
compute_deterministic_create2_address(*, salt, initcode, fork)
¶
Compute address of the resulting contract created using the CREATE2
opcode using the DETERMINISTIC_FACTORY_ADDRESS.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
contract_address_from_hash(account_hash, salt)
¶
Calculate an address from a given (account) hash plus a salt.
Useful to not duplicate accounts in the pre-allocation when grouping many tests.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
150 151 152 153 154 155 156 157 158 159 | |
eoa_from_hash(account_hash, salt)
¶
Calculate an EOA from a given (account) hash plus a salt.
Useful to not duplicate accounts in the pre-allocation when grouping many tests.
Source code in packages/testing/src/execution_testing/test_types/helpers.py
162 163 164 165 166 167 168 169 | |
TestPhase
¶
Bases: str, Enum
Test phase for state and blockchain tests.
Source code in packages/testing/src/execution_testing/test_types/phase_manager.py
8 9 10 11 12 13 14 15 16 17 | |
TestPhaseManager
¶
Manages test phases for transactions and blocks.
This singleton class provides context managers for SETUP and EXECUTION phases. Transactions automatically detect and tag themselves with the current phase.
Usage
with TestPhaseManager.setup(): # Transactions created here have test_phase = SETUP setup_tx = Transaction(...)
with TestPhaseManager.execution(): # Transactions created here have test_phase = EXECUTION benchmark_tx = Transaction(...)
Source code in packages/testing/src/execution_testing/test_types/phase_manager.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 | |
setup()
classmethod
¶
Context manager for the setup phase of a benchmark test.
Source code in packages/testing/src/execution_testing/test_types/phase_manager.py
40 41 42 43 44 45 46 47 48 49 | |
execution()
classmethod
¶
Context manager for the execution phase of a test.
Source code in packages/testing/src/execution_testing/test_types/phase_manager.py
51 52 53 54 55 56 57 58 59 60 | |
get_current_phase()
classmethod
¶
Get the current test phase.
Source code in packages/testing/src/execution_testing/test_types/phase_manager.py
62 63 64 65 | |
reset()
classmethod
¶
Reset the phase state to None (primarily for testing).
Source code in packages/testing/src/execution_testing/test_types/phase_manager.py
67 68 69 70 | |
TransactionLog
¶
Bases: CamelModel
Transaction log.
Source code in packages/testing/src/execution_testing/test_types/receipt_types.py
17 18 19 20 21 22 23 24 25 26 27 28 29 | |
TransactionReceipt
¶
Bases: CamelModel
Transaction receipt.
Source code in packages/testing/src/execution_testing/test_types/receipt_types.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | |
strip_extra_fields(data)
classmethod
¶
Strip extra fields from t8n tool / RPC output not part of model.
Source code in packages/testing/src/execution_testing/test_types/receipt_types.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
SystemContractInteractionBase
dataclass
¶
Base class for all types of request transactions we want to test.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | |
sender_account = None
class-attribute
instance-attribute
¶
Account that sends the transaction.
requests
instance-attribute
¶
Requests to be included in the block.
gas_limits = None
class-attribute
instance-attribute
¶
Optional per-request gas overrides, aligned with requests. Only set by
the out-of-gas test functions; left None for normal tests so the
automatic transaction gas-limit (and full inner-call gas) applies.
request_source_address
property
¶
Address recorded as the source of the requests.
transactions()
¶
Return the transactions that trigger the requests.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
87 88 89 | |
update_pre(pre)
¶
Allocate accounts/contracts in pre and return a new instance with
the allocated state populated. Does not mutate self, so the
parametrize value remains pristine across fixture format runs.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
91 92 93 94 95 96 97 | |
SystemContractInteractionContract
dataclass
¶
Bases: SystemContractInteractionBase
Describe requests originated from a relay contract.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
tx_value = 0
class-attribute
instance-attribute
¶
Value to send with the transaction.
contract_balance = None
class-attribute
instance-attribute
¶
Balance of the relay contract that sends the requests. None (the
default) funds the contract with the sum of the request values, which is
always enough to forward each request's value.
contract_address = None
class-attribute
instance-attribute
¶
Address of the relay contract that sends the requests.
entry_address = None
class-attribute
instance-attribute
¶
Address to send the transaction to.
call_type = field(default_factory=(lambda: Op.CALL))
class-attribute
instance-attribute
¶
Type of call to be made to the system contract.
call_depth = 2
class-attribute
instance-attribute
¶
Frame depth of the system contract when it processes the requests.
extra_code = field(default_factory=Bytecode)
class-attribute
instance-attribute
¶
Extra code to be included in the relay contract.
request_source_address
property
¶
The relay contract is the source of the requests.
contract_code
property
¶
Code used by the relay contract.
transactions()
¶
Return the single transaction that drives the relay contract.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
178 179 180 181 182 183 184 185 186 187 188 | |
update_pre(pre)
¶
Return a copy of self with the allocated sender/contract/entry addresses populated.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
SystemContractInteractionMeasuredOutOfGasContract
dataclass
¶
Bases: SystemContractInteractionContract
Relay-contract interaction that self-measures each request's gas cost and
forces the requests marked invalid (valid=False) out of gas by forwarding
one gas less than required, independent of the fork's gas schedule.
Reuses SystemContractInteractionContract for the driving transaction and
pre-state allocation.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 | |
contract_code
property
¶
Build a relay contract that measures, at runtime, the gas each system contract request needs, then forces the requests marked invalid out of gas by forwarding one gas less than required.
Like relay_contract_code, the contract reads the concatenated request
calldata from its own calldata. It then issues, in order:
- A warm-up call for the first valid request, warming the predeploy account and its storage slots so the measurement reflects the warm cost.
- A measured call for the second valid request, capturing
GASaround the call to record its total cost (CALL base cost + value transfer - the gas value stipend + the callee's own consumption).
- Full-gas calls for any remaining valid requests.
- An overhead probe: a call identical to (2) that forwards only minimal gas so the callee runs out, isolating everything except the callee's own consumption. Subtracting it from (2) yields the gas that must be forwarded for the callee to succeed.
- A call for each invalid request forwarding
(total - overhead) - 1gas, one short of the requirement, so it runs out of gas and is not enqueued.
Because steps (2) and (4) use byte-identical op sequences (including a
same-width gas PUSH), every base-opcode cost cancels in the
subtraction, making the forced out-of-gas independent of the fork's
gas schedule.
All requests must share the same calldata length and a non-zero call value so the measured overhead applies uniformly to each call.
SystemContractInteractionTransaction
dataclass
¶
Bases: SystemContractInteractionBase
Describe requests originated from an externally owned account, one transaction per request.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | |
request_source_address
property
¶
The sender account is the source of the requests.
transactions()
¶
Return one transaction per request.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
update_pre(pre)
¶
Return a copy of self with sender_account populated.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
133 134 135 | |
fee_increment_blocks(request_class, n)
¶
Return N blocks such that each subsequent block has an increasing fee for
the requests of request_class.
Each block contains the number of requests required to reach the next fee
increment (plus the per-block target), built from sequential indices via
from_index and wrapped in a relay-contract interaction.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 | |
relay_contract_code(requests, *, call_type, extra_code, gas_limits=None)
¶
Build the code of a relay contract that issues each request by calling its system contract with the request's calldata.
The contract reads the concatenated request calldata from its own calldata,
copies each request payload into memory and issues call_type to the
corresponding system contract.
gas_limits is an optional list, aligned with requests, that overrides
the gas forwarded to each inner call. It is only used by the out-of-gas
test functions; a None entry (or omitting the list) forwards all
available gas via Op.GAS.
Source code in packages/testing/src/execution_testing/test_types/system_contract_interactions.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 | |
AuthorizationTuple
¶
Bases: AuthorizationTupleGeneric[HexNumber]
Authorization tuple for transactions.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
model_post_init(__context)
¶
Automatically signs the authorization tuple if a secret key or sender are provided.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
131 132 133 134 135 136 137 | |
sign()
¶
Signs the authorization tuple with a private key.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | |
NetworkWrappedTransaction
¶
Bases: CamelModel, RLPSerializable
Network wrapped transaction as defined in EIP-4844.
< Osaka: rlp([tx_payload_body, blobs, commitments, proofs])
= Osaka: rlp([tx_payload_body, wrapper_version, blobs, commitments, cell_proofs])
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | |
blobs
property
¶
Return a list of blob data as bytes.
commitments
property
¶
Return a list of kzg commitments.
proofs
property
¶
Return a list of kzg proofs (returns None >= Osaka).
cell_proofs
property
¶
Return a list of cells (returns None < Osaka).
get_rlp_fields()
¶
Return an ordered list of field names to be included in RLP serialization.
Function can be overridden to customize the logic to return the fields.
By default, rlp_fields class variable is used.
The list can be nested list up to one extra level to represent nested fields.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 | |
hash
property
¶
Return the hash of the transaction.
sender
property
¶
Return the sender of the transaction.
to
property
¶
Return the to address of the transaction.
set_gas_price(*, gas_price, max_fee_per_gas, max_priority_fee_per_gas, max_fee_per_blob_gas)
¶
Set gas price to values of the current execution environment.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 | |
set_gas_limit(*, max_gas_limit, transaction_gas_limit_cap, state_gas_reservoir_enabled=False)
¶
Set the transaction gas limit if unset.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 | |
signer_minimum_balance(*, fork)
¶
Return minimum balance of the signer.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1240 1241 1242 | |
get_rlp_prefix()
¶
Return the transaction type as bytes to be appended at the beginning of the serialized transaction if type is not 0.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1244 1245 1246 1247 1248 1249 1250 1251 | |
with_signature_and_sender(*, keep_secret_key=False)
¶
Return a new transaction with the signature and sender added.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 | |
Transaction
¶
Bases: TransactionGeneric[HexNumber], TransactionTransitionToolConverter, SignableRLPSerializable
Generic object that can represent all Ethereum transaction types.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 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 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | |
strip_hash_from_t8n_output(data)
classmethod
¶
Strip the hash field which may be included in t8n tool output.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
309 310 311 312 313 314 315 316 317 318 | |
treat_none_gas_limit_as_unset(data)
classmethod
¶
Treat a None gas limit (any alias) as unset.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
320 321 322 323 324 325 326 327 328 | |
InvalidFeePaymentError
¶
Bases: Exception
Transaction described more than one fee payment type.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 | |
__init__(*conflicting_fields)
¶
Store the conflicting fee fields used in the transaction.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
385 386 387 | |
__str__()
¶
Print exception string.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
389 390 391 392 393 394 395 396 397 | |
InvalidSignaturePrivateKeyError
¶
Bases: Exception
Transaction describes both the signature and private key of source account.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
399 400 401 402 403 404 405 406 407 | |
__str__()
¶
Print exception string.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
405 406 407 | |
model_post_init(__context)
¶
Ensure transaction has no conflicting properties.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 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 | |
with_error(error)
¶
Create a copy of the transaction with an added error.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
514 515 516 517 518 | |
with_nonce(nonce)
¶
Create a copy of the transaction with a modified nonce.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
520 521 522 | |
signature_bytes
cached
property
¶
Returns the serialized bytes of the transaction signature.
sign()
¶
Signs the authorization tuple with a private key.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
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 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 | |
with_gas_limit(*, max_gas_limit, transaction_gas_limit_cap, state_gas_reservoir_enabled=False)
¶
Return copy of the transaction with the set gas limit.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | |
with_signature_and_sender(*, keep_secret_key=False)
¶
Return signed version of the transaction using the private key.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 | |
get_rlp_signing_fields()
¶
Return the list of values included in the envelope used for signing depending on the transaction type.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 | |
get_rlp_fields()
¶
Return the list of values included in the list used for rlp encoding depending on the transaction type.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
870 871 872 873 874 875 876 877 878 | |
get_rlp_prefix()
¶
Return the transaction type as bytes to be appended at the beginning of the serialized transaction if type is not 0.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
880 881 882 883 884 885 886 887 | |
get_rlp_signing_prefix()
¶
Return the transaction type as bytes to be appended at the beginning of the serialized transaction signing envelope if type is not 0.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
889 890 891 892 893 894 895 896 | |
metadata_string()
¶
Return the metadata field as a formatted json string or None.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
898 899 900 901 902 | |
hash
cached
property
¶
Returns hash of the transaction.
serializable_list
cached
property
¶
Return list of values included in the transaction as a serializable object.
list_blob_versioned_hashes(input_txs)
staticmethod
¶
Get list of ordered blob versioned hashes from a list of transactions.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
917 918 919 920 921 922 923 924 925 926 927 928 929 | |
calculate_max_gas_limit(*, txs, env_gas_limit, transaction_gas_limit_cap, state_gas_reservoir_enabled)
staticmethod
¶
Calculate the maximum gas limit that can be set in a transaction given a list of transactions with and without gas-limits set and a maximum available environment gas.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 | |
created_contract
cached
property
¶
Return address of the contract created by the transaction.
set_gas_price(*, gas_price, max_fee_per_gas, max_priority_fee_per_gas, max_fee_per_blob_gas)
¶
Set the gas price to the appropriate values of the current execution environment.
Values are only set if they were not set during instance creation.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 | |
set_gas_limit(*, max_gas_limit, transaction_gas_limit_cap, state_gas_reservoir_enabled=False)
¶
Set the transaction gas limit if unset.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 | |
signer_minimum_balance(*, fork)
¶
Return minimum balance of the signer.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 | |
__repr__()
¶
Return string representation with hex-encoded values for applicable fields.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 | |
__str__()
¶
Return the repr string representation.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
1090 1091 1092 | |
TransactionDefaults
dataclass
¶
Default values for transactions.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
60 61 62 63 64 65 66 | |
TransactionTestMetadata
¶
Bases: CamelModel
Represents the metadata for a transaction.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
to_json()
¶
Convert the transaction metadata into json string for it to be embedded in the request id.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
294 295 296 297 298 299 | |
TransactionType
¶
Bases: IntEnum
Transaction types.
Source code in packages/testing/src/execution_testing/test_types/transaction_types.py
50 51 52 53 54 55 56 57 | |
Removable
¶
Sentinel class to detect if a parameter should be removed.
(None normally means "do not modify").
Source code in packages/testing/src/execution_testing/test_types/utils.py
22 23 24 25 26 27 28 29 30 31 32 | |
__eq__(other)
¶
Return True for all Removable.
Source code in packages/testing/src/execution_testing/test_types/utils.py
28 29 30 31 32 | |
keccak256(data)
¶
Calculate keccak256 hash of the given data.
Source code in packages/testing/src/execution_testing/test_types/utils.py
8 9 10 | |