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

EIP-7742: Add target_blob_count to block header #7808

Merged
merged 4 commits into from
Oct 29, 2024

Conversation

siladu
Copy link
Contributor

@siladu siladu commented Oct 24, 2024

PR description

First major piece of EIP-7742: Add target_blob_count to the block header.

Still todo in future PRs:

  • Engine API
  • Wiring engine API to block header
  • block validation
  • gas accounting

Fixed Issue(s)

Part of #7605

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

@siladu siladu changed the title Add target_blob_count to block header EIP-7742 based on main Oct 24, 2024
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as ready for review October 28, 2024 02:18
Copy link
Contributor Author

@siladu siladu left a comment

Choose a reason for hiding this comment

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

Added some of my own comments for the reviewer

import org.junit.jupiter.params.provider.Arguments;

// TODO SLD
@Disabled("TODO SLD - Enable when Prague spec is finalized")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I propose we leave this disabled until the nearer the end of the Prague dev work. Anything that changes the block hash (genesis, block header, some engine API changes) causes a cascading change to all the JSON files and it's time consuming to update this with every PR. In the meantime, we will still have regression signal in the devnets and execution-spec/references tests.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's fine, still it's a lot of effort to update. Once the testnets are done though we should re-enable this test

Comment on lines +50 to +51
// TODO SLD Quantity or UInt64Value<UInt64> instead?
protected final UInt64 targetBlobCount;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some other code for similar types use a subclass of BaseUInt256Value (which implements Quantity and UInt256Value).
Withdrawals already uses UInt64 directly.

I think UInt64 is more direct than the tuweni generic base class construct and avoids yet another wrapper class.

Would like to get more opinions about the benefits of defining our own type, i.e. TargetBlobCount extends BaseUInt256Value<TargetBlobCount> implements Quantity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine with using UInt64 directly. Adding the new type doesn't add much value

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu changed the title EIP-7742 based on main EIP-7742: Add target_blob_count to block header Oct 28, 2024
import org.junit.jupiter.params.provider.Arguments;

// TODO SLD
@Disabled("TODO SLD - Enable when Prague spec is finalized")
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's fine, still it's a lot of effort to update. Once the testnets are done though we should re-enable this test

@siladu siladu enabled auto-merge (squash) October 29, 2024 00:09
@siladu siladu merged commit f855d5b into hyperledger:main Oct 29, 2024
43 checks passed
@siladu siladu deleted the eip-7742 branch October 29, 2024 01:05
JanetMo pushed a commit to JanetMo/besu that referenced this pull request Nov 17, 2024
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Marlene Marz <m.marz@kabelmail.de>
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