Open chetan-zilliqa opened 1 month ago
Adding @DrZoltanFazekas @JamesHinshelwood @bzawisto
@chetan-zilliqa Did you post the ZQ1 response twice? Both the responses look the same to me. :stuck_out_tongue:
haha. Yeah, here is the zq1 response
{
"id": "1",
"jsonrpc": "2.0",
"result": {
"body": {
"BlockHash": "cfc9972754842cb3d94475c52c81d8caac6ed63073275c52b7a21af9799e9077",
"HeaderSign": "2CFFD020EC434242F1FAC9662EBC93E8ADC391423D923EFB4E777BAC34E36D66C3074B7C5B039118B0D5287CE0BBD5DA1CE88B0C5DF52655A69FED1C49937CBF",
"MicroBlockInfos": [
{
"MicroBlockHash": "34faf1c98b03205613d5f5c1c8bc8bf8aaeb4db59e5f6a1f28116d01d379773b",
"MicroBlockShardId": 1,
"MicroBlockTxnRootHash": "0000000000000000000000000000000000000000000000000000000000000000"
}
]
},
"header": {
"BlockNum": "7325387",
"DSBlockNum": "73250",
"GasLimit": "200000",
"GasUsed": "0",
"MbInfoHash": "5689c607526f779f00eb71d3d6bc4eb10be5b529266351ad2a517714a3cbe70c",
"MinerPubKey": "0x03E23726080A4B5FEC5E3F4E3DF215E9905A0A831BD39CBFB488E4234438F3F3E7",
"NumMicroBlocks": 1,
"NumPages": 0,
"NumTxns": 0,
"PrevBlockHash": "02a9bd2ba7b3677f3a92ae16b53e9cb51903265518ba08a662959ac75934f732",
"Rewards": "0",
"StateDeltaHash": "0000000000000000000000000000000000000000000000000000000000000000",
"StateRootHash": "9c0b640c619ca6dab992b7f6c709bf4c6553441853e6616efc1bcb230605c849",
"Timestamp": "1727867100537522",
"TxnFees": "0",
"Version": 1
}
}
}
Values that differ between ZQ2 and ZQ1:
root['result']['body']['HeaderSign']:
ZQ2 -> 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
ZQ1 -> 0F2902579BD02FACE1778FDAAC4872000DD3C463A82405354CC342DABC64CD001D8DA143F0688A520E21E7382CEC7C366FA1D9F98C0B6B0F9A946CC4F67AA0B4
root['result']['header']['MbInfoHash']:
ZQ2 -> 0000000000000000000000000000000000000000000000000000000000000000
ZQ1 -> 2f9dd0a266f5ef9a4294ee1f961b096e4af7f9da3cb878d88ee1e89a54ce8759
root['result']['header']['NumMicroBlocks']:
ZQ2 -> 0
ZQ1 -> 4
root['result']['header']['StateDeltaHash']:
ZQ2 -> 0000000000000000000000000000000000000000000000000000000000000000
ZQ1 -> 4675069ff186f06d1af45a42bf65c1fe132612af6d8070b5cda8d30b0fad5bea
root['result']['header']['StateRootHash']:
ZQ2 -> e8e3b27a5a9629bf026556477750c888f763212b6adddb94234d7ac2f6135efb
ZQ1 -> 3a600ca11a0afb3ec7cbd3467e4d7d65ab7e6ba9514bf53e9d549e207cf07e6d
root['result']['header']['TxnFees']:
ZQ2 -> 0
ZQ1 -> 6102000035136
So, we know that we don't have microblocks and microblock hashes in zq2 so we will completely remove those keys from the responses. But not sure about the other keys.
1) TxnFees 2) StateRootHash 3) StateDeltaHash 4) HeaderSign
cc @JamesHinshelwood @DrZoltanFazekas @bzawisto
So, from checking the code:
block.state_root_hash()
, so I don't know why that's different. Could be a persistence conversion issue?Lets accept the mismatch in stateRootHash
. The state is stored differently in ZQ1 vs ZQ2 and we accept the breakage there.
@chetan-zilliqa or @bzawisto Need to check below point raised by @maxconway Should TxnFees be taken from the gas_used field of the block?
I used
z2 converter
and converted testnet persistence from ZQ1 to ZQ2. TheMicroBlockInfos
and other fields likeMinerPubKey
object is missing from the response.ZQ2 response: