mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 04:31:51 +00:00
Add Gloas data column support (#8682)
Co-Authored-By: Eitan Seri-Levi <eserilev@ucsc.edu> Co-Authored-By: Eitan Seri- Levi <eserilev@gmail.com>
This commit is contained in:
@@ -693,7 +693,7 @@ fn handle_rpc_response<E: EthSpec>(
|
||||
Some(fork_name) => {
|
||||
if fork_name.fulu_enabled() {
|
||||
Ok(Some(RpcSuccessResponse::DataColumnsByRoot(Arc::new(
|
||||
DataColumnSidecar::from_ssz_bytes(decoded_buffer)?,
|
||||
DataColumnSidecar::from_ssz_bytes_for_fork(decoded_buffer, fork_name)?,
|
||||
))))
|
||||
} else {
|
||||
Err(RPCError::ErrorResponse(
|
||||
@@ -714,7 +714,7 @@ fn handle_rpc_response<E: EthSpec>(
|
||||
Some(fork_name) => {
|
||||
if fork_name.fulu_enabled() {
|
||||
Ok(Some(RpcSuccessResponse::DataColumnsByRange(Arc::new(
|
||||
DataColumnSidecar::from_ssz_bytes(decoded_buffer)?,
|
||||
DataColumnSidecar::from_ssz_bytes_for_fork(decoded_buffer, fork_name)?,
|
||||
))))
|
||||
} else {
|
||||
Err(RPCError::ErrorResponse(
|
||||
@@ -916,6 +916,7 @@ mod tests {
|
||||
SignedBeaconBlockHeader, Slot,
|
||||
data::{BlobIdentifier, Cell},
|
||||
};
|
||||
use types::{BlobSidecar, DataColumnSidecarFulu};
|
||||
|
||||
type Spec = types::MainnetEthSpec;
|
||||
|
||||
@@ -977,7 +978,7 @@ mod tests {
|
||||
fn empty_data_column_sidecar(spec: &ChainSpec) -> Arc<DataColumnSidecar<Spec>> {
|
||||
// The context bytes are now derived from the block epoch, so we need to have the slot set
|
||||
// here.
|
||||
let data_column_sidecar = DataColumnSidecar {
|
||||
let data_column_sidecar = DataColumnSidecar::Fulu(DataColumnSidecarFulu {
|
||||
index: 0,
|
||||
column: VariableList::new(vec![Cell::<Spec>::default()]).unwrap(),
|
||||
kzg_commitments: VariableList::new(vec![KzgCommitment::empty_for_testing()]).unwrap(),
|
||||
@@ -993,7 +994,7 @@ mod tests {
|
||||
signature: Signature::empty(),
|
||||
},
|
||||
kzg_commitments_inclusion_proof: Default::default(),
|
||||
};
|
||||
});
|
||||
Arc::new(data_column_sidecar)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user