Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Electra spec changes for v1.5.0-beta.0 #6731

Merged
merged 64 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from 55 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
25feedf
First pass
pawanjay176 Aug 29, 2024
4dc6e65
Add restrictions to RuntimeVariableList api
pawanjay176 Aug 30, 2024
a9cb329
Use empty_uninitialized and fix warnings
pawanjay176 Aug 30, 2024
60100fc
Fix some todos
pawanjay176 Aug 30, 2024
13f9bba
Merge branch 'unstable' into max-blobs-preset
pawanjay176 Sep 3, 2024
e71020e
Fix take impl on RuntimeFixedList
pawanjay176 Sep 4, 2024
52bb581
cleanup
pawanjay176 Sep 4, 2024
d37733b
Fix test compilations
pawanjay176 Sep 4, 2024
12c6ef1
Fix some more tests
pawanjay176 Sep 4, 2024
2fcb293
Fix test from unstable
pawanjay176 Sep 7, 2024
21ecb58
Merge branch 'unstable' into max-blobs-preset
pawanjay176 Oct 21, 2024
9d5a3af
Implement "Bugfix and more withdrawal tests"
michaelsproul Dec 19, 2024
f892849
Implement "Add missed exit checks to consolidation processing"
michaelsproul Dec 19, 2024
f27216f
Implement "Update initial earliest_exit_epoch calculation"
michaelsproul Dec 19, 2024
c31f1cc
Implement "Limit consolidating balance by validator.effective_balance"
michaelsproul Dec 20, 2024
282eefb
Implement "Use 16-bit random value in validator filter"
michaelsproul Dec 20, 2024
52e602d
Implement "Do not change creds type on consolidation"
michaelsproul Dec 20, 2024
293db28
Rename PendingPartialWithdraw index field to validator_index
eserilev Jan 2, 2025
9b8a25f
Skip slots to get test to pass and add TODO
eserilev Jan 2, 2025
23d331b
Implement "Synchronously check all transactions to have non-zero length"
eserilev Jan 2, 2025
0c2c8c4
Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
michaelsproul Jan 6, 2025
de01f92
Remove footgun function
michaelsproul Jan 6, 2025
1095d60
Minor simplifications
michaelsproul Jan 6, 2025
2e86585
Move from preset to config
michaelsproul Jan 6, 2025
32483d3
Fix typo
michaelsproul Jan 6, 2025
88bedf0
Revert "Remove footgun function"
michaelsproul Jan 6, 2025
063b79c
Try fixing tests
michaelsproul Jan 6, 2025
251bca7
Implement "bump minimal preset MAX_BLOB_COMMITMENTS_PER_BLOCK and KZG…
eserilev Jan 6, 2025
e4bfe71
Thread through ChainSpec
michaelsproul Jan 6, 2025
f66e179
Fix release tests
michaelsproul Jan 6, 2025
440e854
Move RuntimeFixedVector into module and rename
michaelsproul Jan 6, 2025
04b3743
Add test
michaelsproul Jan 6, 2025
3d3bc6d
Implement "Remove post-altair `initialize_beacon_state_from_eth1` fro…
eserilev Jan 6, 2025
2dbd3b7
Update preset YAML
michaelsproul Jan 7, 2025
0cd263f
Remove empty RuntimeVarList awefullness
pawanjay176 Jan 7, 2025
3b788bf
Make max_blobs_per_block a config parameter (#6329)
michaelsproul Jan 7, 2025
7c215f8
Fix tests
pawanjay176 Jan 7, 2025
0f26408
Implement max_blobs_per_block_electra
michaelsproul Jan 7, 2025
d65e821
Fix config issues
michaelsproul Jan 7, 2025
26c409c
Simplify BlobSidecarListFromRoot
michaelsproul Jan 7, 2025
eee9218
Disable PeerDAS tests
michaelsproul Jan 7, 2025
07c039c
Merge remote-tracking branch 'origin/unstable' into max-blobs-preset
michaelsproul Jan 9, 2025
d4e152c
Bump quota to account for new target (6)
michaelsproul Jan 9, 2025
a73ecb5
Remove clone
michaelsproul Jan 9, 2025
f13bdfc
Fix issue from review
pawanjay176 Jan 9, 2025
70917f7
Try to remove ugliness
pawanjay176 Jan 10, 2025
22b7fcb
Merge branch 'unstable' into max-blobs-preset
pawanjay176 Jan 10, 2025
9e972b1
Merge remote-tracking branch 'origin/unstable' into electra-alpha10
michaelsproul Jan 10, 2025
bb59e7a
Merge commit '04b3743ec1e0b650269dd8e58b540c02430d1c0d' into electra-…
michaelsproul Jan 10, 2025
1d4dc59
Merge remote-tracking branch 'pawan/max-blobs-preset' into electra-al…
michaelsproul Jan 10, 2025
bba7310
Update tests to v1.5.0-beta.0
michaelsproul Jan 10, 2025
ef13f0f
Resolve merge conflicts
eserilev Jan 10, 2025
72bcc8a
Linting
eserilev Jan 10, 2025
344ba2b
fmt
eserilev Jan 10, 2025
a45c0f0
Fix test and add TODO
eserilev Jan 10, 2025
f4fe1b8
Gracefully handle slashed proposers in fork choice tests
michaelsproul Jan 13, 2025
1205d83
Merge remote-tracking branch 'origin/unstable' into electra-alpha10
michaelsproul Jan 13, 2025
3b17732
Keep latest changes from max_blobs_per_block PR in codec.rs
michaelsproul Jan 13, 2025
e2ff440
Revert a few more regressions and add a comment
michaelsproul Jan 13, 2025
7df6560
Disable more DAS tests
michaelsproul Jan 13, 2025
4fbca37
Improve validator monitor test a little
michaelsproul Jan 13, 2025
e821e62
Make test more robust
michaelsproul Jan 13, 2025
0b36d60
Fix sync test that didn't understand blobs
michaelsproul Jan 13, 2025
4f08ac7
Fill out cropped comment
michaelsproul Jan 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ impl<'block, E: EthSpec> NewPayloadRequest<'block, E> {

let _timer = metrics::start_timer(&metrics::EXECUTION_LAYER_VERIFY_BLOCK_HASH);

// Check that no transactions in the payload are zero length
if payload.transactions().iter().any(|slice| slice.is_empty()) {
return Err(Error::ZeroLengthTransaction);
}

let (header_hash, rlp_transactions_root) = calculate_execution_block_hash(
payload,
parent_beacon_block_root,
Expand Down
1 change: 1 addition & 0 deletions beacon_node/execution_layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ pub enum Error {
payload: ExecutionBlockHash,
transactions_root: Hash256,
},
ZeroLengthTransaction,
PayloadBodiesByRangeNotSupported,
InvalidJWTSecret(String),
InvalidForkForPayload,
Expand Down
8 changes: 3 additions & 5 deletions beacon_node/lighthouse_network/src/rpc/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,16 +590,14 @@ fn handle_rpc_request<E: EthSpec>(
))),
SupportedProtocol::BlobsByRangeV1 => {
let req = BlobsByRangeRequest::from_ssz_bytes(decoded_buffer)?;
let max_requested_blobs = req
.count
.saturating_mul(spec.max_blobs_per_block_by_fork(current_fork));
// TODO(pawan): change this to max_blobs_per_rpc_request in the alpha10 PR
if max_requested_blobs > spec.max_request_blob_sidecars {
let max_blobs = spec.max_blobs_per_block_by_fork(current_fork);
if req.count > max_blobs {
michaelsproul marked this conversation as resolved.
Show resolved Hide resolved
return Err(RPCError::ErrorResponse(
RpcErrorResponse::InvalidRequest,
format!(
"requested exceeded limit. allowed: {}, requested: {}",
spec.max_request_blob_sidecars, max_requested_blobs
max_blobs, req.count
),
));
}
Expand Down
3 changes: 2 additions & 1 deletion beacon_node/lighthouse_network/src/rpc/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ pub static SIGNED_BEACON_BLOCK_DENEB_MAX: LazyLock<usize> = LazyLock::new(|| {
*SIGNED_BEACON_BLOCK_CAPELLA_MAX_WITHOUT_PAYLOAD
+ types::ExecutionPayload::<MainnetEthSpec>::max_execution_payload_deneb_size() // adding max size of execution payload (~16gb)
+ ssz::BYTES_PER_LENGTH_OFFSET // Adding the additional offsets for the `ExecutionPayload`
+ (<types::KzgCommitment as Encode>::ssz_fixed_len() * MainnetEthSpec::default_spec().max_blobs_per_block_by_fork(ForkName::Deneb) as usize)
+ ssz::BYTES_PER_LENGTH_OFFSET
}); // Length offset for the blob commitments field.
//
pub static SIGNED_BEACON_BLOCK_ELECTRA_MAX: LazyLock<usize> = LazyLock::new(|| {
*SIGNED_BEACON_BLOCK_ELECTRA_MAX_WITHOUT_PAYLOAD
+ types::ExecutionPayload::<MainnetEthSpec>::max_execution_payload_electra_size() // adding max size of execution payload (~16gb)
+ ssz::BYTES_PER_LENGTH_OFFSET // Adding the additional ssz offset for the `ExecutionPayload` field
+ (<types::KzgCommitment as Encode>::ssz_fixed_len() * MainnetEthSpec::default_spec().max_blobs_per_block_by_fork(ForkName::Electra) as usize)
+ ssz::BYTES_PER_LENGTH_OFFSET
}); // Length offset for the blob commitments field.

Expand Down Expand Up @@ -710,7 +712,6 @@ pub fn rpc_blob_limits<E: EthSpec>() -> RpcLimits {
}
}

// TODO(peerdas): fix hardcoded max here
pub fn rpc_data_column_limits<E: EthSpec>(fork_name: ForkName) -> RpcLimits {
RpcLimits::new(
DataColumnSidecar::<E>::empty().as_ssz_bytes().len(),
Expand Down
1 change: 0 additions & 1 deletion beacon_node/store/src/impls/execution_payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use types::{
EthSpec, ExecutionPayload, ExecutionPayloadBellatrix, ExecutionPayloadCapella,
ExecutionPayloadDeneb, ExecutionPayloadElectra, ExecutionPayloadFulu,
};

macro_rules! impl_store_item {
($ty_name:ident) => {
impl<E: EthSpec> StoreItem for $ty_name<E> {
Expand Down
8 changes: 8 additions & 0 deletions consensus/fork_choice/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,10 @@ async fn progressive_balances_cache_attester_slashing() {
.apply_blocks_while(|_, state| state.finalized_checkpoint().epoch == 0)
.await
.unwrap()
// TODO(electra) The shuffling calculations changed between Altair and Electra. Without
// skipping slots this test breaks. For some reason `fork_name_unchecked` returns Altair
// initially, even though this test harness should be initialized with the most recent fork, i.e. Electra
.skip_slots(32)
michaelsproul marked this conversation as resolved.
Show resolved Hide resolved
// Note: This test may fail if the shuffling used changes, right now it re-runs with
// deterministic shuffling. A shuffling change my cause the slashed proposer to propose
// again in the next epoch, which results in a block processing failure
Expand Down Expand Up @@ -1257,6 +1261,10 @@ async fn progressive_balances_cache_proposer_slashing() {
.apply_blocks_while(|_, state| state.finalized_checkpoint().epoch == 0)
.await
.unwrap()
// TODO(electra) The shuffling calculations changed between Altair and Electra. Without
// skipping slots this test breaks. For some reason `fork_name_unchecked` returns Altair
// initially, even though this test harness should be initialized with the most recent fork, i.e. Electra
.skip_slots(32)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

another TODO we should take a look at

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've fixed both these TODOs by making the test harness skip block proposals for slashed validators. Commit: f4fe1b8

// Note: This test may fail if the shuffling used changes, right now it re-runs with
// deterministic shuffling. A shuffling change may cause the slashed proposer to propose
// again in the next epoch, which results in a block processing failure
Expand Down
36 changes: 23 additions & 13 deletions consensus/state_processing/src/per_block_processing.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::consensus_context::ConsensusContext;
use errors::{BlockOperationError, BlockProcessingError, HeaderInvalid};
use rayon::prelude::*;
use safe_arith::{ArithError, SafeArith};
use safe_arith::{ArithError, SafeArith, SafeArithIter};
use signature_sets::{block_proposal_signature_set, get_pubkey_from_state, randao_signature_set};
use std::borrow::Cow;
use tree_hash::TreeHash;
Expand Down Expand Up @@ -509,7 +509,7 @@ pub fn compute_timestamp_at_slot<E: EthSpec>(

/// Compute the next batch of withdrawals which should be included in a block.
///
/// https://github.com/ethereum/consensus-specs/blob/dev/specs/capella/beacon-chain.md#new-get_expected_withdrawals
/// https://github.com/ethereum/consensus-specs/blob/dev/specs/electra/beacon-chain.md#new-get_expected_withdrawals
pub fn get_expected_withdrawals<E: EthSpec>(
state: &BeaconState<E>,
spec: &ChainSpec,
Expand All @@ -522,18 +522,18 @@ pub fn get_expected_withdrawals<E: EthSpec>(

// [New in Electra:EIP7251]
// Consume pending partial withdrawals
let partial_withdrawals_count =
let processed_partial_withdrawals_count =
if let Ok(partial_withdrawals) = state.pending_partial_withdrawals() {
let mut partial_withdrawals_count = 0;
let mut processed_partial_withdrawals_count = 0;
for withdrawal in partial_withdrawals {
if withdrawal.withdrawable_epoch > epoch
|| withdrawals.len() == spec.max_pending_partials_per_withdrawals_sweep as usize
{
break;
}

let withdrawal_balance = state.get_balance(withdrawal.index as usize)?;
let validator = state.get_validator(withdrawal.index as usize)?;
let withdrawal_balance = state.get_balance(withdrawal.validator_index as usize)?;
let validator = state.get_validator(withdrawal.validator_index as usize)?;

let has_sufficient_effective_balance =
validator.effective_balance >= spec.min_activation_balance;
Expand All @@ -549,17 +549,17 @@ pub fn get_expected_withdrawals<E: EthSpec>(
);
withdrawals.push(Withdrawal {
index: withdrawal_index,
validator_index: withdrawal.index,
validator_index: withdrawal.validator_index,
address: validator
.get_execution_withdrawal_address(spec)
.ok_or(BeaconStateError::NonExecutionAddresWithdrawalCredential)?,
amount: withdrawable_balance,
});
withdrawal_index.safe_add_assign(1)?;
}
partial_withdrawals_count.safe_add_assign(1)?;
processed_partial_withdrawals_count.safe_add_assign(1)?;
}
Some(partial_withdrawals_count)
Some(processed_partial_withdrawals_count)
} else {
None
};
Expand All @@ -570,9 +570,19 @@ pub fn get_expected_withdrawals<E: EthSpec>(
);
for _ in 0..bound {
let validator = state.get_validator(validator_index as usize)?;
let balance = *state.balances().get(validator_index as usize).ok_or(
BeaconStateError::BalancesOutOfBounds(validator_index as usize),
)?;
let partially_withdrawn_balance = withdrawals
.iter()
.filter_map(|withdrawal| {
(withdrawal.validator_index == validator_index).then_some(withdrawal.amount)
})
.safe_sum()?;
let balance = state
.balances()
.get(validator_index as usize)
.ok_or(BeaconStateError::BalancesOutOfBounds(
validator_index as usize,
))?
.safe_sub(partially_withdrawn_balance)?;
if validator.is_fully_withdrawable_at(balance, epoch, spec, fork_name) {
withdrawals.push(Withdrawal {
index: withdrawal_index,
Expand Down Expand Up @@ -604,7 +614,7 @@ pub fn get_expected_withdrawals<E: EthSpec>(
.safe_rem(state.validators().len() as u64)?;
}

Ok((withdrawals.into(), partial_withdrawals_count))
Ok((withdrawals.into(), processed_partial_withdrawals_count))
}

/// Apply withdrawals to the state.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,11 @@ pub fn process_withdrawal_requests<E: EthSpec>(
}

// Verify pubkey exists
let Some(index) = state.pubkey_cache().get(&request.validator_pubkey) else {
let Some(validator_index) = state.pubkey_cache().get(&request.validator_pubkey) else {
continue;
};

let validator = state.get_validator(index)?;
let validator = state.get_validator(validator_index)?;
// Verify withdrawal credentials
let has_correct_credential = validator.has_execution_withdrawal_credential(spec);
let is_correct_source_address = validator
Expand Down Expand Up @@ -542,16 +542,16 @@ pub fn process_withdrawal_requests<E: EthSpec>(
continue;
}

let pending_balance_to_withdraw = state.get_pending_balance_to_withdraw(index)?;
let pending_balance_to_withdraw = state.get_pending_balance_to_withdraw(validator_index)?;
if is_full_exit_request {
// Only exit validator if it has no pending withdrawals in the queue
if pending_balance_to_withdraw == 0 {
initiate_validator_exit(state, index, spec)?
initiate_validator_exit(state, validator_index, spec)?
}
continue;
}

let balance = state.get_balance(index)?;
let balance = state.get_balance(validator_index)?;
let has_sufficient_effective_balance =
validator.effective_balance >= spec.min_activation_balance;
let has_excess_balance = balance
Expand All @@ -576,7 +576,7 @@ pub fn process_withdrawal_requests<E: EthSpec>(
state
.pending_partial_withdrawals_mut()?
.push(PendingPartialWithdrawal {
index: index as u64,
validator_index: validator_index as u64,
amount: to_withdraw,
withdrawable_epoch,
})?;
Expand Down Expand Up @@ -739,8 +739,8 @@ pub fn process_consolidation_request<E: EthSpec>(
}

let target_validator = state.get_validator(target_index)?;
// Verify the target has execution withdrawal credentials
if !target_validator.has_execution_withdrawal_credential(spec) {
// Verify the target has compounding withdrawal credentials
if !target_validator.has_compounding_withdrawal_credential(spec) {
return Ok(());
}

Expand All @@ -757,6 +757,18 @@ pub fn process_consolidation_request<E: EthSpec>(
{
return Ok(());
}
// Verify the source has been active long enough
if current_epoch
< source_validator
.activation_epoch
.safe_add(spec.shard_committee_period)?
{
return Ok(());
}
// Verify the source has no pending withdrawals in the queue
if state.get_pending_balance_to_withdraw(source_index)? > 0 {
return Ok(());
}

// Initiate source validator exit and append pending consolidation
let source_exit_epoch = state
Expand All @@ -772,10 +784,5 @@ pub fn process_consolidation_request<E: EthSpec>(
target_index: target_index as u64,
})?;

let target_validator = state.get_validator(target_index)?;
// Churn any target excess active balance of target and raise its max
if target_validator.has_eth1_withdrawal_credential(spec) {
state.switch_to_compounding_validator(target_index, spec)?;
}
Ok(())
}
Original file line number Diff line number Diff line change
Expand Up @@ -1057,14 +1057,12 @@ fn process_pending_consolidations<E: EthSpec>(
}

// Calculate the consolidated balance
let max_effective_balance =
source_validator.get_max_effective_balance(spec, state_ctxt.fork_name);
let source_effective_balance = std::cmp::min(
*state
.balances()
.get(source_index)
.ok_or(BeaconStateError::UnknownValidator(source_index))?,
max_effective_balance,
source_validator.effective_balance,
);

// Move active balance to target. Excess balance is withdrawable.
Expand Down
4 changes: 3 additions & 1 deletion consensus/state_processing/src/upgrade/electra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ pub fn upgrade_to_electra<E: EthSpec>(
) -> Result<(), Error> {
let epoch = pre_state.current_epoch();

let activation_exit_epoch = spec.compute_activation_exit_epoch(epoch)?;
let earliest_exit_epoch = pre_state
.validators()
.iter()
.filter(|v| v.exit_epoch != spec.far_future_epoch)
.map(|v| v.exit_epoch)
.max()
.unwrap_or(epoch)
.unwrap_or(activation_exit_epoch)
.max(activation_exit_epoch)
.safe_add(1)?;

// The total active balance cache must be built before the consolidation churn limit
Expand Down
13 changes: 9 additions & 4 deletions consensus/types/presets/gnosis/electra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000
# State list lengths
# ---------------------------------------------------------------
# `uint64(2**27)` (= 134,217,728)
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728
PENDING_DEPOSITS_LIMIT: 134217728
# `uint64(2**27)` (= 134,217,728)
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 134217728
# `uint64(2**18)` (= 262,144)
Expand All @@ -29,12 +29,12 @@ WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA: 4096
MAX_ATTESTER_SLASHINGS_ELECTRA: 1
# `uint64(2**3)` (= 8)
MAX_ATTESTATIONS_ELECTRA: 8
# `uint64(2**0)` (= 1)
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
# `uint64(2**1)` (= 2)
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2

# Execution
# ---------------------------------------------------------------
# 2**13 (= 8192) receipts
# 2**13 (= 8192) deposit requests
MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 8192
# 2**4 (= 16) withdrawal requests
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16
Expand All @@ -43,3 +43,8 @@ MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16
# ---------------------------------------------------------------
# 2**3 ( = 8) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 8

# Pending deposits processing
# ---------------------------------------------------------------
# 2**4 ( = 4) pending deposits
MAX_PENDING_DEPOSITS_PER_EPOCH: 16
2 changes: 2 additions & 0 deletions consensus/types/presets/mainnet/altair.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 256
# ---------------------------------------------------------------
# 1
MIN_SYNC_COMMITTEE_PARTICIPANTS: 1
# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 32 * 256)
UPDATE_TIMEOUT: 8192
13 changes: 9 additions & 4 deletions consensus/types/presets/mainnet/electra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ MAX_EFFECTIVE_BALANCE_ELECTRA: 2048000000000
# State list lengths
# ---------------------------------------------------------------
# `uint64(2**27)` (= 134,217,728)
PENDING_BALANCE_DEPOSITS_LIMIT: 134217728
PENDING_DEPOSITS_LIMIT: 134217728
# `uint64(2**27)` (= 134,217,728)
PENDING_PARTIAL_WITHDRAWALS_LIMIT: 134217728
# `uint64(2**18)` (= 262,144)
Expand All @@ -29,12 +29,12 @@ WHISTLEBLOWER_REWARD_QUOTIENT_ELECTRA: 4096
MAX_ATTESTER_SLASHINGS_ELECTRA: 1
# `uint64(2**3)` (= 8)
MAX_ATTESTATIONS_ELECTRA: 8
# `uint64(2**0)` (= 1)
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 1
# `uint64(2**1)` (= 2)
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD: 2

# Execution
# ---------------------------------------------------------------
# 2**13 (= 8192) receipts
# 2**13 (= 8192) deposit requests
MAX_DEPOSIT_REQUESTS_PER_PAYLOAD: 8192
# 2**4 (= 16) withdrawal requests
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16
Expand All @@ -43,3 +43,8 @@ MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD: 16
# ---------------------------------------------------------------
# 2**3 ( = 8) pending withdrawals
MAX_PENDING_PARTIALS_PER_WITHDRAWALS_SWEEP: 8

# Pending deposits processing
# ---------------------------------------------------------------
# 2**4 ( = 4) pending deposits
MAX_PENDING_DEPOSITS_PER_EPOCH: 16
2 changes: 1 addition & 1 deletion consensus/types/presets/mainnet/phase0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ MAX_ATTESTATIONS: 128
# 2**4 (= 16)
MAX_DEPOSITS: 16
# 2**4 (= 16)
MAX_VOLUNTARY_EXITS: 16
MAX_VOLUNTARY_EXITS: 16
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note for reviewers: the contents of the presets and configs are copied verbatim from consensus-specs, which is why there are a mix of substantive changes and formatting changes.

2 changes: 2 additions & 0 deletions consensus/types/presets/minimal/altair.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ EPOCHS_PER_SYNC_COMMITTEE_PERIOD: 8
# ---------------------------------------------------------------
# 1
MIN_SYNC_COMMITTEE_PARTICIPANTS: 1
# SLOTS_PER_EPOCH * EPOCHS_PER_SYNC_COMMITTEE_PERIOD (= 8 * 8)
UPDATE_TIMEOUT: 64
Loading
Loading