-
Notifications
You must be signed in to change notification settings - Fork 60
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
please regenerate protobuf _pb2.py files using recent protoc, and publish new release on PyPI #146
Comments
What is the state of this? A reply would be nice. :) Note: for continued support of the keepkey plugin in Electrum, we need a new release of the library on PyPI with these changes. |
Even if you don't release a new version on PyPI, could you regenerate the pb2 files in the git repo? Otherwise if this library is unmaintained, again, we might have to remove keepkey support from Electrum. |
CC @markrypt0 @pastaghost (I see they are not in repository's watchers list, so they might miss the issue accidentally) |
@SomberNight @MrNaif2018 - thanks for tagging me on this issue; we'll give this some attention right away. |
There are several reasons this hasn't been updated. First is that it isn't a seamless upgrade in firmware and because it hasn't been a critical issue, nothing has been changed. Second, the current keepkey pypl account credentials are not available so this is a problem that needs to be fixed. |
@markrypt0 As for the latter: I think it's not much of a problem, another pypi package can be created, or even it's possible to install from github |
BUMP. Can you please just create a new pypi package with latest and with recompiled _pb2.py files? Electron Cash for BCH also would like this else we may drop keepkey support as well. EDIT: And like @SomberNight said, you can create a new package under a different username on pypi. It's fine. |
Technically worst case it is even possible to load from a github tag specified in requirements.txt, but indeed nothing stops from just publishing a package under different name |
I have a fork that has implemented these changes. Would love some extra eyes and testers. |
I don't have a keepkey device for testing this properly with Electrum ABC or Electron Cash, but I'm getting an error with a basic import
|
Summary: Update the protobuf files in the newer format supported by protobuf versions > 4. This makes it possible for users with a newer version of protobuf installed to use Electrum ABC. For now we keep protobuf 3.20 as the official requirement, because this is the only version supporting both the old and new protobuf format. Our dependency to `keepkey` makes it hard to drop support for the old format (see description of the issue here: spesmilo/electrum#7922) There is ongoing work for trying to make keepkey work with the new protobuf format, but for now I have not been able to use it succesfully. See keepkey/python-keepkey#146 Note that I generated the files with protobuf 5.28 and then manually removed the runtime version check which is not supported by protobuf 3.20 ``` diff --git a/electrum/electrumabc_plugins/fusion/fusion_pb2.py b/electrum/electrumabc_plugins/fusion/fusion_pb2.py index 317bb6e3d5..bc58f947fd 100644 --- a/electrum/electrumabc_plugins/fusion/fusion_pb2.py +++ b/electrum/electrumabc_plugins/fusion/fusion_pb2.py @@ -1,11 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: fusion.proto -# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'fusion.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() ``` I compared the generated paymentrequest file with the one electrum uses and did not find any other discrepancy that could cause an issue with protobuf 3.20 Test Plan: `python test_runner.py` Wait for a successfull fusion. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D16702
Will take a look at this shortly. =) |
Pushed a fix. Client now imports correctly, had some issues with Mayachain code and the way the imports were generated.
|
OK, my very basic unit test is passing now. Good enough for me, until we find an actual tester with access to a device. Thanks @zquestz! |
Summary: Update the protobuf files in the newer format supported by protobuf versions > 4. This makes it possible for users with a newer version of protobuf installed to use Electrum ABC. For now we keep protobuf 3.20 as the official requirement, because this is the only version supporting both the old and new protobuf format. Our dependency to `keepkey` makes it hard to drop support for the old format (see description of the issue here: spesmilo#7922) There is ongoing work for trying to make keepkey work with the new protobuf format, but for now I have not been able to use it succesfully. See keepkey/python-keepkey#146 Note that I generated the files with protobuf 5.28 and then manually removed the runtime version check which is not supported by protobuf 3.20 ``` diff --git a/electrum/electrumabc_plugins/fusion/fusion_pb2.py b/electrum/electrumabc_plugins/fusion/fusion_pb2.py index 317bb6e3d5..bc58f947fd 100644 --- a/electrum/electrumabc_plugins/fusion/fusion_pb2.py +++ b/electrum/electrumabc_plugins/fusion/fusion_pb2.py @@ -1,11 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: fusion.proto -# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'fusion.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() ``` I compared the generated paymentrequest file with the one electrum uses and did not find any other discrepancy that could cause an issue with protobuf 3.20 Test Plan: `python test_runner.py` Wait for a successfull fusion. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D16702
Summary: Update the protobuf files in the newer format supported by protobuf versions > 4. This makes it possible for users with a newer version of protobuf installed to use Electrum ABC. For now we keep protobuf 3.20 as the official requirement, because this is the only version supporting both the old and new protobuf format. Our dependency to `keepkey` makes it hard to drop support for the old format (see description of the issue here: spesmilo/electrum#7922) There is ongoing work for trying to make keepkey work with the new protobuf format, but for now I have not been able to use it succesfully. See keepkey/python-keepkey#146 Note that I generated the files with protobuf 5.28 and then manually removed the runtime version check which is not supported by protobuf 3.20 ``` diff --git a/electrum/electrumabc_plugins/fusion/fusion_pb2.py b/electrum/electrumabc_plugins/fusion/fusion_pb2.py index 317bb6e3d5..bc58f947fd 100644 --- a/electrum/electrumabc_plugins/fusion/fusion_pb2.py +++ b/electrum/electrumabc_plugins/fusion/fusion_pb2.py @@ -1,11 +1,22 @@ # -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! -# NO CHECKED-IN PROTOBUF GENCODE # source: fusion.proto -# Protobuf Python Version: 5.28.0 """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import runtime_version as _runtime_version from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder -_runtime_version.ValidateProtobufRuntimeVersion( - _runtime_version.Domain.PUBLIC, - 5, - 28, - 0, - '', - 'fusion.proto' -) # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() ``` I compared the generated paymentrequest file with the one electrum uses and did not find any other discrepancy that could cause an issue with protobuf 3.20 Test Plan: `python test_runner.py` Wait for a successfull fusion. Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D16702
Unfortunately Google made breaking changes in protobuf (see e.g. here), and hence the current
_pb2.py
generated files in latest release/master of keepkeylib cannot be parsed with new versions of protobuf (4.x).AFAICT protoc >=3.19 generates _pb2 files in the new format, while older protoc generates the old format.
AFAICT
related: BitBoxSwiss/bitbox02-firmware#951
I would suggest
python-keepkey/setup.py
Line 16 in 7bddc11
The text was updated successfully, but these errors were encountered: