fix: skip using the field element containing the proof-of-work (#343)
This commit is contained in:
parent
ee20a49953
commit
50dd6bda19
2 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
## 0.11.0 (2024-10-30)
|
## 0.11.0 (2024-10-30)
|
||||||
|
|
||||||
- [BREAKING] Updated Winterfell dependency to v0.10 (#338).
|
- [BREAKING] Updated Winterfell dependency to v0.10 (#338).
|
||||||
|
- Fixed a bug in the implementation of `draw_integers` for `RpoRandomCoin` (#343).
|
||||||
|
|
||||||
## 0.11.0 (2024-10-17)
|
## 0.11.0 (2024-10-17)
|
||||||
|
|
||||||
|
|
|
@ -145,8 +145,10 @@ impl RandomCoin for RpoRandomCoin {
|
||||||
self.state[RATE_START] += nonce;
|
self.state[RATE_START] += nonce;
|
||||||
Rpo256::apply_permutation(&mut self.state);
|
Rpo256::apply_permutation(&mut self.state);
|
||||||
|
|
||||||
// reset the buffer
|
// reset the buffer and move the next random element pointer to the second rate element.
|
||||||
self.current = RATE_START;
|
// this is done as the first rate element will be "biased" via the provided `nonce` to
|
||||||
|
// contain some number of leading zeros.
|
||||||
|
self.current = RATE_START + 1;
|
||||||
|
|
||||||
// determine how many bits are needed to represent valid values in the domain
|
// determine how many bits are needed to represent valid values in the domain
|
||||||
let v_mask = (domain_size - 1) as u64;
|
let v_mask = (domain_size - 1) as u64;
|
||||||
|
|
Loading…
Add table
Reference in a new issue