Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bootstrap dynamic throttle #4215

Merged
merged 3 commits into from
Apr 20, 2023
Merged

Conversation

clemahieu
Copy link
Contributor

Adds ability for the bootstrap throttle to dynamically change the number of samples it tracks.

The issue with using a fixed number is it doesn't scale as the ledger scales and particularly causes high CPU usage in unit tests or prematurely stops bootstrapping with the live ledger.

This change dynamically changes the number of tracked samples as the ledger grows.

The formula used for selecting the throttle size is config.throttle_coefficient * sqrt(block_count) and the throttle coefficient uses a default value of 16 which is a good fit based on beta and live testing.

clemahieu and others added 2 commits April 19, 2023 15:31
…ber of samples it tracks.

The number of samples to track is computed in proportion to the number of accounts and blocks in the ledger.
This will scale the throttle over time as ledger size adjusts.
@clemahieu clemahieu added this to the V25.0 milestone Apr 20, 2023
@clemahieu clemahieu merged commit 8f0c102 into nanocurrency:develop Apr 20, 2023
@thsfs thsfs added the toml TOML related change label May 22, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement toml TOML related change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants