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 problems #282

Closed
wants to merge 2 commits into from
Closed

Conversation

gzliudan
Copy link
Collaborator

@gzliudan gzliudan commented Jun 17, 2023

Proposed changes

The issues #268, #271, #324 and XinFinOrg/Local_DPoS_Setup#16 reported below problems about sync:

    1. panic: The panic problem can be solved by add a flag --gcmode archive in command.
    1. sync errors: The function checkSignersOnCheckpoint returns below error during sync:
    • 2.1 ErrInvalidCheckpointPenalties: invalid penalty list on checkpoint block
    • 2.2 Masternodes lists are different in checkpoint header and snapshot

This PR fix the first problem. The second problem is caused by golang with v1.19 or above versions. The golang v1.14.15 is suggested to build this repo.

Types of changes

What types of changes does your code introduce to XDC network?

  • [✅] 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,

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

Checklist

  • [✅] 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

Test

I made some tests.

1.1 xinfin network

1.1.1 sync from genesis

sync script: https://github.com/gzliudan/Local_DPoS_Setup/blob/sync/xinfin-from-genesis.sh
result: catch up the latest block without any problem.

1.1.2 sync from snapshot

sync script: https://github.com/gzliudan/Local_DPoS_Setup/blob/sync/xinfin-from-snapshot.sh
result: catch up the latest block without any problem.

1.2 apothem network

1.2.1 sync from genesis

sync script: https://github.com/gzliudan/Local_DPoS_Setup/blob/sync/apothem-from-genesis.sh
result:

  • failed at block 23779191 with error invalid gas used when I use master branch. This error is solved by [the commit
    apothem network upgrade block](ffa2bb5 on apothem branch).
  • catch up the latest block without any problem after switched to apothem branch.

1.2.2 sync from snapshot

sync script: https://github.com/gzliudan/Local_DPoS_Setup/blob/sync/apothem-from-snapshot.sh
result: catch up the latest block without any problem.

@gzliudan gzliudan changed the title Fix issue 268 Fix sync problem Jun 17, 2023
@gzliudan gzliudan changed the title Fix sync problem Fix some sync problems Jun 17, 2023
@gzliudan gzliudan changed the title Fix some sync problems fix sync problems Jun 21, 2023
@liam-lai
Copy link
Collaborator

Hi @gzliudan , could you use same logic of this one please, we cannot set everything ignore.
420a589

@gzliudan
Copy link
Collaborator Author

gzliudan commented Aug 29, 2023

I guess this sync problem is caused by the issue #286. I suggest that we can solve this sync problem first, so this issue will not appear in new blocks. And skip check old blocks when sync.

Hi @gzliudan , could you use same logic of this one please, we cannot set everything ignore. 420a589

@gzliudan gzliudan changed the base branch from master to dev-upgrade September 12, 2023 03:45
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