mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user