Skip to content

Conversation

@gzliudan
Copy link
Collaborator

@gzliudan gzliudan commented May 12, 2025

Proposed changes

This PR fixes the bug of invalid merkle root which is introduced in PR #627. When we sync with mainnet from genesis, the progress is stuck at block 34059322:

ERROR[05-07|09:44:23.105] 
########## BAD BLOCK #########
Number: 34059322
Hash: 0x27cad6c05e6881288549064ee071941e99bbc235552cc93e6ad5896a387a90ff
Round: 0
Error: invalid merkle root (remote: f2a379074af51d343d0a6aa1cfd731e223284f409e6fb32e84cc95014c3be98b local: 519135ccfebd30abe494d636ce3e67b23010e7dc6189e32e71800734eb260a6c)

This bug only occurs when StaticCall is called in tx and the block number is less than TIPXDCXCancellationFee:

  • mainnet: 38383838
  • testnet: 23779191

Types of changes

What types of changes does your code introduce to XDC network?
Put an in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)
  • Regular KTLO or any of the maintaince work. e.g code style
  • CICD Improvement

Impacted Components

Which part of the codebase this PR will touch base on,

Put an in the boxes that apply

  • Consensus
  • Account
  • Network
  • Geth
  • Smart Contract
  • External components
  • Not sure (Please specify below)

Checklist

Put an in the boxes once you have confirmed below actions (or provide reasons on not doing so) that

  • This PR has sufficient test coverage (unit/integration test) OR I have provided reason in the PR description for not having test coverage
  • Provide an end-to-end test plan in the PR description on how to manually test it on the devnet/testnet.
  • Tested the backwards compatibility.
  • Tested with XDC nodes running this version co-exist with those running the previous version.
  • Relevant documentation has been updated as part of this PR
  • N/A

@gzliudan gzliudan merged commit 4fabc43 into XinFinOrg:dev-upgrade May 14, 2025
8 checks passed
@gzliudan gzliudan deleted the fix-merkle-root branch May 14, 2025 08:47
JukLee0ira pushed a commit to JukLee0ira/XDPoSChain that referenced this pull request May 15, 2025
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request May 16, 2025
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