-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: impl final tari pow algorithm #4862
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tari's independent proof-of-work algorithm is very straightforward. Calculate the _triple hash_ of the following input data: - Nonce (8 bytes) - Tari mining hash (32 bytes) - PoW record (for Sha-3x, this is always a single byte of value 1) That is, the nonce in little-endian format, mining hash and the PoW record are chained together and hashed by the Keccak Sha3-256 algorithm. The result is hashed again, and this result is hashed a third time. The result of the third hash is compared to the target value of the current block difficulty. A triple hash is selected to keep the requirements on hardware miners (FPGAs, ASICs) fairly low. But we also want to avoid making the proof-of-work immediately "NiceHashable". There are several coins that already use a single or double SHA3 hash, and we'd like to avoid having that hashrate immediately deployable against Tari. This PR also stabilises RFC-0131
CjS77
added
W-consensus_breaking
Warn - A change requiring a hard fork to be activated
P-acks_required
Process - Requires more ACKs or utACKs
P-reviews_required
Process - Requires a review from a lead maintainer to be merged
labels
Oct 27, 2022
stringhandler
changed the title
feat: impl final tari pow algorithm
feat!: impl final tari pow algorithm
Oct 27, 2022
SWvheerden
previously approved these changes
Oct 31, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
CjS77
removed
the
P-reviews_required
Process - Requires a review from a lead maintainer to be merged
label
Oct 31, 2022
stringhandler
previously approved these changes
Oct 31, 2022
Description --- Updates the header version to change the PoW so we don't have to reset the chain Motivation and Context --- See: #4862 How Has This Been Tested? ---
stringhandler
dismissed stale reviews from SWvheerden and themself
via
November 3, 2022 07:09
889118b
stringhandler
approved these changes
Nov 3, 2022
sdbondi
added a commit
to sdbondi/tari
that referenced
this pull request
Nov 7, 2022
* development: (52 commits) chore: better help for seed-words command (tari-project#4885) fix(ci): resolve windows binary builds (tari-project#4883) fix(ci): correct ARM64 builds (tari-project#4876) fix(comms/peer_manager): fix possible panic in offline calc (tari-project#4877) feat!: impl final tari pow algorithm (tari-project#4862) fix(ci): selectively revert resolver for arm64 builds (tari-project#4871) chore(deps): bump actions/checkout from 2 to 3 (tari-project#4873) fix: delete orphans if they exist (tari-project#4868) chore: replace manual implementation of char methods (tari-project#4864) chore: fix potentially buggy split of string into lines (tari-project#4863) fix(ci): update GHA set-output plus dependabot schedule for GHA (tari-project#4857) fix(base-node): use less harsh emoji for unreachable node (tari-project#4855) fix(core): add txo version checks to async validator (tari-project#4852) feat: add static lifetime to emission amounts calculation (tari-project#4851) v0.38.8 feat: add opcode versions (tari-project#4836) fix: remove clear_on_drop dependency (tari-project#4848) fix(base-node): use Network::from_str to parse network in cli (tari-project#4838) ci: remove circleci test: add cucumber critical (tari-project#4823) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P-acks_required
Process - Requires more ACKs or utACKs
W-consensus_breaking
Warn - A change requiring a hard fork to be activated
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tari's independent proof-of-work algorithm is very straightforward.
Calculate the triple hash of the following input data:
That is, the nonce in little-endian format, mining hash and the PoW record are chained together and hashed by the Keccak Sha3-256 algorithm. The result is hashed again, and this result is hashed a third time. The result of the third hash is compared to the target value of the current block difficulty.
A triple hash is selected to keep the requirements on hardware miners (FPGAs, ASICs) fairly low. But we also want to avoid making the proof-of-work immediately "NiceHashable". There are several coins that already use a single or double SHA3 hash, and we'd like to avoid having that hashrate immediately deployable against Tari.
This PR also stabilises RFC-0131
BREAKING CHANGE: The number of iterations in the Sha3 PoW has changed