omgnetwork / research

43 stars 2 forks source link

Give proof on a generalized watcher only needs to check basic things #79

Closed boolafish closed 5 years ago

boolafish commented 5 years ago

Note

The concept is that watcher only needs to check two things:

  1. check sum(input) >= sum(output): no money out of the air.
  2. output predicate: can the tx output be considered "used".

Successful criteria

boolafish commented 5 years ago

To be more specified, this means we would have a "core watcher" that does the basic verification (predicate + input output sum) and can plugging extension logic for their own need (eg. DEX settlement logic verification).

Let's say we are plugging a new predicate new_P: Case 1: now you are creating a new tx that is totally un-related with the new_P. The history of the new tx you are creating have never touched new_P.

Case 2: now you are creating a new tx that new_P was used in one or some of the inputs' history, but the new tx is not using new_P directly.

Case 3: now you are creating a new tx that actually needs to fulfill new_P.

boolafish commented 5 years ago

@paulperegud @pik694 @pgebal Do you think the above statement sounds solid enough?