mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-18 21:38:31 +00:00
Encode DataColumn responses with Electra context bytes (#6313)
* Use Electra context bytes if PeerDAS is not activated in Deneb. Remove some outdated `das` TODOs. * Fix lint.
This commit is contained in:
@@ -3122,8 +3122,6 @@ impl<T: BeaconChainTypes> BeaconChain<T> {
|
||||
return Err(BlockError::BlockIsAlreadyKnown(block_root));
|
||||
}
|
||||
|
||||
// TODO(das): custody column SSE event
|
||||
|
||||
let r = self
|
||||
.check_rpc_custody_columns_availability_and_import(slot, block_root, custody_columns)
|
||||
.await;
|
||||
|
||||
@@ -423,14 +423,19 @@ fn context_bytes<E: EthSpec>(
|
||||
}
|
||||
};
|
||||
}
|
||||
RPCResponse::BlobsByRange(_)
|
||||
| RPCResponse::BlobsByRoot(_)
|
||||
| RPCResponse::DataColumnsByRoot(_)
|
||||
| RPCResponse::DataColumnsByRange(_) => {
|
||||
// TODO(das): If DataColumnSidecar is defined as an Electra type, update the
|
||||
// context bytes to point to ForkName::Electra
|
||||
RPCResponse::BlobsByRange(_) | RPCResponse::BlobsByRoot(_) => {
|
||||
return fork_context.to_context_bytes(ForkName::Deneb);
|
||||
}
|
||||
RPCResponse::DataColumnsByRoot(_) | RPCResponse::DataColumnsByRange(_) => {
|
||||
// TODO(das): Remove deneb fork after `peerdas-devnet-2`.
|
||||
return if fork_context.spec.eip7594_fork_epoch
|
||||
== fork_context.spec.deneb_fork_epoch
|
||||
{
|
||||
fork_context.to_context_bytes(ForkName::Deneb)
|
||||
} else {
|
||||
fork_context.to_context_bytes(ForkName::Electra)
|
||||
};
|
||||
}
|
||||
RPCResponse::LightClientBootstrap(lc_bootstrap) => {
|
||||
return lc_bootstrap
|
||||
.map_with_fork_name(|fork_name| fork_context.to_context_bytes(fork_name));
|
||||
|
||||
@@ -766,7 +766,6 @@ impl<T: BeaconChainTypes> SyncNetworkContext<T> {
|
||||
.imported_custody_column_indexes(&block_root)
|
||||
.unwrap_or_default();
|
||||
|
||||
// TODO(das): figure out how to pass block.slot if we end up doing rotation
|
||||
let custody_indexes_duty = self.network_globals().custody_columns();
|
||||
|
||||
// Include only the blob indexes not yet imported (received through gossip)
|
||||
|
||||
Reference in New Issue
Block a user