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

Difficulty adjustment fix between golang and rusty nodes #62

Conversation

okilisan
Copy link

@okilisan okilisan commented Sep 2, 2024

Adjust difficulty managment between rusty and golang nodes during the first block window
This smells like a kaspa codebase issue as they are using only rusty nodes in testnet

@lemois-1337
Copy link
Collaborator

lemois-1337 commented Sep 2, 2024

  1. Sync in testnet-1 works fine now including khashv1 and khashv2 blocks, no regression anymore.
  2. Sync in mainnet works fine as well, it was already before due to >2641 blocks for difficulty window, no regression.

Need to check why several test re-runs fail with:

2024-09-02 17:53:42.335 [DBG] POWK: Using khashv2 2 2
2024-09-02 17:53:42.335 [DBG] BLVA: block a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b blue score is 96
2024-09-02 17:53:42.335 [DBG] MDMN: a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b merge depth root not found in store - calculating
2024-09-02 17:53:42.335 [DBG] MDMN: a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b blue score lower then merge depth - returning genesis as merge depth root
2024-09-02 17:53:42.335 [DBG] BDAG: a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b finality point not found in store - calculating
2024-09-02 17:53:42.335 [DBG] BDAG: a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b blue score lower then finality depth - returning genesis as finality point
2024-09-02 17:53:42.335 [DBG] BDAG: Skipping ValidateBodyInContext for block a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b because it's header only
2024-09-02 17:53:42.336 [DBG] BDAG: Block a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b is a header-only block so setting its status as HeaderOnly
2024-09-02 17:53:42.336 [DBG] BDAG: Block a00573f1d892a84af10e9dbbd5308dc8eba13a4e525613748b84c99c64b0cc4b validated and inserted, network hashrate: 2.00 KH/s

@lemois-1337
Copy link
Collaborator

@okilisan As discussed, lets update simnet and devnet and set HFDAAScore > 2641 to pass the difficulty adjustment window. In this case tests should pass.

@lemois-1337 lemois-1337 merged commit a47ed87 into karlsen-network:mainnet_karlsenhashv2 Sep 3, 2024
5 checks passed
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.

2 participants