-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
eth/catalyst: set finalized block hash properly in dev mode #27886
eth/catalyst: set finalized block hash properly in dev mode #27886
Conversation
Please remove the change to the tests submodule! |
but it's dev mode anyway, right? does it really matter the finalization block is at the epoch boundary or not? |
Honestly it probably doesn't really matter that much. But it makes dev-mode behavior somewhat more in-line with a real network. |
eth/catalyst/simulated_beacon.go
Outdated
@@ -157,14 +157,21 @@ func (c *SimulatedBeacon) sealBlock(withdrawals []*types.Withdrawal) error { | |||
} | |||
payload := envelope.ExecutionPayload | |||
|
|||
var finalizedHash common.Hash | |||
if payload.Number%32 == 0 { |
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.
perhaps define a constant for it? e.g. devEpochLength
or whatever.
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
Co-authored-by: Martin Holst Swende <martin@swende.se>
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
(tested it with my fuzzer today)
…#27886) Co-authored-by: Martin Holst Swende <martin@swende.se>
…thereum#27886)" This reverts commit 9070fc8.
…thereum#27886)" This reverts commit 9070fc8.
Conflicts: eth/catalyst/simulated_beacon.go The PR changes simulated beacon. Took upstream version as-is.
In dev mode, the finalized block should be the block that was produced at the start of the current epoch (block number 0, 32, 64, ...)