don't expect context bytes for blob messages
This commit is contained in:
parent
9c46a1cb21
commit
a67fa516c7
@ -570,38 +570,42 @@ fn handle_v1_response<T: EthSpec>(
|
|||||||
SignedBeaconBlock::Base(SignedBeaconBlockBase::from_ssz_bytes(decoded_buffer)?),
|
SignedBeaconBlock::Base(SignedBeaconBlockBase::from_ssz_bytes(decoded_buffer)?),
|
||||||
)))),
|
)))),
|
||||||
Protocol::BlobsByRange => {
|
Protocol::BlobsByRange => {
|
||||||
let fork_name = fork_name.take().ok_or_else(|| {
|
Ok(Some(RPCResponse::BlobsByRange(Arc::new(
|
||||||
RPCError::ErrorResponse(
|
BlobsSidecar::from_ssz_bytes(decoded_buffer)?,
|
||||||
RPCResponseErrorCode::InvalidRequest,
|
))))
|
||||||
format!("No context bytes provided for {} response", protocol),
|
//FIXME(sean) do we need context bytes?
|
||||||
)
|
// let fork_name = fork_name.take().ok_or_else(|| {
|
||||||
})?;
|
// RPCError::ErrorResponse(
|
||||||
match fork_name {
|
// RPCResponseErrorCode::InvalidRequest,
|
||||||
ForkName::Eip4844 => Ok(Some(RPCResponse::BlobsByRange(Arc::new(
|
// format!("No context bytes provided for {} response", protocol),
|
||||||
BlobsSidecar::from_ssz_bytes(decoded_buffer)?,
|
// )
|
||||||
)))),
|
// })?;
|
||||||
_ => Err(RPCError::ErrorResponse(
|
// match fork_name {
|
||||||
RPCResponseErrorCode::InvalidRequest,
|
// ForkName::Eip4844 => ,
|
||||||
"Invalid forkname for blobsbyrange".to_string(),
|
// _ => Err(RPCError::ErrorResponse(
|
||||||
)),
|
// RPCResponseErrorCode::InvalidRequest,
|
||||||
}
|
// "Invalid forkname for blobsbyrange".to_string(),
|
||||||
|
// )),
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
Protocol::BlobsByRoot => {
|
Protocol::BlobsByRoot => {
|
||||||
let fork_name = fork_name.take().ok_or_else(|| {
|
Ok(Some(RPCResponse::BlobsByRoot(Arc::new(
|
||||||
RPCError::ErrorResponse(
|
SignedBeaconBlockAndBlobsSidecar::from_ssz_bytes(decoded_buffer)?,
|
||||||
RPCResponseErrorCode::InvalidRequest,
|
))))
|
||||||
format!("No context bytes provided for {} response", protocol),
|
//FIXME(sean) do we need context bytes?
|
||||||
)
|
// let fork_name = fork_name.take().ok_or_else(|| {
|
||||||
})?;
|
// RPCError::ErrorResponse(
|
||||||
match fork_name {
|
// RPCResponseErrorCode::InvalidRequest,
|
||||||
ForkName::Eip4844 => Ok(Some(RPCResponse::BlobsByRoot(Arc::new(
|
// format!("No context bytes provided for {} response", protocol),
|
||||||
SignedBeaconBlockAndBlobsSidecar::from_ssz_bytes(decoded_buffer)?,
|
// )
|
||||||
)))),
|
// })?;
|
||||||
_ => Err(RPCError::ErrorResponse(
|
// match fork_name {
|
||||||
RPCResponseErrorCode::InvalidRequest,
|
// ForkName::Eip4844 =>
|
||||||
"Invalid forkname for blobsbyroot".to_string(),
|
// _ => Err(RPCError::ErrorResponse(
|
||||||
)),
|
// RPCResponseErrorCode::InvalidRequest,
|
||||||
}
|
// "Invalid forkname for blobsbyroot".to_string(),
|
||||||
|
// )),
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
Protocol::Ping => Ok(Some(RPCResponse::Pong(Ping {
|
Protocol::Ping => Ok(Some(RPCResponse::Pong(Ping {
|
||||||
data: u64::from_ssz_bytes(decoded_buffer)?,
|
data: u64::from_ssz_bytes(decoded_buffer)?,
|
||||||
|
@ -503,6 +503,8 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_blobs(&self, block_root: &Hash256) -> Result<Option<BlobsSidecar<E>>, Error> {
|
pub fn get_blobs(&self, block_root: &Hash256) -> Result<Option<BlobsSidecar<E>>, Error> {
|
||||||
|
// FIXME(sean) I was attempting to use a blob cache here but was getting deadlocks,
|
||||||
|
// may want to attempt to use one again
|
||||||
if let Some(bytes) = self
|
if let Some(bytes) = self
|
||||||
.hot_db
|
.hot_db
|
||||||
.get_bytes(DBColumn::BeaconBlob.into(), block_root.as_bytes())?
|
.get_bytes(DBColumn::BeaconBlob.into(), block_root.as_bytes())?
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
"berlinBlock": 0,
|
"berlinBlock": 0,
|
||||||
"londonBlock": 0,
|
"londonBlock": 0,
|
||||||
"mergeNetsplitBlock": 0,
|
"mergeNetsplitBlock": 0,
|
||||||
"shanghaiTime": 0,
|
"shanghaiTime": 1671582851,
|
||||||
"shardingForkTime": 0,
|
"shardingForkTime": 1671582947,
|
||||||
"terminalTotalDifficulty": 0
|
"terminalTotalDifficulty": 0
|
||||||
},
|
},
|
||||||
"alloc": {
|
"alloc": {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
GETH_BINARY=geth
|
GETH_BINARY=/home/sean/CLionProjects/eip4844-interop/geth/go-ethereum/build/bin/geth
|
||||||
|
|
||||||
# Base directories for the validator keys and secrets
|
# Base directories for the validator keys and secrets
|
||||||
DATADIR=~/.lighthouse/local-testnet
|
DATADIR=~/.lighthouse/local-testnet
|
||||||
|
Loading…
Reference in New Issue
Block a user