-
Notifications
You must be signed in to change notification settings - Fork 83
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
base: main
Are you sure you want to change the base?
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 <michal.walczak@arianelabs.com>
…ation compatibility with Ethereum JSON-RPC standards and add corresponding tests (hiero-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
🎉 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) |
Codecov ReportAttention: Patch coverage is @@ Coverage Diff @@
## main #3825 +/- ##
=======================================
Coverage ? 46.67%
=======================================
Files ? 80
Lines ? 4692
Branches ? 975
=======================================
Hits ? 2190
Misses ? 2153
Partials ? 349
🚀 New features to boost your workflow:
|
…ro-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
packages/relay/tests/lib/services/ethService/blockService/BlockService.spec.ts
Outdated
Show resolved
Hide resolved
… transactions (hiero-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
…r#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
…with `null` to field (hiero-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
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 <michal.walczak@arianelabs.com>
…nReceiptFactory` (hiero-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
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 <michal.walczak@arianelabs.com>
…n-existent block Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
…deployment tests (hiero-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
…hiero-ledger#3814) Signed-off-by: Michał Walczak <michal.walczak@arianelabs.com>
30829ca
to
7789fe7
Compare
Signed-off-by: Michał Walczak <151550037+mwb-al@users.noreply.github.com>
Description:
There is a discrepancy between Hedera and standard Ethereum behavior regarding the
to
field in transaction receipts for contract creation transactions:to
field, the transaction receipt also reports a nullto
fieldto
field with the address of the newly created contractThis inconsistency affects both
eth_getTransactionReceipt
andeth_getBlockReceipts
endpoints, causing compatibility issues with Ethereum tooling that expects standard transaction receipt formats.Solution
This PR implements a centralized fix in
TransactionReceiptFactory.createRegularReceipt()
to correct theto
field behavior for contract creation transactions. The solution:created_contract_ids
arrayto
field to null: When direct contract creation is detected, theto
field is set to null to match standard Ethereum JSON-RPC behavioreth_getTransactionReceipt
andeth_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