rubixchain / rubixgoplatform

GNU General Public License v3.0
8 stars 17 forks source link

Quorum check for pledged token state #162

Closed harirubix closed 1 month ago

harirubix commented 3 months ago

This issue is to handle situation where quorum node(s) that pledged for a particular state change (transaction) will be updated if the state is exhausted.

A classic example if Alice transfer token T to Bob with quorums Q0 to Q4. When Bob further transfer token T to Charlie , the token T reaches a new state and Q0 to Q4 don't have to pledge anymore. In smart contracts , this is a more frequent operation since everytime -executeSmartContract is invoked , a new token state is added and previous quorum pledge can be unpledged.

Solution :

  1. A periodic check by quorum nodes to check if token state is exhausted or not. The new quorum will pin exhausted token state and can be checked by using ipfs pin ls command.
    An API has to be build to do ipfs pin ls command and if result of pin ls is empty , trigger a call to change token state in db from locked to free
  2. New Quorum nodes / current owner can connect to old quorum and inform that token state is changed.