ethereum/trinity

Trinity doesn't seem to advertise its version number to other clients correctly

cburgdorf opened this issue · 1 comments

What is wrong?

Just looking at https://ethernodes.org/nodes it seems like Trinity doesn't announce its version correctly to other clients.

image

How can it be fixed

Needs to be looked into.

On https://www.ethernodes.org, I noticed that on all nodes where the version is not 0.0.0 (at least those I checked), there is a dash (-) between the vX.Y.X and the attached string if any. For example on a parity-ethereum client: v2.5.13-stable-253ff3f-20191231 , there a dash between v2.5.13 and stable. See screenshot below:

image

So, I did the following trick. I replaced line 16 below

def construct_trinity_client_identifier() -> str:
"""
Constructs the client identifier string
e.g. 'Trinity/v1.2.3/darwin-amd64/python3.7.3'
"""
return (
"Trinity/"
f"v{__version__}/"
f"{sys.platform}/"
f"{sys.implementation.name}"
f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
)

with:
image
So that my Trinity node advertises now the following version:
image

and a few minutes later I could see on https://www.ethernodes.org that the version 0.1.0 is shown:

image
image

Moreover, I had a quick look to https://www.python.org/dev/peps/pep-0440/#pre-releases but could not find any naming convention suggesting a package name in alpha version should separate the numerical component from the pre-release alphabetical identifier with a dash or some other separator.

So except if there is some other convention I'm not aware of or if we want to comply with what seems to be a constraint of ethernodes.org, I would say that there is no actual issue with Trinity.