-
Notifications
You must be signed in to change notification settings - Fork 898
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
Deprecate Xsnapsync-bft-enabled option , to be removed in future release #7930
Conversation
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
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.
needs a changelog entry - this will be a breaking change
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.
you'll also want to remove
hidden = true,
so the option shows in the help
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.
IMO better to avoid the breaking change and make this an alias and call out the deprecation of the X version, e.g. see
besu/besu/src/main/java/org/hyperledger/besu/cli/options/storage/DiffBasedSubStorageOptions.java
Lines 58 to 69 in 27592b5
// TODO --Xbonsai-limit-trie-logs-enabled and --Xbonsai-trie-log-pruning-enabled are deprecated, | |
// remove in a future release | |
@SuppressWarnings("ExperimentalCliOptionMustBeCorrectlyDisplayed") | |
@Option( | |
names = { | |
LIMIT_TRIE_LOGS_ENABLED, | |
"--Xbonsai-limit-trie-logs-enabled", // deprecated | |
"--Xbonsai-trie-log-pruning-enabled" // deprecated | |
}, | |
fallbackValue = "true", | |
description = "Limit the number of trie logs that are retained. (default: ${DEFAULT-VALUE})") | |
private Boolean limitTrieLogsEnabled = DEFAULT_LIMIT_TRIE_LOGS_ENABLED; |
Then can add entry to changelog under "Upcoming Breaking Changes"
Thanks for the suggestions. So currently I will
|
Yes I think I we should remove the option, not promote it to non-experimental. So I can see the case for making this PR a changelog entry to mark it deprecated, followed by a PR after the next release or two have gone out, which basically reverses the PR I originally added the new flag under. |
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
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.
ok so if I don't specify this option, does my QBFT network work with SNAP/CHECKPOINT sync ? Have you tried it? Can you add a test for this too
take a look at this code in BesuCommand -
private void validateConsensusSyncCompatibilityOptions() {
// snap and checkpoint are experimental for BFT
if ((genesisConfigOptionsSupplier.get().isIbftLegacy()
|| genesisConfigOptionsSupplier.get().isIbft2()
|| genesisConfigOptionsSupplier.get().isQbft())
&& !unstableSynchronizerOptions.isSnapSyncBftEnabled()) {
final String errorSuffix = "can't be used with BFT networks";
if (SyncMode.CHECKPOINT.equals(syncMode)) {
throw new ParameterException(
commandLine, String.format("%s %s", "Checkpoint sync", errorSuffix));
}
if (syncMode == SyncMode.SNAP) {
throw new ParameterException(commandLine, String.format("%s %s", "Snap sync", errorSuffix));
}
}
}
Yeah I've tested all combinations of QBFT/IBFT/SNAP/CHECKPOINT and can confirm that they all work. @pullurib could you look at which tests already exist for QBFT sync modes and see if we can add one or two for SNAP and CHECKPOINT please? |
Suggest that since we're not removing the validation logic in this PR and we add additional tests under the PR where we do remove it if that's OK with you @macfarla |
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Sure, I'll take a look and add any missing tests in a following PR which would remove the option and cleanup the validation checks . |
Disagree - deprecation is a signal to users that they should stop using this flag. However if I'm a user, I can't stop using this flag until SNAP & BFT work together without it. It will be confusing for users to deprecate the flag first without removing the part of the code that prevents startup with SNAP & BFT unless you specify this flag. I would suggest
|
this is what I get right now if I try SNAP + BFT without using this flag
|
Apologies, I thought this was just a deprecation announce via changelog but I'm fine with changing the logic at the same time and making the flag redundant (but valid). Sound OK to you @pullurib ? |
Sounds good, @matthew1001 . Thanks for clarifying @macfarla . I'll go ahead and include those changes too in this PR . |
…'s now supported by default Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
…4-bft-snapsync Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
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.
looking good. an extra level of niceness is if I specify this option, to log a warning to say it's now deprecated and ignored
besu/src/main/java/org/hyperledger/besu/cli/options/SynchronizerOptions.java
Outdated
Show resolved
Hide resolved
…erOptions.java Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
AT failure -
|
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Looks like a timing issue - has been passing locally. Added some delay to let the new node come up and sync. |
I don't love fixing the failing test with a sleep tbh, is there another option |
Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io>
Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com>
Updated with conditions and timeouts |
…ase (hyperledger#7930) * Move snapsync-bft-enabled to stable options Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * Add deprecation comments: Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * Changelog entry for deprecation Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * spotlessApply Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * Update CHANGELOG.md Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com> * Removed option value checking to enable snapsync for bft networks. It's now supported by default Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * Add acceptance tests for QBFT sync Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * Update test Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * update CHANGELOG Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * Update besu/src/main/java/org/hyperledger/besu/cli/options/SynchronizerOptions.java Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com> * add delay to let the new validator sync Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> * update BFT sync AT to use conditions and timeouts Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> --------- Signed-off-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> Signed-off-by: Bhanu Pulluri <59369753+pullurib@users.noreply.github.com> Co-authored-by: Bhanu Pulluri <bhanu.pulluri@kaleido.io> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com> Signed-off-by: Marcos Serradilla Diez <marcos@io.builders>
PR description
Adding deprecation notice and marking for removal in future release.
Fixed Issue(s)
#7924