2121 State ,
2222 DetectExternalCallAndLeak ,
2323 DetectIntegerOverflow ,
24- DetectTransactionReordering ,
24+ DetectTransactionDisplacement ,
2525 Detector ,
2626 NoAliveStates ,
2727 ABI ,
@@ -46,7 +46,7 @@ def disposable_mevm(*args, **kwargs):
4646 try :
4747 yield mevm
4848 finally :
49- shutil .rmtree (mevm .workspace )
49+ pass # shutil.rmtree(mevm.workspace)
5050
5151
5252class EthDetectorsIntegrationTest (unittest .TestCase ):
@@ -63,39 +63,39 @@ def test_int_ovf(self):
6363 self .assertIn ("Unsigned integer overflow at MUL instruction" , all_findings )
6464
6565
66- class EthDetectorsTransactionReordering (unittest .TestCase ):
67- def test_transaction_reordering_basic (self ):
66+ class EthDetectorsTransactionDisplacement (unittest .TestCase ):
67+ def test_transaction_displacement_basic (self ):
6868 # log.set_verbosity(5)
6969 consts = config .get_group ("evm" )
7070 consts .sha3 = consts .sha3 .concretize
7171 mevm = ManticoreEVM ()
72- mevm .register_detector (DetectTransactionReordering ())
72+ mevm .register_detector (DetectTransactionDisplacement ())
7373 filename = os .path .join (THIS_DIR , "contracts/basic.sol" )
7474 mevm .multi_tx_analysis (filename , tx_limit = 1 )
7575 mevm .finalize ()
7676 self .assertEqual (len (mevm .global_findings ), 1 )
7777 all_findings = "" .join ([x [2 ] for x in mevm .global_findings ])
78- self .assertIn ("REVERT following transaction reordering " , all_findings )
78+ self .assertIn ("REVERT caused by transaction displacement " , all_findings )
7979
80- def test_transaction_reordering_sqrt (self ):
80+ def test_transaction_displacement_sqrt (self ):
8181 # log.set_verbosity(5)
8282 consts = config .get_group ("evm" )
8383 consts .sha3 = consts .sha3 .concretize
8484 mevm = ManticoreEVM ()
85- mevm .register_detector (DetectTransactionReordering ())
85+ mevm .register_detector (DetectTransactionDisplacement ())
8686 filename = os .path .join (THIS_DIR , "contracts/sqrt.sol" )
8787 mevm .multi_tx_analysis (filename , tx_limit = 1 )
8888 mevm .finalize ()
8989 self .assertEqual (len (mevm .global_findings ), 1 )
9090 all_findings = "" .join ([x [2 ] for x in mevm .global_findings ])
91- self .assertIn ("REVERT following transaction reordering " , all_findings )
91+ self .assertIn ("REVERT caused by transaction displacement " , all_findings )
9292
93- def test_transaction_reordering_sqrt_better (self ):
93+ def test_transaction_displacement_sqrt_better (self ):
9494 # log.set_verbosity(5)
9595 consts = config .get_group ("evm" )
9696 consts .sha3 = consts .sha3 .concretize
9797 mevm = ManticoreEVM ()
98- mevm .register_detector (DetectTransactionReordering ())
98+ mevm .register_detector (DetectTransactionDisplacement ())
9999 filename = os .path .join (THIS_DIR , "contracts/sqrt_better.sol" )
100100 mevm .multi_tx_analysis (filename , tx_limit = 2 )
101101 mevm .finalize ()
0 commit comments