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

Detached #1840

Merged
merged 416 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
416 commits
Select commit Hold shift + click to select a range
8c73f74
#1664 adding tests to github actions
kladkogex Nov 29, 2023
e4a79b7
#1664 adding tests to github actions
kladkogex Nov 29, 2023
266cd7a
#1664 adding tests to github actions
kladkogex Nov 29, 2023
b2a6dbc
1664 Update test.yml
kladkogex Nov 30, 2023
4b524a9
#1664 update test.yml
kladkogex Nov 30, 2023
ea511f4
#1664 Update test.yml
kladkogex Nov 30, 2023
aef13f6
1664 adding docs
kladkogex Nov 30, 2023
80948dd
1664 adding docs
kladkogex Nov 30, 2023
067efa8
1664 Fix non-historic build by adding ifdef
kladkogex Nov 30, 2023
30e1f2f
Update VERSION
DmytroNazarenko Dec 4, 2023
7e0d0d4
Update clang-format-check.yml
kladkogex Dec 4, 2023
a67abb1
#1664 clang-format
kladkogex Dec 4, 2023
1de57fd
Merge branch '1664_eth_trace_current' of github.com:skalenetwork/skal…
kladkogex Dec 4, 2023
414c44b
#1664 clang-format check
kladkogex Dec 4, 2023
2cfd3a2
#1664 clang format
kladkogex Dec 4, 2023
aa50d8b
#1664 fix build
kladkogex Dec 4, 2023
f83d7a3
#1644 addressed pull request comments
kladkogex Dec 4, 2023
dd83fd5
1664 fix include order for clang format
kladkogex Dec 5, 2023
f89d3fc
#1664 Add spaces between function definitions
kladkogex Dec 5, 2023
542bb12
1664 Fix clang format
kladkogex Dec 5, 2023
5006d3d
#1664 fix build
kladkogex Dec 5, 2023
e8db3c4
#1664 fixing geth incompatibilities
kladkogex Dec 5, 2023
77ca91b
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 5, 2023
5e2e9f1
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 6, 2023
285a751
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 6, 2023
40f1275
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 6, 2023
a1e13fa
1664 Match gas consumption
kladkogex Dec 7, 2023
78d33dc
1664 Fix clang format
kladkogex Dec 7, 2023
0d07c98
1664 Fix gas price
kladkogex Dec 7, 2023
e882b63
1664 Fix gas cost discrepancies
kladkogex Dec 7, 2023
e10dbb0
1664 Fix discrepancies with geth
kladkogex Dec 7, 2023
f07da5f
1664 Fix default trace return
kladkogex Dec 8, 2023
782b8ba
1664 Test trace
kladkogex Dec 8, 2023
0c9b3ad
1664 added geth
kladkogex Dec 8, 2023
dd8e984
Merge branch '1664_eth_trace_current' of github.com:skalenetwork/skal…
kladkogex Dec 8, 2023
9bec2cd
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 8, 2023
c72d61f
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 8, 2023
b58a72d
#813 update consensus
kladkogex Dec 9, 2023
e7aa714
#813 update consensus
kladkogex Dec 10, 2023
cd4b88e
#813 update consensus
kladkogex Dec 10, 2023
b35f977
#813 geth compatibility
kladkogex Dec 10, 2023
24f39fb
#813 geth compatibility
kladkogex Dec 10, 2023
5b91877
#813 geth compatibility
kladkogex Dec 10, 2023
90d7755
#813 geth compatibility
kladkogex Dec 10, 2023
972e34e
#813 geth compatibility
kladkogex Dec 10, 2023
212439e
#813 geth compatibility
kladkogex Dec 10, 2023
800958d
1664 clang format
kladkogex Dec 11, 2023
71eac4b
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 11, 2023
2891074
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 11, 2023
ff5af79
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 11, 2023
311763a
#1664 fixing compatibiliti with geth default trace
kladkogex Dec 11, 2023
8717699
Merge pull request #1734 from skalenetwork/1664_eth_trace_current
kladkogex Dec 11, 2023
9661bd7
1748 debug trace call
kladkogex Dec 12, 2023
a6a060f
1749 debug trace call (#1771) (#1772)
kladkogex Jan 3, 2024
3550f29
#1750 multiple transactions
kladkogex Jan 12, 2024
0f8a2fb
#1750 multiple transactions
kladkogex Jan 12, 2024
5901d5b
#1750 multiple transactions
kladkogex Jan 12, 2024
ace6fa6
#1750 multiple transactions
kladkogex Jan 12, 2024
14c56e6
#1750 multiple transactions
kladkogex Jan 12, 2024
67ba4c0
#1750 multiple transactions
kladkogex Jan 12, 2024
fce9fcb
#1750 multiple transactions
kladkogex Jan 12, 2024
4188e5f
1751 Adding exceptions
kladkogex Jan 15, 2024
8141ca5
#1750 multiple transactions
kladkogex Jan 15, 2024
8416726
#1751 multiple transactions
kladkogex Jan 15, 2024
689b7e2
#1751 multiple transactions
kladkogex Jan 15, 2024
31c4e62
#1751 multiple transactions
kladkogex Jan 15, 2024
8f51d17
#1751 multiple transactions
kladkogex Jan 15, 2024
028f6ba
#1751 multiple transactions
kladkogex Jan 15, 2024
e6f7572
#1751 multiple transactions
kladkogex Jan 15, 2024
3995d47
#1751 multiple transactions
kladkogex Jan 15, 2024
d7d2274
#1751 case where no contract is called
kladkogex Jan 15, 2024
8f3a34c
#1751 case where no contract is called
kladkogex Jan 15, 2024
7f92009
#1751 case where no contract is called
kladkogex Jan 15, 2024
238fe85
#1751 case where no contract is called
kladkogex Jan 15, 2024
fb7493b
#1751 case where no contract is called
kladkogex Jan 16, 2024
bce8a66
#1751 case where no contract is called
kladkogex Jan 16, 2024
6c8d897
#1751 case where no contract is called
kladkogex Jan 16, 2024
4174a67
#1751 case where no contract is called
kladkogex Jan 16, 2024
99a7d3d
#1751 case where no contract is called
kladkogex Jan 16, 2024
2a87706
#1751 case where no contract is called
kladkogex Jan 16, 2024
385c049
#1751 case where no contract is called
kladkogex Jan 16, 2024
4f2ea73
#1751 case where no contract is called
kladkogex Jan 17, 2024
5843bc4
#1751 case where no contract is called
kladkogex Jan 17, 2024
64f4b5b
#1751 case where no contract is called
kladkogex Jan 17, 2024
51d2ce6
#1751 case where no contract is called
kladkogex Jan 17, 2024
e557439
#1751 case where no contract is called
kladkogex Jan 17, 2024
706cd92
#1751 case where no contract is called
kladkogex Jan 17, 2024
a557989
#1751 case where no contract is called
kladkogex Jan 17, 2024
d620e7c
#1751 case where no contract is called
kladkogex Jan 17, 2024
940d5dc
#1751 case where no contract is called
kladkogex Jan 17, 2024
94fd7c1
#1751 case where no contract is called
kladkogex Jan 17, 2024
64be1d1
#1751 case where no contract is called
kladkogex Jan 17, 2024
ec245b0
#1751 case where no contract is called
kladkogex Jan 17, 2024
8f6e7b1
#1751 case where no contract is called
kladkogex Jan 17, 2024
1a06864
#1751 case where no contract is called
kladkogex Jan 22, 2024
cd21227
#1751 case where no contract is called
kladkogex Jan 22, 2024
da9bf68
Merge pull request #1783 from skalenetwork/1751_trace_transaction_fro…
kladkogex Jan 22, 2024
36a18b3
#1751 case where no contract is called
kladkogex Jan 22, 2024
966169e
#1767 enforce transactions in block and refactor for clarity
kladkogex Jan 22, 2024
c586bc6
#1767 enforce transactions in block and refactor for clarity
kladkogex Jan 22, 2024
80d5bd0
#1767 enforce transactions in block and refactor for clarity
kladkogex Jan 22, 2024
e2de353
#1767 enforce transactions in block and refactor for clarity
kladkogex Jan 22, 2024
a75f38e
#1767 fix exception log
kladkogex Jan 23, 2024
5bbe977
#1767 add error printing for call trace
kladkogex Jan 23, 2024
0620b0f
#1767 make error message same as geth
kladkogex Jan 23, 2024
603fa9c
#1767 make error message same as geth
kladkogex Jan 23, 2024
ee78dc4
#1767 fixed default tracer
kladkogex Jan 23, 2024
499208a
#1767 cleaing up API
kladkogex Jan 24, 2024
4c045ca
#1767 cleaing up API
kladkogex Jan 24, 2024
2b25746
#1749 Fix tests
kladkogex Jan 26, 2024
353869b
#1749 Fix tests
kladkogex Jan 26, 2024
8b1ec08
#1767 Add tests
kladkogex Jan 26, 2024
d9aeb6f
#1767 Add tests
kladkogex Jan 26, 2024
db5c06c
#1767 Add tests
kladkogex Jan 26, 2024
d1458a1
#1767 Add tests
kladkogex Jan 26, 2024
5f73aba
#1767 Add tests
kladkogex Jan 26, 2024
d734268
#1767 Add tests
kladkogex Jan 26, 2024
ab2364f
#1767 Figured out the case for contract nonce
kladkogex Jan 26, 2024
b98da94
#1767 Figured out the case for contract nonce
kladkogex Jan 26, 2024
5eb5947
#1767 Figured out the case for contract nonce
kladkogex Jan 26, 2024
08be2f3
#1767 Adding deploy tests
kladkogex Jan 28, 2024
91b9372
#1767 Figured out the case for contract nonce
kladkogex Jan 28, 2024
2e28252
#1767 Figured out the case for contract nonce
kladkogex Jan 28, 2024
2dd28e2
#1767 Figured out the case for contract nonce
kladkogex Jan 28, 2024
8e2dce1
#1767 Figured out the case for contract nonce
kladkogex Jan 28, 2024
f279b35
#1767 Call trace for deploy
kladkogex Jan 28, 2024
93be658
#1767 fixed call tracer for deploy
kladkogex Jan 29, 2024
c148e32
#1767 fixed call tracer for deploy
kladkogex Jan 29, 2024
d8d7658
#1767 fixed call tracer for deploy
kladkogex Jan 29, 2024
2b6076a
#1767 fixed fourbyte tracer diffs
kladkogex Jan 29, 2024
959960e
#1767 fixing tests
kladkogex Jan 29, 2024
124d7c0
#1767 fix prestate trace for contract deployment
kladkogex Jan 30, 2024
4c72c56
#1767 fix prestate trace for contract deployment
kladkogex Jan 30, 2024
898077a
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
6a87833
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
5cf9371
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
abef9a4
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
d3d9e25
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
e27d988
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
46e41ff
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 30, 2024
03002b9
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
39c4028
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
0356762
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
47bcff1
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
1574ee4
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
c9857e1
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
e7e6776
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
4f6c417
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
36d4ab6
#1767 fix prestate diff trace for contract deployment
kladkogex Jan 31, 2024
7c62b78
#1767 fix from balance
kladkogex Feb 1, 2024
a6dcfc6
#1767 fix from balance
kladkogex Feb 1, 2024
eb4feaa
#1767 fix from balance
kladkogex Feb 1, 2024
4c0d3c5
#1767 fix from balance
kladkogex Feb 1, 2024
92d7d49
#1767 fix from balance
kladkogex Feb 1, 2024
e18f6cb
#1767 fix from balance
kladkogex Feb 1, 2024
8c888fd
#1767 fix from balance
kladkogex Feb 1, 2024
ed10fae
#1767 fix from balance
kladkogex Feb 1, 2024
019e0cf
#1767 fix from balance
kladkogex Feb 1, 2024
7b025f7
#1767 fix second mint
kladkogex Feb 1, 2024
2ae83b3
#1767 fix to in create contract
kladkogex Feb 2, 2024
8f7dfdf
#1767 fix to in create contract
kladkogex Feb 2, 2024
f1ee327
#1767 fix input output in create create2
kladkogex Feb 2, 2024
a70849b
#1767 fix 4byte trace for constructor
kladkogex Feb 2, 2024
48e937b
#1767 fix default trace verification
kladkogex Feb 2, 2024
997010a
#1767 fix default trace verification
kladkogex Feb 2, 2024
475134a
#1767 fix default trace
kladkogex Feb 2, 2024
8dff539
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
088bd9e
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
718bca5
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
81e5915
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
9bc01ed
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
6068c80
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
4ebe0f0
#1767 prestate diff for newly created contract
kladkogex Feb 2, 2024
f9a9b4e
#1767 fix clang format
kladkogex Feb 2, 2024
babfd62
#1767 fix clang format
kladkogex Feb 2, 2024
659e8cb
#1767 fix clang format
kladkogex Feb 2, 2024
fad2815
#1767 fix clang format
kladkogex Feb 2, 2024
224291c
#1767 fix clang format
kladkogex Feb 2, 2024
de133d7
#1767 fix clang format
kladkogex Feb 2, 2024
4843beb
#1767 fix clang format
kladkogex Feb 2, 2024
7f44620
#1767 fix clang format
kladkogex Feb 2, 2024
ab8105b
#1780 disable default parameter validation
kladkogex Feb 7, 2024
0a284b0
1780 allow empty tracer
kladkogex Feb 8, 2024
e13e53e
1780 Fix test
kladkogex Feb 8, 2024
bf1abf0
1780 fix test
kladkogex Feb 8, 2024
d9f5881
1780 Fix clang format
kladkogex Feb 9, 2024
b136489
1760 fix test
kladkogex Feb 10, 2024
0bb359e
#1760 fix test
kladkogex Feb 11, 2024
577af8c
#1760 re structure code
kladkogex Feb 11, 2024
42782ad
#1760 re structure code
kladkogex Feb 11, 2024
ba0cc3f
#1760 re structure code
kladkogex Feb 11, 2024
7ebac20
#1760 re structure code
kladkogex Feb 11, 2024
836c092
#1760 re structure code
kladkogex Feb 11, 2024
2810f85
#1760 re structure code
kladkogex Feb 11, 2024
f145f8f
#1760 re structure code
kladkogex Feb 11, 2024
b429e65
#1760 re structure code
kladkogex Feb 11, 2024
9c07838
#1760 re structure code
kladkogex Feb 11, 2024
ac873dd
#1760 re structure code
kladkogex Feb 11, 2024
eb5fd54
#1760 re structure code
kladkogex Feb 11, 2024
2227f58
#1760 re structure code
kladkogex Feb 11, 2024
d26eca2
#1760 re structure code
kladkogex Feb 11, 2024
9515aad
IS-900 Better checks for invalid transactions in Eth.cpp (again)
dimalit Feb 12, 2024
cf43d21
SKALED-1811 Fix net_version call error
dimalit Feb 12, 2024
394cfee
SKALED-1812 Use _enablePrivilegedApis in jsonrpc's Debug
dimalit Feb 12, 2024
4743776
IS-900 Remove old fix for privileges in tests
dimalit Feb 12, 2024
753a1a3
#1760 fix test
kladkogex Feb 13, 2024
d5bbb6c
#1760 fix CREATE and CREATE2 gas cost
kladkogex Feb 13, 2024
873f25b
IS-900 Removed exclamation marks from comments
dimalit Feb 13, 2024
b0a81e4
SKALED-1812 Remove dead code
dimalit Feb 13, 2024
375de15
SKLAED-1812 Revert consensus
dimalit Feb 14, 2024
cbdbd79
SKALED-1812 Remove .get()
dimalit Feb 14, 2024
3f59722
Merge pull request #1813 from skalenetwork/bug/SKALED-1812-no-permiss…
DmytroNazarenko Feb 14, 2024
1379936
Merge branch 'v3.17.2' into bug/IS-900-wrong-response-if-latest
DmytroNazarenko Feb 14, 2024
26b585a
1760 Fix function gas cost
kladkogex Feb 15, 2024
f74f24e
1760 fix gas used by a call
kladkogex Feb 15, 2024
8406240
1760 fixing gas cost
kladkogex Feb 15, 2024
6368da2
1760 add test
kladkogex Feb 20, 2024
1aa717e
1760 add test
kladkogex Feb 20, 2024
579253f
Adding test
kladkogex Feb 20, 2024
e44c75c
#1760 Fix revert reason formatting
kladkogex Feb 20, 2024
ad3ef90
1760 fixintg revert reason output
kladkogex Feb 21, 2024
a61fb5c
1760 revert reasons
kladkogex Feb 21, 2024
9bb7731
1760 revert test
kladkogex Feb 21, 2024
bf48d36
1760 Fixing geth compatibility
kladkogex Feb 21, 2024
75655a8
#1760 Fix revert reason formatting
kladkogex Feb 21, 2024
4e5ad12
Merge pull request #1810 from skalenetwork/bug/IS-900-wrong-response-…
DmytroNazarenko Feb 21, 2024
20dd548
Merge branch 'v3.17.2' into bug/SKALED-1811-broken-net_version
DmytroNazarenko Feb 21, 2024
69ce41a
1760 Clang format check
kladkogex Feb 23, 2024
35892f2
1760 Clang format check
kladkogex Feb 23, 2024
6325d48
Merge branch 'v3.17.2' into 1767_tracer_fields
kladkogex Feb 23, 2024
3e8b8fe
Merge pull request #1814 from skalenetwork/bug/SKALED-1811-broken-net…
DmytroNazarenko Feb 23, 2024
026ce59
1767 Fixed test crash
kladkogex Feb 23, 2024
dbac33c
Merge branch 'v3.17.2' into 1767_tracer_fields
kladkogex Feb 23, 2024
9de940a
Merge pull request #1804 from skalenetwork/1767_tracer_fields
kladkogex Feb 26, 2024
deb50a4
Merge branch 'v3.17.2' into 1780_absence_tracer_in_params
kladkogex Feb 26, 2024
1bfcf60
Merge branch 'v3.17.2' into 1760_inconsistent_revert_reason
kladkogex Feb 26, 2024
46eb605
#1780 Better string match
kladkogex Feb 26, 2024
516c05d
#1780 remove typo
kladkogex Feb 26, 2024
50de3ec
#1780 Used another approach
kladkogex Feb 28, 2024
74a88e9
1780 Fix clang format
kladkogex Feb 28, 2024
e35ee3a
1780 Clang format v
kladkogex Feb 28, 2024
5147506
Merge pull request #1809 from skalenetwork/1780_absence_tracer_in_params
kladkogex Feb 28, 2024
e114741
Merge branch 'v3.17.2' into 1760_inconsistent_revert_reason
kladkogex Feb 28, 2024
88bba68
1760 Fixed clang format
kladkogex Feb 28, 2024
41d4f92
Add const
kladkogex Feb 28, 2024
f34f2a9
#1760 Fix test
kladkogex Feb 28, 2024
709e6d5
#1760 Remove unneeded function
kladkogex Feb 28, 2024
5683b0a
#1760 Remove ifdef
kladkogex Feb 28, 2024
ecc5124
Merge pull request #1831 from skalenetwork/1760_inconsistent_revert_r…
kladkogex Feb 29, 2024
da63e05
Merge branch 'v3.17.2' into HEAD
kladkogex Feb 29, 2024
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/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.14
- uses: DoozyX/clang-format-lint-action@v0.16.2
with:
source: '.'
exclude: './CMakeFiles ./cmake ./deps ./build ./skaled_ssl_test ./newer_lcov'
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@
[submodule "cmake/cable"]
path = cmake/cable
url = https://github.com/ethereum/cable.git
[submodule "test/historicstate/hardhat/tracely"]
path = test/historicstate/hardhat/tracely
url = https://github.com/DenrianWeiss/tracely
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If you have already cloned the repo and forgot to pass `--recurse-submodules`, e
sudo apt update
sudo apt install autoconf build-essential cmake libprocps-dev libtool texinfo wget yasm flex bison btrfs-progs python3 python3-pip gawk git vim doxygen
sudo apt install make build-essential cmake pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev docker.io gcc-9 g++-9 gperf clang-format-11 gnutls-dev
sudo apt install nettle-dev libhiredis-dev redis-server google-perftools libgoogle-perftools-dev lcov
sudo apt install nettle-dev libhiredis-dev redis-server google-perftools libgoogle-perftools-dev lcov sudo apt-get install libv8-dev
```


Expand Down
61 changes: 61 additions & 0 deletions docs/tracing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Tracing API

## API calls

SKALE tracing API implements the following Geth tracing API calls

```angular2html

debug_traceTransaction
debug_traceCall
debug_traceBlockByNumber
debug_traceBlockByHash
```

The calls a fully compatible with Geth API. If there is
an incompatibility, its a bug.

Geth API is documented here

https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug

Also see here for live examples

https://www.quicknode.com/docs/ethereum/debug_traceTransaction
https://www.quicknode.com/docs/ethereum/debug_traceBlockByNumber
https://www.quicknode.com/docs/ethereum/debug_traceBlockByHash
https://www.quicknode.com/docs/ethereum/debug_traceCall


## Tracer config and types implemented

All tracer config options documented here are implemented

https://geth.ethereum.org/docs/interacting-with-geth/rpc/ns-debug#traceconfig

The following Geth Tracer types are implemented:

* "4byteTracer"
* "callTracer"
* "prestateTracer"
* "noopTracer"

In addition the following Parity tracer is implemented

* replayTracer

See here for documentation of replayTracer

https://openethereum.github.io/JSONRPC-trace-module
https://www.quicknode.com/docs/ethereum/trace_replayTransaction
https://docs.alchemy.com/reference/trace-replaytransaction

Note, that we do not implement Parity "trace_replayTransaction"
API call. Instead, "replayTracer" parameter needs to be
passed to Geth API calls.


## All Tracer

* allTracer has beeen added to help QA, it prints results of all supported traces at once

2 changes: 1 addition & 1 deletion libconsensus
10 changes: 10 additions & 0 deletions libdevcore/CommonData.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,16 @@ inline std::string toCompactHexPrefixed( u256 _val, unsigned _min = 0 ) {
return toHexPrefixed( toCompactBigEndian( _val, _min ) );
}


inline std::string toHex( u256 _val ) {
return toHex( toBigEndian( _val ) );
}

inline std::string toHexPrefixed( u256 _val ) {
return toHexPrefixed( toBigEndian( _val ) );
}


// Algorithms for string and string-like collections.

/// Escapes a string into the C-string representation.
Expand Down
62 changes: 49 additions & 13 deletions libethereum/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -792,24 +792,60 @@ u256 Block::enact( VerifiedBlockRef const& _block, BlockChain const& _bc ) {


#ifdef HISTORIC_STATE
ExecutionResult Block::executeHistoricCall(
LastBlockHashesFace const& _lh, Transaction const& _t ) {
auto p = Permanence::Reverted;
ExecutionResult Block::executeHistoricCall( LastBlockHashesFace const& _lh, Transaction const& _t,
std::shared_ptr< AlethStandardTrace > _tracer, uint64_t _transactionIndex ) {
try {
auto onOp = OnOpFunc();

auto onOp = OnOpFunc();
if ( _tracer ) {
onOp = _tracer->functionToExecuteOnEachOperation();
}

if ( isSealed() )
BOOST_THROW_EXCEPTION( InvalidOperationOnSealedBlock() );

// Uncommitting is a non-trivial operation - only do it once we've verified as much of the
// transaction as possible.
uncommitToSeal();
if ( isSealed() )
BOOST_THROW_EXCEPTION( InvalidOperationOnSealedBlock() );

EnvInfo const envInfo{ info(), _lh, gasUsed(), m_sealEngine->chainParams().chainID };
std::pair< ExecutionResult, TransactionReceipt > resultReceipt =
m_state.mutableHistoricState().execute( envInfo, *m_sealEngine, _t, p, onOp );
uncommitToSeal();

return resultReceipt.first;
STATE_CHECK( _transactionIndex <= m_receipts.size() )

u256 const gasUsed =
_transactionIndex ? receipt( _transactionIndex - 1 ).cumulativeGasUsed() : 0;

EnvInfo const envInfo{ info(), _lh, gasUsed, m_sealEngine->chainParams().chainID };

if ( _tracer ) {
try {
HistoricState stateBefore( m_state.mutableHistoricState() );

auto resultReceipt = m_state.mutableHistoricState().execute(
envInfo, *m_sealEngine, _t, skale::Permanence::Uncommitted, onOp );

_tracer->finalizeAndPrintTrace(
resultReceipt.first, stateBefore, m_state.mutableHistoricState() );
// for tracing the entire block is traced therefore, we save transaction receipt
// as it is used for execution of the next transaction
m_receipts.push_back( resultReceipt.second );
return resultReceipt.first;
} catch ( std::exception& e ) {
throw dev::eth::VMTracingError( "Exception doing trace for transaction index:" +
std::to_string( _transactionIndex ) + ":" +
e.what() );
}
} else {
auto resultReceipt = m_state.mutableHistoricState().execute(
envInfo, *m_sealEngine, _t, skale::Permanence::Reverted, onOp );
return resultReceipt.first;
}
} catch ( std::exception& e ) {
BOOST_THROW_EXCEPTION(
std::runtime_error( "Could not execute historic call for transactionIndex:" +
to_string( _transactionIndex ) + ":" + e.what() ) );
} catch ( ... ) {
BOOST_THROW_EXCEPTION(
std::runtime_error( "Could not execute historic call for transactionIndex:" +
to_string( _transactionIndex ) + ": unknown error" ) );
}
}
#endif

Expand Down
11 changes: 8 additions & 3 deletions libethereum/Block.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@
#include <libethcore/Counter.h>
#include <libethcore/Exceptions.h>
#include <libskale/State.h>

#ifdef HISTORIC_STATE
#include <libhistoric/AlethStandardTrace.h>
#endif
#include "Account.h"
#include "GasPricer.h"
#include "Transaction.h"
Expand Down Expand Up @@ -176,6 +178,9 @@ class Block {

// Information concerning ongoing transactions

/// Get the gas limit in this block.
u256 gasLimit() const { return m_currentBlock.gasLimit(); }

/// Get the remaining gas limit in this block.
u256 gasLimitRemaining() const { return m_currentBlock.gasLimit() - gasUsed(); }

Expand Down Expand Up @@ -214,9 +219,9 @@ class Block {
ExecutionResult execute( LastBlockHashesFace const& _lh, Transaction const& _t,
skale::Permanence _p = skale::Permanence::Committed, OnOpFunc const& _onOp = OnOpFunc() );


#ifdef HISTORIC_STATE
ExecutionResult executeHistoricCall( LastBlockHashesFace const& _lh, Transaction const& _t );
ExecutionResult executeHistoricCall( LastBlockHashesFace const& _lh, Transaction const& _t,
std::shared_ptr< AlethStandardTrace > _tracer, uint64_t _transactionIndex );
#endif


Expand Down
2 changes: 1 addition & 1 deletion libethereum/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target_include_directories( ethereum PRIVATE "${UTILS_INCLUDE_DIR}" ${SKUTILS_IN
${CMAKE_SOURCE_DIR}/libconsensus/jsoncpp/include
${CMAKE_SOURCE_DIR}/libconsensus/spdlog/include
${CMAKE_SOURCE_DIR}/libconsensus/libjson/include)
target_link_libraries( ethereum PUBLIC evm ethcore p2p devcrypto devcore skale PRIVATE skutils Snappy::snappy
target_link_libraries( ethereum PUBLIC evm ethcore p2p devcrypto devcore skale PRIVATE historic skutils Snappy::snappy
jsoncpp # ${CMAKE_SOURCE_DIR}/libconsensus/jsoncpp/build/src/lib_json/libjsoncpp.a
Boost::fiber Boost::context Boost::chrono
batched-io
Expand Down
Loading
Loading