Skip to content

Commit

Permalink
rcpdaemon: error messages in TraceTracer (#1960)
Browse files Browse the repository at this point in the history
update rpc-tests version in integration tests
  • Loading branch information
Sixtysixter authored Apr 12, 2024
1 parent 615fba0 commit 8399a2e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Checkout RPC Tests Repository & Install Requirements
run: |
rm -rf ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v0.8.2 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v0.9.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{runner.workspace}}/rpc-tests
pip3 install -r requirements.txt
Expand Down
14 changes: 10 additions & 4 deletions silkworm/rpc/core/evm_trace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -852,16 +852,19 @@ void TraceTracer::on_execution_end(const evmc_result& result, const silkworm::In
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_UNDEFINED_INSTRUCTION:
case evmc_status_code::EVMC_INVALID_INSTRUCTION:
trace.error = "bad instruction";
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_INVALID_INSTRUCTION:
trace.error = "invalid opcode: INVALID";
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_STACK_UNDERFLOW:
trace.error = "stack underflow";
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_BAD_JUMP_DESTINATION:
trace.error = "bad jump destination";
trace.error = "invalid jump destination";
trace.trace_result.reset();
break;
default:
Expand Down Expand Up @@ -928,16 +931,19 @@ void TraceTracer::on_reward_granted(const silkworm::CallResult& result, const si
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_UNDEFINED_INSTRUCTION:
case evmc_status_code::EVMC_INVALID_INSTRUCTION:
trace.error = "bad instruction";
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_INVALID_INSTRUCTION:
trace.error = "invalid opcode: INVALID";
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_STACK_UNDERFLOW:
trace.error = "stack underflow";
trace.trace_result.reset();
break;
case evmc_status_code::EVMC_BAD_JUMP_DESTINATION:
trace.error = "bad jump destination";
trace.error = "invalid jump destination";
trace.trace_result.reset();
break;
default:
Expand Down

0 comments on commit 8399a2e

Please sign in to comment.