lea-improvement-proposals

Abstract

This LIP proposes modifying the definition and processing rules for the IxData Field Sub-Type 00 ("Legacy Index Reference"), as introduced in LIP-1. While retaining its semantic meaning as an index into a Public Key List or Signature List present within the transaction, this proposal removes the requirement that the index field must immediately follow the list it references. The responsibility for associating the index with the correct list and performing the bounds check is shifted from the raw decoder to the higher-level application logic consuming the decoded stream.

Motivation

The current specification (CTE v1.1 / LIP-1) requires the IxData Sub-Type 00 field (10 IIII 00) to immediately follow the Public Key or Signature List it references. This restricts its use, particularly within Command Data (Tag 11). This proposal allows the 10xxxx00 field to appear anywhere, including within the encoded payload of a command (e.g., smart contract arguments). This enables commands or contracts to compactly reference items (like public keys or signatures) from lists defined earlier in the transaction, leaving the interpretation (which list is referenced) and bounds checking to the application or contract logic.

Specification

This LIP modifies the description and constraints associated with Section 4.3.1 ("Sub-Type 00: Legacy Index Reference") of the CTE specification, as previously defined by LIP-1. The field format remains unchanged.

The modified Section 4.3.1 reads as follows:


4.3.1. Sub-Type 00: List Index Reference


Summary of Changes:

  1. The section title is changed back to "List Index Reference" (or similar) to reflect its purpose.
  2. The description clarifies that the referenced list can be elsewhere in the transaction, not necessarily immediately preceding.
  3. Explicit constraints are added stating that:
    • The target list association is application-defined.
    • The bounds checking responsibility lies with the application, not the raw decoder.
  4. The previous decoder constraint requiring last_list_count > 0 is removed from the raw decoding step for this field.

Rationale

This approach balances flexibility with semantic clarity:

Security Considerations

This LIP is licensed under the MIT License, in alignment with the main LEA Project License.