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

Claim is too slow while "processDepositStatus" handle too much deposits #545

Open
chengzhinei opened this issue Nov 9, 2023 · 0 comments

Comments

@chengzhinei
Copy link

chengzhinei commented Nov 9, 2023

There is a serious problem when monitorTxs handle "ReviewMonitoredTx" and update the mtx.Nonce:
image
here, the mTx.Nonce may bigger than nonce, and the nonce will never updated. And all the mTx can not be sended.
We have saw this bug happend in X1, and it made the bridge function hanged until we use this fixed code.
And this bug caused to the next problem, the GER include more than 70000 txs, and it took more than 10 hours to create claimTx.
A ExitRoots may include many deposits, and during "processDepositStatus()", it builds claimTx(one claimTx may cost about 1s), but only when storage.Commit, the ClaimTx will be write into db, the whole process may cost more than 10 minutes. But during that time, the "monitorTxs" can't get the claimTxs, and no claimTx would be sended to L2, so the claim is slowed down.
And I made a change, every deposit builds a claimTx, it stores the claimTx into db immediately.

The changes code only increases the speed of writing ClaimTx into storage, the logic of sending ClaimTx is not influenced.

PR:#544

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

1 participant