Open chetan-zilliqa opened 3 weeks ago
ZQ1:
curl --request POST \
--url http://34.124.185.137:4201/ \
--header 'Content-Type: application/json' \
--data '{
"id": "1",
"jsonrpc": "2.0",
"method": "GetTransaction",
"params": ["0x4964bf50c8f598f6deedaed6c34cc5d739f8a9a8aecf8eb548206af8594e6c89"]
}'
Output:
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"ID": "4964bf50c8f598f6deedaed6c34cc5d739f8a9a8aecf8eb548206af8594e6c89",
"amount": "0",
"data": "{\"_tag\": \"assign_stake_reward\", \"params\": [{\"vname\": \"ssnreward_list\", \"type\": \"List SsnRewardShare\", \"value\": [{\"constructor\": \"SsnRewardShare\", \"argtypes\": [], \"arguments\": [\"0x812dd251d3ef36ba94acc4f2803ce090386cff91\", \"274794\"]}, {\"constructor\": \"SsnRewardShare\", \"argtypes\": [], \"arguments\": [\"0xe411ab7119664cbae57f67601851edc08c569a0f\", \"274794\"]}]}, {\"vname\": \"reward_blocknum\", \"type\": \"Uint32\", \"value\": \"710000\"}]}",
"gasLimit": "10000",
"gasPrice": "1000000000",
"nonce": "59",
"receipt": {
"accepted": false,
"cumulative_gas": "3414",
"epoch_num": "710003",
"event_logs": [
{
"_eventname": "SSN assign reward",
"address": "0xd62bdccb7cfd8d564e645fb74a0d10741e73a4f2",
"params": [
{
"type": "ByStr20",
"value": "0xe411ab7119664cbae57f67601851edc08c569a0f",
"vname": "ssn_address"
},
{
"type": "Uint128",
"value": "602824509000000000",
"vname": "total_reward"
}
]
},
{
"_eventname": "SSN assign reward",
"address": "0xd62bdccb7cfd8d564e645fb74a0d10741e73a4f2",
"params": [
{
"type": "ByStr20",
"value": "0x812dd251d3ef36ba94acc4f2803ce090386cff91",
"vname": "ssn_address"
},
{
"type": "Uint128",
"value": "16762434000000000",
"vname": "total_reward"
}
]
}
],
"success": true,
"transitions": [
{
"accepted": false,
"addr": "0x38cef22914277a24993235eef92c4a0b3e7e42ed",
"depth": 0,
"msg": {
"_amount": "0",
"_recipient": "0xd62bdccb7cfd8d564e645fb74a0d10741e73a4f2",
"_tag": "assign_stake_reward",
"params": [
{
"type": "List (SsnRewardShare)",
"value": [
{
"argtypes": [],
"arguments": [
"0x812dd251d3ef36ba94acc4f2803ce090386cff91",
"274794"
],
"constructor": "SsnRewardShare"
},
{
"argtypes": [],
"arguments": [
"0xe411ab7119664cbae57f67601851edc08c569a0f",
"274794"
],
"constructor": "SsnRewardShare"
}
],
"vname": "ssnreward_list"
},
{
"type": "Uint32",
"value": "710000",
"vname": "reward_blocknum"
},
{
"type": "ByStr20",
"value": "0x412b55a0ebc1001f930aba8dc107022a3a2ba484",
"vname": "initiator"
}
]
}
}
]
},
"senderPubKey": "0x039CCA4E7D77EC58F597A43DBBFD872ED3A274F21BE8FE0A213C8F89DC994ACAEE",
"signature": "0x1FDDFBFF576AD415C9C8A5A1561714800CE1AB50BCA5EEC02C59BF063289AA0054086F64B8AA00E16F3A850BD0538D104CAC186B18EA8D699394A6F91992071E",
"toAddr": "38cef22914277a24993235eef92c4a0b3e7e42ed",
"version": "65537"
}
}
vs ZQ2
curl --request POST \
--url http://34.124.218.159:4201/ \
--header 'Content-Type: application/json' \
--data '{
"id": "1",
"jsonrpc": "2.0",
"method": "GetTransaction",
"params": ["0x4964bf50c8f598f6deedaed6c34cc5d739f8a9a8aecf8eb548206af8594e6c89"]
}'
output:
{
"jsonrpc": "2.0",
"id": "1",
"result": {
"ID": "4964bf50c8f598f6deedaed6c34cc5d739f8a9a8aecf8eb548206af8594e6c89",
"version": "65537",
"nonce": "58",
"toAddr": "38cef22914277a24993235eef92c4a0b3e7e42ed",
"senderPubKey": "0x039cca4e7d77ec58f597a43dbbfd872ed3a274f21be8fe0a213c8f89dc994acaee",
"amount": "0",
"signature": "0x1fddfbff576ad415c9c8a5a1561714800ce1ab50bca5eec02c59bf063289aa0054086f64b8aa00e16f3a850bd0538d104cac186b18ea8d699394a6f91992071e",
"receipt": {
"cumulative_gas": "8",
"epoch_num": "710003",
"success": true
},
"gasPrice": "1000000000",
"gasLimit": "10000",
"data": "{\"_tag\": \"assign_stake_reward\", \"params\": [{\"vname\": \"ssnreward_list\", \"type\": \"List SsnRewardShare\", \"value\": [{\"constructor\": \"SsnRewardShare\", \"argtypes\": [], \"arguments\": [\"0x812dd251d3ef36ba94acc4f2803ce090386cff91\", \"274794\"]}, {\"constructor\": \"SsnRewardShare\", \"argtypes\": [], \"arguments\": [\"0xe411ab7119664cbae57f67601851edc08c569a0f\", \"274794\"]}]}, {\"vname\": \"reward_blocknum\", \"type\": \"Uint32\", \"value\": \"710000\"}]}"
}
}
If we notice here following fields are missing in ZQ2:
eys present in ZQ1 but missing in ZQ2:
root['result']['receipt']['accepted']
root['result']['receipt']['event_logs']
root['result']['receipt']['transitions']
cc @maxconway
Issue Summary:
Here are the URLs for ZQ1 and ZQ2. ZQ2 : http://34.124.218.159:4201/ ZQ1 : http://34.124.185.137:4201/
Calling
GetTransaction
on the ZQ1 and ZQ2 has the following diff.Result:
Missing keys:
Different Keys:
Observations: 1) nonce is increased by 1 on the converted persistence. 2) The cumulative gas parameter is set to 0. 3) The version field is different. 4) The event_logs filed is missing in ZQ2. This is expected as it is a scilla transaction. 5) format of values in lowercase which is fine.
Conclusion: If the above differences are expected and align with the migration to ZQ2, no further action is required. However, if these differences are unexpected, they may indicate issues that must be addressed.