Skip to content

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
@jimmygchen jimmygchen force-pushed the warn-invalid-fork-epochs branch from 244a1de to a41f1ed Compare May 29, 2024 01:21
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

@mergify
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
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