Merge branch 'unstable' into eip4844
This commit is contained in:
commit
f16e82ab2c
@ -5210,18 +5210,34 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
"status" => ?status
|
||||
);
|
||||
|
||||
// This implies that the terminal block was invalid. We are being explicit in
|
||||
// invalidating only the head block in this case.
|
||||
if latest_valid_hash == ExecutionBlockHash::zero() {
|
||||
match latest_valid_hash {
|
||||
// The `latest_valid_hash` is set to `None` when the EE
|
||||
// "cannot determine the ancestor of the invalid
|
||||
// payload". In such a scenario we should only
|
||||
// invalidate the head block and nothing else.
|
||||
None => {
|
||||
self.process_invalid_execution_payload(
|
||||
&InvalidationOperation::InvalidateOne {
|
||||
block_root: head_block_root,
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
} else {
|
||||
}
|
||||
// An all-zeros execution block hash implies that
|
||||
// the terminal block was invalid. We are being
|
||||
// explicit in invalidating only the head block in
|
||||
// this case.
|
||||
Some(hash) if hash == ExecutionBlockHash::zero() => {
|
||||
self.process_invalid_execution_payload(
|
||||
&InvalidationOperation::InvalidateOne {
|
||||
block_root: head_block_root,
|
||||
},
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
// The execution engine has stated that all blocks between the
|
||||
// `head_execution_block_hash` and `latest_valid_hash` are invalid.
|
||||
Some(latest_valid_hash) => {
|
||||
self.process_invalid_execution_payload(
|
||||
&InvalidationOperation::InvalidateMany {
|
||||
head_block_root,
|
||||
@ -5231,6 +5247,7 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
)
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
|
||||
Err(BeaconChainError::ExecutionForkChoiceUpdateInvalid { status })
|
||||
}
|
||||
|
@ -172,14 +172,26 @@ async fn notify_new_payload<'a, T: BeaconChainTypes>(
|
||||
"method" => "new_payload",
|
||||
);
|
||||
|
||||
// latest_valid_hash == 0 implies that this was the terminal block
|
||||
// Hence, we don't need to run `BeaconChain::process_invalid_execution_payload`.
|
||||
if latest_valid_hash == ExecutionBlockHash::zero() {
|
||||
return Err(ExecutionPayloadError::RejectedByExecutionEngine { status }.into());
|
||||
}
|
||||
// Only trigger payload invalidation in fork choice if the
|
||||
// `latest_valid_hash` is `Some` and non-zero.
|
||||
//
|
||||
// A `None` latest valid hash indicates that the EE was unable
|
||||
// to determine the most recent valid ancestor. Since `block`
|
||||
// has not yet been applied to fork choice, there's nothing to
|
||||
// invalidate.
|
||||
//
|
||||
// An all-zeros payload indicates that an EIP-3675 check has
|
||||
// failed regarding the validity of the terminal block. Rather
|
||||
// than iterating back in the chain to find the terminal block
|
||||
// and invalidating that, we simply reject this block without
|
||||
// invalidating anything else.
|
||||
if let Some(latest_valid_hash) =
|
||||
latest_valid_hash.filter(|hash| *hash != ExecutionBlockHash::zero())
|
||||
{
|
||||
// This block has not yet been applied to fork choice, so the latest block that was
|
||||
// imported to fork choice was the parent.
|
||||
let latest_root = block.parent_root();
|
||||
|
||||
chain
|
||||
.process_invalid_execution_payload(&InvalidationOperation::InvalidateMany {
|
||||
head_block_root: latest_root,
|
||||
@ -187,6 +199,7 @@ async fn notify_new_payload<'a, T: BeaconChainTypes>(
|
||||
latest_valid_ancestor: latest_valid_hash,
|
||||
})
|
||||
.await?;
|
||||
}
|
||||
|
||||
Err(ExecutionPayloadError::RejectedByExecutionEngine { status }.into())
|
||||
}
|
||||
|
@ -10,7 +10,9 @@ use types::ExecutionBlockHash;
|
||||
pub enum PayloadStatus {
|
||||
Valid,
|
||||
Invalid {
|
||||
latest_valid_hash: ExecutionBlockHash,
|
||||
/// The EE will provide a `None` LVH when it is unable to determine the
|
||||
/// latest valid ancestor.
|
||||
latest_valid_hash: Option<ExecutionBlockHash>,
|
||||
validation_error: Option<String>,
|
||||
},
|
||||
Syncing,
|
||||
@ -55,22 +57,10 @@ pub fn process_payload_status(
|
||||
})
|
||||
}
|
||||
}
|
||||
PayloadStatusV1Status::Invalid => {
|
||||
if let Some(latest_valid_hash) = response.latest_valid_hash {
|
||||
// The response is only valid if `latest_valid_hash` is not `null`.
|
||||
Ok(PayloadStatus::Invalid {
|
||||
latest_valid_hash,
|
||||
validation_error: response.validation_error.clone(),
|
||||
})
|
||||
} else {
|
||||
Err(EngineError::Api {
|
||||
error: ApiError::BadResponse(
|
||||
"new_payload: response.status = INVALID but null latest_valid_hash"
|
||||
.to_string(),
|
||||
),
|
||||
})
|
||||
}
|
||||
}
|
||||
PayloadStatusV1Status::Invalid => Ok(PayloadStatus::Invalid {
|
||||
latest_valid_hash: response.latest_valid_hash,
|
||||
validation_error: response.validation_error,
|
||||
}),
|
||||
PayloadStatusV1Status::InvalidBlockHash => {
|
||||
// In the interests of being liberal with what we accept, only raise a
|
||||
// warning here.
|
||||
|
@ -13,8 +13,8 @@ use crate::rpc::*;
|
||||
use crate::service::behaviour::BehaviourEvent;
|
||||
pub use crate::service::behaviour::Gossipsub;
|
||||
use crate::types::{
|
||||
subnet_from_topic_hash, GossipEncoding, GossipKind, GossipTopic, SnappyTransform, Subnet,
|
||||
SubnetDiscovery,
|
||||
fork_core_topics, subnet_from_topic_hash, GossipEncoding, GossipKind, GossipTopic,
|
||||
SnappyTransform, Subnet, SubnetDiscovery,
|
||||
};
|
||||
use crate::EnrExt;
|
||||
use crate::Eth2Enr;
|
||||
@ -41,6 +41,7 @@ use std::{
|
||||
sync::Arc,
|
||||
task::{Context, Poll},
|
||||
};
|
||||
use types::ForkName;
|
||||
use types::{
|
||||
consts::altair::SYNC_COMMITTEE_SUBNET_COUNT, EnrForkId, EthSpec, ForkContext, Slot, SubnetId,
|
||||
};
|
||||
@ -561,13 +562,20 @@ impl<AppReqId: ReqId, TSpec: EthSpec> Network<AppReqId, TSpec> {
|
||||
self.unsubscribe(gossip_topic)
|
||||
}
|
||||
|
||||
/// Subscribe to all currently subscribed topics with the new fork digest.
|
||||
pub fn subscribe_new_fork_topics(&mut self, new_fork_digest: [u8; 4]) {
|
||||
/// Subscribe to all required topics for the `new_fork` with the given `new_fork_digest`.
|
||||
pub fn subscribe_new_fork_topics(&mut self, new_fork: ForkName, new_fork_digest: [u8; 4]) {
|
||||
// Subscribe to existing topics with new fork digest
|
||||
let subscriptions = self.network_globals.gossipsub_subscriptions.read().clone();
|
||||
for mut topic in subscriptions.into_iter() {
|
||||
topic.fork_digest = new_fork_digest;
|
||||
self.subscribe(topic);
|
||||
}
|
||||
|
||||
// Subscribe to core topics for the new fork
|
||||
for kind in fork_core_topics(&new_fork) {
|
||||
let topic = GossipTopic::new(kind, GossipEncoding::default(), new_fork_digest);
|
||||
self.subscribe(topic);
|
||||
}
|
||||
}
|
||||
|
||||
/// Unsubscribe from all topics that doesn't have the given fork_digest
|
||||
|
@ -17,6 +17,6 @@ pub use pubsub::{PubsubMessage, SnappyTransform};
|
||||
pub use subnet::{Subnet, SubnetDiscovery};
|
||||
pub use sync_state::{BackFillState, SyncState};
|
||||
pub use topics::{
|
||||
subnet_from_topic_hash, GossipEncoding, GossipKind, GossipTopic, CORE_TOPICS,
|
||||
LIGHT_CLIENT_GOSSIP_TOPICS,
|
||||
core_topics_to_subscribe, fork_core_topics, subnet_from_topic_hash, GossipEncoding, GossipKind,
|
||||
GossipTopic, LIGHT_CLIENT_GOSSIP_TOPICS,
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
use libp2p::gossipsub::{IdentTopic as Topic, TopicHash};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use strum::AsRefStr;
|
||||
use types::{SubnetId, SyncSubnetId};
|
||||
use types::{ForkName, SubnetId, SyncSubnetId};
|
||||
|
||||
use crate::Subnet;
|
||||
|
||||
@ -23,21 +23,45 @@ pub const BLS_TO_EXECUTION_CHANGE_TOPIC: &str = "bls_to_execution_change";
|
||||
pub const LIGHT_CLIENT_FINALITY_UPDATE: &str = "light_client_finality_update";
|
||||
pub const LIGHT_CLIENT_OPTIMISTIC_UPDATE: &str = "light_client_optimistic_update";
|
||||
|
||||
pub const CORE_TOPICS: [GossipKind; 7] = [
|
||||
pub const BASE_CORE_TOPICS: [GossipKind; 5] = [
|
||||
GossipKind::BeaconBlock,
|
||||
GossipKind::BeaconAggregateAndProof,
|
||||
GossipKind::VoluntaryExit,
|
||||
GossipKind::ProposerSlashing,
|
||||
GossipKind::AttesterSlashing,
|
||||
GossipKind::SignedContributionAndProof,
|
||||
GossipKind::BlsToExecutionChange,
|
||||
];
|
||||
|
||||
pub const ALTAIR_CORE_TOPICS: [GossipKind; 1] = [GossipKind::SignedContributionAndProof];
|
||||
|
||||
pub const CAPELLA_CORE_TOPICS: [GossipKind; 1] = [GossipKind::BlsToExecutionChange];
|
||||
|
||||
pub const LIGHT_CLIENT_GOSSIP_TOPICS: [GossipKind; 2] = [
|
||||
GossipKind::LightClientFinalityUpdate,
|
||||
GossipKind::LightClientOptimisticUpdate,
|
||||
];
|
||||
|
||||
/// Returns the core topics associated with each fork that are new to the previous fork
|
||||
pub fn fork_core_topics(fork_name: &ForkName) -> Vec<GossipKind> {
|
||||
match fork_name {
|
||||
ForkName::Base => BASE_CORE_TOPICS.to_vec(),
|
||||
ForkName::Altair => ALTAIR_CORE_TOPICS.to_vec(),
|
||||
ForkName::Merge => vec![],
|
||||
ForkName::Capella => CAPELLA_CORE_TOPICS.to_vec(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns all the topics that we need to subscribe to for a given fork
|
||||
/// including topics from older forks and new topics for the current fork.
|
||||
pub fn core_topics_to_subscribe(mut current_fork: ForkName) -> Vec<GossipKind> {
|
||||
let mut topics = fork_core_topics(¤t_fork);
|
||||
while let Some(previous_fork) = current_fork.previous_fork() {
|
||||
let previous_fork_topics = fork_core_topics(&previous_fork);
|
||||
topics.extend(previous_fork_topics);
|
||||
current_fork = previous_fork;
|
||||
}
|
||||
topics
|
||||
}
|
||||
|
||||
/// A gossipsub topic which encapsulates the type of messages that should be sent and received over
|
||||
/// the pubsub protocol and the way the messages should be encoded.
|
||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||
@ -396,4 +420,15 @@ mod tests {
|
||||
assert_eq!("proposer_slashing", ProposerSlashing.as_ref());
|
||||
assert_eq!("attester_slashing", AttesterSlashing.as_ref());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_core_topics_to_subscribe() {
|
||||
let mut all_topics = Vec::new();
|
||||
all_topics.extend(CAPELLA_CORE_TOPICS);
|
||||
all_topics.extend(ALTAIR_CORE_TOPICS);
|
||||
all_topics.extend(BASE_CORE_TOPICS);
|
||||
|
||||
let latest_fork = *ForkName::list_all().last().unwrap();
|
||||
assert_eq!(core_topics_to_subscribe(latest_fork), all_topics);
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ use lighthouse_network::{
|
||||
Context, PeerAction, PeerRequestId, PubsubMessage, ReportSource, Request, Response, Subnet,
|
||||
};
|
||||
use lighthouse_network::{
|
||||
types::{GossipEncoding, GossipTopic},
|
||||
types::{core_topics_to_subscribe, GossipEncoding, GossipTopic},
|
||||
MessageId, NetworkEvent, NetworkGlobals, PeerId,
|
||||
};
|
||||
use slog::{crit, debug, error, info, o, trace, warn};
|
||||
@ -445,7 +445,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
let fork_version = self.beacon_chain.spec.fork_version_for_name(fork_name);
|
||||
let fork_digest = ChainSpec::compute_fork_digest(fork_version, self.beacon_chain.genesis_validators_root);
|
||||
info!(self.log, "Subscribing to new fork topics");
|
||||
self.libp2p.subscribe_new_fork_topics(fork_digest);
|
||||
self.libp2p.subscribe_new_fork_topics(fork_name, fork_digest);
|
||||
self.next_fork_subscriptions = Box::pin(None.into());
|
||||
}
|
||||
else {
|
||||
@ -685,7 +685,7 @@ impl<T: BeaconChainTypes> NetworkService<T> {
|
||||
}
|
||||
|
||||
let mut subscribed_topics: Vec<GossipTopic> = vec![];
|
||||
for topic_kind in lighthouse_network::types::CORE_TOPICS.iter() {
|
||||
for topic_kind in core_topics_to_subscribe(self.fork_context.current_fork()) {
|
||||
for fork_digest in self.required_gossip_fork_digests() {
|
||||
let topic = GossipTopic::new(
|
||||
topic_kind.clone(),
|
||||
|
@ -116,7 +116,7 @@ Several conditions need to be met in order to run `lighthouse db`:
|
||||
2. The command must run as the user that owns the beacon node database. If you are using systemd then
|
||||
your beacon node might run as a user called `lighthousebeacon`.
|
||||
3. The `--datadir` flag must be set to the location of the Lighthouse data directory.
|
||||
4. The `--network` flag must be set to the correct network, e.g. `mainnet`, `prater` or `ropsten`.
|
||||
4. The `--network` flag must be set to the correct network, e.g. `mainnet`, `prater` or `sepolia`.
|
||||
|
||||
The general form for a `lighthouse db` command is:
|
||||
|
||||
|
@ -278,26 +278,6 @@ define_hardcoded_nets!(
|
||||
// directory.
|
||||
GENESIS_STATE_IS_KNOWN
|
||||
),
|
||||
(
|
||||
// Network name (must be unique among all networks).
|
||||
kiln,
|
||||
// The name of the directory in the `eth2_network_config/built_in_network_configs`
|
||||
// directory where the configuration files are located for this network.
|
||||
"kiln",
|
||||
// Set to `true` if the genesis state can be found in the `built_in_network_configs`
|
||||
// directory.
|
||||
GENESIS_STATE_IS_KNOWN
|
||||
),
|
||||
(
|
||||
// Network name (must be unique among all networks).
|
||||
ropsten,
|
||||
// The name of the directory in the `eth2_network_config/built_in_network_configs`
|
||||
// directory where the configuration files are located for this network.
|
||||
"ropsten",
|
||||
// Set to `true` if the genesis state can be found in the `built_in_network_configs`
|
||||
// directory.
|
||||
GENESIS_STATE_IS_KNOWN
|
||||
),
|
||||
(
|
||||
// Network name (must be unique among all networks).
|
||||
sepolia,
|
||||
|
@ -1,3 +0,0 @@
|
||||
- enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk
|
||||
- enr:-KG4QFkPJUFWuONp5grM94OJvNht9wX6N36sA4wqucm6Z02ECWBQRmh6AzndaLVGYBHWre67mjK-E0uKt2CIbWrsZ_8DhGV0aDKQc6pfXHAAAHAyAAAAAAAAAIJpZIJ2NIJpcISl6LTmiXNlY3AyNTZrMaEDHlSNOgYrNWP8_l_WXqDMRvjv6gUAvHKizfqDDVc8feaDdGNwgiMog3VkcIIjKA
|
||||
- enr:-MK4QI-wkVW1PxL4ksUM4H_hMgTTwxKMzvvDMfoiwPBuRxcsGkrGPLo4Kho3Ri1DEtJG4B6pjXddbzA9iF2gVctxv42GAX9v5WG5h2F0dG5ldHOIAAAAAAAAAACEZXRoMpBzql9ccAAAcDIAAAAAAAAAgmlkgnY0gmlwhKRcjMiJc2VjcDI1NmsxoQK1fc46pmVHKq8HNYLkSVaUv4uK2UBsGgjjGWU6AAhAY4hzeW5jbmV0cwCDdGNwgiMog3VkcIIjKA
|
@ -1,69 +0,0 @@
|
||||
# Extends the mainnet preset
|
||||
CONFIG_NAME: 'kiln'
|
||||
PRESET_BASE: 'mainnet'
|
||||
# Genesis
|
||||
# ---------------------------------------------------------------
|
||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 95000
|
||||
# Mar 11th, 2022, 14:00 UTC
|
||||
MIN_GENESIS_TIME: 1647007200
|
||||
# Genesis fork
|
||||
GENESIS_FORK_VERSION: 0x70000069
|
||||
# 300 seconds (5 min)
|
||||
GENESIS_DELAY: 300
|
||||
|
||||
|
||||
# Forking
|
||||
# ---------------------------------------------------------------
|
||||
# Some forks are disabled for now:
|
||||
# - These may be re-assigned to another fork-version later
|
||||
# - Temporarily set to max uint64 value: 2**64 - 1
|
||||
|
||||
# Altair
|
||||
ALTAIR_FORK_VERSION: 0x70000070
|
||||
ALTAIR_FORK_EPOCH: 50
|
||||
# Bellatrix
|
||||
BELLATRIX_FORK_VERSION: 0x70000071
|
||||
BELLATRIX_FORK_EPOCH: 150
|
||||
TERMINAL_TOTAL_DIFFICULTY: 20000000000000
|
||||
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
|
||||
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
|
||||
|
||||
# Sharding
|
||||
SHARDING_FORK_VERSION: 0x03000000
|
||||
SHARDING_FORK_EPOCH: 18446744073709551615
|
||||
|
||||
|
||||
# Time parameters
|
||||
# ---------------------------------------------------------------
|
||||
# 12 seconds
|
||||
SECONDS_PER_SLOT: 12
|
||||
# 14 (estimate from Eth1 mainnet)
|
||||
SECONDS_PER_ETH1_BLOCK: 14
|
||||
# 2**8 (= 256) epochs ~27 hours
|
||||
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
|
||||
# 2**8 (= 256) epochs ~27 hours
|
||||
SHARD_COMMITTEE_PERIOD: 256
|
||||
# 16 blocks is ~190s
|
||||
ETH1_FOLLOW_DISTANCE: 16
|
||||
|
||||
|
||||
# Validator cycle
|
||||
# ---------------------------------------------------------------
|
||||
# 2**2 (= 4)
|
||||
INACTIVITY_SCORE_BIAS: 4
|
||||
# 2**4 (= 16)
|
||||
INACTIVITY_SCORE_RECOVERY_RATE: 16
|
||||
# 2**4 * 10**9 (= 16,000,000,000) Gwei
|
||||
EJECTION_BALANCE: 16000000000
|
||||
# 2**2 (= 4)
|
||||
MIN_PER_EPOCH_CHURN_LIMIT: 4
|
||||
# 2**16 (= 65,536)
|
||||
CHURN_LIMIT_QUOTIENT: 65536
|
||||
|
||||
|
||||
# Deposit contract
|
||||
# ---------------------------------------------------------------
|
||||
# Custom Ethereum testnet
|
||||
DEPOSIT_CHAIN_ID: 1337802
|
||||
DEPOSIT_NETWORK_ID: 1337802
|
||||
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242
|
@ -1 +0,0 @@
|
||||
0
|
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
# Pari
|
||||
- enr:-Iq4QMCTfIMXnow27baRUb35Q8iiFHSIDBJh6hQM5Axohhf4b6Kr_cOCu0htQ5WvVqKvFgY28893DHAg8gnBAXsAVqmGAX53x8JggmlkgnY0gmlwhLKAlv6Jc2VjcDI1NmsxoQK6S-Cii_KmfFdUJL2TANL3ksaKUnNXvTCv1tLwXs0QgIN1ZHCCIyk
|
||||
# Teku
|
||||
- enr:-KG4QMJSJ7DHk6v2p-W8zQ3Xv7FfssZ_1E3p2eY6kN13staMObUonAurqyWhODoeY6edXtV8e9eL9RnhgZ9va2SMDRQMhGV0aDKQS-iVMYAAAHD0AQAAAAAAAIJpZIJ2NIJpcIQDhAAhiXNlY3AyNTZrMaEDXBVUZhhmdy1MYor1eGdRJ4vHYghFKDgjyHgt6sJ-IlCDdGNwgiMog3VkcIIjKA
|
@ -1,71 +0,0 @@
|
||||
# Extends the mainnet preset
|
||||
PRESET_BASE: 'mainnet'
|
||||
CONFIG_NAME: 'ropsten'
|
||||
|
||||
# Genesis
|
||||
# ---------------------------------------------------------------
|
||||
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 100000
|
||||
# Monday, May 30th, 2022 3:00:00 PM +UTC
|
||||
MIN_GENESIS_TIME: 1653318000
|
||||
GENESIS_FORK_VERSION: 0x80000069
|
||||
GENESIS_DELAY: 604800
|
||||
|
||||
|
||||
# Forking
|
||||
# ---------------------------------------------------------------
|
||||
# Some forks are disabled for now:
|
||||
# - These may be re-assigned to another fork-version later
|
||||
# - Temporarily set to max uint64 value: 2**64 - 1
|
||||
|
||||
# Altair
|
||||
ALTAIR_FORK_VERSION: 0x80000070
|
||||
ALTAIR_FORK_EPOCH: 500
|
||||
# Merge
|
||||
BELLATRIX_FORK_VERSION: 0x80000071
|
||||
BELLATRIX_FORK_EPOCH: 750
|
||||
TERMINAL_TOTAL_DIFFICULTY: 50000000000000000
|
||||
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
|
||||
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615
|
||||
|
||||
# Sharding
|
||||
SHARDING_FORK_VERSION: 0x03001020
|
||||
SHARDING_FORK_EPOCH: 18446744073709551615
|
||||
|
||||
# Time parameters
|
||||
# ---------------------------------------------------------------
|
||||
# 12 seconds
|
||||
SECONDS_PER_SLOT: 12
|
||||
# 14 (estimate from Eth1 mainnet)
|
||||
SECONDS_PER_ETH1_BLOCK: 14
|
||||
# 2**8 (= 256) epochs ~27 hours
|
||||
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
|
||||
# 2**8 (= 256) epochs ~27 hours
|
||||
SHARD_COMMITTEE_PERIOD: 256
|
||||
# 2**11 (= 2,048) Eth1 blocks ~8 hours
|
||||
ETH1_FOLLOW_DISTANCE: 2048
|
||||
|
||||
|
||||
# Validator cycle
|
||||
# ---------------------------------------------------------------
|
||||
# 2**2 (= 4)
|
||||
INACTIVITY_SCORE_BIAS: 4
|
||||
# 2**4 (= 16)
|
||||
INACTIVITY_SCORE_RECOVERY_RATE: 16
|
||||
# 2**4 * 10**9 (= 16,000,000,000) Gwei
|
||||
EJECTION_BALANCE: 16000000000
|
||||
# 2**2 (= 4)
|
||||
MIN_PER_EPOCH_CHURN_LIMIT: 4
|
||||
# 2**16 (= 65,536)
|
||||
CHURN_LIMIT_QUOTIENT: 65536
|
||||
|
||||
|
||||
# Fork choice
|
||||
# ---------------------------------------------------------------
|
||||
# 40%
|
||||
PROPOSER_SCORE_BOOST: 40
|
||||
|
||||
# Deposit contract
|
||||
# ---------------------------------------------------------------
|
||||
DEPOSIT_CHAIN_ID: 3
|
||||
DEPOSIT_NETWORK_ID: 3
|
||||
DEPOSIT_CONTRACT_ADDRESS: 0x6f22fFbC56eFF051aECF839396DD1eD9aD6BBA9D
|
@ -1 +0,0 @@
|
||||
12269949
|
Binary file not shown.
@ -7,7 +7,7 @@ use std::{env, fs::File};
|
||||
use tempfile::TempDir;
|
||||
use unused_port::unused_tcp_port;
|
||||
|
||||
// const GETH_BRANCH: &str = "master";
|
||||
const GETH_BRANCH: &str = "master";
|
||||
const GETH_REPO_URL: &str = "https://github.com/ethereum/go-ethereum";
|
||||
|
||||
pub fn build_result(repo_dir: &Path) -> Output {
|
||||
@ -27,9 +27,7 @@ pub fn build(execution_clients_dir: &Path) {
|
||||
}
|
||||
|
||||
// Get the latest tag on the branch
|
||||
// TODO: Update when version is corrected
|
||||
// let last_release = build_utils::get_latest_release(&repo_dir, GETH_BRANCH).unwrap();
|
||||
let last_release = "v1.11.1";
|
||||
let last_release = build_utils::get_latest_release(&repo_dir, GETH_BRANCH).unwrap();
|
||||
build_utils::checkout(&repo_dir, dbg!(&last_release)).unwrap();
|
||||
|
||||
// Build geth
|
||||
|
@ -427,7 +427,16 @@ impl<E: GenericExecutionEngine> TestRig<E> {
|
||||
.notify_new_payload(&invalid_payload)
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(matches!(status, PayloadStatus::InvalidBlockHash { .. }));
|
||||
assert!(matches!(
|
||||
status,
|
||||
PayloadStatus::InvalidBlockHash { .. }
|
||||
// Geth is returning `INVALID` with a `null` LVH to indicate it
|
||||
// does not know the invalid ancestor.
|
||||
| PayloadStatus::Invalid {
|
||||
latest_valid_hash: None,
|
||||
..
|
||||
}
|
||||
));
|
||||
|
||||
/*
|
||||
* Execution Engine A:
|
||||
|
@ -660,17 +660,17 @@ mod tests {
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn ropsten_base_types() {
|
||||
test_base_types("ropsten", 4250).await
|
||||
async fn sepolia_base_types() {
|
||||
test_base_types("sepolia", 4250).await
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn ropsten_altair_types() {
|
||||
test_altair_types("ropsten", 4251).await
|
||||
async fn sepolia_altair_types() {
|
||||
test_altair_types("sepolia", 4251).await
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn ropsten_merge_types() {
|
||||
test_merge_types("ropsten", 4252).await
|
||||
async fn sepolia_merge_types() {
|
||||
test_merge_types("sepolia", 4252).await
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ use crate::http_metrics::metrics::{inc_counter_vec, ENDPOINT_ERRORS, ENDPOINT_RE
|
||||
use environment::RuntimeContext;
|
||||
use eth2::BeaconNodeHttpClient;
|
||||
use futures::future;
|
||||
use slog::{error, info, warn, Logger};
|
||||
use slog::{debug, error, info, warn, Logger};
|
||||
use slot_clock::SlotClock;
|
||||
use std::fmt;
|
||||
use std::fmt::Debug;
|
||||
@ -409,10 +409,12 @@ impl<T: SlotClock, E: EthSpec> BeaconNodeFallback<T, E> {
|
||||
where
|
||||
F: Fn(&'a BeaconNodeHttpClient) -> R,
|
||||
R: Future<Output = Result<O, Err>>,
|
||||
Err: Debug,
|
||||
{
|
||||
let mut errors = vec![];
|
||||
let mut to_retry = vec![];
|
||||
let mut retry_unsynced = vec![];
|
||||
let log = &self.log.clone();
|
||||
|
||||
// Run `func` using a `candidate`, returning the value or capturing errors.
|
||||
//
|
||||
@ -427,6 +429,12 @@ impl<T: SlotClock, E: EthSpec> BeaconNodeFallback<T, E> {
|
||||
match func(&$candidate.beacon_node).await {
|
||||
Ok(val) => return Ok(val),
|
||||
Err(e) => {
|
||||
debug!(
|
||||
log,
|
||||
"Request to beacon node failed";
|
||||
"node" => $candidate.beacon_node.to_string(),
|
||||
"error" => ?e,
|
||||
);
|
||||
// If we have an error on this function, make the client as not-ready.
|
||||
//
|
||||
// There exists a race condition where the candidate may have been marked
|
||||
@ -626,6 +634,7 @@ impl<T: SlotClock, E: EthSpec> BeaconNodeFallback<T, E> {
|
||||
where
|
||||
F: Fn(&'a BeaconNodeHttpClient) -> R,
|
||||
R: Future<Output = Result<(), Err>>,
|
||||
Err: Debug,
|
||||
{
|
||||
if self.disable_run_on_all {
|
||||
self.first_success(require_synced, offline_on_failure, func)
|
||||
|
Loading…
Reference in New Issue
Block a user