mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-31 05:07:12 +00:00
Deprecate gossip blobs (#9126)
#9124 Deprecate unneeded pre-Fulu blob features - blob gossip - blob lookup sync - engine getBlobsV1 Also deprecates some tests and cleans up production code paths I think this is blocked until gnosis forks to fulu? Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com> Co-Authored-By: dapplion <35266934+dapplion@users.noreply.github.com> Co-Authored-By: Pawan Dhananjay <pawandhananjay@gmail.com> Co-Authored-By: Michael Sproul <michael@sigmaprime.io> Co-Authored-By: Daniel Knopik <daniel@dknopik.de> Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
@@ -1587,7 +1587,7 @@ pub async fn block_seen_on_gossip_without_blobs_or_columns() {
|
||||
let state = tester.harness.get_current_state();
|
||||
let fork_name = state.fork_name(&tester.harness.spec).unwrap();
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes).
|
||||
if !fork_name.deneb_enabled() || fork_name.gloas_enabled() {
|
||||
if !fork_name.fulu_enabled() || fork_name.gloas_enabled() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1647,7 +1647,7 @@ pub async fn block_seen_on_gossip_without_blobs_or_columns() {
|
||||
/// This test checks that an HTTP POST request with the block & blobs/columns succeeds with a 200 response
|
||||
/// even if the block has already been seen on gossip without all blobs/columns.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
pub async fn block_seen_on_gossip_with_some_blobs_or_columns() {
|
||||
pub async fn block_seen_on_gossip_with_columns() {
|
||||
let validation_level: Option<BroadcastValidation> = Some(BroadcastValidation::Gossip);
|
||||
|
||||
// Validator count needs to be at least 32 or proposer boost gets set to 0 when computing
|
||||
@@ -1658,7 +1658,7 @@ pub async fn block_seen_on_gossip_with_some_blobs_or_columns() {
|
||||
let state = tester.harness.get_current_state();
|
||||
let fork_name = state.fork_name(&tester.harness.spec).unwrap();
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes).
|
||||
if !fork_name.deneb_enabled() || fork_name.gloas_enabled() {
|
||||
if !fork_name.fulu_enabled() || fork_name.gloas_enabled() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1690,9 +1690,6 @@ pub async fn block_seen_on_gossip_with_some_blobs_or_columns() {
|
||||
blobs.0.len()
|
||||
);
|
||||
|
||||
let partial_kzg_proofs = [*blobs.0.first().unwrap()];
|
||||
let partial_blobs = [blobs.1.first().unwrap().clone()];
|
||||
|
||||
// Simulate the block being seen on gossip.
|
||||
block
|
||||
.clone()
|
||||
@@ -1702,12 +1699,7 @@ pub async fn block_seen_on_gossip_with_some_blobs_or_columns() {
|
||||
// Simulate some of the blobs being seen on gossip.
|
||||
tester
|
||||
.harness
|
||||
.process_gossip_blobs_or_columns(
|
||||
&block,
|
||||
partial_blobs.iter(),
|
||||
partial_kzg_proofs.iter(),
|
||||
Some(get_custody_columns(&tester, block.slot())),
|
||||
)
|
||||
.process_gossip_columns(&block, Some(get_custody_columns(&tester, block.slot())))
|
||||
.await;
|
||||
|
||||
// It should not yet be added to fork choice because all blobs have not been seen.
|
||||
@@ -1740,7 +1732,7 @@ pub async fn block_seen_on_gossip_with_some_blobs_or_columns() {
|
||||
/// This test checks that an HTTP POST request with the block & blobs/columns succeeds with a 200 response
|
||||
/// even if the blobs/columns have already been seen on gossip.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
pub async fn blobs_or_columns_seen_on_gossip_without_block() {
|
||||
pub async fn columns_seen_on_gossip_without_block() {
|
||||
let spec = test_spec::<E>();
|
||||
let validation_level: Option<BroadcastValidation> = Some(BroadcastValidation::Gossip);
|
||||
|
||||
@@ -1752,7 +1744,7 @@ pub async fn blobs_or_columns_seen_on_gossip_without_block() {
|
||||
let state = tester.harness.get_current_state();
|
||||
let fork_name = state.fork_name(&tester.harness.spec).unwrap();
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes).
|
||||
if !fork_name.deneb_enabled() || fork_name.gloas_enabled() {
|
||||
if !fork_name.fulu_enabled() || fork_name.gloas_enabled() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1778,12 +1770,7 @@ pub async fn blobs_or_columns_seen_on_gossip_without_block() {
|
||||
// Simulate the blobs being seen on gossip.
|
||||
tester
|
||||
.harness
|
||||
.process_gossip_blobs_or_columns(
|
||||
&block,
|
||||
blobs.iter(),
|
||||
kzg_proofs.iter(),
|
||||
Some(get_custody_columns(&tester, block.slot())),
|
||||
)
|
||||
.process_gossip_columns(&block, Some(get_custody_columns(&tester, block.slot())))
|
||||
.await;
|
||||
|
||||
// It should not yet be added to fork choice because the block has not been seen.
|
||||
@@ -1816,7 +1803,7 @@ pub async fn blobs_or_columns_seen_on_gossip_without_block() {
|
||||
/// This test checks that an HTTP POST request with the block succeeds with a 200 response
|
||||
/// if just the blobs have already been seen on gossip.
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn blobs_or_columns_seen_on_gossip_without_block_and_no_http_blobs_or_columns() {
|
||||
async fn columns_seen_on_gossip_without_block_and_no_http_columns() {
|
||||
let validation_level: Option<BroadcastValidation> = Some(BroadcastValidation::Gossip);
|
||||
|
||||
// Validator count needs to be at least 32 or proposer boost gets set to 0 when computing
|
||||
@@ -1827,7 +1814,7 @@ async fn blobs_or_columns_seen_on_gossip_without_block_and_no_http_blobs_or_colu
|
||||
let state = tester.harness.get_current_state();
|
||||
let fork_name = state.fork_name(&tester.harness.spec).unwrap();
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes).
|
||||
if !fork_name.deneb_enabled() || fork_name.gloas_enabled() {
|
||||
if !fork_name.fulu_enabled() || fork_name.gloas_enabled() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1848,18 +1835,13 @@ async fn blobs_or_columns_seen_on_gossip_without_block_and_no_http_blobs_or_colu
|
||||
|
||||
let state_a = tester.harness.get_current_state();
|
||||
let ((block, blobs), _) = tester.harness.make_block(state_a, slot_b).await;
|
||||
let (kzg_proofs, blobs) = blobs.expect("should have some blobs");
|
||||
let (_, blobs) = blobs.expect("should have some blobs");
|
||||
assert!(!blobs.is_empty());
|
||||
|
||||
// Simulate the blobs being seen on gossip.
|
||||
tester
|
||||
.harness
|
||||
.process_gossip_blobs_or_columns(
|
||||
&block,
|
||||
blobs.iter(),
|
||||
kzg_proofs.iter(),
|
||||
Some(get_custody_columns(&tester, block.slot())),
|
||||
)
|
||||
.process_gossip_columns(&block, Some(get_custody_columns(&tester, block.slot())))
|
||||
.await;
|
||||
|
||||
// It should not yet be added to fork choice because the block has not been seen.
|
||||
@@ -1893,7 +1875,7 @@ async fn blobs_or_columns_seen_on_gossip_without_block_and_no_http_blobs_or_colu
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
|
||||
async fn slashable_blobs_or_columns_seen_on_gossip_cause_failure() {
|
||||
async fn slashable_columns_seen_on_gossip_cause_failure() {
|
||||
let validation_level: Option<BroadcastValidation> =
|
||||
Some(BroadcastValidation::ConsensusAndEquivocation);
|
||||
|
||||
@@ -1905,7 +1887,7 @@ async fn slashable_blobs_or_columns_seen_on_gossip_cause_failure() {
|
||||
let state = tester.harness.get_current_state();
|
||||
let fork_name = state.fork_name(&tester.harness.spec).unwrap();
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes).
|
||||
if !fork_name.deneb_enabled() || fork_name.gloas_enabled() {
|
||||
if !fork_name.fulu_enabled() || fork_name.gloas_enabled() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1926,19 +1908,13 @@ async fn slashable_blobs_or_columns_seen_on_gossip_cause_failure() {
|
||||
|
||||
let state_a = tester.harness.get_current_state();
|
||||
let ((block_a, blobs_a), _) = tester.harness.make_block(state_a.clone(), slot_b).await;
|
||||
let ((block_b, blobs_b), _) = tester.harness.make_block(state_a, slot_b).await;
|
||||
let ((block_b, _), _) = tester.harness.make_block(state_a, slot_b).await;
|
||||
let (kzg_proofs_a, blobs_a) = blobs_a.expect("should have some blobs");
|
||||
let (kzg_proofs_b, blobs_b) = blobs_b.expect("should have some blobs");
|
||||
|
||||
// Simulate the blobs of block B being seen on gossip.
|
||||
tester
|
||||
.harness
|
||||
.process_gossip_blobs_or_columns(
|
||||
&block_b,
|
||||
blobs_b.iter(),
|
||||
kzg_proofs_b.iter(),
|
||||
Some(get_custody_columns(&tester, block_b.slot())),
|
||||
)
|
||||
.process_gossip_columns(&block_b, Some(get_custody_columns(&tester, block_b.slot())))
|
||||
.await;
|
||||
|
||||
// It should not yet be added to fork choice because block B has not been seen.
|
||||
@@ -1984,7 +1960,7 @@ pub async fn duplicate_block_status_code() {
|
||||
// Gloas blocks don't carry blobs (execution data comes via envelopes).
|
||||
let spec = test_spec::<E>();
|
||||
let genesis_fork = spec.fork_name_at_slot::<E>(Slot::new(0));
|
||||
if !genesis_fork.deneb_enabled() || genesis_fork.gloas_enabled() {
|
||||
if !genesis_fork.fulu_enabled() || genesis_fork.gloas_enabled() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user