-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: abci client type now an explicit config setting #416
Conversation
Setting the flag still works and takes precedence.
server/config/config.go
Outdated
@@ -289,6 +292,7 @@ func DefaultConfig() *Config { | |||
IAVLCacheSize: 781250, // 50 MB | |||
IAVLDisableFastNode: false, | |||
IAVLLazyLoading: false, | |||
ABCIClientType: "committing", // [AGORIC] |
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.
No way to reference the "other" default value ?
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.
Not where it is now - circular imports. Let me see if I can do the reference the other way - or at least add cross-reference comments.
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.
Done. Now the options and default are defined in one place - the config package. (The server/types package seems like the better place, but it imports server/config.)
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.
D'oh! It would help if I actually used the constant I just defined. Actually done now.
* feat: abci client type now an explicit config setting Setting the flag still works and takes precedence. * docs: changelog entry * refactor: common location for valid abci client types and default * refactor: actually use the defined default value
* feat: abci client type now an explicit config setting Setting the flag still works and takes precedence. * docs: changelog entry * refactor: common location for valid abci client types and default * refactor: actually use the defined default value
* feat: abci client type now an explicit config setting Setting the flag still works and takes precedence. * docs: changelog entry * refactor: common location for valid abci client types and default * refactor: actually use the defined default value
Description
Refs: Agoric/agoric-sdk#9224
Add an explicit entry for abci-client-type in the TOML file. The setting can be done in the file but is overridden by when the command-line flag is set.
Note that this entry is unlike the other entries in the "base config" part of the TOML file, in that there are no
BaseApp.Get/SetABCIClientType()
methods, option helpers, etc. This makes it more like the various start command flags that do not have explicit config fields, e.g.--with-tendermint
or--trace-store
. This seems appropriate for a setting that is used near the "top" of the start command.Note that even without this change, the option can be set in the
config/app.toml
file. This just makes the entry part of the automatically-generated TOML file.Note that the default value is now specified both in the flag definition and in the default config constructor, as some of the other flags are. It's confusing to think about which one takes precedence, so they should just be kept in sync.
Tested the following:
app.toml
app.toml
entry and override with a different legal valueAuthor 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