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

Add robust db check for checkpoint sync #3

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

syjn99
Copy link
Contributor

@syjn99 syjn99 commented Sep 4, 2024

When checkpoint sync is enabled, beacon node checks db whether the checkpoint origin block root exists in db. If it exists, it skips checkpoint sync progress(e.g. download finalized data from remote url).

This work adds a robust check for checkpoint sync. By checking if a checkpoint state exists in db, this will remove the chance of failing in init process like:

Fri Aug 23 2024 15:39:29 GMT+0900 (Korean Standard Time) could not get ancestor state: slot 69983 not in db due to checkpoint sync: cannot retrieve data for slot

@syjn99 syjn99 self-assigned this Sep 4, 2024
@syjn99 syjn99 marked this pull request as ready for review September 4, 2024 08:04
@syjn99
Copy link
Contributor Author

syjn99 commented Sep 9, 2024

FYI)

When this change is applied, if the state at the checkpoint is deleted, the sync will start from the new checkpoint received from the origin. Based on my understanding, there are two possible scenarios:

  1. The checkpoint block is invalid.
  2. The beacon chain has not been finalized for more than 100 epochs, so saveHotStateDB is triggered.

These are potential scenarios, but IMO, they will not occur frequently.

@syjn99 syjn99 merged commit ed00285 into master Sep 9, 2024
4 checks passed
syjn99 pushed a commit that referenced this pull request Sep 24, 2024
* imported superblock-dev/kairos

* github action added

* github token setting

* kairos dependency setting done & dolphin/under config added

* fixed build problem for tools and changed linter setting

* added deneb fork version to dolphin to pass fuzz test

* added deneb fork version to dolphin to pass fuzz test2

* fixed param tests

* fixed validator/accounts test

* removed prysm web UI

* update linter action

* update linter config

* Add bailout at beacon state

* Add bailout to block types

* Add bailout config

* Add bailout logic

* Update/build settings (#1)

* imported superblock-dev/kairos

* github action added

* github token setting

* kairos dependency setting done & dolphin/under config added

* fixed build problem for tools and changed linter setting

* added deneb fork version to dolphin to pass fuzz test

* added deneb fork version to dolphin to pass fuzz test2

* fixed param tests

* fixed validator/accounts test

* removed prysm web UI

* update linter action

* update linter config

* Add bailout logic

* Fix error

* Add bailout to api struct

* Add bailout rpc

* Fix lint

* Add bailout to blindblock

* Fix test

* Fix build error

* Fix test and error

* Add bailout to experimental state

* Fix sharedFieldRefCount

* Fix test

* Fix FieldRefCount

* Apply anderson's comments

Co-authored-by: Anderson <97861652+sb-anderson@users.noreply.github.com>

* Apply jay's comments

* Apply jays comments

---------

Co-authored-by: Jay <jay@superblock.xyz>
Co-authored-by: Jay <gts2030@snu.ac.kr>
Co-authored-by: Anderson <97861652+sb-anderson@users.noreply.github.com>
syjn99 added a commit that referenced this pull request Sep 24, 2024
@syjn99 syjn99 deleted the fix/checkpoint-state-gen-issue branch September 24, 2024 06:54
syjn99 added a commit that referenced this pull request Sep 24, 2024
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