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

OP: fast sync got constantly triggered #55

Open
lesterli opened this issue Sep 17, 2024 · 1 comment
Open

OP: fast sync got constantly triggered #55

lesterli opened this issue Sep 17, 2024 · 1 comment

Comments

@lesterli
Copy link
Collaborator

Problem

In our deployed L2 OP devnet, we found fast sync got constantly triggered every interval (20s), we have below configurations:

  • OP L2 block time: 2s
  • FP chain poller interval: 2s
  • FP fast sync interval: 20s
  • FP fast sync gap blocks: 6

Root cause analysis

After debugging we found the root cause is: within the fast sync interval-20s, there are 10 new blocks, but each EOTS sig submission takes 5 sec, FP can only manage to submit 4 blocks, so 6 blocks got left behind, and the fast sync gap is 6. so fast sync got triggered every time.

So this means for chains that produce blocks very fast, fast sync will be constantly triggered.

Proposed fix

Batch processing all queued blocks in the finalitySigSubmissionLoop instead of processing them one by one.

func (fp *FinalityProviderInstance) finalitySigSubmissionLoop() {
    for {
		select {
		case b := <-fp.poller.GetBlockInfoChan():
        // res, err := fp.retrySubmitFinalitySignatureUntilBlockFinalized(&nextBlock)
        res, err := fp.retryBatchSubmitFinalitySignatureUntilBlockFinalized(&queuedBlocks)
@bap2pecs
Copy link
Collaborator

follow-up tasks:

  • verify how much improvements it has
  • add automated test

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