Skip to content

New RPC methods miner_setExtraData and miner_getExtraData#7078

Merged
fab-10 merged 5 commits intobesu-eth:mainfrom
fab-10:miner-set-extradata
May 9, 2024
Merged

New RPC methods miner_setExtraData and miner_getExtraData#7078
fab-10 merged 5 commits intobesu-eth:mainfrom
fab-10:miner-set-extradata

Conversation

@fab-10
Copy link
Copy Markdown
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
fab-10 added 3 commits May 8, 2024 19:49
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the miner-set-extradata branch from 8ff0040 to c092791 Compare May 8, 2024 17:56
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@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
Copy Markdown
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 <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 enabled auto-merge (squash) May 9, 2024 07:34
@fab-10 fab-10 merged commit 40cfc80 into besu-eth:main May 9, 2024
@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
…th#7078)

* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
…th#7078)

* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Jun 10, 2024
…th#7078)

* New RPC methods to set and get block extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Remove redundant methods to set the extra data

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* miner_getExtraData unit tests

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Add CHANGELOG

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

* Apply suggestions from code review

Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>

---------

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
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