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

Add JSON RPC call to get miner reward and address #1408

Closed
timbeiko opened this issue Sep 30, 2020 · 4 comments
Closed

Add JSON RPC call to get miner reward and address #1408

timbeiko opened this issue Sep 30, 2020 · 4 comments
Assignees

Comments

@timbeiko
Copy link
Contributor

Description

In a conversation with @richardpringle and @sammy1991106, they mentioned it would be useful to them if Besu had a JSON-RPC call that returned information about a certain block's mining reward and coinbase address. If possible, we should probably return additional mining-related data (e.g. the extra-data, difficulty and total difficulty).

@davemec davemec self-assigned this Oct 12, 2020
@davemec
Copy link
Contributor

davemec commented Oct 20, 2020

Endpoint will return the following:

  • block reward
  • static block reward
  • transaction fees
  • uncle inclusion reward
  • uncle rewards
    • address
    • reward
  • coinbase address
  • extra-data
  • difficulty
  • total difficulty

davemec pushed a commit to davemec/besu that referenced this issue Nov 5, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec pushed a commit to davemec/besu that referenced this issue Nov 5, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec pushed a commit to davemec/besu that referenced this issue Nov 5, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec pushed a commit to davemec/besu that referenced this issue Nov 6, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec pushed a commit to davemec/besu that referenced this issue Nov 6, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec added a commit that referenced this issue Nov 6, 2020
…k hash. (#1538)

* #1066 Switched to use unprefixed hex strings for memory and stack values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Disable flaky tests per Ben Burns(Yeti) request

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Revert last commit and enable ignored tests.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1157 - updated to create 2 agents so that proper bonding can occur

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1162 - Updated test to mock the local peer PING packet creation so that the hash can be managed.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove p2p network code per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Updates from PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Spotless Apply fixes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Admin force cache refresh when called through end point per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Pr updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update changelog for 1.5.1

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove check for 0x prefix on addresses to match expectations

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update graphql pending to allow for sorting of transactions

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Added tests for new miner endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

Co-authored-by: David Mechler <davemec@users.noreply.github.com>
@timbeiko
Copy link
Contributor Author

timbeiko commented Nov 7, 2020

@richardpringle @sammy1991106 the endpoint is now merged into master. Would love feedback from you on it when you have the time to give it a try 😄

davemec added a commit that referenced this issue Nov 10, 2020
* #1066 Switched to use unprefixed hex strings for memory and stack values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Disable flaky tests per Ben Burns(Yeti) request

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Revert last commit and enable ignored tests.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1157 - updated to create 2 agents so that proper bonding can occur

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1162 - Updated test to mock the local peer PING packet creation so that the hash can be managed.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove p2p network code per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Updates from PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Spotless Apply fixes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Admin force cache refresh when called through end point per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Pr updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update changelog for 1.5.1

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove check for 0x prefix on addresses to match expectations

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update graphql pending to allow for sorting of transactions

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Added tests for new miner endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 - Added tests for precompiled contract and for byzantium and berlin gas values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 - Added tests for precompiled contract and for byzantium and berlin gas values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 Initial changes for EIP-2565

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 - Added tests for precompiled contract and for byzantium and berlin gas values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1086 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

Co-authored-by: David Mechler <davemec@users.noreply.github.com>
davemec added a commit that referenced this issue Nov 12, 2020
…1552)

* #1066 Switched to use unprefixed hex strings for memory and stack values

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Disable flaky tests per Ben Burns(Yeti) request

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Revert last commit and enable ignored tests.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1157 - updated to create 2 agents so that proper bonding can occur

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1162 - Updated test to mock the local peer PING packet creation so that the hash can be managed.

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Added admin_logsRepairCache end point

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove p2p network code per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Updates from PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Spotless Apply fixes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Admin force cache refresh when called through end point per PR comments

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Pr updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update changelog for 1.5.1

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Remove check for 0x prefix on addresses to match expectations

Signed-off-by: David Mechler <david.mechler@consensys.net>

* Update graphql pending to allow for sorting of transactions

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Add Miner data endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 Added tests for new miner endpoints

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1408 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* SpotlessApply updtes

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1411 - Added System.exit when No space left on device

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1411 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

* #1411 - PR updates

Signed-off-by: David Mechler <david.mechler@consensys.net>

Co-authored-by: David Mechler <davemec@users.noreply.github.com>
@richardpringle
Copy link

@sammy1991106 have you had a chance to test this out yet?

davemec pushed a commit to davemec/besu that referenced this issue Nov 16, 2020
…fee calc to use gasPrice and gasUsed

Signed-off-by: David Mechler <david.mechler@consensys.net>
@timbeiko
Copy link
Contributor Author

@richardpringle we found some issues calculating the gas refund on mainnet that didn't appear as part of our initial testing on Goerli, so we're reverting the change for now. We should have a fix out in the next couple days!

davemec pushed a commit to davemec/besu that referenced this issue Nov 19, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec pushed a commit to davemec/besu that referenced this issue Nov 20, 2020
Signed-off-by: David Mechler <david.mechler@consensys.net>
davemec pushed a commit that referenced this issue Nov 23, 2020
* #1408 - Code cleanup; update to use Immutables

Signed-off-by: David Mechler <david.mechler@consensys.net>
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

No branches or pull requests

3 participants