-
Notifications
You must be signed in to change notification settings - Fork 852
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
Enable --Xbonsai-limit-trie-logs-enabled by default #7181
Enable --Xbonsai-limit-trie-logs-enabled by default #7181
Conversation
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
@@ -86,6 +86,8 @@ public static class Unstable { | |||
@CommandLine.Option( | |||
hidden = true, | |||
names = {BONSAI_LIMIT_TRIE_LOGS_ENABLED, "--Xbonsai-trie-log-pruning-enabled"}, | |||
defaultValue = "true", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be enabled by default for all profiles? In the The enterprise-private profile probably makes more sense to not prune I think. @non-fungible-nelson What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not. I thought it might be alright initially since it's scoped to BONSAI, but I know we have a follow-on story related to profiles somewhere...I will check if we need to play that at the same time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disabled this in enterprise-profile 👍 - side note: was surprised to find enterprise was defaulting to BONSAI, addressed that here: #7186
Signed-off-by: Simon Dudley <[email protected]>
…ogs-enabled-by-default Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple of nits
@@ -1244,8 +1244,13 @@ public void ethStatsContactOptionCannotBeUsedWithoutEthStatsServerProvided() { | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any test to verify it is enabled by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added here 100bf43
(#7181)
long MINIMUM_BONSAI_TRIE_LOG_RETENTION_LIMIT = DEFAULT_BONSAI_MAX_LAYERS_TO_LOAD; | ||
int DEFAULT_BONSAI_TRIE_LOG_PRUNING_WINDOW_SIZE = 30_000; | ||
boolean DEFAULT_BONSAI_FULL_FLAT_DB_ENABLED = true; | ||
boolean DEFAULT_BONSAI_CODE_USING_CODE_HASH_ENABLED = true; | ||
|
||
DataStorageConfiguration.Unstable DEFAULT = | ||
ImmutableDataStorageConfiguration.Unstable.builder().build(); | ||
ImmutableDataStorageConfiguration.Unstable.builder() | ||
.bonsaiLimitTrieLogsEnabled(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be redundant since the default is true now, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well spotted, an artefact from an earlier implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed here 100bf43
(#7181)
Address PR comments Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Signed-off-by: Simon Dudley <[email protected]>
Commit LGTM - thanks @siladu for the last minute fixes. |
FYI @siladu in PR #7140 I was planning to change the fail-on-start behaviour if Let me know if you have any concerns about that change - maybe via comments in that PR? |
* Enable --Xbonsai-limit-trie-logs-enabled by default Signed-off-by: Simon Dudley <[email protected]> Signed-off-by: George Tebrean <[email protected]>
* Enable --Xbonsai-limit-trie-logs-enabled by default Signed-off-by: Simon Dudley <[email protected]>
PR description
Enable
--Xbonsai-limit-trie-logs-enabled
by default, unless sync-mode=FULL.More info: https://wiki.hyperledger.org/display/BESU/Limit+Trie+Logs+for+Bonsai
When sync-mode=FULL and data-storage-format=BONSAI you get a config validation error at startup...
I will promote to a Stable option in a separate PR.
This option has been tested on our canaries and by the community since https://github.com/hyperledger/besu/releases/tag/24.3.0
Added a fallback value for the option otherwise specifying --Xbonsai-limit-trie-logs-enabled on the command line, without a value, toggles it back off again.
The
minimalist-profile
has been updated frombonsai-historical-block-limit=128
tobonsai-historical-block-limit=512
to avoid further code changes and because I believe there is only a ~60MB difference so using 128 has limited value, see #6560 (comment)I will conservatively set
Xbonsai-limit-trie-logs-enabled=false
in theenterprise
profile for now as not sure it is desirable.Fixed Issue(s)
Fixes #6560
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.