• John Chase's avatar
    MTCannon: Fix `AssertEVMReverts` to correctly construct data (#12200) · 03b526d3
    John Chase authored
    * 1. Added `WithRegisters` for initializing state's `Registers`.
    2. Added `ThreadProofEncoder` helper function to generate `ThreadProof`.
    3. Updated `AssertEVMReverts` to include `statePCs` for multiple memory requirements, added `ProofData` parameter for passing `ThreadProof`, and introduced `expectedReason` parameter for more precise testing.
    4. Revised `TestEVMFault` and `TestEVM_UnsupportedSyscall` test functions to be compatible with `AssertEVMReverts`.
    
    * lint fix and comment fix
    
    * avoid false negatives
    
    * delete WithRegisters && create ProofGenerator
    
    * assert multi outputs
    
    * fix naming issue
    
    * Update cannon/mipsevm/tests/evm_multithreaded_test.go
    
    Nice catch!
    Co-authored-by: default avatarmbaxter <meredith.a.baxter@gmail.com>
    
    * Small fix
    
    * link check
    
    * make expectedReason a value & delete nil check
    
    ---------
    Co-authored-by: default avatarmbaxter <meredith.a.baxter@gmail.com>
    03b526d3
evm_multithreaded_test.go 61.2 KB