Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EntryTypes and UnitEntryTypes are inaccessible in validation crates. #69

Open
8e8b2c opened this issue Aug 2, 2024 · 1 comment
Open
Assignees

Comments

@8e8b2c
Copy link
Collaborator

8e8b2c commented Aug 2, 2024

I've just encountered a situation where I'd like to in which I like to validate that the recipe_ah of an SignedEvmSigningOffer points to a Recipe record. An imprecise way in which to do this is to attempt to deserialise the entry into the structure of a record. This approach is probably adequate but not flawless in general because the and struct type may overlap sufficiently to give a false positive. Therefore I would like to make a comparison on the records EntryType instead.

This isn't possible with the current crate structure because the EntryTypes and UnitEntryTypes enum are declared in the integrity crate, which is a dependant of the validation crate.

At the same time, we're also discussing separating differing functionality into zomes (see #4). Integrity zomes cannot specify each other as dependencies, therefore we should devise a strategy that allows the enums to be shared between zomes without the zomes beings interdependent.

@8e8b2c
Copy link
Collaborator Author

8e8b2c commented Aug 19, 2024

Partially addressed by this spike:
#98

While above solution makes entry defs injectable, it doesn't yet describe how zomes would be made aware of sibling zome indices. That might require some compile time variables.

On the other hand, I haven't yet encountered a strong motivation for separating features into zomes, other than for the sake of making code more modular (which we've achieved anyway).

@8e8b2c 8e8b2c self-assigned this Aug 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant