Given the sets of commitments and nullifiers S at block n
- We have two sets of new transactions: {A, B} and {A,C}, which are just like new blocks proposed by separate leaders
- Problem 1: Can we merge them and what would it take? The result should be the new set S’ with both sets merged ie = S + {A, B, C}
- Problem 2: if now we have {A1, B} and {A2, C} where A1 and A2 are conflicting, can we detect this and merge the two by discarding one. S’ = S + {A1, B, C} given an arbitrary rule to pick A1 vs A2
- Problem 3: if A2 in the previous points has descendants (A2.A, A2.B, etc) they all need to be discarded.
Problem 1: Merging Sets S = {A, B} and S = {A, C}
The goal is to merge two proposed blocks with new sets of transactions, {A, B} and {A, C}, without conflicts. This is a relatively straightforward scenario where there is no conflict between the sets A, B, and C, and the final set would be the union of all elements, i.e., $S' = S \cup \{A, B, C\}$.
Solution 1:
- Since each transaction modifies the state (via commitments and nullifiers), the merge requires updating the Merkle trees for commitments and nullifiers.
- Leaders proposing blocks need to verify that no transactions modify the same note or result in a double spend. Given that there are no conflicts in this case, the leader would simply include all transactions in the next block.
The result would be $S' = S \cup \{A, B, C\}$, as all transactions can coexist without issues.
Thus, we can merge the two sets as long as there is no conflict, and the only requirement is to update the state of commitments and nullifiers.
Problem 2: Conflict Resolution Between A1 and A2
This scenario introduces conflicting transactions A1 and A2, which cannot be included together. The goal is to detect the conflict and merge the sets by discarding one of the conflicting transactions (based on an arbitrary rule).
Solution 2:
- Each transaction generates a nullifier that corresponds to the spent note. When combining transactions from different proposed blocks, the protocol would check for conflicts based on the nullifiers. If both A1 and A2 produce the same nullifier, then they are conflicting (i.e., a double spend is detected).
- To resolve the conflict, you would apply an arbitrary rule to pick either A1 or A2. This rule could be based on priority (e.g., timestamp, block proposer, or deterministic randomness). Let’s assume we choose A1.
- After choosing A1, the nullifier generated by A2 is discarded. The resulting set is $S' = S \cup \{A1, B, C\}$.
So, it can be detected the conflict via nullifier checks and merge the blocks by discarding one of the conflicting transactions.
Problem 3: Discarding Descendants of A2