Rename to MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS (#4206)
Co-authored-by: realbigsean <sean@sigmaprime.io>
This commit is contained in:
parent
cbe4880490
commit
aa34339298
@ -117,7 +117,7 @@ use tree_hash::TreeHash;
|
|||||||
use types::beacon_block_body::KzgCommitments;
|
use types::beacon_block_body::KzgCommitments;
|
||||||
use types::beacon_state::CloneConfig;
|
use types::beacon_state::CloneConfig;
|
||||||
use types::blob_sidecar::{BlobIdentifier, BlobSidecarList, Blobs};
|
use types::blob_sidecar::{BlobIdentifier, BlobSidecarList, Blobs};
|
||||||
use types::consts::deneb::MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS;
|
use types::consts::deneb::MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS;
|
||||||
use types::*;
|
use types::*;
|
||||||
|
|
||||||
pub type ForkChoiceError = fork_choice::Error<crate::ForkChoiceStoreError>;
|
pub type ForkChoiceError = fork_choice::Error<crate::ForkChoiceStoreError>;
|
||||||
@ -6231,7 +6231,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
|||||||
self.epoch().ok().map(|current_epoch| {
|
self.epoch().ok().map(|current_epoch| {
|
||||||
std::cmp::max(
|
std::cmp::max(
|
||||||
fork_epoch,
|
fork_epoch,
|
||||||
current_epoch.saturating_sub(*MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS),
|
current_epoch.saturating_sub(*MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -15,7 +15,7 @@ use std::collections::HashMap;
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use types::beacon_block_body::KzgCommitments;
|
use types::beacon_block_body::KzgCommitments;
|
||||||
use types::blob_sidecar::{BlobIdentifier, BlobSidecar};
|
use types::blob_sidecar::{BlobIdentifier, BlobSidecar};
|
||||||
use types::consts::deneb::MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS;
|
use types::consts::deneb::MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS;
|
||||||
use types::{
|
use types::{
|
||||||
BeaconBlockRef, BlobSidecarList, ChainSpec, Epoch, EthSpec, ExecPayload, FullPayload, Hash256,
|
BeaconBlockRef, BlobSidecarList, ChainSpec, Epoch, EthSpec, ExecPayload, FullPayload, Hash256,
|
||||||
SignedBeaconBlock, SignedBeaconBlockHeader, Slot,
|
SignedBeaconBlock, SignedBeaconBlockHeader, Slot,
|
||||||
@ -441,7 +441,7 @@ impl<T: EthSpec, S: SlotClock> DataAvailabilityChecker<T, S> {
|
|||||||
.map(|current_epoch| {
|
.map(|current_epoch| {
|
||||||
std::cmp::max(
|
std::cmp::max(
|
||||||
fork_epoch,
|
fork_epoch,
|
||||||
current_epoch.saturating_sub(*MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS),
|
current_epoch.saturating_sub(*MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS),
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -52,7 +52,7 @@ pub struct Config {
|
|||||||
/// Path where the blobs database will be located if blobs should be in a separate database.
|
/// Path where the blobs database will be located if blobs should be in a separate database.
|
||||||
///
|
///
|
||||||
/// The capacity this location should hold varies with the data availability boundary. It
|
/// The capacity this location should hold varies with the data availability boundary. It
|
||||||
/// should be able to store < 69 GB when [MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS](types::consts::deneb::MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS) is 4096
|
/// should be able to store < 69 GB when [MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS](types::consts::deneb::MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS) is 4096
|
||||||
/// epochs of 32 slots (up to 131072 bytes data per blob and up to 4 blobs per block, 88 bytes
|
/// epochs of 32 slots (up to 131072 bytes data per blob and up to 4 blobs per block, 88 bytes
|
||||||
/// of [BlobsSidecar](types::BlobsSidecar) metadata per block).
|
/// of [BlobsSidecar](types::BlobsSidecar) metadata per block).
|
||||||
pub blobs_db_path: Option<PathBuf>,
|
pub blobs_db_path: Option<PathBuf>,
|
||||||
|
@ -39,7 +39,7 @@ use std::path::{Path, PathBuf};
|
|||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use types::blob_sidecar::BlobSidecarList;
|
use types::blob_sidecar::BlobSidecarList;
|
||||||
use types::consts::deneb::MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS;
|
use types::consts::deneb::MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS;
|
||||||
use types::*;
|
use types::*;
|
||||||
|
|
||||||
/// On-disk database that stores finalized states efficiently.
|
/// On-disk database that stores finalized states efficiently.
|
||||||
@ -1866,7 +1866,7 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
|||||||
let min_current_epoch = self.get_split_slot().epoch(E::slots_per_epoch()) + Epoch::new(2);
|
let min_current_epoch = self.get_split_slot().epoch(E::slots_per_epoch()) + Epoch::new(2);
|
||||||
let min_data_availability_boundary = std::cmp::max(
|
let min_data_availability_boundary = std::cmp::max(
|
||||||
deneb_fork,
|
deneb_fork,
|
||||||
min_current_epoch.saturating_sub(*MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS),
|
min_current_epoch.saturating_sub(*MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS),
|
||||||
);
|
);
|
||||||
|
|
||||||
self.try_prune_blobs(force, Some(min_data_availability_boundary))
|
self.try_prune_blobs(force, Some(min_data_availability_boundary))
|
||||||
|
@ -32,7 +32,7 @@ pub mod deneb {
|
|||||||
"52435875175126190479447740508185965837690552500527637822603658699938581184513"
|
"52435875175126190479447740508185965837690552500527637822603658699938581184513"
|
||||||
)
|
)
|
||||||
.expect("should initialize BLS_MODULUS");
|
.expect("should initialize BLS_MODULUS");
|
||||||
pub static ref MIN_EPOCHS_FOR_BLOBS_SIDECARS_REQUESTS: Epoch = Epoch::from(4096_u64);
|
pub static ref MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: Epoch = Epoch::from(4096_u64);
|
||||||
}
|
}
|
||||||
pub const BLOB_TX_TYPE: u8 = 3;
|
pub const BLOB_TX_TYPE: u8 = 3;
|
||||||
pub const VERSIONED_HASH_VERSION_KZG: u8 = 1;
|
pub const VERSIONED_HASH_VERSION_KZG: u8 = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user