Skip to content
New issue

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

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

Already on GitHub? # to your account

trace_block JSON RPC method response doesn't contain "to" property for some transactions #2346

Closed
vbaranov opened this issue May 22, 2024 · 2 comments

Comments

@vbaranov
Copy link

RSKj version: RskJ/6.0.0/Linux/Java1.8/ARROWHEAD-46636a3

trace_block request to RSK Mainnet JSON RPC node for block 3881560:

curl -sL \
  -H "Content-Type:application/json;charset=utf-8" \
  -d "{
      \"jsonrpc\": \"2.0\",
      \"id\": 1,
      \"method\": \"trace_block\",
      \"params\": [
          \"0x3B3A58\"
      ]
  }" \
http://...:4444

One of the traces of transaction with hash 0x59565f05f908644271207aced33b06c22c2fd2314340f5d02fbafef8b709d1f0 doesn't contain to property in action:

{
            "action": {
                "callType": "delegatecall",
                "from": "0x3cc937ca0c1250f6a4cc544232b3f9cb389c7d56",
                "gas": "0x5b6e",
                "input": "0x",
                "value": "0x0"
            },
            "blockHash": "0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e",
            "blockNumber": 3881560,
            "transactionHash": "0x59565f05f908644271207aced33b06c22c2fd2314340f5d02fbafef8b709d1f0",
            "transactionPosition": 0,
            "type": "call",
            "subtraces": 0,
            "traceAddress": [
                0,
                0
            ],
            "result": {
                "gasUsed": "0x0",
                "output": "0x"
            }
        }

The full response:

{"jsonrpc":"2.0","id":1,"result":[{"action":{"callType":"call","from":"0xb8c18e036d46c5fb94d7debaaed92afabe65ee61","to":"0x3cc937ca0c1250f6a4cc544232b3f9cb389c7d56","gas":"0xfdc6","input":"0x6a7612020000000000000000000000008d29be29923b68abfdd21e541b9374737b49cdad0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000005f180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000e48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000009900c4b52a6d94e8d468de7b2bef97c49210395fb5db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044c99c4448000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041000000000000000000000000b8c18e036d46c5fb94d7debaaed92afabe65ee6100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000","value":"0x0"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0x59565f05f908644271207aced33b06c22c2fd2314340f5d02fbafef8b709d1f0","transactionPosition":0,"type":"call","subtraces":1,"traceAddress":[],"result":{"gasUsed":"0xa92f","output":"0x"}},{"action":{"callType":"delegatecall","from":"0x3cc937ca0c1250f6a4cc544232b3f9cb389c7d56","to":"0xe502b44b0f3981f883e03dfa1dff119753178b40","gas":"0x84cf","input":"0x6a7612020000000000000000000000008d29be29923b68abfdd21e541b9374737b49cdad0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000005f180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000e48d80ff0a0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000009900c4b52a6d94e8d468de7b2bef97c49210395fb5db00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044c99c4448000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041000000000000000000000000b8c18e036d46c5fb94d7debaaed92afabe65ee6100000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000","value":"0x0"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0x59565f05f908644271207aced33b06c22c2fd2314340f5d02fbafef8b709d1f0","transactionPosition":0,"type":"call","subtraces":1,"traceAddress":[0],"result":{"gasUsed":"0x300b","output":"0x0000000000000000000000000000000000000000000000000000000000000001"}},{"action":{"callType":"delegatecall","from":"0x3cc937ca0c1250f6a4cc544232b3f9cb389c7d56","gas":"0x5b6e","input":"0x","value":"0x0"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0x59565f05f908644271207aced33b06c22c2fd2314340f5d02fbafef8b709d1f0","transactionPosition":0,"type":"call","subtraces":0,"traceAddress":[0,0],"result":{"gasUsed":"0x0","output":"0x"}},{"action":{"callType":"call","from":"0xccedc255128e161589c242a3ce9a6e54962b5ebd","to":"0x0000000000000000000000000000000001000006","gas":"0x0","input":"0x","value":"0x0"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0x5f490a3459b76a737b5d0f21f37ac9cb324d1e6223ec750635cd203a3970310a","transactionPosition":1,"type":"call","subtraces":0,"traceAddress":[],"result":{"gasUsed":"0x10ea0","output":"0x"}},{"action":{"callType":"call","from":"0x0000000000000000000000000000000000000000","to":"0x0000000000000000000000000000000001000008","gas":"0x0","input":"0x","value":"0x0"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0xe8150ffd48ae74534ec61769e33f8ae9c331dfa588f7b7c830ba6a76407a5f2b","transactionPosition":2,"type":"call","subtraces":4,"traceAddress":[],"result":{"gasUsed":"0x0","output":"0x"}},{"action":{"callType":"call","from":"0x0000000000000000000000000000000001000008","to":"0xdcb12179ba4697350f66224c959bdd9c282818df","gas":"0x0","input":"0x","value":"0x328bbd3f507"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0xe8150ffd48ae74534ec61769e33f8ae9c331dfa588f7b7c830ba6a76407a5f2b","transactionPosition":2,"type":"call","subtraces":0,"traceAddress":[0],"result":{"gasUsed":"0x0","output":"0x"}},{"action":{"callType":"call","from":"0x0000000000000000000000000000000001000008","to":"0x1b7a75ef070ff49e6b9491a26403d799f2099ebd","gas":"0x0","input":"0x","value":"0x14042301853"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0xe8150ffd48ae74534ec61769e33f8ae9c331dfa588f7b7c830ba6a76407a5f2b","transactionPosition":2,"type":"call","subtraces":0,"traceAddress":[1],"result":{"gasUsed":"0x0","output":"0x"}},{"action":{"callType":"call","from":"0x0000000000000000000000000000000001000008","to":"0x12d3178a62ef1f520944534ed04504609f7307a1","gas":"0x0","input":"0x","value":"0x4d031db9b0b"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0xe8150ffd48ae74534ec61769e33f8ae9c331dfa588f7b7c830ba6a76407a5f2b","transactionPosition":2,"type":"call","subtraces":0,"traceAddress":[2],"result":{"gasUsed":"0x0","output":"0x"}},{"action":{"callType":"call","from":"0x0000000000000000000000000000000001000008","to":"0x1b7a75ef070ff49e6b9491a26403d799f2099ebd","gas":"0x0","input":"0x","value":"0x5110c0f95ba"},"blockHash":"0xfcc4e370b449f120095a67e1ee0bba68d4ee46f07b2f0c0e415416d4769d3f6e","blockNumber":3881560,"transactionHash":"0xe8150ffd48ae74534ec61769e33f8ae9c331dfa588f7b7c830ba6a76407a5f2b","transactionPosition":2,"type":"call","subtraces":0,"traceAddress":[3],"result":{"gasUsed":"0x0","output":"0x"}}]}
@Vovchyk
Copy link
Contributor

Vovchyk commented May 23, 2024

looks like this is a sort of incompatibility in trace_block when there's an internal delegatecall to non-existing contract address. Thanks for reporting this, @vbaranov

@vbaranov
Copy link
Author

vbaranov commented Jul 9, 2024

The issue has been resolved with RSKj v6.3.0.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants