-
Notifications
You must be signed in to change notification settings - Fork 4
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
fix: return signed delegations #6
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,9 @@ use std::collections::HashMap; | |
use async_trait::async_trait; | ||
use ethereum_consensus::primitives::{BlsPublicKey, Hash32, U256}; | ||
use helix_common::{ | ||
api::builder_api::TopBidUpdate, bid_submission::{ | ||
api::{builder_api::TopBidUpdate, constraints_api::{SignedDelegation, SignedRevocation}}, bid_submission::{ | ||
v2::header_submission::SignedHeaderSubmission, BidTrace, SignedBidSubmission, | ||
}, builder_info::BuilderInfo, eth::SignedBuilderBid, pending_block::PendingBlock, proofs::{SignedConstraintsWithProofData, InclusionProofs}, signing::RelaySigningContext, versioned_payload::PayloadAndBlobs, ProposerInfo | ||
}, builder_info::BuilderInfo, eth::SignedBuilderBid, pending_block::PendingBlock, proofs::{InclusionProofs, SignedConstraintsWithProofData}, signing::RelaySigningContext, versioned_payload::PayloadAndBlobs, ProposerInfo | ||
}; | ||
use helix_database::BuilderInfoDocument; | ||
|
||
|
@@ -15,6 +15,21 @@ use tokio_stream::{Stream, StreamExt}; | |
#[async_trait] | ||
#[auto_impl::auto_impl(Arc)] | ||
pub trait Auctioneer: Send + Sync + Clone { | ||
async fn get_validator_delegations( | ||
&self, | ||
pub_key: BlsPublicKey, | ||
) -> Result<Vec<SignedDelegation>, AuctioneerError>; | ||
Comment on lines
+18
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider implementing pagination for If the number of delegations can be large, returning all delegations at once may impact performance and memory usage. Consider implementing pagination or streaming results to handle large datasets efficiently. |
||
|
||
async fn save_validator_delegation( | ||
&self, | ||
signed_delegation: SignedDelegation, | ||
) -> Result<(), AuctioneerError>; | ||
|
||
async fn revoke_validator_delegation( | ||
&self, | ||
signed_revocation: SignedRevocation, | ||
) -> Result<(), AuctioneerError>; | ||
|
||
async fn save_constraints( | ||
&self, | ||
slot: u64, | ||
|
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.
Add missing documentation comment for
GetBuilderDelegations
The
GetBuilderDelegations
route lacks a documentation comment with a reference link. For consistency and clarity, please add a/// Reference:
comment pointing to the appropriate API documentation for this route.