Skip to content

Commit

Permalink
rpcdaemon: fix gas_cost and memory of last STOP opcode in debug API (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixtysixter committed Sep 1, 2024
1 parent 8a0991d commit 67889b5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 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.43.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v0.44.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{runner.workspace}}/rpc-tests
pip3 install -r requirements.txt
Expand Down
3 changes: 2 additions & 1 deletion silkworm/rpc/core/evm_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,10 @@ void DebugTracer::on_execution_end(const evmc_result& result, const silkworm::In
DebugLog newlog;
newlog.pc = log.pc + 1;
newlog.op = get_opcode_name(opcode_names_, OP_STOP);
newlog.gas = log.gas;
newlog.gas = log.gas - log.gas_cost;
newlog.gas_cost = 0;
newlog.depth = log.depth;
newlog.memory = log.memory;
logs_.push_back(newlog);
}
}
Expand Down

0 comments on commit 67889b5

Please sign in to comment.