Browse Source

PIP-0016: add quantity field, fixed mutation rules

Herman Schoenfeld 7 years ago
parent
commit
57f5a241e4
1 changed files with 6 additions and 2 deletions
  1. 6 2
      PIP/PIP-0016.md

+ 6 - 2
PIP/PIP-0016.md

@@ -28,6 +28,7 @@ A new operation called DATA is proposed that allows accounts to send data to ano
 - **Sequence**: this is used by Layer-2 protocol to envelope it's message into many Layer-1 messages, just as HTTP response is enveloped over many TCP messages. 
 - **Sequence**: this is used by Layer-2 protocol to envelope it's message into many Layer-1 messages, just as HTTP response is enveloped over many TCP messages. 
 - **Account**: this is the account authoring the operation
 - **Account**: this is the account authoring the operation
 - **Destination**: this is the account receiving the operation
 - **Destination**: this is the account receiving the operation
+- **Quantity**: this is an **optional** PASC quantity to transfer (can be 0)
 - **Fee**: the network fee payable to miner
 - **Fee**: the network fee payable to miner
 - **Payload**: the 256 byte operation payload containing Layer-2 data
 - **Payload**: the 256 byte operation payload containing Layer-2 data
 - **Signer**: this is the signer account which pays the fee
 - **Signer**: this is the signer account which pays the fee
@@ -37,10 +38,13 @@ A new operation called DATA is proposed that allows accounts to send data to ano
 - The Signer Account balance must greater than or equal to Fee
 - The Signer Account balance must greater than or equal to Fee
 - The public keys for Signer Account and Account must be identical
 - The public keys for Signer Account and Account must be identical
 - The Signature must be well-formed ECDSA signature verifiable using Signer Account's public key
 - The Signature must be well-formed ECDSA signature verifiable using Signer Account's public key
+- Account balance >= Quantity + Fee
 
 
 **Mutation Rules**
 **Mutation Rules**
-- Only the usual N_OPERATION and Fee mutations are made to Account and Signer.
-- Destination account state is **not changed**.
+- Account Balance = Account Balance - Quantity
+- Signer Balance = Signer Balance - Fee
+- Account NOperation = Account NOperation + 1
+- Destination Balance = Destination Balance + 1  
 
 
 **NOTE**
 **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. 
 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.