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 feature flags for backwards compatibility #521

Merged
merged 4 commits into from
Sep 12, 2023
Merged

Conversation

avalonche
Copy link
Collaborator

@avalonche avalonche commented Sep 8, 2023

📝 Summary

Adds two feature flags to maintain backwards compatibility with older CL clients.

⛱ Motivation and Context

New features were recently added which breaks compatibility with older clients. This PR adds feature flags allowing toggling via env vars to switch between the features:

  • USE_V2_PUBLISH_BLOCK_ENDPOINT - this toggles using the v2 endpoint on CL clients to publish blocks. This endpoint includes equivocation checks to prevent equivocation attacks. The latest prysm and lighthouse releases has not been tested thoroughly for the v2 endpoint, so the default for this flag is using the v1 endpoint.

📚 References


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

@codecov-commenter
Copy link

Codecov Report

Merging #521 (a7e29af) into main (e0d1248) will decrease coverage by 0.04%.
The diff coverage is 21.73%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main     #521      +/-   ##
==========================================
- Coverage   33.23%   33.19%   -0.04%     
==========================================
  Files          24       24              
  Lines        5079     5097      +18     
==========================================
+ Hits         1688     1692       +4     
- Misses       3173     3186      +13     
- Partials      218      219       +1     
Flag Coverage Δ
unittests 33.19% <21.73%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
services/api/service.go 39.64% <0.00%> (-0.12%) ⬇️
beaconclient/prod_beacon_instance.go 14.28% <31.25%> (+1.68%) ⬆️

📢 Have feedback on the report? Share it here.

services/api/service.go Outdated Show resolved Hide resolved
services/api/service.go Outdated Show resolved Hide resolved
services/api/service.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@metachris metachris left a comment

Choose a reason for hiding this comment

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

nice!

@avalonche avalonche merged commit 5767f05 into main Sep 12, 2023
4 checks passed
@avalonche avalonche deleted the add-feature-flags branch September 12, 2023 16:37
michaelneuder pushed a commit that referenced this pull request Sep 21, 2023
* Add feature flags for backwards compatibility

* improve readability of flags

* renaming flags

* remove fork schedule checks and flag
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