-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass full version in Handshake
#15679
Pass full version in Handshake
#15679
Conversation
This probably has unintended consequences for the crawler/seeder as it will significantly change all downstream version reporting on the dashboards. This is may drive inconsistency between versions inside the windows installer as the windows installer has to be int.int.int. |
The version used by the seeder/crawler remains unchanged (cut down version), or are you referring to something else? If you are referring to older seeder/crawler version collection then yes, this is a breaking change, and thus why i'd put this change into 2.0.0, a breaking release 👍
The The only place which actually changed is the version in the handshake message |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
77f0d15
to
3e6e300
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
3e6e300
to
3a7242a
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties. |
Waiting for CNI re versioning schema decisions |
3a7242a
to
d721ef9
Compare
Conflicts have been resolved. A maintainer will review the pull request shortly. |
Since i opened this PR about 3 months ago the With this being said i don't actually think we need a versioning discussion for this PR anymore, as the field in the protocol is a string and as indicated by others is already being used with values other than This PR will try to transform the version string from the handshake into the I don't think the fact that new clients now send a more detailed/exact version in case they indeed are different from the official releases is a breaking change, instead it is how other custom nodes already behave. |
This PR has been flagged as stale due to no activity for over 60 days. It will not be automatically closed, but it has been given a stale-pr label and should be manually reviewed by the relevant parties. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
# Conflicts: # chia/_tests/core/server/test_server.py # chia/_tests/util/test_chia_version.py
Conflicts have been resolved. A maintainer will review the pull request shortly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested a few changes
After taking some time to study the code, I think some minor adjustments to the proposed code changes and this should be ok. The Handshake version string isn't really used anywhere other than the crawler Note, this does require the crawler to need an update such that it does some post-processing on the version in the Handshake into the form it is expecting. But this is a reasonable lift. An alternative approach would be to change the code such that only the harvester uses a modified version string, which would have modestly less implications, at the cost of some muckity muck. |
I'm going to go back a bit - at least specifically for 3rd party harvesters For 3rd Party Harvesters, this isn't needed at all. That harvester can put whatever they want into the Handshake version string. and the farmer can use it from the connection |
From discord:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved
I have made one more commit to ensure we extract major.minor.patch from versions which are invalid pep440 but contain a major.minor.patch version. This is now the same behavior as |
coverage exemption for a couple of lines not previously covered |
Purpose:
Currently the
Handshake
contains a cut down version of the package version (__version__
). As it is desired to get the exact version of peers for a future PR related to farming/pooling and there is no downside in having more/exact info on the version of peers this PR changes this to now include the full__version__
. Theversion
of aWSChiaConnection
is currently only used by the seeder viaget_version
, which was refactored to return the desired cut down version. Additionally legacy code was removed in favor of usingpackaging.version.Version
, same as we already do in theWSChiaConnection
for parsing the Handshake version.Current Behavior:
A
Handshake
contains a cut down version, for example:__version__
is1.8.2rc3.dev116
, the handshake contains1.8.2rc3
instead. Another example:__version__
is2.0.0b2.dev0+og-1.4.0
, the handshake contains2.0.0b2
.New Behavior:
The
Handshake
now contains__version__
as is, so from the examples above:1.8.2rc3.dev116
or2.0.0b2.dev0+og-1.4.0
respectively.The
get_chia_version_str()
method on aWSChiaConnection
returns the cut down version, same as before.Testing Notes:
I added tests for the three "new" functions which are responsible for retrieving the "chia version" (cut down version) of the package or a passed
Version
orstr
instance, these basically replace thechia_full_version_str
frominit_funcs.py
.