stellar / stellar-core

Reference implementation for the peer-to-peer agent that manages the Stellar network.
https://www.stellar.org
Other
3.12k stars 970 forks source link

Add more templated fields in the history get/put/mkdir options #3970

Open jacekn opened 1 year ago

jacekn commented 1 year ago

Description

Explain in detail the additional functionality you would like to see in stellar-core.

It would be useful if core allowed history archive commands to support more templated fields. For example today we can do the following:

get="curl http://history.stellar.org/{0} -o {1}"

I would like to ask for a few more fields to be available on top of {0} and {1}. The most useful field I can think of would be something like {stellar-core-version}, as show in the stellar-core version output but soroban specific fields could also be useful in some cases.

Explain why this feature is important

Currently when core hits history archives using curl there is very little info that the archive admins see about the requests. We can see curl version in the user agent string but that's about it. This makes it hard to track down certain problems, for example with hosts hitting the archive excessively.

Describe the solution you'd like

What would be useful to do is something like this:

get="curl --user-agent \"stellar-core/{stellar-core-version}\" http://history.stellar.org/{0} -o {1}"

above would result in history archive logs having core versions that download archives. This in turn would be very useful in troubleshooting problems with hosts hitting archives excessively. One example of that is to check how many core hosts use versions that don't support current protocol version.

If this functionality is added we could update example config to include user agent and slowly roll it out to the community.

Describe alternatives you've considered

I couldn't think of any alternatives.

MonsieurNicolas commented 1 year ago

related to https://github.com/stellar/stellar-core/issues/3437