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

fix(op-node): Execute only part of the initialReset function each time #13

Open
wants to merge 2 commits into
base: testnet
Choose a base branch
from

Conversation

claymega
Copy link
Collaborator

@claymega claymega commented Jan 8, 2025

This pr is for fixing event dead loop when restarting op-node and the unsafe/safe difference is large.

Problem: When the unsafe/safe difference is large, the restart op-node will call initialReset(), If this function call takes too long, the pipelineHandler will be blocked and unable to consume events in pipeline queue(the executor keep adding events to pipeline queue). The pipelineHandler will also generate events when executing the event consumption logic.

@claymega claymega changed the title fix(op-node): initialReset function step by step execution fix(op-node): Execute only part of the initialReset function each time Jan 8, 2025
if d.pipeline.pipeLineIsInitialReset &&
d.pipeline.pipelineInitialResetNextTime.Before(time.Now()) {
d.emitter.Emit(PipelineStepEvent{PendingSafe: d.pipeline.pipelineInitialResetNextPendingSafe})
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • else ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If true, continue to execute the previous initialReset logic, if false, then no logic is executed

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

Successfully merging this pull request may close these issues.

2 participants