hexresearch / hschain-utxo

UTXO-based contracts for hschain
0 stars 0 forks source link

Rework data types and verification #243

Closed Shimuuar closed 3 years ago

Shimuuar commented 3 years ago

First part is rework of data types. It's in large part preparations for rework of distribute proof building. Also HasXYZ type classes turned out to be rather handy.

 - Env is function now, which allows other representations. Not only list of
   keys

 - DLog & DTuple modules are merged into protocol. Mostly in order to make
   definition of HasXYZ type classes easier.

 - HasXYZ type classes are introduced. They push job of generating trvil
   boilerplate of drilling through

 - Many specific data types are introduced. Some of them are for not yet
   submitted rework of distributed proof creation

Second is simplification of proof verification. There's no point in checking whether AtomicProof is correct. We compute commitments there. They're correct by construction. Real proof is checking whether computed root challenge matches provided in proof.