Skip to content

Revert: regenerate messages_solana_pb2 with a modern protoc - #40

Merged
BitHighlander merged 1 commit into
masterfrom
fix/revert-pb2-regen
Aug 21, 2026
Merged

Revert: regenerate messages_solana_pb2 with a modern protoc#40
BitHighlander merged 1 commit into
masterfrom
fix/revert-pb2-regen

Conversation

@BitHighlander

Copy link
Copy Markdown
Owner

Restores keepkeylib/messages_solana_pb2.py to the committed version.

I regenerated it locally with a modern protoc to pick up the new KKSOLSW1 fields. That was wrong. Every other *_pb2.py here is old-style generated code (DESCRIPTOR = _descriptor.FileDescriptor(...)), and the CI test container is Alpine 3.8 / Python 3.6.9, whose protobuf runtime cannot load the modern descriptor_pool form:

_SOLANAGETADDRESS = DESCRIPTOR.message_types_by_name['SolanaGetAddress']
AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

That took down the whole python-integration-tests job — and with it generate-test-report — on every alpha run since it landed.

These bindings are regenerated with docker_build_pb.sh against the pinned kktech/firmware image, and have been for years. That is the supported path, it produces the style this package needs, and there was no reason to change it. Regenerating for the KKSOLSW1 tags belongs in that step, on a machine with Docker running.

The KKSOLSW1 firmware and protocol work is unaffected — the .proto carries the fields, the firmware implements and verifies them, and the four tests pass against locally-generated bindings. Only the committed Python bindings revert here.

Restores keepkeylib/messages_solana_pb2.py to the committed version.

I regenerated it locally with a modern protoc to pick up the new KKSOLSW1
fields. That was wrong: every other *_pb2.py in this package is old-style
generated code (DESCRIPTOR = _descriptor.FileDescriptor(...)), and the CI test
container is Alpine 3.8 / Python 3.6.9, whose protobuf runtime cannot load the
modern descriptor_pool form. The result was:

    messages_solana_pb2.py: _SOLANAGETADDRESS =
        DESCRIPTOR.message_types_by_name['SolanaGetAddress']
    AttributeError: 'NoneType' object has no attribute 'message_types_by_name'

which took down the whole python-integration job -- and with it
generate-test-report -- on every alpha run since it landed.

These bindings are regenerated with docker_build_pb.sh against the pinned
kktech/firmware image, and have been for years. That is the only supported
path, it produces the style this package needs, and there was no reason to
change it. Regenerating for the KKSOLSW1 tags belongs in that step, on a
machine with Docker running.

The KKSOLSW1 firmware and protocol work is unaffected: the .proto carries the
fields, the firmware implements and verifies them, and the four tests pass
against locally-generated bindings. Only the committed Python bindings revert
here, so CI stops failing on a file I should not have hand-generated.
@BitHighlander
BitHighlander merged commit af148d8 into master Aug 21, 2026
2 of 5 checks passed
@BitHighlander
BitHighlander deleted the fix/revert-pb2-regen branch August 21, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant