Compare commits

...

5 Commits

Author SHA1 Message Date
realbigsean
796e3567c8 slog updates 2025-03-13 10:06:15 -07:00
realbigsean
56bb6c1968 add import 2025-03-13 09:59:08 -07:00
dapplion
8f2194eb2c Add logs when adding to pubkey cache 2025-03-13 09:48:44 -07:00
Michael Sproul
8d058e4040 Release v7.0.0-beta.3 2025-03-13 10:07:09 +11:00
Michael Sproul
3645d57099 Fix descent from split check (#7105) 2025-03-11 16:14:58 +11:00
8 changed files with 37 additions and 14 deletions

8
Cargo.lock generated
View File

@@ -860,7 +860,7 @@ dependencies = [
[[package]]
name = "beacon_node"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
dependencies = [
"account_utils",
"beacon_chain",
@@ -1108,7 +1108,7 @@ dependencies = [
[[package]]
name = "boot_node"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
dependencies = [
"beacon_node",
"bytes",
@@ -4811,7 +4811,7 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
[[package]]
name = "lcli"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
dependencies = [
"account_utils",
"beacon_chain",
@@ -5366,7 +5366,7 @@ dependencies = [
[[package]]
name = "lighthouse"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
dependencies = [
"account_manager",
"account_utils",

View File

@@ -1,6 +1,6 @@
[package]
name = "beacon_node"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
authors = [
"Paul Hauner <paul@paulhauner.com>",
"Age Manning <Age@AgeManning.com",

View File

@@ -1783,10 +1783,17 @@ pub fn check_block_is_finalized_checkpoint_or_descendant<
block: B,
) -> Result<B, BlockError> {
// If we have a split block newer than finalization then we also ban blocks which are not
// descended from that split block.
// descended from that split block. It's important not to try checking `is_descendant` if
// finality is ahead of the split and the split block has been pruned, as `is_descendant` will
// return `false` in this case.
let finalized_slot = fork_choice
.finalized_checkpoint()
.epoch
.start_slot(T::EthSpec::slots_per_epoch());
let split = chain.store.get_split_info();
let is_descendant_from_split_block =
split.slot == 0 || fork_choice.is_descendant(split.block_root, block.parent_root());
let is_descendant_from_split_block = split.slot == 0
|| split.slot <= finalized_slot
|| fork_choice.is_descendant(split.block_root, block.parent_root());
if fork_choice.is_finalized_checkpoint_or_descendant(block.parent_root())
&& is_descendant_from_split_block

View File

@@ -1,6 +1,7 @@
use crate::errors::BeaconChainError;
use crate::{BeaconChainTypes, BeaconStore};
use bls::PUBLIC_KEY_UNCOMPRESSED_BYTES_LEN;
use slog::{debug, Logger};
use smallvec::SmallVec;
use ssz::{Decode, Encode};
use ssz_derive::{Decode, Encode};
@@ -18,6 +19,7 @@ use types::{BeaconState, FixedBytesExtended, Hash256, PublicKey, PublicKeyBytes}
/// keys in compressed form and they are needed in decompressed form for signature verification.
/// Decompression is expensive when many keys are involved.
pub struct ValidatorPubkeyCache<T: BeaconChainTypes> {
log: Logger,
pubkeys: Vec<PublicKey>,
indices: HashMap<PublicKeyBytes, usize>,
pubkey_bytes: Vec<PublicKeyBytes>,
@@ -33,6 +35,7 @@ impl<T: BeaconChainTypes> ValidatorPubkeyCache<T> {
store: BeaconStore<T>,
) -> Result<Self, BeaconChainError> {
let mut cache = Self {
log: store.log.clone(),
pubkeys: vec![],
indices: HashMap::new(),
pubkey_bytes: vec![],
@@ -64,7 +67,14 @@ impl<T: BeaconChainTypes> ValidatorPubkeyCache<T> {
}
}
let indices_len = indices.len();
debug!(
store.log,
"Loaded pubkey cache from store. Indices: {}", indices_len
);
Ok(ValidatorPubkeyCache {
log: store.log.clone(),
pubkeys,
indices,
pubkey_bytes,
@@ -105,6 +115,12 @@ impl<T: BeaconChainTypes> ValidatorPubkeyCache<T> {
self.pubkeys.reserve(validator_keys.len());
self.indices.reserve(validator_keys.len());
let count = validator_keys.len();
debug!(
self.log,
"Importing new pubkeys to the pubkey cache. count: {}", count
);
let mut store_ops = Vec::with_capacity(validator_keys.len());
for pubkey_bytes in validator_keys {
let i = self.pubkeys.len();

View File

@@ -1,6 +1,6 @@
[package]
name = "boot_node"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
authors = ["Sigma Prime <contact@sigmaprime.io>"]
edition = { workspace = true }

View File

@@ -17,8 +17,8 @@ pub const VERSION: &str = git_version!(
// NOTE: using --match instead of --exclude for compatibility with old Git
"--match=thiswillnevermatchlol"
],
prefix = "Lighthouse/v7.0.0-beta.2-",
fallback = "Lighthouse/v7.0.0-beta.2"
prefix = "Lighthouse/v7.0.0-beta.3-",
fallback = "Lighthouse/v7.0.0-beta.3"
);
/// Returns the first eight characters of the latest commit hash for this build.
@@ -54,7 +54,7 @@ pub fn version_with_platform() -> String {
///
/// `1.5.1`
pub fn version() -> &'static str {
"7.0.0-beta.2"
"7.0.0-beta.3"
}
/// Returns the name of the current client running.

View File

@@ -1,7 +1,7 @@
[package]
name = "lcli"
description = "Lighthouse CLI (modeled after zcli)"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
authors = ["Paul Hauner <paul@paulhauner.com>"]
edition = { workspace = true }

View File

@@ -1,6 +1,6 @@
[package]
name = "lighthouse"
version = "7.0.0-beta.2"
version = "7.0.0-beta.3"
authors = ["Sigma Prime <contact@sigmaprime.io>"]
edition = { workspace = true }
autotests = false