Gloas HTTP API tests passing

This commit is contained in:
Michael Sproul
2026-04-21 17:52:31 +10:00
parent 7731b5f250
commit 2021055121
6 changed files with 174 additions and 20 deletions

View File

@@ -1939,7 +1939,7 @@ impl<'de, E: EthSpec> ContextDeserialize<'de, ForkName> for FullBlockContents<E>
where
D: Deserializer<'de>,
{
if context.deneb_enabled() {
if context.deneb_enabled() && !context.gloas_enabled() {
Ok(FullBlockContents::BlockContents(
BlockContents::context_deserialize::<D>(deserializer, context)?,
))
@@ -2124,7 +2124,10 @@ impl<E: EthSpec> PublishBlockRequest<E> {
impl<E: EthSpec> TryFrom<Arc<SignedBeaconBlock<E>>> for PublishBlockRequest<E> {
type Error = &'static str;
fn try_from(block: Arc<SignedBeaconBlock<E>>) -> Result<Self, Self::Error> {
if block.message().fork_name_unchecked().deneb_enabled() {
let fork = block.message().fork_name_unchecked();
// Gloas blocks don't carry blobs (execution data comes via envelopes),
// so they can be published as block-only requests like pre-Deneb blocks.
if fork.deneb_enabled() && !fork.gloas_enabled() {
Err("post-Deneb block contents cannot be fully constructed from just the signed block")
} else {
Ok(PublishBlockRequest::Block(block))