chore(python): remove per-call THP piggybacking
What changed, and why it matters
This commit removes a small piece of Python code in Trezor's host-side library that automatically bundled low-level transport acknowledgements with every device call. The change is labelled as a routine cleanup ('chore') and explicitly says it has no changelog entry. There is nothing in the diff or commit message that indicates a security fix, vulnerability, or behavior change visible to users.
No security action is indicated by the supplied materials. Treat as a normal maintenance commit. If THP ack behavior is security-relevant in your deployment, verify the parent class still provides equivalent or preferred ack handling.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The deleted code overrode _call() in TrezorClientThp to wrap each call with self.channel.piggyback_acks(msg), then delegated to the parent _call(). Removing it means THP (Trezor Host Protocol) ack piggybacking is no longer done on every individual call in this client class; the parent class’s _call() now handles the call directly. The commit is a code-cleanup refactor with no accompanying security explanation.
Changed components
python/src/trezorlib/thp/client.pyInspect captured patch +0 / −13
diff --git a/python/src/trezorlib/thp/client.py b/python/src/trezorlib/thp/client.py
index 778b0e60..8c240223 100644
--- a/python/src/trezorlib/thp/client.py
+++ b/python/src/trezorlib/thp/client.py
@@ -188,19 +188,6 @@ class TrezorClientThp(client.TrezorClient[ThpSession]):
else:
self._session_message_queue[session_id].append(msg)
- def _call(
- self,
- session: ThpSession,
- msg: client.MessageType,
- *,
- expect: type[client.MT] = client.MessageType,
- timeout: float | None = None,
- ) -> client.MT:
- with self.channel.piggyback_acks(msg):
- return super()._call(
- session=session, msg=msg, expect=expect, timeout=timeout
- )
-
@staticmethod
def detect_model(props: messages.ThpDeviceProperties) -> models.TrezorModel:
internal_model = props.internal_model
Why this scored 11/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.