Skip to content
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

Retrieve all transaction receipts for a block in one request #6646

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Wetitpig
Copy link
Contributor

@Wetitpig Wetitpig commented Feb 29, 2024

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Most advanced CI tests are deferred until PR approval, but you could:

  • locally run all unit tests via: ./gradlew build
  • locally run all acceptance tests via: ./gradlew acceptanceTest
  • locally run all integration tests via: ./gradlew integrationTest
  • locally run all reference tests via: ./gradlew ethereum:referenceTests:referenceTests

PR description

  1. Retrieve all transaction receipts in a block in 1 call to blockchain query instead of a call for each transaction in a block
  2. Calculate transaction fee reward for miner based on effectivePriorityFeePerGas instead of effectiveGasPrice because baseFee would be burnt.

@Wetitpig
Copy link
Contributor Author

My node on snap sync shows static block reward as 0 even at genesis block of ETH mainnet.
Not sure if the protocol specification was purged as part of the state or simply a bug.

@Wetitpig Wetitpig force-pushed the receiptLoop branch 3 times, most recently from 89ea57c to 4341667 Compare March 1, 2024 10:42
@Wetitpig Wetitpig marked this pull request as ready for review March 2, 2024 02:25
@Wetitpig Wetitpig force-pushed the receiptLoop branch 4 times, most recently from 8d61d3e to ef71f57 Compare March 6, 2024 03:35
@Wetitpig Wetitpig force-pushed the receiptLoop branch 2 times, most recently from 6c1a93d to 027d056 Compare March 19, 2024 10:24
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the changes make sense. Would like a test for the new method on BlockchainQueries, think other changes are covered already.

* @param blockHash The hash of the block that corresponds to the receipts to retrieve.
* @return The transaction receipts associated with the referenced block.
*/
public Optional<List<TransactionReceiptWithMetadata>> transactionReceiptsByBlockHash(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see a test for this method

@macfarla
Copy link
Contributor

My node on snap sync shows static block reward as 0 even at genesis block of ETH mainnet. Not sure if the protocol specification was purged as part of the state or simply a bug.

is this comment related to this change or a separate issue?

@Wetitpig
Copy link
Contributor Author

My node on snap sync shows static block reward as 0 even at genesis block of ETH mainnet. Not sure if the protocol specification was purged as part of the state or simply a bug.

is this comment related to this change or a separate issue?

Separate issue. Incidentally discovered when testing the RPC method.

@macfarla
Copy link
Contributor

My node on snap sync shows static block reward as 0 even at genesis block of ETH mainnet. Not sure if the protocol specification was purged as part of the state or simply a bug.

is this comment related to this change or a separate issue?

Separate issue. Incidentally discovered when testing the RPC method.

ok - can you open an issue with more info if we need to look into it? thanks!

@macfarla
Copy link
Contributor

@Wetitpig this PR needs updating with latest main - I don't have permission to update your branch

Signed-off-by: Wetitpig <winsto003@hotmail.com>
Exclude burnt fees

Signed-off-by: Wetitpig <winsto003@hotmail.com>
Signed-off-by: Wetitpig <winsto003@hotmail.com>
Signed-off-by: Wetitpig <winsto003@hotmail.com>
Signed-off-by: Wetitpig <winsto003@hotmail.com>
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Wetitpig can you add a test for BlockchainQueries. transactionReceiptsByBlockHash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants