Comments (4)
Amongst those options, I would agree that Option 2 sounds like our best option right now. Though I may change the name subtlety to make it super-explicit it's purpose (ie. show-default-network-quorum
or something similar).
However, I actually would question whether or not we really need this command. You can still get this info in viewing the generated file, though I get that might be annoying. Given that, my inclination would be to not add it now, but to add it later, should the need arise or if we notice user pain around it.
from go.
In the context of this ticket, the term "network-quorum set" refers to the list of validator names along with their addresses and history urls, as configured in the captive-core config file. The main objective is to simplify Horizon setup by displaying the URLs that users should consider adding to their firewall rules, without the need to manually inspect the captive-core config file.
Originally, the plan was to implement show-network-quorum
as an ad hoc command that would fetch the network-quorum from the currently running Horizon (captive-core) process. However, this approach has a problem since it requires that the command horizon --show-network-quorum
is invoked with the same shell context (environment variables) as the running Horizon process. Now It is possible to run multiple Horizon (captive-core) with different shell contexts by starting them as separate processes with its own sets of environment variables. That is to say that each process can have its own environment variables, allowing them to point to different captive-core config files which means we need to supply our new command with captive-core config path
to work, leading to a chicken and egg problem.
There are two possible options to move forward:
Option 1:
Expose an admin endpoint that fetches the captive-core config file and returns the quorum set.
Pros: Generic approach that works for all networks, no need to worry about environment variables when invoking horizon --show-network-quorum
.
Cons: Increases the scope of the work and may be considered excessive, concerns about exposing internal details.
Option 2:
Limit the scope of the new command to display the default network-quorum set introduced through the NETWORK
parameter. So the command wouldhorizon --show-network-quorum --network [testnet|pubnet]
Pros: Simpler as it removes the dependency on running Horizon process and instead it is available statically in the code. If users want to view the quorum set before starting Horizon, and they are using one of the default networks, this will serve their need.
Cons: Very limited, restricted to the pubnet
and testnet
static configurations, not possible to query Horizon at runtime to retrieve the quorum set.
@mollykarcher, What are your thoughts on the best approach to move forward?
from go.
I would vote for option 2, a minor suggestion for simiplification of the sub-cmd to horizon show-network-quorom [testnet|pubnet]
I think option 1 is cool, if it resonates, maybe we add that in another iteration, the one caveat with that is that you have to install horizon first, before can retrieve the list of quorum hosts, which is the chicken/egg thing as a typical deployment timeline will want to identify fw rules for outbound traffic up front first before running the system.
from go.
I think the generated captive core config file won't be available until horizon has been run in the 'serve' or 'ingest' mode at least once, it seems like that type of cycle was where show-default-network-quorum
command could provide the info prior to executing horizon in those modes.
from go.
Related Issues (20)
- Error running processors on ledger: Error streaming changes from ledger: could not process transaction 171... CORE_REF: v19.13.0rc1 SOROBAN_TOOLS_REF: v0.9.4
- services/horizon: Race condition in integration test HOT 1
- services/horizon: remove internal transaction submission queue HOT 2
- Refactor CalculatePoolPayout and CalculatePoolExpectation so slippage calculations are handled in separate functions
- services/horizon: Race condition in ingestion system
- services/horizon: use IETF standard response headers for rate limiting
- stellar/horizon: Figure out difference from core in path payment ingestion HOT 1
- Create Horizon Configuration File
- services/horizon/flags: refined cli help content HOT 1
- services/horizon: use of strict captive-core config makes horizon unnecessarily incompatible with new stellar-core features HOT 1
- Eviction of Soroban ledger entries can lead to Horizon having invalid asset stats HOT 4
- horizon: TestFillGaps and TestReingestDB are flaky HOT 6
- Add Flag to truncate full href URL in responses
- services/horizon: deprecate command-line parameter usage in favor of env vars
- services/horizon: support configuration via configuration files HOT 1
- services/horizon: Document horizon setups of partners
- services/horizon: fix long-running payment migration HOT 2
- Remove unused indexes from horizon schema HOT 8
- services/horizon: investigate db connection management anomalies
- Write a knowledge document on removing Horizon submission queue
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go.