-
-
Notifications
You must be signed in to change notification settings - Fork 300
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
feat: add ssz support to LC updates by range endpoint #7119
Conversation
}), | ||
fromHeaders: (headers) => { | ||
const versions = headers.getOrDefault(MetaHeader.Version, ""); | ||
return {versions: versions === "" ? [] : (versions.split(",") as ForkName[])}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other clients won't be setting the header which means the metadata (res.meta()
) will be empty, however this is not a big issue since it's not required to deserialize the response.
|
||
const cachedBeaconConfig = (): BeaconConfig => { | ||
if (beaconConfig === undefined) { | ||
const genesisValidatorsRoot = genesisData[config.CONFIG_NAME as NetworkName]?.genesisValidatorsRoot; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Caveat with this is that custom networks won't be supported across different clients, however, as long as Lodestar is both the client and server this still works as both use zero hash as genesis validators root.
There is also always the option to use JSON encoding, so I don't think this is a big issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also noticed that as of right now, it's not possible to configure the LC for custom networks
lodestar/packages/light-client/src/utils/api.ts
Lines 6 to 8 in c4952ee
if (!(network in networksChainConfig)) { | |
throw Error(`Invalid network name "${network}". Valid options are: ${Object.keys(networksChainConfig).join()}`); | |
} |
Performance Report✔️ no performance regression detected Full benchmark results
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #7119 +/- ##
============================================
+ Coverage 49.12% 49.17% +0.05%
============================================
Files 597 597
Lines 39718 39762 +44
Branches 2085 2091 +6
============================================
+ Hits 19512 19554 +42
- Misses 20165 20167 +2
Partials 41 41 |
🎉 This PR is included in v1.23.0 🎉 |
Motivation
getLightClientUpdatesByRange
#6841Description
Adds SSZ support to
getLightClientUpdatesByRange
endpoint as defined in specCloses #6841