internal/ethapi,params: add eth_config#32239
Merged
gballet merged 11 commits intoethereum:masterfrom Sep 1, 2025
Merged
Conversation
|
|
||
| switch { | ||
| case c.IsOsaka(london, time): | ||
| next = c.OsakaTime |
Member
There was a problem hiding this comment.
Wouldn't it be better to return something like Maxuint64 here
25c0e49 to
756304b
Compare
Member
Author
|
Implementation seems correct now, working on some tests. |
Member
Author
|
Should be ready to go, PTAL! |
MariusVanDerWijden
previously approved these changes
Aug 27, 2025
33c972b to
815a841
Compare
| } | ||
| forkid := forkid.NewID(c, types.NewBlockWithHeader(genesis), ^uint64(0), t).Hash | ||
| return &config{ | ||
| ActivationTime: t, |
Member
There was a problem hiding this comment.
Activation time is required. If a fork is activated at genesis the value 0 is used. If the fork is not scheduled to be activated or its activation time is unknown it should not be in the rpc results.
Fix like this?
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go
index eb662f9a71..9f2e84c194 100644
--- a/internal/ethapi/api.go
+++ b/internal/ethapi/api.go
@@ -1188,9 +1188,14 @@ func (api *BlockChainAPI) Config(ctx context.Context) (*configResponse, error) {
for addr, c := range vm.ActivePrecompiledContracts(rules) {
precompiles[c.Name()] = addr
}
+ // Activation time is required. If a fork is activated at genesis the value 0 is used
+ activateTime := t
+ if genesis.Time >= t {
+ activateTime = 0
+ }
forkid := forkid.NewID(c, types.NewBlockWithHeader(genesis), ^uint64(0), t).Hash
return &config{
- ActivationTime: t,
+ ActivationTime: activateTime,
BlobSchedule: c.BlobConfig(c.LatestFork(t)),
ChainId: (*hexutil.Big)(c.ChainID),
ForkId: forkid[:],
Member
|
One nit, otherwise lgtm |
gballet
reviewed
Sep 1, 2025
Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
e098cb5 to
360152b
Compare
gballet
added a commit
to gballet/go-ethereum
that referenced
this pull request
Sep 11, 2025
~Will probably be mostly supplanted by ethereum#32224, but this should do for now for devnet 3.~ Seems like ethereum#32224 is going to take some more time, so I have completed the implementation of eth_config here. It is quite a bit simpler to implement now that the config hashing was removed. --------- Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de> Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
Sahil-4555
pushed a commit
to Sahil-4555/go-ethereum
that referenced
this pull request
Oct 12, 2025
~Will probably be mostly supplanted by ethereum#32224, but this should do for now for devnet 3.~ Seems like ethereum#32224 is going to take some more time, so I have completed the implementation of eth_config here. It is quite a bit simpler to implement now that the config hashing was removed. --------- Co-authored-by: MariusVanDerWijden <m.vanderwijden@live.de> Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Co-authored-by: rjl493456442 <garyrong0905@gmail.com>
9 tasks
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Will probably be mostly supplanted by #32224, but this should do for now for devnet 3.Seems like #32224 is going to take some more time, so I have completed the implementation of eth_config here. It is quite a bit simpler to implement now that the config hashing was removed.