Sfoglia il codice sorgente

PIP-0015: add sync workflow

Herman Schoenfeld 7 anni fa
parent
commit
9345542412
1 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 13 0
      PIP/PIP-0015.md

+ 13 - 0
PIP/PIP-0015.md

@@ -111,6 +111,19 @@ This network operation allows a node to fetch specific block operations from oth
 - OP_SIZE_M : DWord - the size of the M'th operation being returned
 - OP_M - the raw data of M'th operation being returned
 
+### Block Propagation Workflow
+
+Suppose Bob and Alice run nodes and Alice encounters a new valid block B.
+
+- Alice sends B to Bob in the form of a Block Skeleton
+- Bob reconstructs block by pulling missing operations from Alice using NET_OP_PULL_ACCOUNT_OPS
+- Bob validates block B
+  + If invalid, Bob reconstructs B again by pulling **all** the operations from Alice, including ones he already had.
+    * If invalid, Bob discards B and blacklists Alice
+    * Otherwise Bob accepts B as the next block
+  + Otherwise Bob accepts B as the next block
+  
+**NOTE**: other network operations will need to be modified to support Block Skeleton pushing.
 ## Rationale
 
 This provides a 95% reduction in the block data being transmitted increasing propagation efficiency. As a result, orphan rates are expected to proportionally reduce resulting a dramatically less number of orphans. In combination with other PIPs that improve SafeBox rollback efficiency, PascalCoin will be able to seamlessly support CPU-mining such as proposed in [PIP-0009][1].