tc-consensus-pow

Crates.iotc-consensus-pow
lib.rstc-consensus-pow
version0.8.1
sourcesrc
created_at2021-03-04 01:54:42.345899
updated_at2021-04-04 19:06:32.528944
descriptionPoW consensus algorithm for tetcore
homepagehttps://core.tetcoin.org
repositoryhttps://github.com/tetcoin/tetcore
max_upload_size
id363521
size33,085
Marlon Hanks (marlonhanks)

documentation

https://docs.rs/tc-consensus-pow

README

Proof of work consensus for Tetcore.

To use this engine, you can need to have a struct that implements PowAlgorithm. After that, pass an instance of the struct, along with other necessary client references to import_queue to setup the queue. Use the start_mine function for basic CPU mining.

The auxiliary storage for PoW engine only stores the total difficulty. For other storage requirements for particular PoW algorithm (such as the actual difficulty for each particular blocks), you can take a client reference in your PowAlgorithm implementation, and use a separate prefix for the auxiliary storage. It is also possible to just use the runtime as the storage, but it is not recommended as it won't work well with light clients.

License: GPL-3.0-or-later WITH Classpath-exception-2.0

Commit count: 5279

cargo fmt