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

consensus, core, ethstats: use engine specific block beneficiary #14318

Merged
merged 2 commits into from
Apr 12, 2017

Conversation

karalabe
Copy link
Member

@karalabe karalabe commented Apr 12, 2017

While executing transaction, the current code had the recipient of the gas fees set as the coinbase field from the header. This however only holds true for ethash, but not for clique and probably won't hold for casper either. Any consensus scheme that is based on signatures needs to actually derive the "miner" address and won't have a field pre-set (that would be redundant data).

This PR ensures that transaction processing has access to the consensus engine, and the coinbase account while running transactions isn't taken directly from the header, rather it delegates extracting the coinbase to the specific consensus engine. An annoying "corner case" for signature based engines is that the header does not yet contain the signature during mining, so the miner's address needs to be explicitly specified during block minting.

The PR also adds a minor polish to ethstats to it reports the newly derived block author field and not the current header coinbase.

@karalabe karalabe added this to the 1.6.0 milestone Apr 12, 2017
@karalabe karalabe force-pushed the engine-agnostic-beneficiary branch from b7c81ca to 2bdc019 Compare April 12, 2017 10:29
@karalabe karalabe merged commit a7b9e48 into ethereum:master Apr 12, 2017
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.

2 participants