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.
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.
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:
00: List Index ReferenceSS): 00Public Key List (Section 4.1) or Signature List (Section 4.2) that exists elsewhere within the same CTE transaction.10 IIII 00| Bits | Field | Description |
|---|---|---|
| 7-6 | Tag (10) |
IxData Field family. |
| 5-2 | Index (IIII) |
The 4-bit index value (0-15). |
| 1-0 | Sub-Type (00) |
Specifies List Index Reference format. |
IIII) MUST correspond to a valid position within the intended target list (Public Key or Signature List).Index < list_size) MUST be performed by the application logic, using the decoded index and the size of the appropriate target list (obtained when decoding that list).10 0001 00 = 0x84. (The application logic determines if this refers to the PubKey list or Sig list and performs bounds checks accordingly).Summary of Changes:
last_list_count > 0 is removed from the raw decoding step for this field.This approach balances flexibility with semantic clarity:
10xxxx00) retains its specific meaning as a list index, preventing it from being overloaded as a generic 4-bit integer, which could lead to ambiguity.This LIP is licensed under the MIT License, in alignment with the main LEA Project License.