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

Log warning on startup if chain spec contains misaligned fork epochs #5859

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

jimmygchen
Copy link
Member

Issue Addressed

Addresses this comment: #4946 (comment)

If fork epochs are not multiples of 256, sync committee period may span across forks - this is mostly fine for non-production and testing code unrelated to light client. Adding a check would be useful for identifying issues with future forks / light client testing.

Proposed Changes

Check fork epochs in the ChainSpec are aligned with the start of sync committee period, otherwise log a warning durinog startup.

@jimmygchen jimmygchen added ready-for-review The code is ready for review light-client labels May 29, 2024
Copy link
Collaborator

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am thinking who is the person that needs to see this warn. Anyone consuming lightclient data could be affected by an improperly aligned fork, which is a bigger group than the node operator. However, in practice no real network will adopt a bad fork epoch. This should apply to local devnets or experiments.

@jimmygchen
Copy link
Member Author

The intent was mainly for setting up expectation and giving a heads up on the configuration during testing (local devnet / testnets).

So yes, this only applies to local devnet and experiments, and we should never see this on a production network.

Copy link
Collaborator

@dapplion dapplion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@jimmygchen jimmygchen added ready-for-merge This PR is ready to merge. and removed ready-for-review The code is ready for review labels Jul 10, 2024
@jimmygchen
Copy link
Member Author

@mergify queue

Copy link

mergify bot commented Jul 11, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at 4c7277c

mergify bot added a commit that referenced this pull request Jul 11, 2024
@mergify mergify bot merged commit 4c7277c into sigp:unstable Jul 11, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
light-client ready-for-merge This PR is ready to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants