-
Notifications
You must be signed in to change notification settings - Fork 88
feat: fix contract creation tx receipt compatibility with Ethereum spec #3825
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
feat: fix contract creation tx receipt compatibility with Ethereum spec #3825
Conversation
…n nullable types and add tests validating address resolution logic (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
…ation compatibility with Ethereum JSON-RPC standards and add corresponding tests (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
…ro-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
packages/relay/tests/lib/services/ethService/blockService/BlockService.spec.ts
Outdated
Show resolved
Hide resolved
… transactions (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
Signed-off-by: Michał Walczak <[email protected]>
…r#3814) Signed-off-by: Michał Walczak <[email protected]>
…with `null` to field (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change only impact eth_getBlockReceipts, or eth_getTransactionReceipt as well? Because there is test change for eth_getTransactionReceipt, but I would have assumed that TransactionService.ts::handleRegularTransactionReceipt needs to be changed as well.
In any case, we should update both this PR and issue descriptions to match the actual scope of this PR.
…ipts to `transactionReceiptFactory` (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
…nReceiptFactory` (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@quiet-node I have updated the branch with the latest main and made sure all tests pass. |
@mwb-al hey thanks looks like the DCO is still failing. Please update the branch and will approve again |
30829ca to
525de14
Compare
525de14 to
30829ca
Compare
…ct deployments with `null` to field (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
…n-existent block Signed-off-by: Michał Walczak <[email protected]>
…deployment tests (hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
…hiero-ledger#3814) Signed-off-by: Michał Walczak <[email protected]>
30829ca to
7789fe7
Compare
Signed-off-by: Michał Walczak <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. @@ Coverage Diff @@
## main #3825 +/- ##
=======================================
Coverage ? 40.55%
=======================================
Files ? 83
Lines ? 4774
Branches ? 972
=======================================
Hits ? 1936
Misses ? 2565
Partials ? 273
🚀 New features to boost your workflow:
|
Description:
There is a discrepancy between Hedera and standard Ethereum behavior regarding the
tofield in transaction receipts for contract creation transactions:tofield, the transaction receipt also reports a nulltofieldtofield with the address of the newly created contractThis inconsistency affects both
eth_getTransactionReceiptandeth_getBlockReceiptsendpoints, causing compatibility issues with Ethereum tooling that expects standard transaction receipt formats.Solution
This PR implements a centralized fix in
TransactionReceiptFactory.createRegularReceipt()to correct thetofield behavior for contract creation transactions. The solution:created_contract_idsarraytofield to null: When direct contract creation is detected, thetofield is set to null to match standard Ethereum JSON-RPC behavioreth_getTransactionReceiptandeth_getBlockReceipts) use the same factory method, this change ensures consistent behavior across both endpointsThis change affects:
eth_getTransactionReceipt- Individual transaction receipt querieseth_getBlockReceipts- Batch transaction receipt queries for entire blocksRelated issue(s):
Fixes #3814
Checklist