Skip to content

Liquid signing aborts for asset tickers longer than 7 characters #313

Description

@KyrylR

Signing a Liquid transaction containing a registered asset with a ticker of 8 or more characters causes Jade to display:

Internal error
sign_tx.c:135

The device then restarts.

Environment

  • Hardware: Jade Plus (JADE_V2)
  • Features: DEV
  • Firmware: 1.0.40-111-gcfce08ce
  • Commit: cfce08ced9f58ed0244e516f1d7f0c61a82889ee
  • ESP-IDF: v5.5.4

This commit is the current master at the time of reporting.

Steps to reproduce

  1. Build and install master for jade_v2.
  2. Initiate a Liquid sign_tx operation containing a registered asset whose ticker is at least 8 characters long.
  3. Allow Jade to display the asset output or asset summary.
  4. Jade aborts at main/ui/sign_tx.c:135 and restarts.

Examples already present in the generated asset registry include:

  • TREETEST — 8 characters
  • Sangiovese2 — 11 characters
  • TEST-COLLECTION3 — 16 characters

Cause

Ticker display buffers are declared as:

char ticker[8];

Reproduction test data

{
  "description": "Liquid issuance with a valid ELIP-0100 contract whose ticker is exactly 8 bytes",
  "input": {
    "network": "testnet-liquid",
    "txn": "02000000000195344d666c28ee7a57a9d540099cb7415eb03bbe8f51bb87e20c9ade57fe29c20000008000ffffffff0000000000000000000000000000000000000000000000000000000000000000802de150c40d8cca4b55fc287b284903524215eeca17afff23460c8025b1d149010000000000000001000301f759547a69ecf038d33007f4ac7e73aa72f50fb1f58422acf09cb996b36d073d01000000000000000100160014d0c4a3ef09e997b6e99e397e518fe3e41a118ca101499a818545f6bae39fc03b637f2a4e1e64e590cac1bc3a6f6d71aa4443654c1401000000000000000100160014d0c4a3ef09e997b6e99e397e518fe3e41a118ca101499a818545f6bae39fc03b637f2a4e1e64e590cac1bc3a6f6d71aa4443654c14010000000000000002000000000000",
    "asset_info": [
      {
        "asset_id": "3d076db396b99cf0ac2284f5b10ff572aa737eacf40730d338f0ec697a5459f7",
        "contract": {
          "entity": {
            "domain": "lending.example"
          },
          "issuer_pubkey": "0250929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0",
          "name": "simplicity-lending/v1 c229fe57de9a0ce287bb518fbe3bb05e41b79c0940d5a9577aee286c664d3495:0",
          "precision": 0,
          "ticker": "SLFc229f",
          "version": 0
        },
        "issuance_prevout": {
          "txid": "c229fe57de9a0ce287bb518fbe3bb05e41b79c0940d5a9577aee286c664d3495",
          "vout": 0
        }
      }
    ],
    "trusted_commitments": [null, null, null],
    "change": [null, null, null],
    "inputs": [{}]
  },
  "expected_output": [""]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions