This protocol aims to solve the problem that multiple OP_RETURN outputs would solve but without changing the BCH standardness rules.
One aim is to be compatible with SLP such that existing SLP UTXOs will not be burned by un-upgraded wallets.
- Each sub-protocol is one PUSHDATA operation after the OP_RETURN. PUSHDATA operations don’t have to be minimally encoded, i.e. the minimal encoding rules that apply in a scriptSig don’t apply here. This simplifies interaction with Script.
- Each sub-protocol must be at least four bytes, which encode the LOKAD ID. All following bytes encode arbitrary payload, which are sub-protocol specific.
- Any PUSHDATA operation that is less than four bytes will be ignored and discarded.
If a sub-protocol with no payload appears as the first sub-protocol, this could be problematic for existing infrastructure which could confuse it with an existing LOKAD ID encoding and should therefore be avoided. However, it is still valid encoding and should be regarded as valid by implementations of this protocol.
The SLP encoding will change:
OP_RETURN 0x04 SLP\0 0x01 <SLP version BITOR 0x10> PUSH_N <SLP payload>
The first SLP push op plus version byte will be detected by existing wallets, thus preventing burns.
The SLP payload will have its own LOKAD ID (perhaps SLP\1) to be compatible with the Metaprotocol, and then contain the same data as the original SLP protocol after the version byte(s).