mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-19 05:48:31 +00:00
Changes for devnet-8 (#4518)
* Addressed #4487 Add override threshold flag Added tests for Override Threshold Flag Override default shown in decimal * Addressed #4445 Addressed Jimmy's Comments No need for matches Fix Mock Execution Engine Tests Fix clippy fix fcuv3 bug * Fix Block Root Calculation post-Deneb * Addressed #4444 Attestation Verification Post-Deneb Fix Gossip Attestation Verification Test * Addressed #4443 Fix Exit Signing for EIP-7044 Fix cross exit test Move 7044 Logic to signing_context() * Update EF Tests * Addressed #4560 * Added Comments around EIP7045 * Combine Altair Deneb to Eliminate Duplicated Code
This commit is contained in:
@@ -14,7 +14,7 @@ use slot_clock::{SlotClock, SystemTimeSlotClock};
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::time::Duration;
|
||||
use tokio::time::sleep;
|
||||
use types::{ChainSpec, Epoch, EthSpec, Fork, VoluntaryExit};
|
||||
use types::{ChainSpec, Epoch, EthSpec, VoluntaryExit};
|
||||
|
||||
pub const CMD: &str = "exit";
|
||||
pub const KEYSTORE_FLAG: &str = "keystore";
|
||||
@@ -148,7 +148,6 @@ async fn publish_voluntary_exit<E: EthSpec>(
|
||||
.ok_or("Failed to get current epoch. Please check your system time")?;
|
||||
let validator_index = get_validator_index_for_exit(client, &keypair.pk, epoch, spec).await?;
|
||||
|
||||
let fork = get_beacon_state_fork(client).await?;
|
||||
let voluntary_exit = VoluntaryExit {
|
||||
epoch,
|
||||
validator_index,
|
||||
@@ -175,12 +174,8 @@ async fn publish_voluntary_exit<E: EthSpec>(
|
||||
|
||||
if confirmation == CONFIRMATION_PHRASE {
|
||||
// Sign and publish the voluntary exit to network
|
||||
let signed_voluntary_exit = voluntary_exit.sign(
|
||||
&keypair.sk,
|
||||
&fork,
|
||||
genesis_data.genesis_validators_root,
|
||||
spec,
|
||||
);
|
||||
let signed_voluntary_exit =
|
||||
voluntary_exit.sign(&keypair.sk, genesis_data.genesis_validators_root, spec);
|
||||
client
|
||||
.post_beacon_pool_voluntary_exits(&signed_voluntary_exit)
|
||||
.await
|
||||
@@ -318,16 +313,6 @@ async fn is_syncing(client: &BeaconNodeHttpClient) -> Result<bool, String> {
|
||||
.is_syncing)
|
||||
}
|
||||
|
||||
/// Get fork object for the current state by querying the beacon node client.
|
||||
async fn get_beacon_state_fork(client: &BeaconNodeHttpClient) -> Result<Fork, String> {
|
||||
Ok(client
|
||||
.get_beacon_states_fork(StateId::Head)
|
||||
.await
|
||||
.map_err(|e| format!("Failed to get get fork: {:?}", e))?
|
||||
.ok_or("Failed to get fork, state not found")?
|
||||
.data)
|
||||
}
|
||||
|
||||
/// Calculates the current epoch from the genesis time and current time.
|
||||
fn get_current_epoch<E: EthSpec>(genesis_time: u64, spec: &ChainSpec) -> Option<Epoch> {
|
||||
let slot_clock = SystemTimeSlotClock::new(
|
||||
|
||||
Reference in New Issue
Block a user