This is the output of a (on-going) review of darkfi’s implementation of Crypsinous to understand whether we can reuse their code for Nomos. Everybody is welcomThe following subsections explain how this conclusion could be made and exact numbers for μμe to add thoughts or feedback
The code seems to be written by a C programmer without too much attention to Rust idioms.
Examples:
i64
(https://github.com/darkrenaissance/darkfi/blob/e5e105ca40e538ebed7dc8981084f0b01db5601a/src/consensus/validator.rs#L354)-1
is the special magic number used to refer to the canonical chain throughout the code (https://github.com/darkrenaissance/darkfi/blob/e5e105ca40e538ebed7dc8981084f0b01db5601a/src/consensus/validator.rs#L388C1-L388C1).-2
looks like a special magic number too: https://github.com/darkrenaissance/darkfi/blob/e5e105ca40e538ebed7dc8981084f0b01db5601a/src/consensus/validator.rs#L745C14-L745C14