feat: adds tip004 pow changes#174
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new proposal document, TIP-Proc-MT-0004_MinoTari_PoW_Difficulty_changes.md, which outlines proposed changes to the MinoTari Proof-of-Work (PoW) difficulty adjustment mechanism. Specifically, it proposes an exponential backoff mechanism for consecutive blocks mined by the same PoW algorithm to prevent a single algorithm from dominating and causing disproportionate reorgs. The review feedback suggests fixing a broken relative link in the TIP metadata table, resolving an undefined markdown link reference [OEP], and removing an empty list item.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
I would support this change, despite it requiring a hard fork. It would reduce the ability of an attacker to 'rock the boat' and depress one algorithm's difficulty either to attempt a reorg or to gain an advantage with a timed burst of mining on the depressed algorithm.
|
If the goal is to stop reorgs on a network with as little nethash as Tari currently has, a more gradual increase like you suggested wouldn't sufficiently mitigate the threat of reorgs. It needs to be be a stiff penalty for consecutive blocks. I think the exponential increase is the right move. |
Kelketek
left a comment
There was a problem hiding this comment.
@SWvheerden Small comment on the header, but otherwise this looks good to me. Exponential backoff as a mitigation to making any lane dominant seems straightfoward to implement and likely to resolve immediate issues.
stringhandler
left a comment
There was a problem hiding this comment.
I don't think this will solve the problem.
Some faults off the top of my mind:
- If you are behind on C29 blocks, multiple C29 blocks are hard to mine in succession.
- If you interleave 2 algorithms, there is no penalty.
If anything you should adjust the target time for the other 3 algorithms when a C29 block has not been mined. This strategy is complicated and also flawed.
You would have to find a sequence in the chain's history where this proposal would have actually made a difference.
From my experience with P2pool, trying to artificially limit POW does not have the desire effect, and often has the reverse of what you are trying to achieve.
|
I will address you comments here quick: 2: This will only work with RxT/RxM as they hardware is the same, but also not 100% as you need to closely match the PoW of the network for that algo. Tari's PoW is calculated as Sha * C29 * RxT * RxM. Which you further boil down to: This can be seen the (Sha3 % increase) > (C29 % increase) + (Rxt % increase) + (RxM % increase) |
08cf7b4 to
8ee8843
Compare
|
I'm not going to die on this hill, but this still seems dumb to me. Anyway here is what claude thinks:
Why the exponential backoff won't workAccumulated difficulty per unit time equals hashrate, regardless of the target. LWMA sets So doubling Sha3x's target makes each block worth 2x and take 2x as long. Over any window longer than a few blocks, is unchanged. Selfish mining costs hashrate x time; the proposal moves neither. "Neutral: does not change the geometric-mean comparison logic" is the tell. Also:
The fix belongs in the accounting, not the scheduling. The comparison is sensitive to an algorithm's growth rate of accumulated difficulty. Normalize each block's work by that algorithm's recent average difficulty before summing, so a block is worth ~ Minor: |
| | Last Modified | 2026-05-17 | | ||
| | Authors | SW van Heerden | | ||
| | Status | Accepted | | ||
| | Type | Process | |
| ## Proposed Change | ||
|
|
||
| Tari currently calculates target difficulty using LWMA (Linearly | ||
| Weighted Moving Average) over the last 90 blocks. The LWMA uses: |
There was a problem hiding this comment.
@SWvheerden Could you make sure to add the change to the LWMA as discussed in the forum thread and approved by the council? I think we landed on 45, but Kinkajou should remember if neither of us does.
| - Makes selfish mining exponentially more expensive for any single | ||
| algorithm attempting to dominate. | ||
| - Encourages natural interleaving of algorithms. | ||
| - |
| | TIP | [A-TIP-RFC-MT-0004](#/RFC/MinoTari/TIP-RFC-MT-0004_MinoTari_PoW_Difficulty_changes.md) | | ||
| |-----------------|---------------------------------------------------------------------------| | ||
| | Title | MinoTari PoW difficulty changes | | ||
| | Last Modified | 2026-05-17 | |
There was a problem hiding this comment.
Please bump this upon addressing notes
Description
adds a proposed changed to change how the difficulty is calculated