-
Notifications
You must be signed in to change notification settings - Fork 70
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
store claimTx into storage every deposit #544
base: develop
Are you sure you want to change the base?
Conversation
We require contributors/corporates @chengzhinei to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document |
1 similar comment
We require contributors/corporates @chengzhinei to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document |
cc9f357
to
1f9759a
Compare
We require contributors/corporates @chengzhinei to read our Contributor License Agreement, please check the Individual CLA document/Corporate CLA document |
SonarCloud Quality Gate failed. 0 Bugs No Coverage information Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
Hi, I don't see the problem since the nonce is only updated if the service get a nonce too low error. As all txs are sent sincronously, all of them must consume the nonce (success tx or revert). I think this situations could only a problem in your current implementation. |
Thanks for your reply~ Besides, the other changes wants to solve the problem I descripted before: "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.". The changes could add claimTx into storage every deposit instead of the logic that finish making the claimTxs of all the deposits then add all the claimTxs into storage. |
Closes #.
What does this PR do?
There is a serious problem when monitorTxs handle "ReviewMonitoredTx" and update the mtx.Nonce:
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.
Reviewers
Main reviewers:
Codeowner reviewers: