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

New RPC methods miner_setExtraData and miner_getExtraData #7078

Merged
merged 5 commits into from
May 9, 2024

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented May 8, 2024

PR description

Fixed Issue(s)

Add two new RPC methods to get and set the vanity extra data that goes into the related field of a built block.

miner_getExtraData request has no parameters, and the response is the hex string of the extra data bytes

miner_setExtraData request has only 1 parameter: the hex string of the extra data bytes.

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

@fab-10 fab-10 changed the title Miner set extradata New RPC methods miner_setExtraData and miner_getExtraData May 8, 2024
Signed-off-by: Fabio Di Fabio <[email protected]>
@fab-10 fab-10 added the doc-change-required Indicates an issue or PR that requires doc to be updated label May 8, 2024
@fab-10 fab-10 marked this pull request as ready for review May 8, 2024 17:57
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.

minor nit on test names, otherwise LGTM

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
@fab-10 fab-10 enabled auto-merge (squash) May 9, 2024 07:34
@fab-10 fab-10 merged commit 40cfc80 into hyperledger:main May 9, 2024
42 checks passed
@fab-10 fab-10 deleted the miner-set-extradata branch May 9, 2024 10:48
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label May 14, 2024
jflo pushed a commit to jflo/besu that referenced this pull request May 28, 2024
…edger#7078)

* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <[email protected]>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <[email protected]>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <[email protected]>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>

---------

Signed-off-by: Fabio Di Fabio <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
…edger#7078)

* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <[email protected]>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <[email protected]>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <[email protected]>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>

---------

Signed-off-by: Fabio Di Fabio <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
jflo pushed a commit to jflo/besu that referenced this pull request Jun 10, 2024
…edger#7078)

* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <[email protected]>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <[email protected]>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <[email protected]>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <[email protected]>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>

---------

Signed-off-by: Fabio Di Fabio <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
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.

3 participants