-
Notifications
You must be signed in to change notification settings - Fork 206
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 (internal/ethapi): implement eth_getBlockReceipts #2284
feat (internal/ethapi): implement eth_getBlockReceipts #2284
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2284 +/- ##
==========================================
+ Coverage 55.06% 55.76% +0.70%
==========================================
Files 684 684
Lines 114596 92000 -22596
==========================================
- Hits 63097 51308 -11789
+ Misses 47617 36795 -10822
- Partials 3882 3897 +15 ☔ View full report in Codecov by Sentry. |
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.
Looks good so far, please add the missing docstring.
For future reference, upstream PR: ethereum/go-ethereum#27702 |
@kamikazechaser I had another look and I think we need to add the effective gas price to the receipts as it is done in celo-blockchain/internal/ethapi/api.go Lines 1693 to 1710 in d77ad8e
|
* generateReceiptResponse now receives a context and a backend interface so as to also compute the effectiveGasPrice field in transaction receipts
@palango I have refactored the I have also noticed there is an |
Thanks, the changes look good. Needs a merge from master, where a new transaction type was added in the meantime, but the conflict is easy to resolve.
Yes, this is the RPC API to get receipts for celo system transactions. Not having the field added for them is fine. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2284 +/- ##
==========================================
+ Coverage 55.06% 55.76% +0.70%
==========================================
Files 684 684
Lines 114596 92000 -22596
==========================================
- Hits 63097 51308 -11789
+ Misses 47617 36795 -10822
- Partials 3882 3897 +15 ☔ View full report in Codecov by Sentry. |
Sounds good. I have also added the DenominatedFeeCurrency changes. |
Coverage from tests in coverage: 51.1% of statements across all listed packagescoverage: 63.4% of statements in consensus/istanbul coverage: 43.3% of statements in consensus/istanbul/announce coverage: 56.0% of statements in consensus/istanbul/backend coverage: 0.0% of statements in consensus/istanbul/backend/backendtest coverage: 24.3% of statements in consensus/istanbul/backend/internal/replica coverage: 65.6% of statements in consensus/istanbul/core coverage: 50.0% of statements in consensus/istanbul/db coverage: 0.0% of statements in consensus/istanbul/proxy coverage: 64.2% of statements in consensus/istanbul/uptime coverage: 51.8% of statements in consensus/istanbul/validator coverage: 79.2% of statements in consensus/istanbul/validator/random |
* feat (internal/ethapi): implement eth_getBlockReceipts * ref: #2187 * inline-docs (eth-client): add description for BlockReceipts * refactor (ethapi/api.go): generateReceiptResponse helper * generateReceiptResponse now receives a context and a backend interface so as to also compute the effectiveGasPrice field in transaction receipts * reconcile: receipt changes from master 272982b (#2278)
Description
Addition of a new ETH RPC method
eth_getBlockReceipts
.ethereum/execution-apis#438
Standardized and implemented in several eth clients e.g. geth, nethermind, nimbus, besu e.t.c.
Other changes
None.
Tested
internal/ethapi/api.go
is not covered by any tests.To be tested on a devnet/testnet with existing chaindata.
Related issues
Resolves #2187
Backwards compatibility
Backwards compatible.