Ethereum CLIs Package¶
Library of Python wrappers for the different implementations of transition tools.
BlockExceptionWithMessage
¶
Bases: ExceptionWithMessage[BlockException]
Block exception with message.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
59 60 61 62 | |
LazyAlloc
dataclass
¶
Bases: Generic[TRaw]
Allocation that is lazily loaded from the transition tool response.
Source code in packages/testing/src/execution_testing/client_clis/cli_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 | |
validate()
¶
Validate the alloc.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
419 420 421 | |
get()
¶
Model validate the allocation and return it.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
423 424 425 426 427 | |
state_root()
¶
Return state root of the allocation.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
429 430 431 | |
Result
¶
Bases: CamelModel
Result of a transition tool output.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
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 | |
TraceFieldDiff
¶
Bases: NamedTuple
A single diff entry from TransactionTraces.compare().
line_index is None for structural diffs (trace_length, output, gas_used). Field dicts map field name to string value.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
134 135 136 137 138 139 140 141 142 143 144 | |
Traces
¶
Bases: EthereumTestRootModel
Traces returned from the transition tool for all transactions executed.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
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 | |
append(item)
¶
Append the transaction traces to the current list.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
293 294 295 | |
are_equivalent(other, ignore_gas_differences)
¶
Return True if the only difference is the gas counter.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 | |
print()
¶
Print the traces in a readable format.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
316 317 318 319 320 | |
TransactionExceptionWithMessage
¶
Bases: ExceptionWithMessage[TransactionException]
Transaction exception with message.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
51 52 53 54 55 56 | |
TransitionToolOutput
dataclass
¶
Transition tool output.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
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 | |
model_validate_files(directory_path, *, context=None)
classmethod
¶
Validate the model from the file system where each key is a different JSON file.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 | |
model_validate(response_json, *, context=None)
classmethod
¶
Validate the model from the file system where each key is a different JSON file.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
model_validate_json(response_json, *, context=None)
classmethod
¶
Validate the model from a JSON string.
Source code in packages/testing/src/execution_testing/client_clis/cli_types.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 | |
BesuFixtureConsumer
¶
Bases: BesuEvmTool, FixtureConsumerTool
Besu's implementation of the fixture consumer.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
consume_blockchain_test(fixture_path, fixture_name=None, debug_output_path=None)
¶
Consume a single blockchain test.
Besu's evmtool block-test accepts --test-name to
select a specific fixture from the file.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
consume_state_test_file(fixture_path, debug_output_path=None)
cached
¶
Consume an entire state test file.
Besu's evmtool state-test outputs one JSON object per
line (NDJSON) with a test field instead of name.
This method normalizes the output to match the expected
format.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
consume_state_test(fixture_path, fixture_name=None, debug_output_path=None)
¶
Consume a single state test.
Uses the cached result from consume_state_test_file
and selects the requested fixture by name.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
consume_fixture(fixture_format, fixture_path, fixture_name=None, debug_output_path=None)
¶
Execute the appropriate Besu fixture consumer for the
fixture at fixture_path.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
BesuTransitionTool
¶
Bases: TransitionTool
Besu EvmTool Transition tool frontend wrapper class.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
__init__(*, binary=None, trace=False)
¶
Initialize the BesuTransitionTool class.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
start_server()
¶
Start the t8n-server process, extract the port, and leave it running for future reuse.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
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 | |
shutdown()
¶
Stop the t8n-server process if it was started.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
190 191 192 193 194 195 | |
is_fork_supported(fork)
¶
Return True if the fork is supported by the tool.
Source code in packages/testing/src/execution_testing/client_clis/clis/besu.py
301 302 303 | |
EthereumJSTransitionTool
¶
Bases: TransitionTool
EthereumJS Transition tool interface wrapper class.
Source code in packages/testing/src/execution_testing/client_clis/clis/ethereumjs.py
18 19 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 | |
__init__(*, binary=None, trace=False)
¶
Initialize the EthereumJS Transition tool interface.
Source code in packages/testing/src/execution_testing/client_clis/clis/ethereumjs.py
30 31 32 33 34 35 36 37 38 39 40 41 | |
is_fork_supported(fork)
¶
Return True if the fork is supported by the tool.
Currently, EthereumJS-t8n provides no way to determine supported forks.
Source code in packages/testing/src/execution_testing/client_clis/clis/ethereumjs.py
43 44 45 46 47 48 49 50 | |
EvmOneBlockchainFixtureConsumer
¶
Bases: EvmoneFixtureConsumerCommon, FixtureConsumerTool
Evmone's implementation of the fixture consumer for blockchain tests.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
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 | |
__init__(binary=None, trace=False)
¶
Initialize the EvmOneBlockchainFixtureConsumer class.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
299 300 301 302 303 304 305 306 | |
consume_fixture(fixture_format, fixture_path, fixture_name=None, debug_output_path=None)
¶
Execute the appropriate fixture consumer for the fixture at
fixture_path.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 | |
EvmoneExceptionMapper
¶
Bases: ExceptionMapper
Translate between EEST exceptions and error strings returned by Evmone.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
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 | |
EvmOneStateFixtureConsumer
¶
Bases: EvmoneFixtureConsumerCommon, FixtureConsumerTool
Evmone's implementation of the fixture consumer for state tests.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
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 | |
__init__(binary=None, trace=False)
¶
Initialize the EvmOneStateFixtureConsumer class.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
259 260 261 262 263 264 265 266 | |
consume_fixture(fixture_format, fixture_path, fixture_name=None, debug_output_path=None)
¶
Execute the appropriate fixture consumer for the fixture at
fixture_path.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 | |
EvmOneTransitionTool
¶
Bases: TransitionTool
Evmone evmone-t8n Transition tool interface wrapper class.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
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 | |
__init__(*, binary=None, trace=False)
¶
Initialize the Evmone Transition tool interface.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
55 56 57 58 59 60 61 62 63 64 65 66 | |
is_fork_supported(fork)
¶
Return True if the fork is supported by the tool. Currently, evmone-t8n provides no way to determine supported forks.
Source code in packages/testing/src/execution_testing/client_clis/clis/evmone.py
68 69 70 71 72 73 74 | |
ExecutionSpecsTransitionTool
¶
Bases: TransitionTool
Implementation of the EELS T8N for execution-spec-tests.
Source code in packages/testing/src/execution_testing/client_clis/clis/execution_specs.py
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 | |
__init__(*, binary=None, trace=False)
¶
Initialize the EELS Transition Tool interface.
Source code in packages/testing/src/execution_testing/client_clis/clis/execution_specs.py
41 42 43 44 45 46 47 48 49 50 51 52 | |
version()
¶
Version of the t8n tool.
Source code in packages/testing/src/execution_testing/client_clis/clis/execution_specs.py
58 59 60 | |
is_fork_supported(fork)
¶
Return True if the fork is supported by the tool.
Source code in packages/testing/src/execution_testing/client_clis/clis/execution_specs.py
62 63 64 | |
is_installed(binary_path=None)
classmethod
¶
ExecutionSpecs is always installed.
Source code in packages/testing/src/execution_testing/client_clis/clis/execution_specs.py
161 162 163 164 165 | |
GethFixtureConsumer
¶
Bases: GethEvm, FixtureConsumerTool
Geth's implementation of the fixture consumer.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
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 | |
consume_blockchain_test(fixture_path, fixture_name=None, debug_output_path=None)
¶
Consume a single blockchain test.
The evm blocktest command takes the --run argument which can be
used to select a specific fixture from the fixture file when executing.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
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 | |
consume_state_test_file(fixture_path, debug_output_path=None)
cached
¶
Consume an entire state test file.
The evm statetest will always execute all the tests contained in a
file without the possibility of selecting a single test, so this
function is cached in order to only call the command once and
consume_state_test can simply select the result that was requested.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
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 | |
consume_state_test(fixture_path, fixture_name=None, debug_output_path=None)
¶
Consume a single state test.
Uses the cached result from consume_state_test_file in order to not
call the command every time and select a single result from there.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
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 | |
consume_fixture(fixture_format, fixture_path, fixture_name=None, debug_output_path=None)
¶
Execute the appropriate geth fixture consumer for the fixture at
fixture_path.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
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 | |
GethTransitionTool
¶
Bases: GethEvm, TransitionTool
go-ethereum evm Transition tool interface wrapper class.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
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 | |
__init__(*, exception_mapper=None, binary=None, trace=False)
¶
Initialize the GethTransitionTool class.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | |
is_fork_supported(fork)
¶
Return True if the fork is supported by the tool.
If the fork is a transition fork, we want to check the fork it transitions to.
Source code in packages/testing/src/execution_testing/client_clis/clis/geth.py
282 283 284 285 286 287 288 289 | |
Nethtest
¶
Bases: EthereumCLI
Nethermind nethtest binary base class.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.py
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 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 | |
__init__(binary, trace=False, exception_mapper=None)
¶
Initialize the Nethtest class.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.py
39 40 41 42 43 44 45 46 47 48 49 | |
help(subcommand=None)
cached
¶
Return the help string, optionally for a subcommand.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.py
96 97 98 99 100 101 102 103 | |
NethtestFixtureConsumer
¶
Bases: Nethtest, FixtureConsumerTool
Nethermind implementation of the fixture consumer.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.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 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 | |
consume_state_test_file(fixture_path, command, debug_output_path=None)
cached
¶
Consume an entire state test file.
The evm statetest will always execute all the tests contained in a
file without the possibility of selecting a single test, so this
function is cached in order to only call the command once and
consume_state_test can simply select the result that was requested.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.py
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 | |
consume_state_test(command, fixture_path, fixture_name=None, debug_output_path=None)
¶
Consume a single state test.
Uses the cached result from consume_state_test_file in order to not
call the command every time and select a single result from there.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.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 224 225 226 227 228 229 230 231 232 233 234 235 236 237 | |
consume_blockchain_test(command, fixture_path, fixture_name=None, debug_output_path=None)
¶
Execute the the fixture at fixture_path via nethtest.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.py
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 | |
consume_fixture(fixture_format, fixture_path, fixture_name=None, debug_output_path=None)
¶
Execute the appropriate geth fixture consumer for the fixture at
fixture_path.
Source code in packages/testing/src/execution_testing/client_clis/clis/nethermind.py
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 | |
NimbusTransitionTool
¶
Bases: TransitionTool
Nimbus evm Transition tool interface wrapper class.
Source code in packages/testing/src/execution_testing/client_clis/clis/nimbus.py
19 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 71 72 | |
__init__(*, binary=None, trace=False)
¶
Initialize the Nimbus Transition tool interface.
Source code in packages/testing/src/execution_testing/client_clis/clis/nimbus.py
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 | |
version()
¶
Get evm binary version.
Source code in packages/testing/src/execution_testing/client_clis/clis/nimbus.py
56 57 58 59 60 61 62 63 | |
is_fork_supported(fork)
¶
Return True if the fork is supported by the tool.
If the fork is a transition fork, we want to check the fork it transitions to.
Source code in packages/testing/src/execution_testing/client_clis/clis/nimbus.py
65 66 67 68 69 70 71 72 | |
CLINotFoundInPathError
¶
Bases: Exception
Exception raised if the specified CLI binary isn't found in the path.
Source code in packages/testing/src/execution_testing/client_clis/ethereum_cli.py
24 25 26 27 28 29 30 31 32 33 34 35 | |
__init__(message='The CLI binary was not found in the path', binary=None)
¶
Initialize the exception.
Source code in packages/testing/src/execution_testing/client_clis/ethereum_cli.py
27 28 29 30 31 32 33 34 35 | |
UnknownCLIError
¶
Bases: Exception
Exception raised if an unknown CLI is encountered.
Source code in packages/testing/src/execution_testing/client_clis/ethereum_cli.py
18 19 20 21 | |
FixtureConsumerTool
¶
Bases: FixtureConsumer, EthereumCLI
Fixture consumer tool abstract base class which should be inherited by all fixture consumer tool implementations.
Source code in packages/testing/src/execution_testing/client_clis/fixture_consumer_tool.py
10 11 12 13 14 15 16 17 18 19 20 21 22 | |
__init_subclass__(*, fixture_formats)
¶
Register all subclasses of FixtureConsumerTool as possible tools.
Source code in packages/testing/src/execution_testing/client_clis/fixture_consumer_tool.py
19 20 21 22 | |
FieldExclusionTraceComparator
¶
Bases: TraceComparator
Compare traces field-by-field, optionally excluding fields.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
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 | |
name
property
¶
Return the comparator's name.
compare_transaction_traces(baseline, current, transaction_index)
¶
Compare trace fields, excluding configured fields.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
199 200 201 202 203 204 205 206 207 208 209 210 211 212 | |
GasExhaustionTraceComparator
¶
Bases: TraceComparator
Detect differences in gas exhaustion between traces.
Equivalent when both sides have no out-of-gas errors or when both run out of gas at the same trace line(s). Different when the out-of-gas points diverge.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
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 | |
name
property
¶
Return the comparator's name.
compare_transaction_traces(baseline, current, transaction_index)
¶
Compare gas exhaustion points between two transaction traces.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
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 | |
TraceComparator
¶
Bases: ABC
Abstract base class for trace comparison strategies.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
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 | |
name
abstractmethod
property
¶
Return the comparator's name.
compare_transaction_traces(baseline, current, transaction_index)
abstractmethod
¶
Compare a single transaction's traces.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
93 94 95 96 97 98 99 100 101 | |
compare_traces(baseline, current)
¶
Compare two Traces objects by iterating transaction pairs.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.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 | |
TraceComparatorType
¶
Bases: StrEnum
Supported trace comparator strategies.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
17 18 19 20 21 22 23 24 25 | |
TraceComparisonResult
¶
Bases: EthereumTestBaseModel
Result of comparing two Traces objects.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
77 78 79 80 81 | |
TraceDifference
¶
Bases: EthereumTestBaseModel
A difference between baseline and current trace at a specific line.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
45 46 47 48 49 50 51 52 53 54 55 56 | |
TransactionCountMismatch
¶
Bases: TraceDifference
Structural mismatch: different number of transactions.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
59 60 61 62 63 64 65 66 67 68 | |
create_comparator(comparator_type)
¶
Create a comparator instance from the given type.
Source code in packages/testing/src/execution_testing/client_clis/trace_comparators.py
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
TransitionTool
¶
Bases: EthereumCLI
Transition tool abstract base class which should be inherited by all transition tool implementations.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.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 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 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 | |
__init__(*, exception_mapper=None, binary=None, trace=False)
abstractmethod
¶
Abstract initialization method that all subclasses must implement.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 | |
__init_subclass__()
¶
Register all subclasses of TransitionTool as possible tools.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
218 219 220 | |
is_fork_supported(fork)
abstractmethod
¶
Return True if the fork is supported by the tool.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
222 223 224 225 | |
start_server()
¶
Start the t8n-server process, extract the port, and leave it running for future reuse.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
227 228 229 230 231 232 | |
shutdown()
¶
Perform any cleanup tasks related to the tested tool.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
234 235 236 | |
reset_traces()
¶
Reset the internal trace storage for a new test to begin.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
238 239 240 | |
append_traces(new_traces)
¶
Append a list of traces of a state transition to the current list.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
242 243 244 245 246 247 248 | |
get_traces()
¶
Return the accumulated traces.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
250 251 252 | |
collect_traces(receipts, temp_dir, debug_output_path)
¶
Collect the traces from the t8n tool output and store them in the traces list.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
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 | |
set_cache(*, key)
¶
Set the current cache key.
Creates the cache on first call, then reuses it for single-key eviction. Returns True if the key was already in the cache (hit).
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
285 286 287 288 289 290 291 292 293 294 295 | |
remove_cache()
¶
Clear the cache (test doesn't use caching).
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
297 298 299 300 | |
reset_opcode_count()
¶
Reset the opcode count to zero.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
302 303 304 305 306 | |
TransitionToolData
dataclass
¶
Transition tool files and data to pass between methods.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
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 | |
fork_name
property
¶
Return the fork name.
fork_name_if_supports_blob_params
property
¶
Return the fork name.
blob_params
property
¶
Return the blob parameters for the current fork.
__post_init__()
¶
Modify the reward if the environment number is 0.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
348 349 350 351 | |
to_input()
¶
Convert the data to a TransactionToolInput object.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
353 354 355 356 357 358 359 360 | |
get_request_data()
¶
Convert the data to a TransitionToolRequest object.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
362 363 364 365 366 367 368 369 370 371 | |
safe_t8n_args(fork_name, chain_id, reward, temp_dir=None)
¶
Safely construct t8n arguments with validated inputs.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
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 | |
construct_args_stream(t8n_data, temp_dir)
¶
Construct arguments for t8n interaction via streams.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
793 794 795 796 797 798 799 800 801 802 803 804 805 806 | |
dump_debug_stream(debug_output_path, temp_dir, stdin, args, result)
¶
Export debug files if requested when interacting with t8n via streams.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
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 | |
get_next_transition_tool_output_path(call_id)
¶
Return path to the next transition tool output file.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
891 892 893 894 895 896 897 898 | |
increment_call_counter()
¶
Increment the call counter by one and return the previous value.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
900 901 902 903 904 | |
process_result(result)
¶
Process the result of the transition tool evaluation performing the following operations: - Add opcode count to the result if available.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
906 907 908 909 910 911 912 913 914 915 916 917 918 919 | |
evaluate(*, transition_tool_data, slow_request=False)
¶
Execute the relevant evaluate method as required by the t8n tool.
If a client's t8n tool varies from the default behavior, this method
can be overridden.
Source code in packages/testing/src/execution_testing/client_clis/transition_tool.py
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 | |