mirror of
https://github.com/sigp/lighthouse.git
synced 2026-06-18 22:49:34 +00:00
Merge remote-tracking branch 'sigp/unstable' into gloas-range-sync
This commit is contained in:
@@ -10,7 +10,7 @@ use beacon_chain::{
|
||||
custody_context::NodeCustodyType,
|
||||
test_utils::{
|
||||
AttestationStrategy, BeaconChainHarness, BlockStrategy, EphemeralHarnessType,
|
||||
MakeAttestationOptions, test_spec,
|
||||
MakeAttestationOptions, fork_name_from_env, test_spec,
|
||||
},
|
||||
};
|
||||
use beacon_chain::{
|
||||
@@ -388,6 +388,10 @@ fn update_data_column_signed_header<E: EthSpec>(
|
||||
|
||||
#[tokio::test]
|
||||
async fn chain_segment_full_segment() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let harness = get_harness(VALIDATOR_COUNT, NodeCustodyType::Fullnode);
|
||||
let (chain_segment, chain_segment_blobs) = get_chain_segment().await;
|
||||
store_envelopes_for_chain_segment(&chain_segment, &harness);
|
||||
@@ -428,6 +432,10 @@ async fn chain_segment_full_segment() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn chain_segment_varying_chunk_size() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, chain_segment_blobs) = get_chain_segment().await;
|
||||
let harness = get_harness(VALIDATOR_COUNT, NodeCustodyType::Fullnode);
|
||||
let blocks: Vec<RangeSyncBlock<E>> =
|
||||
@@ -734,6 +742,10 @@ async fn get_invalid_sigs_harness(
|
||||
}
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_gossip_block() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, chain_segment_blobs) = get_chain_segment().await;
|
||||
for &block_index in BLOCK_INDICES {
|
||||
// Ensure the block will be rejected if imported on its own (without gossip checking).
|
||||
@@ -795,6 +807,10 @@ async fn invalid_signature_gossip_block() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_block_proposal() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, chain_segment_blobs) = get_chain_segment().await;
|
||||
for &block_index in BLOCK_INDICES {
|
||||
let harness = get_invalid_sigs_harness(&chain_segment).await;
|
||||
@@ -839,6 +855,10 @@ async fn invalid_signature_block_proposal() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_randao_reveal() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, mut chain_segment_blobs) = get_chain_segment().await;
|
||||
for &block_index in BLOCK_INDICES {
|
||||
let harness = get_invalid_sigs_harness(&chain_segment).await;
|
||||
@@ -868,6 +888,10 @@ async fn invalid_signature_randao_reveal() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_proposer_slashing() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, mut chain_segment_blobs) = get_chain_segment().await;
|
||||
for &block_index in BLOCK_INDICES {
|
||||
let harness = get_invalid_sigs_harness(&chain_segment).await;
|
||||
@@ -911,6 +935,10 @@ async fn invalid_signature_proposer_slashing() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_attester_slashing() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, mut chain_segment_blobs) = get_chain_segment().await;
|
||||
for &block_index in BLOCK_INDICES {
|
||||
let harness = get_invalid_sigs_harness(&chain_segment).await;
|
||||
@@ -1033,6 +1061,10 @@ async fn invalid_signature_attester_slashing() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_attestation() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, mut chain_segment_blobs) = get_chain_segment().await;
|
||||
let mut checked_attestation = false;
|
||||
|
||||
@@ -1165,6 +1197,10 @@ async fn invalid_signature_deposit() {
|
||||
|
||||
#[tokio::test]
|
||||
async fn invalid_signature_exit() {
|
||||
// TODO(gloas): re-enable for Gloas once range sync imports payload envelopes.
|
||||
if fork_name_from_env().is_some_and(|f| f.gloas_enabled()) {
|
||||
return;
|
||||
}
|
||||
let (chain_segment, mut chain_segment_blobs) = get_chain_segment().await;
|
||||
for &block_index in BLOCK_INDICES {
|
||||
let harness = get_invalid_sigs_harness(&chain_segment).await;
|
||||
|
||||
@@ -3148,6 +3148,14 @@ async fn weak_subjectivity_sync_test(
|
||||
.store
|
||||
.put_payload_envelope(&wss_block_root, &envelope)
|
||||
.unwrap();
|
||||
|
||||
// `from_anchor` doesn't mark the anchor's payload received, so do it here; otherwise the
|
||||
// first forward block (a FULL child of the anchor) would be rejected with `ParentUnknown`.
|
||||
beacon_chain
|
||||
.canonical_head
|
||||
.fork_choice_write_lock()
|
||||
.on_valid_payload_envelope_received(wss_block_root)
|
||||
.unwrap();
|
||||
}
|
||||
|
||||
// Apply blocks forward to reach head.
|
||||
|
||||
Reference in New Issue
Block a user