-
Notifications
You must be signed in to change notification settings - Fork 210
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
tortoise: tortoise state loading will be growing in time #3006
Comments
Note: we don't need state in full.weight for verified layers, but we need to know which ballots are good, because the definition is recursive. |
Also need to compute real margins for layers between verified and processed, as we will use them for voting. So it is not completely possible to avoid vote counting. Will postpone this change. |
We can do this after mutable ballots will be implemented. They allow us to verify goodness of the ballot without recursively decoding all previous votes, instead we can just compare if ballot encoded opinion is identical to local opinion. |
minor issue i encountered is that the loading is not interrupt-able with sigterm as it doesn't check context cancel. |
related: #3006 - tally votes once per window, or after all ballots were loaded - load ballots without joining identities table. that information already available in tortoise - set tortoise log level to warn on mainnet. it is not pleasant that info is printed every time node is restarted
related: #3006 it also reduced 300MB of used memory on my machine. ballot signs opinion hash, and provides sidecar to decode that opinion hash. if node decoded one sidecar it can store it in memory and reuse for all following ballots with the same opinion hash.
related: #3006 check if context was cancelled , and exit with context error if it was cancelled
After persistent state was removed tortoise loads state from meshdb and atxdb when the node is started. In the initial implementation i am also re-verifying everything, as it allowed to reuse code for rerun almost as is.
However after #3000 is merged rerun in full mode will be rather slow. So instead of verifying when node is booted we can just load state.
the end goal is to make restart fast, we can achieve that:
The text was updated successfully, but these errors were encountered: