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

Pass miningBeneficiary address to BlockAwareOperationTracer::traceStartBlock calls #8096

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

lu-pinto
Copy link
Contributor

@lu-pinto lu-pinto commented Jan 9, 2025

PR description

This passes the miningBeneficiary, which in most cases should be the coinbase but for other consensus approaches could be different, to BlockAwareOperationTracer::traceStartBlock calls.

Fixed Issue(s)

fixes #8094

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

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@lu-pinto lu-pinto force-pushed the add-miner-address-tracer-API branch 2 times, most recently from bf28c88 to 6710f5f Compare January 10, 2025 08:25
@lu-pinto lu-pinto marked this pull request as ready for review January 10, 2025 08:25
@@ -191,7 +191,7 @@ private List<TransactionProcessingResult> trace(
final ProtocolSpec protocolSpec = protocolSchedule.getByBlockHeader(block.getHeader());
final MainnetTransactionProcessor transactionProcessor = protocolSpec.getTransactionProcessor();
final BlockHeader header = block.getHeader();
tracer.traceStartBlock(block.getHeader(), block.getBody());
tracer.traceStartBlock(block.getHeader(), block.getBody(), block.getHeader().getCoinbase());
Copy link
Contributor

Choose a reason for hiding this comment

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

You will need to use miningBeneficiaryCalculator here otherwise the coinbase will still be zero for Click

@lu-pinto lu-pinto force-pushed the add-miner-address-tracer-API branch from 6710f5f to 6097d0b Compare January 10, 2025 10:02
@lu-pinto lu-pinto force-pushed the add-miner-address-tracer-API branch from 6097d0b to 2564b7d Compare January 10, 2025 10:14
@lu-pinto lu-pinto enabled auto-merge (squash) January 10, 2025 11:10
@lu-pinto lu-pinto force-pushed the add-miner-address-tracer-API branch from 2564b7d to bc0538c Compare January 10, 2025 11:10
@lu-pinto lu-pinto merged commit 8cddcfd into hyperledger:main Jan 10, 2025
43 checks passed
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have been great to keep the previous methods signature (marking them deprecated for removal) so existing plugins will not break.
Since this is already merged, that can be done in a following PR.

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.

Pass miningBeneficiary to BlockAwareOperationTracer::traceStartBlock
3 participants