Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpcdaemon: fix gas cost in case of early failures #2378

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rpc-integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,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.51.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
git -c advice.detachedHead=false clone --depth 1 --branch v0.52.0 https://github.com/erigontech/rpc-tests ${{runner.workspace}}/rpc-tests
cd ${{runner.workspace}}/rpc-tests
pip3 install -r requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion silkworm/rpc/core/evm_debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void DebugTracer::on_execution_end(const evmc_result& result, const silkworm::In
case evmc_status_code::EVMC_INVALID_INSTRUCTION:
case evmc_status_code::EVMC_STACK_OVERFLOW:
case evmc_status_code::EVMC_STACK_UNDERFLOW:
log.gas_cost = result.gas_cost;
log.gas_cost = 0;
break;

case evmc_status_code::EVMC_OUT_OF_GAS:
Expand Down
2 changes: 1 addition & 1 deletion silkworm/rpc/core/evm_debug_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1230,7 +1230,7 @@ TEST_CASE_METHOD(DebugExecutorTest, "DebugExecutor::execute call with error") {
{
"depth": 1,
"gas": 156080,
"gasCost": 2,
"gasCost": 0,
"memory": [],
"op": "opcode 0x4b not defined",
"pc": 1,
Expand Down
Loading