Skip to content

Commit

Permalink
Fix context bytes logic for DataColumn RPC responses (sigp#6325)
Browse files Browse the repository at this point in the history
* Fix context byte logic for data columns.
  • Loading branch information
jimmygchen authored Sep 1, 2024
1 parent 60157ad commit 002ca2c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions beacon_node/lighthouse_network/src/rpc/codec/ssz_snappy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,11 +426,12 @@ fn context_bytes<E: EthSpec>(
RPCResponse::BlobsByRange(_) | RPCResponse::BlobsByRoot(_) => {
return fork_context.to_context_bytes(ForkName::Deneb);
}
RPCResponse::DataColumnsByRoot(_) | RPCResponse::DataColumnsByRange(_) => {
RPCResponse::DataColumnsByRoot(d) | RPCResponse::DataColumnsByRange(d) => {
// TODO(das): Remove deneb fork after `peerdas-devnet-2`.
return if fork_context.spec.eip7594_fork_epoch
== fork_context.spec.deneb_fork_epoch
{
return if matches!(
fork_context.spec.fork_name_at_slot::<E>(d.slot()),
ForkName::Deneb
) {
fork_context.to_context_bytes(ForkName::Deneb)
} else {
fork_context.to_context_bytes(ForkName::Electra)
Expand Down

0 comments on commit 002ca2c

Please sign in to comment.