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 sync issue for testnet #631

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

gzliudan
Copy link
Collaborator

@gzliudan gzliudan commented Sep 3, 2024

Proposed changes

The progress is stuck at block number 65533267 when we sync testnet. And the below error appears again and again:

ERROR[09-03|11:12:55]
########## BAD BLOCK #########
Chain config: {"chainId":51,"homesteadBlock":1,"eip150Block":2,"eip150Hash":"0x0000000000000000000000000000000000000000000000000000000000000000","eip155Block":3,"eip158Block":3,"byzantiumBlock":4,"XDPoS":{"period":2,"epoch":900,"reward":5000,"rewardCheckpoint":900,"gap":450,"foudat
ionWalletAddr":"0x746249c61f5832c5eed53172776b460491bdcd5c","SkipV1Validation":false,"v2":{"switchBlock":56828700,"config":{"maxMasternodes":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"allConfigs":{"0":{"maxMasternodes
":15,"switchRound":0,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":20,"certificateThreshold":0.45},"900000":{"maxMasternodes":108,"switchRound":900000,"minePeriod":2,"timeoutSyncThreshold":3,"timeoutPeriod":30,"certificateThreshold":0.667}},"SkipV2Validation":false}}}

Number: 65533267
Hash: 0xc2e6baa3d08c66a30f3c25c33bd5677c244b757fcc19adcc55979f138413d9d2
        receipt{status=0 cgas=23090 bloom=000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 logs=[]}


Round: 8758270
Error: invalid receipt root hash (remote: 2fecae86a645f95c7e10f83cd05e497d668a119c5c4851d732af4839ee1673c3 local: 1af8b4fed1f4f654daefc4ace930be9bb2418ddf2178c99557104c45751ced21)
##############################

WARN [09-03|11:12:55] Synchronisation failed, dropping peer    peer=cfd8683cf09bd5bd err="retrieved hash chain is invalid"

After debug, we found the reason is caused by the change in PR #590.

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 763f8cb into XinFinOrg:dev-upgrade Sep 9, 2024
17 checks passed
@gzliudan gzliudan deleted the fix-sync branch September 9, 2024 05:59
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.

3 participants