FilOzone / pdp

Smart contracts and utilities for Proof of Data Possession
Other
2 stars 2 forks source link

PDP Methods should take in extra data #56

Open ZenGround0 opened 3 weeks ago

ZenGround0 commented 3 weeks ago

The PDP Listener interface should allow an extra data param to be threaded through from the caller. This means we should add extra data params into the main PDP interface to allow caller to talk directly to the listener. This lets us use the safer, cleaner listener pattern but still allow for protocol extensions in base PDP that allow offchain auth and other extensions. The canonical example is an application that allows PDP client to fully determine the allowlist of valid cids to be added to proofset.

  1. Without extra data: in this case the PDP client must go to the application contract directly and store the valid cids that are allowed to be added to the proofset in the contract state before the PDP SP can call PDP addroots.
  2. With extra data: signature is sent to PDP SP who then includes it and passes to listener during addRoots call
ZenGround0 commented 3 weeks ago

Note: this is the approach we used for DDO. Though this time I think one extra data per call is fine, no need to have an array per individual operation in a batch

magik6k commented 3 weeks ago

Makes sense, definitely at least for the non-prove calls