Rust Cuckatoo for verifier and test-miner (#1558)

* cuck placeholder

* rustfmt

* cuckatoo, early days

* rustfmt

* data structures are in place, siphash key creation is consistent with @tromp

* solver in place, (not yet working)

* cuckatoo test solver working with test nonce

* rustfmt

* update solver to remove adjacency list removals

* verifier functioning

* rustfmt

* Proper error handing in Cuckatoo module, couple of tests

* modify cuckoo/cuckatoo solvers and verifiers to function identically, in advance of trait refactoring

* rustfmt

* refactor PoW context into trait, default to using cuckoo context

* rustfmt

* create macros for integer casting/unwraps

* don't instantiate structs when just verifying, add test validation vector for cuckatoo 29

* rustfmt

* don't init cuckoo structs if just validating

* test fix

* ensure BH hashing for POW is only done within miner/validators
This commit is contained in:
Yeastplume
2018-09-28 11:53:14 +01:00
committed by GitHub
parent a13c20ceb2
commit e64f4fbcd1
16 changed files with 1171 additions and 329 deletions
+3 -3
View File
@@ -42,7 +42,7 @@ pub enum Error {
/// Error originating from wallet API.
Wallet(wallet::Error),
/// Error originating from the cuckoo miner
Cuckoo(pow::cuckoo::Error),
Cuckoo(pow::Error),
}
impl From<core::block::Error> for Error {
@@ -62,8 +62,8 @@ impl From<p2p::Error> for Error {
}
}
impl From<pow::cuckoo::Error> for Error {
fn from(e: pow::cuckoo::Error) -> Error {
impl From<pow::Error> for Error {
fn from(e: pow::Error) -> Error {
Error::Cuckoo(e)
}
}