feat: add more signing functions#370
Merged
Merged
Conversation
iamquang95
reviewed
May 5, 2026
|
|
||
| pub use crate::{ | ||
| aggregate::{AggregateError, agg_deposit_data, agg_lock_hash_sig, agg_validator_registrations}, | ||
| disk, |
Collaborator
There was a problem hiding this comment.
do we need pub use this?
| /// preserves existing creator/operator signatures. | ||
| pub unverified: bool, | ||
| /// Validator addresses for the newly added validators. Length must match | ||
| /// [`AppendConfig::add_validators`]. |
Collaborator
There was a problem hiding this comment.
do we need to validate this: Length must match [AppendConfig::add_validators]? There is no constructor for this, so not sure if we can validate that
| withdrawal_addresses: &[String], | ||
| network: &str, | ||
| node_idx: &NodeIdx, | ||
| deposit_amounts: &[u64], |
Collaborator
There was a problem hiding this comment.
should we use Gwei here
|
|
||
| /// Signs, exchanges, and aggregates deposit data for each deposit amount. | ||
| #[allow(dead_code, reason = "will be used in dkg later ")] | ||
| pub async fn sign_and_agg_deposit_data( |
|
|
||
| /// Signs, exchanges, and aggregates validator registrations. | ||
| #[allow(dead_code, reason = "will be used in dkg later ")] | ||
| pub async fn sign_and_agg_validator_registrations( |
| /// unverified, in which case signing is skipped. | ||
| #[allow(dead_code, reason = "will be used in dkg later ")] | ||
| #[allow(clippy::too_many_arguments, reason = "mirrors Go signAndAggLockHash")] | ||
| pub async fn sign_and_aggregate_lock_hash( |
- Drop redundant `pub use crate::disk` re-export; add private `use crate::disk`. - Add `DkgError::AppendConfigAddressCountMismatch` and `AppendConfig::validate` so callers can enforce the documented length invariant. - Use `phase0::Gwei` instead of `u64` for `sign_and_agg_deposit_data`'s `deposit_amounts`. - Lower visibility of `sign_and_agg_deposit_data`, `sign_and_agg_validator_registrations`, and `sign_and_aggregate_lock_hash` to `pub(crate)`; they are not used outside the crate. Co-Authored-By: Bohdan Ohorodnii <35969035+varex83@users.noreply.github.com>
iamquang95
approved these changes
May 5, 2026
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
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.
No description provided.