Skip to content
Unverified Commit b9e17824 authored by Wei Tang's avatar Wei Tang Committed by GitHub
Browse files

Consensus: Proof of Work (#3473)



* consensus-pow: init primtives and verifier

* consensus-pow: add total difficulty auxiliary

* consensus-pow: implement total difficulty chain selection

* consensus-pow: implement pow import queue

* consensus-pow-primitives: add mine into PowApi

* consensus-pow: implement mining

* Update lock file

* Style fixes

No run-on expressions allowed.

* consensus-pow: refactor register_pow_inherent_data_provider

* consensus-pow: make PowApi::mine yieldable

* consensus-pow: better mining loop

* Add missing license header

* consensus-pow-primitives: clarify the meaning of None for PowApi::verify

* consensus-pow: changing total difficulty addition to use saturating add

* consensus-pow: change mine-loop error to log on error! level

* consensus-pow: allow inserting arbitrary preruntime digest for pow

The preruntime digest can be intepreted by the runtime as the block author/coinbase.

* Fix line width

* More line width fixes

* consensus-pow: separate difficulty, verify API

This makes it more apparent that currently in PoW engine, `difficulty` should
be input, not output.

* srml-pow: implementation of average_span difficulty adjustment

* srml-pow: basic blake2 algo example

* srml-pow-average-span: make it not require genesis config

* srml-pow: add support for authorship

* Missing license headers

* consensus-pow: PowAlgorithm trait generalization

* Missing docs for consensus-pow

* More docs

* node-runtime: bump impl_version

* Add rationale for difficulty type

* consensus-pow: refactor aux_key

* Update lock file

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/primitives/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Update core/consensus/pow/primitives/src/lib.rs

Co-Authored-By: default avatarSergei Pepyakin <[email protected]>

* Remove PowRuntimeAlgorithm

* block_id -> parent_block_id

* Auxiliary data -> auxiliary storage data

* Fix error message

* Fix compile

* Update core/consensus/pow/primitives/src/lib.rs

Co-Authored-By: default avatarDemiMarie-parity <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarDemiMarie-parity <[email protected]>

* Update core/consensus/pow/primitives/src/lib.rs

Co-Authored-By: default avatarDemiMarie-parity <[email protected]>

* Update core/consensus/pow/src/lib.rs

Co-Authored-By: default avatarDemiMarie-parity <[email protected]>

* Fix crate description

* More docs

* Address grumbles

1. Make preruntime Optional.
2. Add more docs on what is `preruntie` and `round`.
3. Replace `Default::default` with the approriate type.
parent 499a88cc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment