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

Avoid redefinition of types in different crates #121

Open
ureeves opened this issue Jan 19, 2023 · 0 comments
Open

Avoid redefinition of types in different crates #121

ureeves opened this issue Jan 19, 2023 · 0 comments
Assignees
Labels
mark:next Strategic issues related to next versions of Testnet and mid/long term plans team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Milestone

Comments

@ureeves
Copy link
Member

ureeves commented Jan 19, 2023

Summary

We should try and avoid redefining types defined in other crates, or using "untyped" fields. Currently the Transaction::proof field is a Vec<u8>, when it really should be a dusk_plonk::Proof, and there is also a ModuleId type alias that really should be piecrust_uplink::ModuleId.

Possible solution design or implementation

One possible solution is to include the appropriate dependencies, even at the risk of increasing binary size for users of this crate.

Additional context

Although this is clearly an improvement to the previous version where we don't add a type alias and only use BlsScalars as an ID, wouldn't it make sense to use the piecrust ModuleId here even though it would include an extra dependency?
It doesn't feel 'right' to define the same thing in two different crates.

Originally posted by @moCello in #120 (comment)

@ureeves ureeves added team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc) mark:next Strategic issues related to next versions of Testnet and mid/long term plans labels Jan 19, 2023
@HDauven HDauven added this to the Mainnet milestone Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mark:next Strategic issues related to next versions of Testnet and mid/long term plans team:Core Low Level Core Development Team (Rust) type:enhancement Issues concerning code or feature improvement (performance, refactoring, etc)
Projects
None yet
Development

No branches or pull requests

3 participants