Add compile warnings to every AffinePoint
/ ExtendedPoint
getters
#41
Labels
area:architecture
Issues related to general architectural improvements to enhance performance and/or maintainabilty
area:cryptography
anything related to cryptographic primitives, hashing and ZKP
status:minor
Low priority improvements
team:Core
Low Level Core Development Team (Rust)
The coordinates of
AffinePoint
andExtendedPoint
are internals value that ideally should never be exposed as public APIs.However, we need access to them in few critical cases, such PLONK since they're really coupled together, and the only way for PLONK to access to them is let make them public getters and available to every library.
This brings to misuse and overuse of such internals (with some interesting result, for example when we're trying to hashing: https://github.com/dusk-network/dusk-pki/pull/1/files#diff-96f32075a85698229737b72d5e411bcfR4-R9).
Therefore a developer shouldn't easily use it as regular public APIs.
We should raise a compiler error if the developer is trying to use them, so he's aware he needs to think twice before proceed: the idea is made the getters behind features, however a custom message might be useful to explain why it is happening.
Also, we'll wrap some specific use case in methods / functions of JubJub repo so that a developer doesn't need to access to the internals directly (see issue: #40)
The text was updated successfully, but these errors were encountered: