Closed birdychang closed 1 year ago
Notes from @Terryhung
derived_gas_outputs -> TipSetMessageReceipts -> lotus code: BlockMsgsForTipset:
after MessagesForBlock got messages (BlsMessages & SecpkMessages), it uses selectMsg to filter message before returning
message_gas_economy -> TipSetBlockMessages -> MessagesForTipSetBlocks
-> lotus code : ChainGetBlockMessages -> MessagesForBlock to get messages (BlsMessages & SecpkMessages)
The root cause is that we inadvertently duplicated the calculation of messages with nonce duplication in message_gas_economy, causing a mismatch between message_gas_economy
and derived_gas_output
.
Here's an example of such message:
SELECT *
FROM visor.messages
WHERE height=3268061 AND "from"='f3wt7zk5zvyyfi2gh5lth4eav2qogeyobr2w6v4w3iafcxzn7hwcdsx5m2zxkwr2u2a6cpkxkb55mdhpiyyv6q'
cid | to | nonce | gas_limit |
---|---|---|---|
bafy2bzacebxegun7jrajoxoq66amvxjodoiklraht66qqvvlqjtarasheru36 | f02252173 | 67581 | 60934215 |
bafy2bzaceazdl3h5d32ph2fhbcv3a6dye56jybb3mjcexmszytjoclcgkmtqc | f02252173 | 67581 | 60934215 |
Theoretically message_gas_economy.gas_limit_unique_total should match the sum of gas_limit from derived_gas_outputs, but sometimes, the former is larger.