-
Notifications
You must be signed in to change notification settings - Fork 501
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
services/horizon: Refactor Captive Core configuration flags #3262
services/horizon: Refactor Captive Core configuration flags #3262
Conversation
091a6c7
to
858c1f5
Compare
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. I remember you wanted to add some improvements so will approve later.
* Rename `--stellar-core-config-path` to `--stellar-captive-core-quorum-path`. The core config path is automatically generated in captive-core online mode. `--stellar-captive-core-quorum-path` should point to a toml config file containing `[QUORUM_SET]` entries, with the same semantics as in the stellar core configuration. * Add `--stellar-captive-core-http-port` to indicate what port (if any) captive core shoulf listen on. If `--stellar-core-url` is unset and the local Captive core is enabled, `--stellar-core-url` will be implicitly use `http://localhost:<stellar_captive_core_http_port>` * Remove unused entries in `CaptiveStellarCore`
34edf52
to
5539f81
Compare
UPDATE It turns out that In reality we need a combination of Thus, I have renamed PTAL |
42b7c27
to
c83bce9
Compare
c83bce9
to
4035167
Compare
func (r *stellarCoreRunner) generateConfig() (string, error) { | ||
if r.mode == stellarCoreRunnerModeOnline && r.coreConfigAddendumPath == "" { | ||
return "", errors.New("stellar-core addendum config file path cannot be empty in online mode") | ||
} | ||
lines := []string{ | ||
"# Generated file -- do not edit", | ||
"RUN_STANDALONE=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.
sorry I missed this during my earlier review but, I think "RUN_STANDALONE=true"
should only be enabled in offline mode
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 changed it it ... but this enables peer connections, I think. Are we sure about this?
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.
according to the stellar-core doc when you set it to true it prevents core from connecting to other peers
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 think in online mode we need to be able to connect to peers to sync with consensus
ADDRESS="core-testnet1.stellar.org" | ||
``` | ||
|
||
The full configuration to be used will be printed out by Horizon when runnign horizon with `--log-level debug` |
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 full configuration to be used will be printed out by Horizon when runnign horizon with `--log-level debug` | |
The full configuration to be used will be printed out by Horizon when running horizon with `--log-level debug`, |
NAME="sdf_testnet_1" | ||
HOME_DOMAIN="testnet.stellar.org" | ||
PUBLIC_KEY="GDKXE2OZMJIPOSLNA6N6F2BVCI3O777I2OOC4BV7VOYUEHYX7RTRYA7Y" | ||
ADDRESS="core-testnet1.stellar.org" |
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.
Worth noting that this is not a valid configuration stub. From the Horizon Captive Core logs:
Got an exception: Failed to parse '/tmp/captive-stellar-core-3bdb97927775752a/stellar-core.conf' :Critical and High quality validators sdf_testnet_1 must have redundancy of at least 3
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.
Yes, it has to be "MEDIUM", I fixed it in the docs, but not here (since it's not really relevant for the test).
This commit updates config files in `stellar-captive-core` package. Starting from stellar/go#3262 config file for stellar-core is generated by Horizon (except quorum slices that need to be explicitly set by the admin).
Rename
--stellar-core-config-path
to--stellar-captive-core-quorum-path
.The core config path is automatically generated in captive-core online mode.
--stellar-captive-core-quorum-path
should point to a toml config file containing[QUORUM_SET]
entries, with the same semantics as in the stellar core configuration.Add
--stellar-captive-core-http-port
to indicate what port (if any) captive coreshoulf listen on. If
--stellar-core-url
is unset and the local Captive core is enabled,--stellar-core-url
will be implicitly usehttp://localhost:<stellar_captive_core_http_port>
Remove unused entries in
CaptiveStellarCore
Closes #3211