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

Timestamp-based forking for Shanghai (and later) #1424

Closed
AdamSpitz opened this issue Jan 11, 2023 · 3 comments
Closed

Timestamp-based forking for Shanghai (and later) #1424

AdamSpitz opened this issue Jan 11, 2023 · 3 comments
Assignees

Comments

@AdamSpitz
Copy link
Contributor

Activation of the Shanghai fork will be determined by a timestamp, not a block number.

e.g. EIP-4895 says, "Beginning with the execution timestamp FORK_TIMESTAMP, execution clients MUST introduce the following extensions to payload validation and processing..."

jangko had some comments here on how to go about implementing this.

  • We probably need both shanghaiBlock and shanghaiTime, because hive and ethereum/tests are still using a block number.
  • The relevant files are common/common.nim and hardforks.nim.
@AdamSpitz AdamSpitz self-assigned this Jan 11, 2023
@AdamSpitz
Copy link
Contributor Author

Note also that geth has put in a hard-coded value called timestampThreshold, used to decide whether a forkid.next field is a block number or a timestamp.

https://github.com/ethereum/go-ethereum/blob/master/core/forkid/forkid.go#L48

@jangko
Copy link
Contributor

jangko commented Jan 12, 2023

in EIP-4895, geth still keep both shanghaiBlock and shanghaiTime. but in EIP-4844, as can be seen in this commit, they remove shanghaiBlock and use only shanghaiTime.
Sure this will complicated fork transition and forkid calculation.

@jangko
Copy link
Contributor

jangko commented Mar 18, 2023

fixed by #1465. closing

@jangko jangko closed this as completed Mar 18, 2023
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

No branches or pull requests

2 participants