Avoid redefinition of types in different crates #121
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
Summary
We should try and avoid redefining types defined in other crates, or using "untyped" fields. Currently the
Transaction::proof
field is aVec<u8>
, when it really should be adusk_plonk::Proof
, and there is also aModuleId
type alias that really should bepiecrust_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 piecrustModuleId
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)
The text was updated successfully, but these errors were encountered: