Skip to content

Commit fb01e6f

Browse files
committed
Revert "Docker pos fixup attempt1 (#5401)"
This reverts commit 43c848c.
1 parent 9fb8a19 commit fb01e6f

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

eth/stagedsync/stage_headers.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,9 @@ func startHandlingForkChoice(
315315

316316
if header == nil {
317317
log.Info(fmt.Sprintf("[%s] Fork choice: need to download header with hash %x", s.LogPrefix(), headerHash))
318-
cfg.hd.BeaconRequestList.Remove(requestId)
319-
if !test {
318+
if test {
319+
cfg.hd.BeaconRequestList.Remove(requestId)
320+
} else {
320321
schedulePoSDownload(requestId, headerHash, 0 /* header height is unknown, setting to 0 */, headerHash, s, cfg)
321322
}
322323
return &engineapi.PayloadStatus{Status: remote.EngineStatus_SYNCING}, nil
@@ -444,8 +445,8 @@ func handleNewPayload(
444445
}
445446
if parent == nil {
446447
log.Info(fmt.Sprintf("[%s] New payload: need to download parent", s.LogPrefix()), "height", headerNumber, "hash", headerHash, "parentHash", header.ParentHash)
447-
cfg.hd.BeaconRequestList.Remove(requestId)
448448
if test {
449+
cfg.hd.BeaconRequestList.Remove(requestId)
449450
return &engineapi.PayloadStatus{Status: remote.EngineStatus_SYNCING}, nil
450451
}
451452
if !schedulePoSDownload(requestId, header.ParentHash, headerNumber-1, headerHash /* downloaderTip */, s, cfg) {

turbo/stages/sentry_mock_test.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -601,17 +601,11 @@ func TestPoSDownloader(t *testing.T) {
601601
require.NoError(t, err)
602602
stages.SendPayloadStatus(m.HeaderDownload(), headBlockHash, err)
603603

604-
// Since we are removing the current request to avoid the deadlock, we need to send the new payload (or fcu) request again.
605-
m.SendPayloadRequest(chain.TopBlock)
606604
// Second cycle: process the previous beacon request
607605
headBlockHash, err = stages.StageLoopStep(m.Ctx, m.DB, m.Sync, 0, m.Notifications, initialCycle, m.UpdateHead, nil)
608606
require.NoError(t, err)
609607
stages.SendPayloadStatus(m.HeaderDownload(), headBlockHash, err)
610608
assert.Equal(t, chain.TopBlock.Hash(), headBlockHash)
611-
// Second cycle: checking the response
612-
payloadStatus = m.ReceivePayloadStatus()
613-
assert.Equal(t, remote.EngineStatus_VALID, payloadStatus.Status)
614-
assert.Equal(t, chain.TopBlock.Hash(), headBlockHash)
615609

616610
// Point forkChoice to the head
617611
forkChoiceMessage := engineapi.ForkChoiceMessage{

0 commit comments

Comments
 (0)