Remove unicode in Zebra's user agent #2376
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
Zebra doesn't appear in node explorers like https://blockchair.com/zcash/nodes
(It also doesn't appear in DNS seeders #1904, but recent fixes might have resolved that issue.)
This might be because we use multi-byte UTF-8 in Zebra's user-agent.
Currently, accurate network metrics are more important than encouraging UTF-8 support in the Zcash ecosystem.
Specifications
User-agents are loosely specified as US-ASCII, but you have to track back through a lot of references and spec grammar to find that restriction:
https://github.com/bitcoin/bips/blob/master/bip-0014.mediawiki#proposal
https://datatracker.ietf.org/doc/html/rfc1945#section-10.15
https://datatracker.ietf.org/doc/html/rfc1945#section-3.7
https://datatracker.ietf.org/doc/html/rfc1945#section-2.2
However, it is quite likely that some block explorers do not support multi-byte UTF-8.
Solution
Review
Anyone can review this PR.
Reviewer Checklist
Fix is implemented as described
Optional: Manually deployed node version appears in the node list
listen_addr
with the external IP address before this worksFollow Up Work
Automatically use zebrad version for the zebra-network user agent #2375