Skip to content

Commit d40aca9

Browse files
authored
Merge pull request #816 from dusk-network/mocello/815_default_witness
Add `Default` trait implementation for `Witness`
2 parents 7505e9a + 7312fa9 commit d40aca9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Reduce hades constants count in circuit compression from 960 to 335 [#813]
1313

14+
### Added
15+
16+
- Add `Default` trait for `Witness` [#815]
17+
1418
## [0.19.0] - 2024-01-03
1519

1620
### Fixed
@@ -567,6 +571,7 @@ is necessary since `rkyv/validation` was required as a bound.
567571
- Proof system module.
568572

569573
<!-- ISSUES -->
574+
[#815]: https://github.com/dusk-network/plonk/issues/815
570575
[#813]: https://github.com/dusk-network/plonk/issues/813
571576
[#805]: https://github.com/dusk-network/plonk/issues/805
572577
[#804]: https://github.com/dusk-network/plonk/issues/804

src/composer/constraint_system/witness.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ pub struct Witness {
2929
index: usize,
3030
}
3131

32+
impl Default for Witness {
33+
fn default() -> Self {
34+
crate::composer::Composer::ZERO
35+
}
36+
}
37+
3238
impl Witness {
3339
/// A `0` witness representation.
3440
pub const ZERO: Witness = Witness::new(0);

0 commit comments

Comments
 (0)