Merge branch 'unstable' of https://github.com/sigp/lighthouse into gloas-data-availability-checker

This commit is contained in:
Eitan Seri- Levi
2026-02-09 19:25:09 -08:00
43 changed files with 1547 additions and 560 deletions

View File

@@ -48,7 +48,6 @@ excluded_paths = [
"tests/.*/eip7732",
"tests/.*/eip7805",
# TODO(gloas): remove these ignores as more Gloas operations are implemented
"tests/.*/gloas/operations/attestation/.*",
"tests/.*/gloas/operations/attester_slashing/.*",
"tests/.*/gloas/operations/block_header/.*",
"tests/.*/gloas/operations/bls_to_execution_change/.*",

View File

@@ -16,8 +16,9 @@ use state_processing::{
errors::BlockProcessingError,
process_block_header, process_execution_payload,
process_operations::{
altair_deneb, base, process_attester_slashings, process_bls_to_execution_changes,
process_deposits, process_exits, process_proposer_slashings,
altair_deneb, base, gloas, process_attester_slashings,
process_bls_to_execution_changes, process_deposits, process_exits,
process_proposer_slashings,
},
process_sync_aggregate, withdrawals,
},
@@ -98,9 +99,18 @@ impl<E: EthSpec> Operation<E> for Attestation<E> {
_: &Operations<E, Self>,
) -> Result<(), BlockProcessingError> {
initialize_epoch_cache(state, spec)?;
initialize_progressive_balances_cache(state, spec)?;
let mut ctxt = ConsensusContext::new(state.slot());
if state.fork_name_unchecked().altair_enabled() {
initialize_progressive_balances_cache(state, spec)?;
if state.fork_name_unchecked().gloas_enabled() {
gloas::process_attestation(
state,
self.to_ref(),
0,
&mut ctxt,
VerifySignatures::True,
spec,
)
} else if state.fork_name_unchecked().altair_enabled() {
altair_deneb::process_attestation(
state,
self.to_ref(),

View File

@@ -1137,7 +1137,9 @@ impl<E: EthSpec + TypeName, O: Operation<E>> Handler for OperationsHandler<E, O>
fn is_enabled_for_fork(&self, fork_name: ForkName) -> bool {
// TODO(gloas): So far only withdrawals tests are enabled for Gloas.
Self::Case::is_enabled_for_fork(fork_name)
&& (!fork_name.gloas_enabled() || self.handler_name() == "withdrawals")
&& (!fork_name.gloas_enabled()
|| self.handler_name() == "withdrawals"
|| self.handler_name() == "attestation")
}
}

View File

@@ -137,11 +137,7 @@ mod tests {
}
fn client_identity_path() -> PathBuf {
if cfg!(target_os = "macos") {
tls_dir().join("lighthouse").join("key_legacy.p12")
} else {
tls_dir().join("lighthouse").join("key.p12")
}
tls_dir().join("lighthouse").join("key.p12")
}
fn client_identity_password() -> String {

View File

@@ -1,12 +1,5 @@
#!/bin/bash
# The lighthouse/key_legacy.p12 file is generated specifically for macOS because the default `openssl pkcs12` encoding
# algorithm in OpenSSL v3 is not compatible with the PKCS algorithm used by the Apple Security Framework. The client
# side (using the reqwest crate) relies on the Apple Security Framework to parse PKCS files.
# We don't need to generate web3signer/key_legacy.p12 because the compatibility issue doesn't occur on the web3signer
# side. It seems that web3signer (Java) uses its own implementation to parse PKCS files.
# See https://github.com/sigp/lighthouse/issues/6442#issuecomment-2469252651
# We specify `-days 825` when generating the certificate files because Apple requires TLS server certificates to have a
# validity period of 825 days or fewer.
# See https://github.com/sigp/lighthouse/issues/6442#issuecomment-2474979183
@@ -16,5 +9,4 @@ openssl pkcs12 -export -out web3signer/key.p12 -inkey web3signer/key.key -in web
cp web3signer/cert.pem lighthouse/web3signer.pem &&
openssl req -x509 -sha256 -nodes -days 825 -newkey rsa:4096 -keyout lighthouse/key.key -out lighthouse/cert.pem -config lighthouse/config &&
openssl pkcs12 -export -out lighthouse/key.p12 -inkey lighthouse/key.key -in lighthouse/cert.pem -password pass:$(cat lighthouse/password.txt) &&
openssl pkcs12 -export -legacy -out lighthouse/key_legacy.p12 -inkey lighthouse/key.key -in lighthouse/cert.pem -password pass:$(cat lighthouse/password.txt) &&
openssl x509 -noout -fingerprint -sha256 -inform pem -in lighthouse/cert.pem | cut -b 20-| sed "s/^/lighthouse /" > web3signer/known_clients.txt