-
Notifications
You must be signed in to change notification settings - Fork 20.3k
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
core/forkid: skip genesis forks by time #28034
Conversation
I think the API is a bit clunky.
The IMO a better api would be
[1]: The callsite // ForkID gets the fork id of the chain.
func (c *Chain) ForkID() forkid.ID {
return forkid.NewID(c.chainConfig, c.blocks[0], uint64(c.Len()), c.blocks[0].Time())
} It looks like it should be // ForkID gets the fork id of the chain.
func (c *Chain) ForkID() forkid.ID {
return forkid.NewID(c.chainConfig, c.blocks[0], uint64(c.Len()), c.blocks[c.Len() -1].Time())
} Just the type of error that would not have happened with my suggested api :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You also added a genesis.json
file, is that intentional?
@karalabe says to leave it as is (triage discussion) |
0d2f564
to
e27464a
Compare
not intentional! removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for merging #28034 into master! Can you please provide an update on
the status of this PR?
…On Mon, Sep 04, 2023 09:32 AM, ***@***.*** wrote:
Merged #28034 <#28034> into
master.
—
Reply to this email directly, view it on GitHub
<#28034 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AV75GPTCEMAKDHG2D6RSRDDXYXJ6XANCNFSM6AAAAAA4FI65MU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
* core/forkid: skip genesis forks by time * core/forkid: add comment about skipping non-zero fork times * core/forkid: skip all time based forks in genesis using loop * core/forkid: simplify logic for dropping time-based forks
This reverts commit cfdfeea.
This reverts commit cfdfeea.
|
I made a mistake in #27895, I didn't realize
newFilter
also generated the fork id hash. This caused geth to disconnect from peers during the handshake. I've resolved it by modifyinggatherForks
to simply skip forks that are non-zero and before the genesis timestamp.