Skip to content

Post-freeze cleanup for Ethereum definition source API and tar lookup #7325

Description

@coderabbitai

Summary

Follow up on the Ethereum display-format definition support introduced in #7304 after the firmware freeze.

Required changes

  1. Revisit the Trezorlib Ethereum signing API so the definition-request handling is internalized around a definitions.Source (or an equivalent source abstraction), rather than requiring callers to supply a definition_provider callback that only dispatches request fields to Source lookup methods.
  2. Simplify the tar definition-source implementation by removing root-prefix detection and the detailed diagnostic handling for the unsupported tarball case, as agreed in the review discussion.

Rationale

Source already abstracts definition retrieval and can serve repeated, nested lookup requests. Moving the protocol-specific callback dispatch into the library should make the public signing API clearer and avoid duplicating the same callback logic in Trezorlib consumers.

Affected areas

  • python/src/trezorlib/ethereum.py signing API and definition-request flow
  • python/src/trezorlib/cli/ethereum.py CLI definition wiring
  • python/src/trezorlib/definitions.py tar definition source behavior

Acceptance criteria

  • Ethereum signing callers can provide a definition source without implementing a boilerplate request-dispatch callback.
  • Repeated and nested definition requests remain supported.
  • Tar source root detection and the agreed detailed unsupported-tarball diagnostics are removed or replaced by the simplified intended behavior.
  • Relevant tests cover the finalized API and tar-source behavior.

Backlinks

Requested by: @PrisionMike

Metadata

Metadata

Assignees

Labels

trezorlibPython library and the command line trezorctl tool.

Type

No type

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions