what is done in commitment stage


qs meng <qsmeng@...>
 

Hi experts,
    In fabric 2.0 alpha, fabtoken is introduced. The issue transaction can be endorsed only by the prover peer. I want to know what is done by all peers in the transaction commitment stage to ensure the security.
   Thank you.
  best regards,
qs meng


 


Angelo De Caro
 

Hi qs meng,

Let me first clarify what is the role of the prover peer. It is there to assist a "weak" client that does not have enough computational power or access to the ledger. Therefore I would not say that a token transaction is endorsed by the prover peer. Indeed, the prover peer, when used, do not sign the token transaction with it is own signing key.

Regarding the commitment stage: the implementation checks the following:
1. the transaction is well formed
2. the rightful owner is trying to spend the input tokens
3. the sum of the inputs is equal the sun of the outputs
4. input tokens and output tokens have the same type
5. the input tokens have not been already spend.
If everything is fine, the committer produces a ReadWrite-Set and commit it to the ledger.
This process can be seen as a post-ordering execution of the token transaction.

Please, let me know if you need more information :)

Best,
./angelo