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

fix: malleable monero headers #104

Merged
merged 1 commit into from
Sep 14, 2023
Merged

Conversation

SWvheerden
Copy link
Contributor

Description

Adds a rule to RandomX headers to stop RandomX headers from being malleable.

Changes Sha -> Sha3x
Monero -> RandomX

@CjS77
Copy link
Collaborator

CjS77 commented Aug 3, 2023

ACK

SWvheerden added a commit to tari-project/tari that referenced this pull request Aug 8, 2023
Description
---
Forces the nonce of all Monero blocks to be 0. 

Motivation and Context
---
The Nonce field in the header is used when calculating the hash of the
block. When merge mining monero blocks, the nonce used by the monero
mining sits in pow->monero_header->nonce. It does not use the tari block
header nonce.

But this allows any node to change the nonce in the header and not break
the mined pow, but change the hash of monero header. This will cause the
network to fork of valid mined monero blocks.

How Has This Been Tested?
---
unit tests

RFC update: tari-project/rfcs#104
@CjS77 CjS77 merged commit 914c123 into tari-project:main Sep 14, 2023
2 checks passed
CjS77 pushed a commit that referenced this pull request Dec 19, 2023
Description
---
Adds a rule to RandomX headers to stop RandomX headers from being
malleable.

Changes Sha -> Sha3x
Monero -> RandomX
@SWvheerden SWvheerden deleted the sw_monero_headers branch April 22, 2024 14:19
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

3 participants