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

RC Plugin Causing TestNet Hang #3589

Open
mvandeberg opened this issue Feb 5, 2020 · 0 comments · May be fixed by #3598
Open

RC Plugin Causing TestNet Hang #3589

mvandeberg opened this issue Feb 5, 2020 · 0 comments · May be fixed by #3598
Assignees

Comments

@mvandeberg
Copy link
Contributor

On the TestNet we do not start tracking RCs until block 100,000. On that block, objects in the RC Plugin are initialized, including rc accounts for every blockchain account.

This is a sizable load. With MIRA, if there was sufficient prior blockchain activity, this load can take 30-50 minutes. With minimal activity, this can still take 30 seconds.

To remove the hang, rc accounts should be created as accounts are created instead of on the start block. The challenge here is that we still don't want to track changes to max mana. Thankfully, max mana is calculated every regeneration. If we set an account's current mana to std::numeric_limits< int64_t >::max on creation, then the first time it is charged mana, it will regenerate mana and get set to the current mana.

This raises one small UI problem in that if an account has not transacted since the time which we are calculating RCs then it will show a current mana much higher than its actual value. This is also easily fixed by regenerating current mana when we return an RC account, which will likely be a welcome change regardless.

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

Successfully merging a pull request may close this issue.

1 participant