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: monero fork attack #5603

Merged

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Aug 1, 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

@ghpbot-tari-project ghpbot-tari-project added P-acks_required Process - Requires more ACKs or utACKs P-reviews_required Process - Requires a review from a lead maintainer to be merged labels Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Test Results (CI)

1 187 tests   1 187 ✔️  13m 47s ⏱️
     37 suites         0 💤
       1 files           0

Results for commit c783b60.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Aug 1, 2023

Test Results (Integration tests)

27 tests   27 ✔️  14m 13s ⏱️
11 suites    0 💤
  2 files      0

Results for commit c783b60.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@hansieodendaal hansieodendaal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@ghpbot-tari-project ghpbot-tari-project removed the P-reviews_required Process - Requires a review from a lead maintainer to be merged label Aug 2, 2023
@SWvheerden SWvheerden force-pushed the sw_fix_monero_attack branch from a24ca9d to c783b60 Compare August 8, 2023 19:58
@SWvheerden SWvheerden merged commit 9c81b4d into tari-project:development Aug 8, 2023
@SWvheerden SWvheerden deleted the sw_fix_monero_attack branch August 8, 2023 20:27
sdbondi added a commit to sdbondi/tari that referenced this pull request Aug 10, 2023
…-addresses

* development:
  chore: fix windows install (tari-project#5616)
  feat: ban peer unexpected response (tari-project#5608)
  fix!: add validator mr to mining hash (tari-project#5615)
  fix: check bytes remaining on monero blocks (tari-project#5610)
  fix: duplicate tari header in monero coinbase (tari-project#5604)
  fix: monero fork attack (tari-project#5603)
  feat: add mempool min fee (tari-project#5606)
  chore(tests): large block unit tests (tari-project#5599)
  fix: miner delay attack (tari-project#5582)
  fix: peer connection to stale nodes (tari-project#5579)
  ci(fix): artifact cleanup for diag-utils (tari-project#5613)
  ci(fix): update Windows installer for Minotari (tari-project#5614)
  chore: fixes monero build (tari-project#5612)
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants