-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor: Fix confusing iavl command message #13653
Conversation
@@ -165,7 +165,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. | |||
cmd.Flags().Uint64(FlagStateSyncSnapshotInterval, 0, "State sync snapshot interval") | |||
cmd.Flags().Uint32(FlagStateSyncSnapshotKeepRecent, 2, "State sync snapshot to keep") | |||
|
|||
cmd.Flags().Bool(FlagIAVLFastNode, true, "Enable fast node for IAVL tree") | |||
cmd.Flags().Bool(FlagIAVLFastNode, true, "Disable fast node for IAVL tree, set to 'false' to enable") |
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.
cmd.Flags().Bool(FlagIAVLFastNode, true, "Disable fast node for IAVL tree, set to 'false' to enable") | |
cmd.Flags().Bool(FlagIAVLDisableFastNode, false, "Disable fast node for IAVL tree, it's 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.
Should probably change the default value of IAVLDisableFastNode
in DefaultConfig
as well.
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.
IAVL fast node is disabled by default, so renaming to FlagIAVLDisableFastNode
would do?
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.
will need core team members to chime in, but I think it's supposed to be enabled by default, which is the case with main branch and 0.46.
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.
The default value should remains true
since current (v0.45.10) default behavior is disable Fast Node
.
https://github.com/cosmos/cosmos-sdk/blob/v0.45.10/simapp/simd/cmd/root.go#L279
baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode)))
https://github.com/cosmos/cosmos-sdk/blob/v0.45.10/store/rootmulti/store.go#L41
const iavlDisablefastNodeDefault = 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.
BTW this CLI flag seems missing in 0.46, but the config is still there
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.
It is actually missing on main too. Could you set main as base branch, so then we can backport.
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.
But the default behavior is different for >= 0.46
0.46 enables Fast Node by default (i.e. disableFastNode == false
)
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.
But the default behavior is different for >= 0.46
0.46 enables Fast Node by default (i.e.disableFastNode == false
)
I don't see the issue:
0.45
cmd.Flags().Bool(FlagDisableIAVLFastNode, true, "Disable fast node for IAVL tree")
0.46+
cmd.Flags().Bool(FlagDisableIAVLFastNode, false, "Disable fast node for IAVL tree")
Not having the flag in version after 0.45 is a CLI breaking change, so I think it is better to still keep the flag (true and false keep the same meaning anyway). We don't need to precise the default value in the message, as cobra does that already.
In the PR backported to 0.45 we can just swap the false
to true
. This way we keep consistency.
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.
@julienrbrt #13656 Please check if I understand correctly, then we can close this PR and follow up in the new one
Follow up in #13656 |
Description
In #13540
iavl-disable-fastnode
is added to cmd, however the description is confusing, since settingiavl-disable-fastnode=true
disable fast node, instead of enabling it.Closes: #XXXX
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change