-
Notifications
You must be signed in to change notification settings - Fork 6
Update dusk-plonk and canonical and related dependencies #130
Conversation
- Update `dusk-pki` from `v0.6` to `v0.7.0-rc.0`. - Update `dusk-poseidon` from `v0.20.0` to `v0.21.0-rc.0`. - Update `dusk-bls12_381` from `v0.6.0` to `v0.8.0-rc.0`. - Update `dusk-jubjub` from `v0.8.0` to `v0.10.0-rc.0`. - Update `dusk-plonk` from `v0.5` to `v0.8.0-rc.1`. - Update `rand-core` from `v0.5` to `v0.6`. - Update `canonical` from `v0.5` to `v0.6`. - Update `rand` from `v0.7` to `v0.8`. - Update `plonk_gadgets` from `v0.5` to `v0.6.0-rc.0`. - Remove `MemStore` references from tests. - Remove `canonical-host` from dev-deps. - Update tests according to the new `dusk-plonk` API. - Change `Bid::pos` method to return &u64 instead of `u64` directly. Resolves: #127 Resolves: #129
Cargo.toml
Outdated
anyhow = {version = "1", optional = true} | ||
dusk-bytes = "0.1" | ||
cfg-if = "1.0" | ||
|
||
[dev-dependencies] | ||
canonical_host = "0.5" | ||
microkelvin = "0.7.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Always use the form major.minor
never use the fix
:
microkelvin = "0.7.1" | |
microkelvin = "0.7" |
@@ -154,12 +145,11 @@ mod protocol_tests { | |||
let latest_consensus_step = 50u64; | |||
|
|||
// Append the Bid to the tree. | |||
tree.push(bid.into()); | |||
tree.push(bid.into()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use expect
at least, or since the test returns a Result
checks if you can use ?
or map_err
.
.poseidon_branch(0usize) | ||
.expect("Poseidon Branch Extraction"); | ||
let branch = | ||
tree.branch(0).expect("Poseidon Branch Extraction").unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@@ -237,12 +231,11 @@ mod protocol_tests { | |||
let latest_consensus_step = 25519u64; | |||
|
|||
// Append the Bid to the tree. | |||
tree.push(bid.into()); | |||
tree.push(bid.into()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
To be clear, if the tests was already using unwrap()
I wouldn't care much, but this is a kind of "regression".
.poseidon_branch(0usize) | ||
.expect("Poseidon Branch Extraction"); | ||
let branch = | ||
tree.branch(0).expect("Poseidon Branch Extraction").unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@@ -331,12 +328,11 @@ mod protocol_tests { | |||
.expect("Bid creation error"); | |||
|
|||
// Append the Bid to the tree. | |||
tree.push(bid.into()); | |||
tree.push(bid.into()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
.poseidon_branch(0usize) | ||
.expect("Poseidon Branch Extraction"); | ||
let branch = | ||
tree.branch(0).expect("Poseidon Branch Extraction").unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
@@ -433,12 +433,11 @@ mod protocol_tests { | |||
.expect("Bid creation error"); | |||
|
|||
// Append the Bid to the tree. | |||
tree.push(bid.into()); | |||
tree.push(bid.into()).unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
.poseidon_branch(0usize) | ||
.expect("Poseidon Branch Extraction"); | ||
let branch = | ||
tree.branch(0).expect("Poseidon Branch Extraction").unwrap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
fn poseidon_hash(&self) -> BlsScalar { | ||
self.0.hash() | ||
} | ||
|
||
fn pos(&self) -> u64 { | ||
self.0.pos() | ||
*self.0.pos() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already discuss that, and I've mixed feeling about it.
dusk-pki
fromv0.6
tov0.7.0-rc.0
.dusk-poseidon
fromv0.20.0
tov0.21.0-rc.0
.dusk-bls12_381
fromv0.6.0
tov0.8.0-rc.0
.dusk-jubjub
fromv0.8.0
tov0.10.0-rc.0
.dusk-plonk
fromv0.5
tov0.8.0-rc.1
.rand-core
fromv0.5
tov0.6
.canonical
fromv0.5
tov0.6
.rand
fromv0.7
tov0.8
.plonk_gadgets
fromv0.5
tov0.6.0-rc.0
.MemStore
references from tests.canonical-host
from dev-deps.dusk-plonk
API.Bid::pos
method to return &u64 instead ofu64
directly.Resolves: #127, #129