PIP: PIP-0016 Title: Layer-2 protocol support Type: Protocol Impact: Hard-Fork Author: Herman Schoenfeld <[email protected]> Comments-URI: https://discord.gg/sJqcgtD (channel #pip-0016) Status: Proposed Created: 2018-01-04
A new operation DATA is propose to facilitate data exchange between accounts. This will allow clean enveloping of Layer-2 protocols inside Layer-1 much in the same way HTTP lives inside TCP.
Currently, PascalCoin can facilitate Layer-2 protocols by allowing them to be enveloped within the Layer-1 Transaction operations. This is achieved by using the Payload field inside operations. Whilst this is useful, it has some drawbacks such as requiring double the fee and hard to distinguish between payments and data exchange. Whilst it's possible to send BLOB data over many 256 bytes payloads, it's hard for receiver to sequence these operations since some may payloads may be PASC others part of Layer-2 protocol. As a result, a new operation is required to cleanly support Layer-2 protocol eveloping. As a result, Layer-2 applications can quickly aggregate messages without needing to inspect every payload of every message and ordinary nodes can discard these Data messages after 100 blocks without any further burden.
A new operation called DATA is proposed that allows accounts to send data to another account.
Consensus Rules
Mutation Rules
NOTE It's important to note that this operation only transfers data between accounts, not PASC or PASA. Since nodes delete these operations after 100 blocks, it's up to Layer-2 applications to ensure they are persisted separately.
As mentioned in Motivation section, enveloping layer-2 protocols inside layer-1 can be achieved without this operation however it introduces many unncessary complexities. Also, by segregating DATA operations from PASC transactions, nodes can quickly filter Layer-2 protocols without expensive introspection of every Transaction.
This change is not backwards compatible and requires a hard-fork activation.