Skip to content

Conversation

@shemnon
Copy link
Contributor

@shemnon shemnon commented Mar 13, 2025

PR description

A prototype for eth_cofig, sharing operational client configuration data
via RPC.

Fixed Issue(s)

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:

  • spotless: ./gradlew spotlessApply
  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

Copy link
Contributor

@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.

Adding this as context for reviewers https://hackmd.io/@shemnon/eth_config

"result": {
"current": {
"activation": 1444660040,
"blobs": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"blobs": {
"blobSchedule": {

Think we should align with genesis naming

"id": 8,
"result": {
"current": {
"activation": 1444660040,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"activation": 1444660040,
"activationTime": 1444660040,

Could this ever include blockNumber activation forks? Maybe for other networks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Two things, (a) the EIP limits itself to post-merge networks and (b) block numbers for mainnet and tesnets will always be less than the point in 2015 when ethereum launched.

Also, unless we are going to see it on mainnet or the testnets I don't think we should put it in EIPs. Rollups with shorter block times that present an issue for this can post a RRC. So it can be moved to activationTime, but I wouldn't specify anything for blocks.

L2s that adopt it and have block based activatons could update the eth_config generation file and add it.

spec.getBlockHashProcessor()
.getHistoryContract()
.ifPresent(a -> contracts.put("HISTORY", a.toHexString()));
if (!contracts.isEmpty()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can be added. This would be an example of a true constant being reported, as the beacon root is not configurable in Besu -

final MutableAccount account = worldUpdater.getAccount(BEACON_ROOTS_ADDRESS);

Thus it serves two good purposes - (a) a vale for Cancun systemContracts and (b) an example of serving up a compiled constant.

Copy link
Contributor

@siladu siladu Mar 17, 2025

Choose a reason for hiding this comment

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

This would be an example of a true constant being reported, as the beacon root is not configurable in Besu

Isn't this already the case with the precompiles and some of the other system contracts like HISTORY_STORAGE_ADDRESS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HISTORY_STORAGE_ADDRESS is a variable inside the besu implementations, and had multiple values in devnets. When I called BEACON_ROOTS_ADDRESS a constant I was referring to Besu code.

.orElse(Map.of()));
spec.getBlockHashProcessor()
.getHistoryContract()
.ifPresent(a -> contracts.put("HISTORY", a.toHexString()));
Copy link
Contributor

Choose a reason for hiding this comment

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

would be nice to match the EIP name IMO i.e. HISTORY_STORAGE_ADDRESS (and same for the other contracts)

Think precision is good here as perhaps there will be future contracts that require similar names, e.g. the confusion around "withdrawals" vs "withdrawal requests".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you have a naming proposal? 2935_HISTORY perhaps?

How about precompiles, should we add the EIP number to the name? What about modexp, which has had multiple tweaks to the gas schedule, would the eip be the most recent one?

Copy link
Contributor

@siladu siladu Mar 17, 2025

Choose a reason for hiding this comment

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

I think it should match the name given in the EIP, i.e HISTORY_STORAGE_ADDRESS

I wouldn't object to including the EIP number too, although it is already encoded in the vanity address (though not consistently). However, my comment is less concerned about linking it to an EIP, rather than making it precise enough that a future system contract name is unlikely to collide.

Undecided if we should include EIP number to the precompiles, but if so then maybe the EIP it was introduced in would be more stable?
As an alternative, perhaps more precise naming is also warranted there...how likely is it that a future precompile collides? e.g. a new version of modexp alongside the old?

garyschulte and others added 5 commits April 3, 2025 13:07
* implement NativeRequirements for named networks

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
A prototype for eth_cofig, sharing operational client configuration data
 via RPC.

Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Danno Ferrin <danno@numisight.com>
@github-actions
Copy link

github-actions bot commented May 4, 2025

This pr is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the Stale label May 4, 2025
@github-actions
Copy link

This pr was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this May 18, 2025
@siladu
Copy link
Contributor

siladu commented May 20, 2025

Reopening as think we should get this in

@siladu siladu reopened this May 20, 2025
@github-actions github-actions bot removed the Stale label May 20, 2025
@jframe
Copy link
Contributor

jframe commented May 26, 2025

@shemnon Would you be happy for this to go in as is? We can always update this when the spec is updated.

@shemnon
Copy link
Contributor Author

shemnon commented May 27, 2025

I'd feel better if at least one other client had implemented it. But sure, go ahead.

@github-actions
Copy link

This pr is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the Stale label Jun 27, 2025
macfarla added 3 commits June 27, 2025 13:31
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
@github-actions github-actions bot removed the Stale label Jun 28, 2025
@macfarla macfarla marked this pull request as ready for review June 30, 2025 02:54
@Gabriel-Trintinalia Gabriel-Trintinalia moved this to In Progress in Osaka Jul 4, 2025
Copy link
Contributor

@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.

Wonder if we should add fork names into their as well, for convenience.

}

@Override
public Optional<ScheduledProtocolSpec> getNextProtocolSpec(final long currentTime) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Think we should have a test for this, but can be follow on PR.

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu enabled auto-merge (squash) July 8, 2025 01:29
@siladu siladu merged commit 4b82d2f into hyperledger:main Jul 8, 2025
53 of 67 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Osaka Jul 8, 2025
jflo pushed a commit to jflo/besu that referenced this pull request Sep 8, 2025
* Feature/required besu native (hyperledger#8418)

* implement NativeRequirements for named networks

Signed-off-by: garyschulte <garyschulte@gmail.com>

* Fix gradle verification (hyperledger#8435)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

* eth_config prototype

A prototype for eth_cofig, sharing operational client configuration data
 via RPC.

Signed-off-by: Danno Ferrin <danno@numisight.com>

* review comments

Signed-off-by: Danno Ferrin <danno@numisight.com>

* update precompile names

Signed-off-by: Danno Ferrin <danno@numisight.com>

* Refactor how next fork is calculated

Signed-off-by: Danno Ferrin <danno@numisight.com>

* copyright

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* formatting

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* changelog

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

---------

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
jflo pushed a commit to jflo/besu that referenced this pull request Sep 8, 2025
* Feature/required besu native (hyperledger#8418)

* implement NativeRequirements for named networks

Signed-off-by: garyschulte <garyschulte@gmail.com>

* Fix gradle verification (hyperledger#8435)

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

* eth_config prototype

A prototype for eth_cofig, sharing operational client configuration data
 via RPC.

Signed-off-by: Danno Ferrin <danno@numisight.com>

* review comments

Signed-off-by: Danno Ferrin <danno@numisight.com>

* update precompile names

Signed-off-by: Danno Ferrin <danno@numisight.com>

* Refactor how next fork is calculated

Signed-off-by: Danno Ferrin <danno@numisight.com>

* copyright

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* formatting

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>

* changelog

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>

---------

Signed-off-by: garyschulte <garyschulte@gmail.com>
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Signed-off-by: Danno Ferrin <danno@numisight.com>
Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
Co-authored-by: garyschulte <garyschulte@gmail.com>
Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: jflo <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

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants