oasisprotocol / adrs

Architectural Decision Records
2 stars 1 forks source link

ADR14: Metadata changes #20

Closed matevz closed 1 year ago

matevz commented 1 year ago

Changes to ADR 14:

Rationale:

  1. You need to prase CBOR message in order to determine its size.
  2. CBOR wrapped inside another CBOR is CBOR. This means you don't need any additional memory (as is the case, for example, in Base64) in order to parse the CBOR-encoded object (e.g. transaction) wrapped inside CBOR.

As a consequence, there is no added value, if we pass two separate Meta+Message CBOR-encoded messages to the hardware wallet, so we combine them inside a single Data CBOR-encoded map with metadata and tx fields.

matevz commented 1 year ago

The new version of nano app supports detection of metadata size, so there is no need to combine metadata+tx into a single object anymore. Closing.