-
Notifications
You must be signed in to change notification settings - Fork 20.9k
all: remove TerminalTotalDifficultyPassed #30609
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
Conversation
hi, I didn't notice you create one too. I just re-commit the PR #30612, including more deletion of TerminalTotalDifficultyPassed. |
your commit contains my updates, closing mine. |
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.
Looks good to me, let's merge if CI is green IMO
Co-authored-by: stevemilk <wangpeculiar@gmail.com>
… into its own commit as a reminder to double-check that this doesn't break anything
…cified. Remove unused parts from HF description generation
…x possible). Otherwise, we cannot create the consensus engine if ttd==nil.
…ensus engine creation ensures this.
18db7d0
to
90906c8
Compare
if t := cfg.ChainConfig.ShanghaiTime; cfg.ChainConfig.TerminalTotalDifficultyPassed || (t != nil && *t == 0) { | ||
cfg.Random = &(common.Hash{}) | ||
} | ||
cfg.Random = &(common.Hash{}) |
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.
The random is only set if the Shanghai fork is configured. The behavior is changed
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.
EDIT. Yeah, since you always expect the TTD is configured and it implies the Shanghai has already be configured (no matter is activated or not).
@@ -113,8 +113,12 @@ func testHeaderVerificationForMerging(t *testing.T, isClique bool) { | |||
} | |||
copy(gspec.ExtraData[32:], addr[:]) | |||
|
|||
// chain_maker has no blockchain to retrieve the TTD from, setting to nil |
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.
I think you can delete all the pre-merge tests
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.
We're still supposed to be able to verify backwards across a merge, right? In that case, I think we should leave it in
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
rebased #29766 . The downstream branch appears to have been deleted and I don't have perms to push to that fork. `TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty` must now be non-nil, and it is expected that networks are already merged: we can only import PoW/Clique chains, not produce blocks on them. --------- Co-authored-by: stevemilk <wangpeculiar@gmail.com>
rebased ethereum#29766 . The downstream branch appears to have been deleted and I don't have perms to push to that fork. `TerminalTotalDifficultyPassed` is removed. `TerminalTotalDifficulty` must now be non-nil, and it is expected that networks are already merged: we can only import PoW/Clique chains, not produce blocks on them. --------- Co-authored-by: stevemilk <wangpeculiar@gmail.com>
rebased #29766 . The downstream branch appears to have been deleted and I don't have perms to push to that fork.
TerminalTotalDifficultyPassed
is removed.TerminalTotalDifficulty
must now be non-nil, and it is expected that networks are already merged: we can only import PoW/Clique chains, not produce blocks on them.