Skip to content

Model Verification when Nodes are Trait Objects #67

@jakehemmerle

Description

@jakehemmerle

This is what we were starting to get into at the end of 4/17/24 meeting with Antonio and Cesar, but we were getting wiped and out of time. To jog our memory for next time, the new issue is that by refactoring Model to use Vec<Box<dyn NodeOpsCommon>>
as one of its field types, we can't iterate through the nodes on the verifier side and verify the nodes anymore.

So, a few ideas to spur the next discussion:

  • I wonder if it makes sense to refactor NodeOpsVerify back into common (gated by a core feature or something), and also refactor its impls gated with a verify feature, which the verifier crate then requires. This allows us to still keep verifier logic out of prover yet still exposes the NodeOpsVerify trait without its impls (via just the core feature), but by recoupling the node verification logic with the nodes themselves (and model verification), verification becomes simpler at the model level.
  • Antonio also suggested we might allow the conversion of type Model to another type VerifiableModel, which removes all private data and has a new method that calls verification on the nodes.
  • Define NodeOpsCommon as a of supertrait of NodeOpsVerify: By doing this, we need to allow the NodeOpsVerify NodeOpsVerify on the underlying Nodes already. New Nodes will just have to implement NodeOpsVerify
  • Merge NodeOpsVerify into NodeOpsCommon, maybe even rename NodeOpsCommon to just NodeOps

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions