[LUR-33] Refactor common behavior between Nova/Supernova in `public_parameters` caching
Closed this issue · 0 comments
huitseeker commented
The logic for reading to/from cache in #1085 shows a lot of duplicated logic between supernova and nova. One of the issues of this definition is that the UX of the code isn't ideal, witness the uneven usage of logging and use of tap
.
We want to relate two sets of three types:
- lurk::proof::nova::PublicParams, nova_snark::PublicParams, nova_snark::FlatPublicParams,
- lurk::proof::supernova::PublicParams, nova_snark::supernova::AuxParams, nova_snark::supernova::FlatAuxParams
and basically execute the same read-from-cache-and-extract or generate logic on each of those two pairs, returning a final type that's either a lurk::proof::nova::PublicParams
or lurk::proof::supernova::PublicParams
in the end. This seems to be a job for a trait with two associated types, which we could use to make the processing of this file more systematic.