Skip to content

Commit

Permalink
fixup! CIP-0021: Restrictions on transactions signed by hardware wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielKerekes committed Aug 20, 2021
1 parent 81d2394 commit 0d287f8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions CIP-0021/CIP-0021.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This CIP describes all the restrictions applicable to Cardano transactions which

## Motivation

Due to certain limitations of HW wallets, especially very small memory and a limited set of data types supported by Ledger, HW wallets are not able to process all valid transactions which are supported by Cardano nodes.
Due to certain limitations of hardware (abbrev. HW) wallets, especially very small memory and a limited set of data types supported by Ledger, HW wallets are not able to process all valid transactions which are supported by Cardano nodes.

The limitations also result in an inability of HW wallets to see the whole transaction at once. Transaction data are streamed into HW wallets in small chunks and they compute a rolling hash of the transaction body which is signed at the end. Consequently, a HW wallet only provides witness signatures, and the transaction body which was signed has to be reconstructed by the client. We thus need a common transaction serialization format which will allow no ambiguity. In addition, the format must define ordering of map keys in such a way that it’s possible to check for duplicate keys by HW wallets.

Expand Down Expand Up @@ -49,7 +49,17 @@ While the Cardano CDDL specification usually does not limit the size of integers

**Numbers of transaction elements**

The numbers of inputs, outputs, certificates, withdrawals, tokens in an asset group, and other similar transaction elements must not exceed `UINT16_MAX`, i.e. 65535.
The number of the following transaction elements individually must not exceed `UINT16_MAX`, i.e. 65535:

- inputs in transaction body
- outputs in transaction body
- asset groups (policy IDs) in an output
- tokens (asset names) in an asset group
- certificates in transaction body
- pool owners in a pool registration certificate
- pool relays in a pool registration certificate
- withdrawals in transaction body
- the total number of witnesses

**Optional empty lists and maps**

Expand Down

0 comments on commit 0d287f8

Please sign in to comment.