Skip to content

Add compile warnings to every AffinePoint / ExtendedPoint getters #41

@ZER0

Description

@ZER0

The coordinates of AffinePoint and ExtendedPoint 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)

Metadata

Metadata

Assignees

Labels

area:architectureIssues related to general architectural improvements to enhance performance and/or maintainabiltyarea:cryptographyanything related to cryptographic primitives, hashing and ZKPstatus:minorLow priority improvementsteam:CoreLow Level Core Development Team (Rust)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions