-
Notifications
You must be signed in to change notification settings - Fork 61
Support lido modules #392
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
Merged
Merged
Support lido modules #392
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8dcc8ae to
83d137d
Compare
Added new types in `crates/common/src/types.rs` to model the different Lido modules we'll encounter depending on the Chain. Also added a `HashMap` that introduces a new dimension to the pseudo-map that previously always returned the registry address for the Lido curated module in `crates/common/src/config/mux.rs`, with the goal of being able to return the corresponding address based on the Chain and Lido Module id. To specify the required Lido module, a new optional field was added to `examples/configs/pbs_mux.toml` for lido loader, called `lido_module_id` which always defaults to 1.
Added support for Lido's Community Staking Module (CSM), since the deployed contract has a different ABI, so the same registry used for the other modules cannot be used. Because this difference in ABIs, the CSM contract ABI has been imported, containing the required functions. One key difference is that in the CSM contract, `getTotalSigningKeyCount´ does not exist; therefore, for CSM this call is replaced with `getNodeOperatorSummary´, which returns a tuple of several values, including `totalDepositedValidators´ and `depositableValidatorsCount´, whose sum is used to compute the total number of keys. Another difference between ABIs is the `getSigningKeys´ method, which in CSM returns directly a `Bytes´ type. The logic for obtaining `total_keys´ and the iteration to fetch the keys has been extracted into smaller functions since this new case for CSM encourages code duplication; therefore, the main function `fetch_lido_registry_keys´ clearly separate both cases.
83d137d to
74e32d1
Compare
Co-authored-by: ltitanb <163874448+ltitanb@users.noreply.github.com>
Update PR 392
jclapis
requested changes
Nov 11, 2025
Co-authored-by: Joe Clapis <jclapis@outlook.com>
Co-authored-by: Joe Clapis <jclapis@outlook.com>
Co-authored-by: Joe Clapis <jclapis@outlook.com>
jclapis
approved these changes
Nov 11, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for Lido Modules
Summary
This PR adds support for all lido modules by introducing a new configuration parameter,
lido_module_id, with a default value of1.Because the Lido CS Module exposes a different contract ABI, we've added a the corresponding ABI to the repository, and adapted this different logic accordingly.
Motivation
Code Updates
Changes in
crates/common/src/config/mux.rsto:lido_module_id.lido_module_id = 1 (default).