#pow #nano #blake2b #proof-of-work #blockchain

no-std blake2b-pow

A Library for Performing Proof of Work Using Blake2B Based Off of Nano's Consensus Algorithm

2 releases

0.1.1 Jan 11, 2021
0.1.0 Nov 9, 2019

#12 in #proof-of-work

MIT license

4KB

Blake2B-PoW

A Rust Library That Performs Proof of Work (Consensus Algorithm) using Blake2B. Useful for Blockchain-related projects.

Usage

extern crate blake2b_pow;
use blake2b_pow::{mine,verify_nonce};

fn main() {
    let correct_nonce = mine(&[0x3Eu8;32], 0xffffffc000000000);

    let _is_valid = verify_nonce(&[0x3Eu8;32], 0xffffffc000000000, correct_nonce);
}

Dependencies

~140KB