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

1751 trace multiple transactions in a single block #1783

Merged
merged 42 commits into from
Jan 22, 2024

Conversation

kladkogex
Copy link
Collaborator

@kladkogex kladkogex commented Jan 15, 2024

WHAT WAS FIXED

Trace was not working if a block has multiple transactions (from a single entity or from multiple entities)

Bug 1751 is a duplicate of 1750. Both are fixed by this commit,.

  1. When the block was executed, receipts were not saved. Execution of a transaction requires receipt of the previous transaction since it includes the totalgas used so far. This is important for block gas limit.

  2. Also the case when a transaction does not call a smartcontract (so the trace is empty) was not handled properly.

  3. In the process of the fix, I made corresponding exceptions more informative and checked that exceptions are always handled

TESTS

I modified the test tracer.ts. Now the test inserts a transaction before the test transaction, so in the test the block
includes two transactions.

As before, the test runs as part of github actions.

Bug 1750 is a duplicate of 1751. Both are fixed by this commit,.

@kladkogex kladkogex changed the title 1751 trace transaction from a single user 1751 trace multiple transactions in a single block Jan 15, 2024
@kladkogex kladkogex force-pushed the 1751_trace_transaction_from_a_single_user branch from e458e6a to e6f7572 Compare January 15, 2024 17:34
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 189 lines in your changes are missing coverage. Please review.

Comparison is base (a6a060f) 42.63% compared to head (cd21227) 42.50%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           v3.17.2    #1783      +/-   ##
===========================================
- Coverage    42.63%   42.50%   -0.13%     
===========================================
  Files          392      392              
  Lines        57013    57116     +103     
===========================================
- Hits         24307    24279      -28     
- Misses       32706    32837     +131     

@DmytroNazarenko DmytroNazarenko removed this from the SKALE 2.3 milestone Jan 18, 2024
libethereum/Client.cpp Outdated Show resolved Hide resolved
libhistoric/AlethStandardTrace.cpp Show resolved Hide resolved
libhistoric/AlethStandardTrace.cpp Show resolved Hide resolved
libhistoric/ReplayTracePrinter.cpp Outdated Show resolved Hide resolved
@kladkogex kladkogex merged commit da9bf68 into v3.17.2 Jan 22, 2024
6 of 8 checks passed
@kladkogex kladkogex deleted the 1751_trace_transaction_from_a_single_user branch January 22, 2024 15:17
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.