Merge remote-tracking branch 'upstream/unstable' into electra_attestation_changes

This commit is contained in:
Mark Mackey
2024-05-02 18:22:34 -05:00
156 changed files with 3625 additions and 4082 deletions

View File

@@ -88,14 +88,15 @@ const _: () = assert!({
/// bringing in the entire crate.
const _: () = assert!(ATTESTATION_SUBSCRIPTION_OFFSETS[0] > 2);
// The info in the enum variants is displayed in logging, clippy thinks it's dead code.
#[derive(Debug)]
pub enum Error {
UnableToReadSlotClock,
FailedToDownloadAttesters(String),
FailedToProduceSelectionProof(ValidatorStoreError),
InvalidModulo(ArithError),
Arith(ArithError),
SyncDutiesNotFound(u64),
FailedToDownloadAttesters(#[allow(dead_code)] String),
FailedToProduceSelectionProof(#[allow(dead_code)] ValidatorStoreError),
InvalidModulo(#[allow(dead_code)] ArithError),
Arith(#[allow(dead_code)] ArithError),
SyncDutiesNotFound(#[allow(dead_code)] u64),
}
impl From<ArithError> for Error {
@@ -896,7 +897,7 @@ async fn poll_beacon_attesters_for_epoch<T: SlotClock + 'static, E: EthSpec>(
"Attester duties re-org";
"prior_dependent_root" => %prior_dependent_root,
"dependent_root" => %dependent_root,
"msg" => "this may happen from time to time"
"note" => "this may happen from time to time"
)
}
*mut_value = (dependent_root, duty_and_proof);

View File

@@ -17,8 +17,8 @@ use warp::{http::Response, Filter};
#[derive(Debug)]
pub enum Error {
Warp(warp::Error),
Other(String),
Warp(#[allow(dead_code)] warp::Error),
Other(#[allow(dead_code)] String),
}
impl From<warp::Error> for Error {

View File

@@ -47,7 +47,7 @@ use notifier::spawn_notifier;
use parking_lot::RwLock;
use preparation_service::{PreparationService, PreparationServiceBuilder};
use reqwest::Certificate;
use slog::{error, info, warn, Logger};
use slog::{debug, error, info, warn, Logger};
use slot_clock::SlotClock;
use slot_clock::SystemTimeSlotClock;
use std::fs::File;
@@ -121,6 +121,27 @@ impl<E: EthSpec> ProductionValidatorClient<E> {
pub async fn new(context: RuntimeContext<E>, config: Config) -> Result<Self, String> {
let log = context.log().clone();
// Attempt to raise soft fd limit. The behavior is OS specific:
// `linux` - raise soft fd limit to hard
// `macos` - raise soft fd limit to `min(kernel limit, hard fd limit)`
// `windows` & rest - noop
match fdlimit::raise_fd_limit().map_err(|e| format!("Unable to raise fd limit: {}", e))? {
fdlimit::Outcome::LimitRaised { from, to } => {
debug!(
log,
"Raised soft open file descriptor resource limit";
"old_limit" => from,
"new_limit" => to
);
}
fdlimit::Outcome::Unsupported => {
debug!(
log,
"Raising soft open file descriptor resource limit is not supported"
);
}
};
info!(
log,
"Starting validator client";

View File

@@ -87,7 +87,7 @@ impl<'a, E: EthSpec, Payload: AbstractExecPayload<E>> Web3SignerObject<'a, E, Pa
block: Some(block),
block_header: None,
}),
BeaconBlock::Merge(_) => Ok(Web3SignerObject::BeaconBlock {
BeaconBlock::Bellatrix(_) => Ok(Web3SignerObject::BeaconBlock {
version: ForkName::Bellatrix,
block: None,
block_header: Some(block.block_header()),

View File

@@ -360,7 +360,7 @@ impl<T: SlotClock + 'static, E: EthSpec> ValidatorStore<T, E> {
fn signing_context(&self, domain: Domain, signing_epoch: Epoch) -> SigningContext {
if domain == Domain::VoluntaryExit {
match self.spec.fork_name_at_epoch(signing_epoch) {
ForkName::Base | ForkName::Altair | ForkName::Merge | ForkName::Capella => {
ForkName::Base | ForkName::Altair | ForkName::Bellatrix | ForkName::Capella => {
SigningContext {
domain,
epoch: signing_epoch,