hashcloak/stoffelMPC

Blockchain specific types

Opened this issue · 1 comments

So far, we have focused mainly types that are mainly relevant for MPC computation. However, in going through our example applications, it's becoming clear that we may want a few blockchain specific types as well. These will mainly aid in reading and writing from the MPC nodes for an application and help with keeping on-chain data in sync with what's stored by the MPC nodes.

A tenative list of types to support:

  • Addresses: Pretty self-explanatory.
  • Contract IDs: Having some form of IDs for the contracts makes sense in that the nodes will always know which contract a particular set of computations are for. Might possibly just br subsumed by the Address type
  • Notes: in many applications, we will want to shield basic on-chain data (amounts, addresses). As such, these won't be in an easily accessible form for the user. Common designs rely on notes that only the user has in order to prove ownership of some data in zero-knowledge. Obviously, we can't store the notes directly with the MPC nodes.
th4s commented

Yup, this is a good idea. Probably helpful to have a look at other rust libraries to get an inspiration for all the types which might be interesting in blockchain context.