mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 01:28:21 -05:00
add builder_pubkey to relay queries (#6236)
This commit is contained in:
@@ -70,11 +70,9 @@ pub struct BidTrace {
|
||||
/// The hash of the block.
|
||||
pub block_hash: B256,
|
||||
/// The public key of the builder.
|
||||
#[serde(rename = "builder_pubkey")]
|
||||
pub builder_public_key: BlsPublicKey,
|
||||
pub builder_pubkey: BlsPublicKey,
|
||||
/// The public key of the proposer.
|
||||
#[serde(rename = "proposer_pubkey")]
|
||||
pub proposer_public_key: BlsPublicKey,
|
||||
pub proposer_pubkey: BlsPublicKey,
|
||||
/// The recipient of the proposer's fee.
|
||||
pub proposer_fee_recipient: Address,
|
||||
/// The gas limit associated with the block.
|
||||
@@ -197,9 +195,12 @@ pub struct ProposerPayloadsDeliveredQuery {
|
||||
/// Search for a specific EL block number
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub block_number: Option<u64>,
|
||||
/// filter results by a proposer public key
|
||||
/// Filter results by a proposer public key
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub proposer_key: Option<BlsPublicKey>,
|
||||
pub proposer_pubkey: Option<BlsPublicKey>,
|
||||
/// Filter results by a builder public key
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub builder_pubkey: Option<BlsPublicKey>,
|
||||
/// How to order results
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub order_by: Option<OrderBy>,
|
||||
@@ -231,8 +232,14 @@ impl ProposerPayloadsDeliveredQuery {
|
||||
}
|
||||
|
||||
/// Sets the proposer public key
|
||||
pub fn proposer_key(mut self, proposer_key: BlsPublicKey) -> Self {
|
||||
self.proposer_key = Some(proposer_key);
|
||||
pub fn proposer_pubkey(mut self, proposer_pubkey: BlsPublicKey) -> Self {
|
||||
self.proposer_pubkey = Some(proposer_pubkey);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the builder public key
|
||||
pub fn builder_pubkey(mut self, builder_pubkey: BlsPublicKey) -> Self {
|
||||
self.builder_pubkey = Some(builder_pubkey);
|
||||
self
|
||||
}
|
||||
|
||||
@@ -271,8 +278,8 @@ pub enum OrderBy {
|
||||
}
|
||||
|
||||
/// Query for the GET `/relay/v1/data/bidtraces/builder_blocks_received` endpoint.
|
||||
/// This endpoint provides BidTraces for the builder block submission for a given slot (that were
|
||||
/// verified successfully).
|
||||
/// This endpoint provides BidTraces for builder block submissions that match the query and were
|
||||
/// verified successfully.
|
||||
#[derive(Default, Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||
pub struct BuilderBlocksReceivedQuery {
|
||||
/// A specific slot
|
||||
@@ -287,6 +294,9 @@ pub struct BuilderBlocksReceivedQuery {
|
||||
/// Search for a specific EL block number
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub block_number: Option<u64>,
|
||||
/// Search for a specific builder public key.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub builder_pubkey: Option<BlsPublicKey>,
|
||||
}
|
||||
|
||||
impl BuilderBlocksReceivedQuery {
|
||||
@@ -313,6 +323,12 @@ impl BuilderBlocksReceivedQuery {
|
||||
self.block_number = Some(block_number);
|
||||
self
|
||||
}
|
||||
|
||||
/// Sets the specific builder public key
|
||||
pub fn builder_pubkey(mut self, builder_pubkey: BlsPublicKey) -> Self {
|
||||
self.builder_pubkey = Some(builder_pubkey);
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user