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

ZQ2-Converter : GetTransaction has depth field mismatch. #2131

Open
chetan-zilliqa opened this issue Jan 13, 2025 · 2 comments
Open

ZQ2-Converter : GetTransaction has depth field mismatch. #2131

chetan-zilliqa opened this issue Jan 13, 2025 · 2 comments
Assignees
Labels
Agate Required for mainnet launch

Comments

@chetan-zilliqa
Copy link
Contributor

chetan-zilliqa commented Jan 13, 2025

If you call GetTransaction api , the following are the differences.

  1. The depth field in transition has value 0 in ZQ2 while it has 1 in ZQ1. sometimes ZQ2 has garbage value for eg -18446744073709551615 in depth field.
  2. Receipt has missing event_logs field.
  3. cumulative_gas and nonce is wrong , refer to b95dd8837550bfdbcbb983a2860a2d0cd3eaad7a8902db51352ac8c178486ccf transaction id with below curl.

ZQ1 call:

curl --request POST \
  --url http://34.126.135.118:4201/ \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetTransaction",
		"params": ["6a43f762ddb0492954918496b4254df0d1dcf5f81bcdbc4e532e2b5cb5010516"]
}'

ZQ2 call:

curl --request POST \
  --url http://34.87.132.124:4202/ \
  --header 'Content-Type: application/json' \
  --data '{
    "id": "1",
    "jsonrpc": "2.0",
    "method": "GetTransaction",
		"params": ["6a43f762ddb0492954918496b4254df0d1dcf5f81bcdbc4e532e2b5cb5010516"]
}'

Depth field difference :

Values that differ between ZQ2 and ZQ1:
  root['result']['senderPubKey']:
    ZQ2 -> 0x03e8f67f75d7842725c11b01800a18e539981a162dd390a60ab149237e3a54ffe4
    ZQ1 -> 0x03E8F67F75D7842725C11B01800A18E539981A162DD390A60AB149237E3A54FFE4
  root['result']['signature']:
    ZQ2 -> 0xc1db10aabd8071677711b6a8fac420a483fc6c972419115fac5b5d246c6daaf65fe6cefbb20fc3a709ecc43130490e6c0dfdff90ec8d41a573eeea8d56ca8a10
    ZQ1 -> 0xC1DB10AABD8071677711B6A8FAC420A483FC6C972419115FAC5B5D246C6DAAF65FE6CEFBB20FC3A709ECC43130490E6C0DFDFF90EC8D41A573EEEA8D56CA8A10
  root['result']['receipt']['transitions'][1]:
    ZQ2 -> {'addr': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', 'depth': 0, 'msg': {'_amount': '0', '_recipient': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '_tag': 'RecipientAcceptTransfer', 'params': [{'type': 'ByStr20', 'value': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'vname': 'sender'}, {'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'recipient'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}}
    ZQ1 -> {'addr': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', 'depth': 1, 'msg': {'_amount': '0', '_recipient': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '_tag': 'RecipientAcceptTransfer', 'params': [{'type': 'ByStr20', 'value': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'vname': 'sender'}, {'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'recipient'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}}
  root['result']['receipt']['transitions'][2]:
    ZQ2 -> {'addr': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', 'depth': 0, 'msg': {'_amount': '0', '_recipient': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', '_tag': 'TransferSuccessCallBack', 'params': [{'type': 'ByStr20', 'value': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'vname': 'sender'}, {'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'recipient'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}}
    ZQ1 -> {'accepted': False, 'addr': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', 'depth': 1, 'msg': {'_amount': '0', '_recipient': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', '_tag': 'TransferSuccessCallBack', 'params': [{'type': 'ByStr20', 'value': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'vname': 'sender'}, {'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'recipient'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}}
  root['result']['receipt']['transitions'][0]:
    ZQ2 -> {'addr': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'depth': 18446744073709551615, 'msg': {'_amount': '0', '_recipient': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', '_tag': 'Transfer', 'params': [{'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'to'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}}
    ZQ1 -> {'accepted': False, 'addr': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'depth': 0, 'msg': {'_amount': '0', '_recipient': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', '_tag': 'Transfer', 'params': [{'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'to'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}}

missing event logs:

Lists empty in ZQ2 but populated in ZQ1:
  root['result']['receipt']['event_logs']:
    ZQ2 -> []
    ZQ1 -> [{'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1012', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1112621466371552168'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1011', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1112621466371552168'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1010', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1009', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1008', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1007', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1006', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1005', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1004', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1003', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1002', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1001', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '1000', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'Claimed', 'address': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'params': [{'type': 'Uint32', 'value': '999', 'vname': 'epoch_number'}, {'type': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf', 'value': {'argtypes': [], 'arguments': ['0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', '1184403496460039405'], 'constructor': '0x96c300ce0697e3524190943cd05681d7abe7c1ca.DistributionLeaf'}, 'vname': 'data'}]}, {'_eventname': 'TransferSuccess', 'address': '0x327082dd216ff625748b13e156b9d1a5d3dd41f2', 'params': [{'type': 'ByStr20', 'value': '0x96c300ce0697e3524190943cd05681d7abe7c1ca', 'vname': 'sender'}, {'type': 'ByStr20', 'value': '0xed958ed3f4c8be8772aa53c5fd83c45977f0c30b', 'vname': 'recipient'}, {'type': 'Uint128', 'value': '16438084890263577196', 'vname': 'amount'}]}]

@maxconway
Copy link
Contributor

@chetan-zilliqa I've already got a separate issue for the missing transitions and event logs, which appears to be a persistence conversion issue: #2124

Would you be able to put these bugs in with that issue and adjust the naming if possible? Given we've already got some issues in transaction receipt persistence conversion I think these need to be looked at from that perspective first.

Sorry for asking, I'd do it myself but if I re-report a bug you've found we might end up in a chinese whispers sort of situation.

@chetan-zilliqa chetan-zilliqa changed the title ZQ2-Converter : GetTransaction api difference. ZQ2-Converter : GetTransaction has depth field mismatch. Jan 13, 2025
@chetan-zilliqa
Copy link
Contributor Author

Thanks, that makes sense. Since transitions and event logs are being tracked in #2124 , I have updated the title of this ticket to reflect that it addresses the depth field mismatch issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agate Required for mainnet launch
Projects
None yet
Development

No branches or pull requests

2 participants