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!: change how sha3 difficulty is calculated #4528

Merged

Conversation

SWvheerden
Copy link
Collaborator

Description

Change how the sha3 hash for the difficulty is calculated.
Before this pr the difficulty was calculated as the Hash(header.part || header.part || ... || header.part), which is then hashed again.

The merge mining is calculated as the hash of all the parts bar the nonce and pow data. This hash is then concatenated with the nonce and pow data. This makes it much easier to send over data to hash as only this hash of data is required to mine the header and not the entire header.

This updates the sha3 mining to also use this same hash rather than the concatenated header part.

How Has This Been Tested?

unit tests

change name of merge_mining_hash() to just mining_hash()
@stringhandler stringhandler merged commit 1843998 into tari-project:development Aug 24, 2022
@SWvheerden SWvheerden deleted the sw_change_sha3_dif branch August 31, 2022 06:17
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