Skip to content

Commit

Permalink
fix mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jianlinjiang authored and mlbones666 committed Nov 20, 2024
1 parent 781bc69 commit bb8c474
Showing 1 changed file with 13 additions and 19 deletions.
32 changes: 13 additions & 19 deletions src/node/dvfcore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ pub struct DvfDutyCheckMessage {
pub data: Vec<u8>,
#[serde(skip_serializing_if = "Option::is_none")]
pub sign_hex: Option<String>,
pub pubkey: Option<Vec<u8>>
}

impl DvfDutyCheckMessage {
Expand Down Expand Up @@ -417,23 +416,19 @@ impl<E: EthSpec> MessageHandler for DvfDutyCheckHandler<E> {
}
};
let fee_recipient = block.body().execution_payload().unwrap().fee_recipient();

match check_msg.pubkey {
Some(pubkey) => {
info!("block proposal full block, va pubic key {}, fee recipient {}", hex::encode(&pubkey), format!("{0:0x}", fee_recipient));
if !self.db.check_validator_fee_recipient(pubkey, fee_recipient).await.unwrap() {
reply(
writer,
DutySafety::Invalid,
format!("fee recipient is not consistent"),
)
.await;
error!("fee recipient is not consistent");
return Ok(());
}
}
None => {}
let pubkey = self.validator_pk.serialize().to_vec();
info!("block proposal full block, va pubic key {}, fee recipient {}", hex::encode(&pubkey), format!("{0:0x}", fee_recipient));
if !self.db.check_validator_fee_recipient(pubkey, fee_recipient).await.unwrap() {
reply(
writer,
DutySafety::Invalid,
format!("fee recipient is not consistent"),
)
.await;
error!("fee recipient is not consistent");
return Ok(());
}

self.sign_block(writer, block, check_msg.domain_hash).await;
}
BlockType::Blinded => {
Expand Down Expand Up @@ -612,8 +607,7 @@ impl DvfSigner {
domain_hash,
check_type,
data: data.to_vec(),
sign_hex: None,
pubkey: Some(self.validator_public_key().serialize().to_vec())
sign_hex: None
};
match msg.sign_digest(&self.node_secret) {
Ok(sign_hex) => msg.sign_hex = Some(sign_hex),
Expand Down

0 comments on commit bb8c474

Please sign in to comment.