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

V3.17.2 to develop #1775

Closed
wants to merge 228 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
228 commits
Select commit Hold shift + click to select a range
f85a75c
1664 Switching on transaction tracing
kladkogex Sep 21, 2023
7e48759
1664 adding trace
kladkogex Sep 29, 2023
ce72ec8
1664 fixing function signatures
kladkogex Sep 29, 2023
cb06e64
Fixing function signatures
kladkogex Sep 29, 2023
097239c
1664 Fix fudge factor
kladkogex Sep 29, 2023
f271e37
1664 Process tracer result
kladkogex Sep 29, 2023
f4b2bd7
1664 enable debug interface
kladkogex Sep 29, 2023
a96b376
1664 completed implementation of eth_TraceTransaction
kladkogex Sep 29, 2023
4ebfa1a
1664 adding tests
kladkogex Sep 29, 2023
e0656a3
1664 Added tracely trace viwer
kladkogex Sep 29, 2023
b06c7c1
1664 adding tests
kladkogex Sep 29, 2023
06b0ab4
1664 Adding tests
kladkogex Sep 29, 2023
665d991
Adding tests
kladkogex Sep 29, 2023
0b0e37d
1664 move to typescript
kladkogex Sep 29, 2023
c9d2e14
Merge branch 'develop' into 1664_eth_trace
kladkogex Sep 29, 2023
13b2e7a
Merge develop
kladkogex Sep 29, 2023
01b8de0
1664 added tests for trace
kladkogex Sep 29, 2023
39cff5d
1664 Fixed issue with last block
kladkogex Sep 30, 2023
22861b2
1664 improve test
kladkogex Sep 30, 2023
f9af0ea
1664 use historic state only for old blocks
kladkogex Sep 30, 2023
3b1e9c7
1664 moving trace to a separate function
kladkogex Sep 30, 2023
5ed46c8
1664 fixing trace format
kladkogex Oct 1, 2023
c5ca0ba
1664 set aleth tracer
kladkogex Oct 1, 2023
cdaa3e7
1664 basic traces now work
kladkogex Oct 1, 2023
8fbbb6d
Update README.md
kladkogex Oct 2, 2023
133e9b1
1664 fixed test
kladkogex Oct 2, 2023
d11421b
1664 fixed storage
kladkogex Oct 2, 2023
9c0e17a
1664 matching geth format
kladkogex Oct 2, 2023
4ed013f
1664 matching geth format
kladkogex Oct 2, 2023
b988363
1664 matching geth format
kladkogex Oct 2, 2023
0e10208
1664 matching geth format
kladkogex Oct 3, 2023
a2c946d
1664 matching geth format
kladkogex Oct 3, 2023
3991dcc
1664 matching geth format
kladkogex Oct 3, 2023
a2a6fda
1664 fixed revert
kladkogex Oct 4, 2023
bb81976
1664 fixed revert
kladkogex Oct 4, 2023
333a024
1664 limiting memory size
kladkogex Oct 5, 2023
8244b9e
1664 limiting memory size
kladkogex Oct 5, 2023
48c9088
1664 limiting memory size
kladkogex Oct 5, 2023
73fa985
1664 adding state before and after
kladkogex Oct 5, 2023
2f2caf0
1664 adding before and after
kladkogex Oct 5, 2023
8155d04
1664 added prestate tracer
kladkogex Oct 5, 2023
79a2cb1
1664 Cleaned tracing
kladkogex Oct 6, 2023
b833997
1664 add diff option
kladkogex Oct 6, 2023
db76037
1664 doing pretrace
kladkogex Oct 6, 2023
5f36091
Merge branch 'develop' into 1664_eth_trace
kladkogex Oct 6, 2023
ac535fc
1664 adding diff trace
kladkogex Oct 6, 2023
d2d37e3
Merge branch '1664_eth_trace' of github.com:skalenetwork/skaled into …
kladkogex Oct 6, 2023
14050ba
1664 fixing diffs
kladkogex Oct 6, 2023
c541d78
1664 fixing diff
kladkogex Oct 6, 2023
8a35361
1664 fixing diffs
kladkogex Oct 6, 2023
efc2508
1664 fixing diffs
kladkogex Oct 8, 2023
3f623b9
1664 nicifing code
kladkogex Oct 9, 2023
535f0ca
1664 nicifing code
kladkogex Oct 9, 2023
000465b
1664 extracted superclass
kladkogex Oct 9, 2023
c211b21
1664 adding call trace
kladkogex Oct 9, 2023
b1fea3d
1664 adding call trace
kladkogex Oct 9, 2023
44f29c3
1664 adding call trace
kladkogex Oct 9, 2023
d11c6e0
1664 adding call trace
kladkogex Oct 10, 2023
298a168
1664 adding call trace
kladkogex Oct 10, 2023
0c1b14c
1664 adding call trace
kladkogex Oct 10, 2023
5659269
1664 adding call trace
kladkogex Oct 11, 2023
9eee865
1664 adding call trace
kladkogex Oct 11, 2023
4fc1479
1664 adding call trace
kladkogex Oct 11, 2023
6fea373
1664 adding call trace
kladkogex Oct 11, 2023
9bdec9f
1664 adding call trace
kladkogex Oct 11, 2023
ca2c0ca
1664 adding call trace
kladkogex Oct 11, 2023
0c2e088
1664 adding call trace
kladkogex Oct 11, 2023
d9b9478
1664 adding call trace
kladkogex Oct 12, 2023
fff9173
1664 adding call trace
kladkogex Oct 12, 2023
2f47c28
1664 adding call trace
kladkogex Oct 13, 2023
5a12de7
1664 adding call trace
kladkogex Oct 13, 2023
e5d2673
1664 adding call trace
kladkogex Oct 13, 2023
9e0e7e6
1664 adding call trace
kladkogex Oct 13, 2023
5afe068
1664 adding call trace
kladkogex Oct 13, 2023
357e4e1
1664 adding call trace
kladkogex Oct 13, 2023
71ef7a9
1664 adding call trace
kladkogex Oct 14, 2023
b8052bb
1664 adding call trace
kladkogex Oct 14, 2023
ad148dc
1664 adding call trace
kladkogex Oct 14, 2023
f83cdbd
1664 adding call trace
kladkogex Oct 14, 2023
d01facd
1664 adding call trace
kladkogex Oct 14, 2023
0d30562
1664 adding call trace
kladkogex Oct 14, 2023
0a9b858
1664 adding call trace
kladkogex Oct 14, 2023
5c7592d
1664 adding call trace
kladkogex Oct 14, 2023
53b9d62
1664 adding call trace
kladkogex Oct 14, 2023
97f1475
1664 adding call trace
kladkogex Oct 14, 2023
6b9daa6
1664 adding call trace
kladkogex Oct 14, 2023
375f872
1664 adding call trace
kladkogex Oct 14, 2023
7586a22
1664 adding call trace
kladkogex Oct 15, 2023
8df2e39
1664 adding call trace
kladkogex Oct 15, 2023
a89073f
1664 adding call trace
kladkogex Oct 16, 2023
c6e453e
1664 adding call trace
kladkogex Oct 16, 2023
f67f1ce
1664 adding call trace
kladkogex Oct 16, 2023
efaba04
1664 adding call trace
kladkogex Oct 16, 2023
21e5b9b
1664 adding call trace
kladkogex Oct 16, 2023
d58b950
1664 adding call trace
kladkogex Oct 16, 2023
221d5a1
Merge branch 'develop' into 1664_eth_trace_current
kladkogex Oct 18, 2023
526fb4f
1664 adding replay trace
kladkogex Oct 18, 2023
b2578a9
1664 adding replay trace
kladkogex Oct 18, 2023
c200761
Update VERSION
DmytroNazarenko Nov 2, 2023
e412fa1
Merge pull request #1716 from skalenetwork/update-version
DmytroNazarenko Nov 2, 2023
f013fac
#1526 Make net_version returns decimal number
DmytroNazarenko Nov 3, 2023
68798a7
Add unit test
DmytroNazarenko Nov 6, 2023
238665d
#1526 Update test
DmytroNazarenko Nov 6, 2023
9ad487e
#1664 Adding parity trace
kladkogex Nov 6, 2023
3ac4335
#1664 Adding parity trace
kladkogex Nov 6, 2023
4861254
Merge pull request #1717 from skalenetwork/enhancement/net-version-nu…
DmytroNazarenko Nov 7, 2023
dfe084e
#1664 adding replay transaction
kladkogex Nov 7, 2023
72c4e0a
#1664 adding replay transaction
kladkogex Nov 7, 2023
fbb55c2
#1664 adding replay transaction
kladkogex Nov 7, 2023
67e83a9
#1664 adding replay transaction
kladkogex Nov 10, 2023
c228482
#1664 adding replay transaction
kladkogex Nov 10, 2023
ece09ae
#1664 adding 4byte and noop tracers
kladkogex Nov 13, 2023
33095f4
#1664 adding 4byte and noop tracers
kladkogex Nov 14, 2023
b843bc5
#1664 fix 4byte trace for constructor
kladkogex Nov 14, 2023
f9f66c1
#1664 fix 4byte trace for constructor
kladkogex Nov 14, 2023
23e8607
#1664 added alltrace
kladkogex Nov 14, 2023
1a6f4f0
#1664 improve class structure
kladkogex Nov 14, 2023
0f26f13
#1664 improve class structure
kladkogex Nov 14, 2023
13e99f2
#1664 improve class structure
kladkogex Nov 16, 2023
ee11dd9
1700 clang format
kladkogex Nov 17, 2023
3ca247f
#1664 improve class structure
kladkogex Nov 20, 2023
2c2a396
#1664 improve class structure
kladkogex Nov 20, 2023
6238fa2
#1664 improve class structure
kladkogex Nov 21, 2023
7b71ad1
#1664 improve class structure
kladkogex Nov 21, 2023
ade0ab1
#1664 adding tests
kladkogex Nov 21, 2023
2d053a7
#1664 adding tests
kladkogex Nov 21, 2023
229adb5
#1664 adding tests
kladkogex Nov 21, 2023
974007a
1664 debug_traceBlockByNumber
kladkogex Nov 23, 2023
648241b
1664 debug_traceBlockByNumber
kladkogex Nov 23, 2023
f096f09
1664 adding call trace
kladkogex Nov 24, 2023
bdc9c12
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
b9ca657
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
ff88000
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
431c0c2
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
0ce4f92
Merge branch 'develop' into 1664_eth_trace_current
kladkogex Nov 24, 2023
5d1f558
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
4e7c065
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
bffcfba
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
08b8be6
1664 adding traceBlockByNumber
kladkogex Nov 24, 2023
2a9be64
1664 adding cache
kladkogex Nov 25, 2023
75d7c57
1664 adding traceBlockByNumber
kladkogex Nov 25, 2023
5e0006b
1664 adding cache
kladkogex Nov 25, 2023
d0ea2c1
1664 fixed cache
kladkogex Nov 25, 2023
7927fb6
1664 fixed to string
kladkogex Nov 25, 2023
43090e4
1664 adding debug_traceCall
kladkogex Nov 25, 2023
596df93
1664 adding debug_traceCall
kladkogex Nov 26, 2023
4de00f7
1664 adding debug_traceTransaction
kladkogex Nov 26, 2023
6c10464
1664 adding debug_traceTransaction
kladkogex Nov 26, 2023
9680285
1664 fixed clang format
kladkogex Nov 27, 2023
d131e8e
1664 clang-format check
kladkogex Nov 27, 2023
430489b
Update clang-format-check.yml
kladkogex Nov 27, 2023
ffa62ec
1664 fix build
kladkogex Nov 27, 2023
2d3815f
#1664 preparing pull request
kladkogex Nov 27, 2023
53f79b8
1664 adding comments
kladkogex Nov 28, 2023
2379d7c
#1664 adding comments
kladkogex Nov 28, 2023
5b15319
Merge branch 'v3.17.2' into 1664_eth_trace_current
kladkogex Nov 28, 2023
eab5678
Merge branch 'v3.17.2' into develop-merge
DmytroNazarenko Nov 28, 2023
5428e3f
Merge pull request #1733 from skalenetwork/develop-merge
DmytroNazarenko Nov 28, 2023
538815b
#1664 adding ifdefs
kladkogex Nov 28, 2023
f749181
#1664 adding ifdefs for historic state
kladkogex Nov 28, 2023
971d8d0
Merge branch 'v3.17.2' into 1664_eth_trace_current
kladkogex Nov 28, 2023
7bf75d4
#1664 adding ifdefs for historic state
kladkogex Nov 28, 2023
e0c6c3e
#1664 adding tests to github actions
kladkogex Nov 28, 2023
9ccd09d
Merge branch '1664_eth_trace_current' of github.com:skalenetwork/skal…
kladkogex Nov 28, 2023
779790a
#1664 adding tests to github actions
kladkogex Nov 28, 2023
ef234cb
#1664 adding tests to github actions
kladkogex Nov 28, 2023
56bb650
#1664 adding tests to github actions
kladkogex Nov 28, 2023
8ccfa8b
#1664 adding tests to github actions
kladkogex Nov 28, 2023
2f6174b
#1664 adding tests to github actions
kladkogex Nov 28, 2023
be41e2d
#1664 adding tests to github actions
kladkogex Nov 29, 2023
f91d4e3
#1664 adding tests to github actions
kladkogex Nov 29, 2023
5cd6fe5
#1664 adding tests to github actions
kladkogex Nov 29, 2023
ae58af7
#1664 adding tests to github actions
kladkogex Nov 29, 2023
90a1709
#1664 adding tests to github actions
kladkogex Nov 29, 2023
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
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
92 changes: 54 additions & 38 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: checkout
uses: actions/checkout@v2

- name: Cache apt packages
uses: actions/cache@v2
with:
Expand Down Expand Up @@ -117,12 +118,11 @@ jobs:
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
- name: Configure ccache cache size, zero ccache counters and print ccache stats before start
run: |
ccache --max-size=15G
ccache --max-size=30G
ccache -z
ccache --show-stats
- name: Build dependencies
run: |

run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
Expand All @@ -134,32 +134,73 @@ jobs:
rm -f ./libwebsockets-from-git.tar.gz
./build.sh DEBUG=1 PARALLEL_COUNT=$(nproc)
cd ..
- name: Configure all
- name: Print ccache stats for deps
run: |
ccache --show-stats
- name: Configure all as historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" &&
export CC=gcc-9 &&
export CXX=g++-9 &&
export TARGET=all &&
export CMAKE_BUILD_TYPE=Debug &&
export CODE_COVERAGE=ON &&
mkdir -p build &&
cd build &&
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=$CODE_COVERAGE -DHISTORIC_STATE=1 ..
cd ..
- name: Build all historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
mkdir -p build
cd build
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=$CODE_COVERAGE ..
make skaled testeth -j$(nproc)
cd ..
- name: Print ccache stats for deps
run: |
- name: Print ccache stats after full historic build
run : |
ccache --show-stats
- name: Build all
- name: Use Node.js 19
uses: actions/setup-node@v1
with:
node-version: 19
- name: run historic tests
run: |
build/skaled/skaled --config test/historicstate/configs/basic_config.json&
SKALED_PID=$! &&
cd test/historicstate/hardhat/ &&
npm install --save-dev typescript ts-node @types/node @types/mocha &&
npx hardhat check &&
sleep 60 &&
npx hardhat run scripts/trace.ts --network skaled &&
kill $SKALED_PID
- name: Configure all
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
mkdir -p build
cd build
make testeth -j$(nproc)
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=$CODE_COVERAGE ..
cd ..
- name: Build all
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" &&
export CC=gcc-9 &&
export CXX=g++-9 &&
export TARGET=all &&
export CMAKE_BUILD_TYPE=Debug &&
export CODE_COVERAGE=ON &&
cd build &&
make skaled testeth -j$(nproc) &&
cd ..
- name: Print ccache stats after full build
run : |
Expand Down Expand Up @@ -283,30 +324,5 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.info

- name: Configure all as historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
mkdir -p build
cd build
# -DCMAKE_C_FLAGS=-O3 -DCMAKE_CXX_FLAGS=-O3
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DCOVERAGE=$CODE_COVERAGE -DHISTORIC_STATE=1 ..
cd ..
- name: Build all historic
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
export CC=gcc-9
export CXX=g++-9
export TARGET=all
export CMAKE_BUILD_TYPE=Debug
export CODE_COVERAGE=ON
cd build
make testeth -j$(nproc)
cd ..
- name: Print ccache stats after full historic build
run : |
ccache --show-stats


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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.17.1
3.17.2
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

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
31 changes: 23 additions & 8 deletions libethereum/Block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,24 +793,39 @@ 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 ) {
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();

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 );
u256 const gasUsed =
_transactionIndex ? receipt( _transactionIndex - 1 ).cumulativeGasUsed() : 0;

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

if ( _tracer ) {
HistoricState stateBefore( m_state.mutableHistoricState() );
auto resultReceipt = m_state.mutableHistoricState().execute(
envInfo, *m_sealEngine, _t, skale::Permanence::Uncommitted, onOp );
HistoricState stateAfter( m_state.mutableHistoricState() );
_tracer->finalizeTrace( resultReceipt.first, stateBefore, stateAfter );
return resultReceipt.first;
} else {
auto resultReceipt = m_state.mutableHistoricState().execute(
envInfo, *m_sealEngine, _t, skale::Permanence::Reverted, onOp );
return resultReceipt.first;
}
}
#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