Skip to content

Commit 2f6ebe1

Browse files
authored
Merge branch 'unstable' into vm-voluntary-exit
2 parents 6fb971e + c33307d commit 2f6ebe1

File tree

280 files changed

+6421
-2978
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+6421
-2978
lines changed

.cargo/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[env]
22
# Set the number of arenas to 16 when using jemalloc.
33
JEMALLOC_SYS_WITH_MALLOC_CONF = "abort_conf:true,narenas:16"
4+

.github/CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
beacon_node/network/ @jxs
2+
beacon_node/lighthouse_network/ @jxs

.github/workflows/test-suite.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ jobs:
392392
cache: false
393393
env:
394394
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
395+
- name: Fetch libssl1.1
396+
run: wget https://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
397+
- name: Install libssl1.1
398+
run: sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
395399
- name: Create Cargo config dir
396400
run: mkdir -p .cargo
397401
- name: Install custom Cargo config

Cargo.lock

Lines changed: 16 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ members = [
99
"beacon_node/client",
1010
"beacon_node/eth1",
1111
"beacon_node/execution_layer",
12+
"beacon_node/genesis",
1213
"beacon_node/http_api",
1314
"beacon_node/http_metrics",
1415
"beacon_node/lighthouse_network",
1516
"beacon_node/lighthouse_network/gossipsub",
1617
"beacon_node/network",
18+
"beacon_node/operation_pool",
1719
"beacon_node/store",
1820
"beacon_node/timer",
1921

@@ -30,6 +32,8 @@ members = [
3032
"common/eth2_interop_keypairs",
3133
"common/eth2_network_config",
3234
"common/eth2_wallet_manager",
35+
"common/filesystem",
36+
"common/health_metrics",
3337
"common/lighthouse_version",
3438
"common/lockfile",
3539
"common/logging",
@@ -48,14 +52,16 @@ members = [
4852
"common/unused_port",
4953
"common/validator_dir",
5054
"common/warp_utils",
55+
5156
"consensus/fixed_bytes",
5257
"consensus/fork_choice",
53-
5458
"consensus/int_to_bytes",
59+
"consensus/merkle_proof",
5560
"consensus/proto_array",
5661
"consensus/safe_arith",
5762
"consensus/state_processing",
5863
"consensus/swap_or_not_shuffle",
64+
"consensus/types",
5965

6066
"crypto/bls",
6167
"crypto/eth2_key_derivation",
@@ -247,6 +253,7 @@ filesystem = { path = "common/filesystem" }
247253
fork_choice = { path = "consensus/fork_choice" }
248254
genesis = { path = "beacon_node/genesis" }
249255
gossipsub = { path = "beacon_node/lighthouse_network/gossipsub/" }
256+
health_metrics = { path = "common/health_metrics" }
250257
http_api = { path = "beacon_node/http_api" }
251258
initialized_validators = { path = "validator_client/initialized_validators" }
252259
int_to_bytes = { path = "consensus/int_to_bytes" }

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ PROFILE ?= release
3030

3131
# List of all hard forks. This list is used to set env variables for several tests so that
3232
# they run for different forks.
33-
FORKS=phase0 altair bellatrix capella deneb electra
33+
FORKS=phase0 altair bellatrix capella deneb electra fulu
3434

3535
# Extra flags for Cargo
3636
CARGO_INSTALL_EXTRA_FLAGS?=

account_manager/src/validator/create.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ use account_utils::{
66
};
77
use clap::{Arg, ArgAction, ArgMatches, Command};
88
use clap_utils::FLAG_HEADER;
9-
use directory::{
10-
ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR,
11-
};
9+
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR, DEFAULT_WALLET_DIR};
1210
use environment::Environment;
1311
use eth2_wallet_manager::WalletManager;
1412
use slashing_protection::{SlashingDatabase, SLASHING_PROTECTION_FILENAME};
1513
use std::ffi::OsStr;
1614
use std::fs;
15+
use std::fs::create_dir_all;
1716
use std::path::{Path, PathBuf};
1817
use types::EthSpec;
1918
use validator_dir::Builder as ValidatorDirBuilder;
@@ -156,8 +155,10 @@ pub fn cli_run<E: EthSpec>(
156155
));
157156
}
158157

159-
ensure_dir_exists(&validator_dir)?;
160-
ensure_dir_exists(&secrets_dir)?;
158+
create_dir_all(&validator_dir)
159+
.map_err(|e| format!("Could not create validator dir at {validator_dir:?}: {e:?}"))?;
160+
create_dir_all(&secrets_dir)
161+
.map_err(|e| format!("Could not create secrets dir at {secrets_dir:?}: {e:?}"))?;
161162

162163
eprintln!("secrets-dir path {:?}", secrets_dir);
163164
eprintln!("wallets-dir path {:?}", wallet_base_dir);

account_manager/src/validator/recover.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use account_utils::eth2_keystore::{keypair_from_secret, Keystore, KeystoreBuilde
55
use account_utils::{random_password, read_mnemonic_from_cli, STDIN_INPUTS_FLAG};
66
use clap::{Arg, ArgAction, ArgMatches, Command};
77
use clap_utils::FLAG_HEADER;
8-
use directory::ensure_dir_exists;
98
use directory::{parse_path_or_default_with_flag, DEFAULT_SECRET_DIR};
109
use eth2_wallet::bip39::Seed;
1110
use eth2_wallet::{recover_validator_secret_from_mnemonic, KeyType, ValidatorKeystores};
11+
use std::fs::create_dir_all;
1212
use std::path::PathBuf;
1313
use validator_dir::Builder as ValidatorDirBuilder;
1414
pub const CMD: &str = "recover";
@@ -91,8 +91,10 @@ pub fn cli_run(matches: &ArgMatches, validator_dir: PathBuf) -> Result<(), Strin
9191

9292
eprintln!("secrets-dir path: {:?}", secrets_dir);
9393

94-
ensure_dir_exists(&validator_dir)?;
95-
ensure_dir_exists(&secrets_dir)?;
94+
create_dir_all(&validator_dir)
95+
.map_err(|e| format!("Could not create validator dir at {validator_dir:?}: {e:?}"))?;
96+
create_dir_all(&secrets_dir)
97+
.map_err(|e| format!("Could not create secrets dir at {secrets_dir:?}: {e:?}"))?;
9698

9799
eprintln!();
98100
eprintln!("WARNING: KEY RECOVERY CAN LEAD TO DUPLICATING VALIDATORS KEYS, WHICH CAN LEAD TO SLASHING.");

account_manager/src/wallet/mod.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ pub mod recover;
55
use crate::WALLETS_DIR_FLAG;
66
use clap::{Arg, ArgAction, ArgMatches, Command};
77
use clap_utils::FLAG_HEADER;
8-
use directory::{ensure_dir_exists, parse_path_or_default_with_flag, DEFAULT_WALLET_DIR};
8+
use directory::{parse_path_or_default_with_flag, DEFAULT_WALLET_DIR};
9+
use std::fs::create_dir_all;
910
use std::path::PathBuf;
1011

1112
pub const CMD: &str = "wallet";
@@ -44,7 +45,7 @@ pub fn cli_run(matches: &ArgMatches) -> Result<(), String> {
4445
} else {
4546
parse_path_or_default_with_flag(matches, WALLETS_DIR_FLAG, DEFAULT_WALLET_DIR)?
4647
};
47-
ensure_dir_exists(&wallet_base_dir)?;
48+
create_dir_all(&wallet_base_dir).map_err(|_| "Could not create wallet base dir")?;
4849

4950
eprintln!("wallet-dir path: {:?}", wallet_base_dir);
5051

beacon_node/beacon_chain/src/attestation_rewards.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,10 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
5151
.get_state(&state_root, Some(state_slot))?
5252
.ok_or(BeaconChainError::MissingBeaconState(state_root))?;
5353

54-
match state {
55-
BeaconState::Base(_) => self.compute_attestation_rewards_base(state, validators),
56-
BeaconState::Altair(_)
57-
| BeaconState::Bellatrix(_)
58-
| BeaconState::Capella(_)
59-
| BeaconState::Deneb(_)
60-
| BeaconState::Electra(_) => self.compute_attestation_rewards_altair(state, validators),
54+
if state.fork_name_unchecked().altair_enabled() {
55+
self.compute_attestation_rewards_altair(state, validators)
56+
} else {
57+
self.compute_attestation_rewards_base(state, validators)
6158
}
6259
}
6360

0 commit comments

Comments
 (0)