Resolve merge conflicts

This commit is contained in:
Eitan Seri- Levi
2026-02-03 21:27:18 -08:00
90 changed files with 1395 additions and 960 deletions

View File

@@ -443,7 +443,7 @@ pub fn gossipsub_config(
network_load: u8,
fork_context: Arc<ForkContext>,
gossipsub_config_params: GossipsubConfigParams,
seconds_per_slot: u64,
slot_duration: Duration,
slots_per_epoch: u64,
idontwant_message_size_threshold: usize,
) -> gossipsub::Config {
@@ -487,7 +487,7 @@ pub fn gossipsub_config(
// To accommodate the increase, we should increase the duplicate cache time to filter older seen messages.
// 2 epochs is quite sane for pre-deneb network parameters as well.
// Hence we keep the same parameters for pre-deneb networks as well to avoid switching at the fork.
let duplicate_cache_time = Duration::from_secs(slots_per_epoch * seconds_per_slot * 2);
let duplicate_cache_time = Duration::from_secs(slots_per_epoch * slot_duration.as_secs() * 2);
gossipsub::ConfigBuilder::default()
.max_transmit_size(gossipsub_config_params.gossipsub_max_transmit_size)

View File

@@ -54,7 +54,7 @@ pub struct PeerScoreSettings<E: EthSpec> {
impl<E: EthSpec> PeerScoreSettings<E> {
pub fn new(chain_spec: &ChainSpec, mesh_n: usize) -> PeerScoreSettings<E> {
let slot = Duration::from_secs(chain_spec.seconds_per_slot);
let slot = chain_spec.get_slot_duration();
let beacon_attestation_subnet_weight = 1.0 / chain_spec.attestation_subnet_count as f64;
let max_positive_score = (MAX_IN_MESH_SCORE + MAX_FIRST_MESSAGE_DELIVERIES_SCORE)
* (BEACON_BLOCK_WEIGHT

View File

@@ -232,7 +232,7 @@ impl<E: EthSpec> Network<E> {
config.network_load,
ctx.fork_context.clone(),
gossipsub_config_params,
ctx.chain_spec.seconds_per_slot,
ctx.chain_spec.get_slot_duration(),
E::slots_per_epoch(),
config.idontwant_message_size_threshold,
);
@@ -240,13 +240,12 @@ impl<E: EthSpec> Network<E> {
let score_settings = PeerScoreSettings::new(&ctx.chain_spec, gs_config.mesh_n());
let gossip_cache = {
let slot_duration = std::time::Duration::from_secs(ctx.chain_spec.seconds_per_slot);
let half_epoch = std::time::Duration::from_secs(
ctx.chain_spec.seconds_per_slot * E::slots_per_epoch() / 2,
let half_epoch = std::time::Duration::from_millis(
(ctx.chain_spec.get_slot_duration().as_millis() as u64) * E::slots_per_epoch() / 2,
);
GossipCache::builder()
.beacon_block_timeout(slot_duration)
.beacon_block_timeout(ctx.chain_spec.get_slot_duration())
.aggregates_timeout(half_epoch)
.attestation_timeout(half_epoch)
.voluntary_exit_timeout(half_epoch * 2)

View File

@@ -1019,7 +1019,6 @@ fn test_tcp_columns_by_root_chunked_rpc_for_fork(fork_name: ForkName) {
column: vec![vec![0; E::bytes_per_cell()].try_into().unwrap()]
.try_into()
.unwrap(),
kzg_commitments: vec![KzgCommitment::empty_for_testing()].try_into().unwrap(),
kzg_proofs: vec![KzgProof::empty()].try_into().unwrap(),
}))
} else {
@@ -1190,7 +1189,6 @@ fn test_tcp_columns_by_range_chunked_rpc_for_fork(fork_name: ForkName) {
column: vec![vec![0; E::bytes_per_cell()].try_into().unwrap()]
.try_into()
.unwrap(),
kzg_commitments: vec![KzgCommitment::empty_for_testing()].try_into().unwrap(),
kzg_proofs: vec![KzgProof::empty()].try_into().unwrap(),
}))
} else {