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

Skaled return an error if block contains more than 1 transaction from different users for debug traceBlockByNumber #1750

Closed
Tracked by #1751
oleksandrSydorenkoJ opened this issue Dec 12, 2023 · 4 comments · Fixed by #1783
Assignees
Labels
bug Something isn't working

Comments

@oleksandrSydorenkoJ
Copy link

Preconditions
Active chains
Archival node
Deployed contract with erc20 tokens

Versions
skalenetwork/schain:3.17.2-develop.2-historic

Steps to reproduce

  1. Send several transactions into the same block from different users
  2. Send debug.traceBlockByNumber method

Expected state:
Skaled should return the tracing result by executing all transactions in the block specified by number with a tracer

Actual state:
Skaled returns the error:

> debug.traceBlockByNumber('122177', {"tracer": "callTracer"})
Error: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
    at web3.js:3143:20
    at web3.js:6347:15
    at web3.js:5081:36
    at <anonymous>:1:1

@oleksandrSydorenkoJ oleksandrSydorenkoJ added bug Something isn't working release:2.2 labels Dec 12, 2023
@oleksandrSydorenkoJ oleksandrSydorenkoJ changed the title skled return an error if block contains more than 1 transaction for debug traceBlockByNumber Skaled return an error if block contains more than 1 transaction for debug traceBlockByNumber Dec 12, 2023
@oleksandrSydorenkoJ
Copy link
Author

The same behavior for traceBlockByHash

> debug.traceBlockByHash('0x1275ee77bc5334b11960c4dd5a08faebe9b795ebd3543e60a6b58c35e1a1f2b5', {"tracer": "callTracer"})
Error: vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
    at web3.js:3143:20
    at web3.js:6347:15
    at web3.js:5081:36
    at <anonymous>:1:1

@oleksandrSydorenkoJ
Copy link
Author

The same behavior for debug_traceTransaction

curl http://10.3.155.147:10131 -X POST -H "Content-Type: application/json" --data '{"method":"debug_traceTransaction","params":["0x7d7cd2a45dacbab63b9fdc22d3e0230d35d5c5afe78fa32c9b0f7e6fe19044b7",{"tracer":"prestateTracer"}],"id":1,"jsonrpc":"2.0"}'
{"error":{"code":-32000,"message":"vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)"},"id":1}

@PolinaKiporenko PolinaKiporenko moved this to Ready For Pickup in SKALE Engineering 🚀 Dec 13, 2023
@oleksandrSydorenkoJ oleksandrSydorenkoJ changed the title Skaled return an error if block contains more than 1 transaction for debug traceBlockByNumber Skaled return an error if block contains more than 1 transaction from different users for debug traceBlockByNumber Jan 5, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 12, 2024
kladkogex added a commit that referenced this issue Jan 15, 2024
@kladkogex kladkogex linked a pull request Jan 15, 2024 that will close this issue
@PolinaKiporenko PolinaKiporenko moved this from Ready For Pickup to In Progress in SKALE Engineering 🚀 Jan 16, 2024
@PolinaKiporenko PolinaKiporenko moved this from In Progress to Code Review in SKALE Engineering 🚀 Jan 17, 2024
@kladkogex kladkogex moved this from Code Review to Merged To Release Candidate in SKALE Engineering 🚀 Jan 22, 2024
@kladkogex kladkogex moved this from Merged To Release Candidate to QA in SKALE Engineering 🚀 Jan 22, 2024
@github-project-automation github-project-automation bot moved this from QA to Ready For Release Candidate in SKALE Engineering 🚀 Feb 5, 2024
@PolinaKiporenko
Copy link
Contributor

3.18.1-beta.0

@PolinaKiporenko PolinaKiporenko moved this from Ready For Release Candidate to Merged To Release Candidate in SKALE Engineering 🚀 May 2, 2024
@oleksandrSydorenkoJ
Copy link
Author

Verified on legacy network
skale_schain_these-long-sadalsuud
skalenetwork/schain:3.18.1-beta.0-historic
Block 299549

curl http://localhost:10195/   -X POST -H "Content-Type: application/json" --data '{"method":"debug_traceBlockByHash","params":["0xf8152326594f579518ce649e7e716d034feed4eb3993a4b5ef5f8811dd7f367e", {"tracer": "callTracer"}], "id":1,"jsonrpc":"2.0"}'
{"id":1,"jsonrpc":"2.0","result":[{"result":{"error":"execution reverted","from":"0x482d7f53cba6ae73a354533673c48e2dfd560949","gas":"0x30d40","gasUsed":"0x64bc","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000014496e73756666696369656e742062616c616e6365000000000000000000000000","revertReason":"Insufficient balance","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0x6f2af81740fbd00b2dc808aebed08cd9191e26c20c518506c81069056ba4a5a2"},{"result":{"from":"0xe3cc6ec63b5652d1594bc63bb293f4e80f76dbdd","gas":"0x30d40","gasUsed":"0x19062","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000001","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0x652cdca90b236cc37d4ce2b5b0ed9072c510468e6dfef40b48fca7c5c1512c6e"},{"result":{"error":"execution reverted","from":"0xa6d50055592cecb795bc1ed3b9ea57ed426b0b7c","gas":"0x30d40","gasUsed":"0x64bc","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000014496e73756666696369656e742062616c616e6365000000000000000000000000","revertReason":"Insufficient balance","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0x7c9dbb1c7e8908d83175c9d40e0ffb536710cffb09bcb7fe790ea56e4d1459f6"},{"result":{"from":"0x3f5bdf5d4c274c82b8d17aa2810b00d2cf050f24","gas":"0x30d40","gasUsed":"0x19062","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000001","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0xcf96aa12d56275dc3e2e9e2daee6693d2bad1efd7493a99d3eeaa4b88f2a2688"},{"result":{"from":"0x94c6e5746971d6aebeaa42cbbe2feca0f6b5b24f","gas":"0x30d40","gasUsed":"0x19062","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x0000000000000000000000000000000000000000000000000000000000000001","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0x98a708626a82498451b8183ec2609cd1d1eee5d0ec5949651ceba68387a79a43"},{"result":{"error":"execution reverted","from":"0xb70603c505f85130b5b2e73cd82d196dfd7d8b5e","gas":"0x30d40","gasUsed":"0x64bc","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000014496e73756666696369656e742062616c616e6365000000000000000000000000","revertReason":"Insufficient balance","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0xd0258d700e644bf2f66bfc1eeb3ea2982fc658efdd14a3b378bcd72ba8e70b58"},{"result":{"error":"execution reverted","from":"0xbf5aa678b969c0871e2fbcf09c3dbb5d5865ac1e","gas":"0x30d40","gasUsed":"0x64bc","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000014496e73756666696369656e742062616c616e6365000000000000000000000000","revertReason":"Insufficient balance","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0xcde552781f7096bd310d35367bd12f4df42eea8752f8db048d79f934f08b1023"},{"result":{"error":"execution reverted","from":"0x079cf317ef40b16141784b6fabff812d64f7c0fd","gas":"0x30d40","gasUsed":"0x64bc","input":"0x56b8c7240000000000000000000000007cef6369dfd5377d823a2c65b3c2de740d52a5b400000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000008366393063613830343832303136623833303138366130393438386664356530313037383632396363313934633933336439363331623934342020202020202020202020202020386665313062316438306239306334343764393330313962303030303033306365653739333865396562613265393132313162373862333239653236320000000000000000000000000000000000000000000000000000000000","output":"0x08c379a000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000014496e73756666696369656e742062616c616e6365000000000000000000000000","revertReason":"Insufficient balance","to":"0x8722eb776a5d9a2ffd914648381fe2daf80c7add","type":"CALL","value":"0x0"},"txHash":"0xacfdd073d859caefdb41150abad37f82de013206b73c214a5416105485e65ee3"}]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants