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

msg_processor should not fail for 'invalid' message #133

Open
noel2004 opened this issue Jul 28, 2021 · 1 comment
Open

msg_processor should not fail for 'invalid' message #133

noel2004 opened this issue Jul 28, 2021 · 1 comment

Comments

@noel2004
Copy link
Member

Current msg_processor would throw assert failure when receive some message it consider as invalid (or not consistent) like:

  1. A registry message specify an account id which has been used (line 39 @ msg_processor.rs)

  2. The balance reported by matching engine is not consistent with the balance which manager has maintained (line 80 @ msg_processor.rs)

Such failure can be easily triggered if we run tick.ts multiple times and then handle the messages generated by matching engine. Because the reset in tick.ts 1. re-registry accounts 2. clear the balance data in matching engine

@noel2004
Copy link
Member Author

To summary: all the instance should be consistent with the state in L2 blocks, so it is matching engine (and all other module except rollup manager itself)'s responsibility to correct or sync the balance data any time an inconsistent occurs.

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