AntelopeIO / leap

C++ implementation of the Antelope protocol
Other
116 stars 68 forks source link

Provide example config.ini that matches old behaviour for "Support multiple http endpoints" 5.0 #1684

Closed matthewdarwin closed 1 year ago

matthewdarwin commented 1 year ago

This PR allows much more configuration of which features are available on which ports: https://github.com/AntelopeIO/leap/pull/1137

It would great if there was example that can be copy-pasted to enable exactly as in previous versions to make is easier to migrate.

http-server-address = http-category-address
http-category-address = node,127.0.0.1:8888
http-category-address = chain_ro,127.0.0.1:8888
http-category-address = chain_rw,127.0.0.1:8888
http-category-address = db_size,127.0.0.1:8888
http-category-address = net_ro,127.0.0.1:8888
http-category-address = net_rw,127.0.0.1:8888
http-category-address = producer_ro,127.0.0.1:8888
http-category-address = producer_rw,127.0.0.1:8888
http-category-address = snapshot,127.0.0.1:8888
http-category-address = prometheus,127.0.0.1:8888

However "node" seems to be an invalid type. So maybe the PR description is wrong?

matthewdarwin commented 1 year ago

Background: https://github.com/AntelopeIO/leap/issues/1681

heifner commented 1 year ago

"For the node category, it is NOT user configurable because it will be available for all listened http addresses."

That means node is not a configuration value, but rather just an indication that v1/node/get_supported_apis and v1/chain/get_info are available on all configured endpoints.

This is backward compatible with 4.0 configuration except for the prometheus-exporter-address which should be removed. If you use the same config.ini from 4.0 it will continue to listen on only one endpoint.

bhazzard commented 1 year ago

@heifner so we're saying that we don't need an example, because the old config will work as it did before... do I have that right? If so, I'll make sure some mention of the backwards compatibility is mentioned in the upgrade guide and release notes.

heifner commented 1 year ago

@heifner so we're saying that we don't need an example, because the old config will work as it did before... do I have that right? If so, I'll make sure some mention of the backwards compatibility is mentioned in the upgrade guide and release notes.

That is correct.

bhazzard commented 1 year ago

Updated https://github.com/AntelopeIO/leap/wiki/Leap-5.0-Upgrade-Guide