Skip to content
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: update to version for PoW #4875

Merged
merged 2 commits into from Nov 3, 2022

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Nov 2, 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 stringhandler merged commit 889118b into tari-project:sha-3x Nov 3, 2022
stringhandler pushed a commit that referenced this pull request Nov 3, 2022
* feat: impl final tari pow algorithm

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

* fix: mining_test_difficulty

* feat: update to version for PoW (#4875)

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?
---

Co-authored-by: SW van Heerden <swvheerden@gmail.com>
@SWvheerden SWvheerden deleted the sw_Update_to_version branch November 10, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants