ethereum / execution-specs

Specification for the Execution Layer. Tracking network upgrades.
Creative Commons Zero v1.0 Universal
810 stars 225 forks source link

t8n receipt information WIP #770

Closed winsvega closed 1 year ago

winsvega commented 1 year ago

here is my attempt to introduce t8n receipt information. I need at least those 3 fields.

gurukamath commented 1 year ago

Finally, I would add additional checks in the tests to make sure that the tx_hash, gas_used etc in the receipt is calculated properly. You could add the following checks at the end of the t8n_tool_test function in the tests/evm_tools/test_t8n.py module.

    if "receipts" in data["result"]:
        assert len(json_result["receipts"]) == len(data["result"]["receipts"])
        for t8n_receipt, expected_receipt in zip(
            json_result["receipts"], data["result"]["receipts"]
        ):
            assert t8n_receipt["gasUsed"] == expected_receipt["gasUsed"]
            assert (
                t8n_receipt["transactionHash"]
                == expected_receipt["transactionHash"]
            )
            assert t8n_receipt["blockHash"] == expected_receipt["blockHash"]
codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (c90ccbe) 74.06% compared to head (4923db6) 74.06%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #770 +/- ## ======================================= Coverage 74.06% 74.06% ======================================= Files 570 570 Lines 31557 31557 ======================================= Hits 23372 23372 Misses 8185 8185 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `74.06% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ethereum#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

gurukamath commented 1 year ago

Finally, I would add additional checks in the tests to make sure that the tx_hash, gas_used etc in the receipt is calculated properly. You could add the following checks at the end of the t8n_tool_test function in the tests/evm_tools/test_t8n.py module.

I just missed this part in the review. Could you please add these checks in the tests?

winsvega commented 1 year ago

Actually I did. But it got lost it seems.