diff --git a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlobSidecars.json b/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlobSidecars.json deleted file mode 100644 index 99b5a3405f8..00000000000 --- a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlobSidecars.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "title" : "BlindedBlobSidecars", - "type" : "object", - "required" : [ "blinded_blob_sidecars" ], - "properties" : { - "blinded_blob_sidecars" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BlindedBlobSidecar" - } - } - } -} \ No newline at end of file diff --git a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlockContents.json b/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlockContents.json index b44377dcf7c..1dd0b09afd2 100644 --- a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlockContents.json +++ b/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlindedBlockContents.json @@ -7,7 +7,10 @@ "$ref" : "#/components/schemas/BeaconBlockDeneb" }, "blinded_blob_sidecars" : { - "$ref" : "#/components/schemas/BlindedBlobSidecars" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BlindedBlobSidecar" + } } } } \ No newline at end of file diff --git a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlobSidecars.json b/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlobSidecars.json deleted file mode 100644 index 965d9c33a17..00000000000 --- a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlobSidecars.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "title" : "BlobSidecars", - "type" : "object", - "required" : [ "blob_sidecars" ], - "properties" : { - "blob_sidecars" : { - "type" : "array", - "items" : { - "$ref" : "#/components/schemas/BlobSidecar" - } - } - } -} \ No newline at end of file diff --git a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlockContents.json b/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlockContents.json index ad1360b81fd..afabf061fcb 100644 --- a/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlockContents.json +++ b/data/beaconrestapi/src/integration-test/resources/tech/pegasys/teku/beaconrestapi/beacon/schema/BlockContents.json @@ -1,13 +1,16 @@ { "title" : "BlockContents", "type" : "object", - "required" : [ "beacon_block", "blob_sidecars" ], + "required" : [ "block", "blob_sidecars" ], "properties" : { - "beacon_block" : { + "block" : { "$ref" : "#/components/schemas/BeaconBlockDeneb" }, "blob_sidecars" : { - "$ref" : "#/components/schemas/BlobSidecars" + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/BlobSidecar" + } } } } \ No newline at end of file diff --git a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BlobSidecars.java b/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BlobSidecars.java deleted file mode 100644 index 83ad6ece86a..00000000000 --- a/data/serializer/src/main/java/tech/pegasys/teku/api/schema/deneb/BlobSidecars.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.api.schema.deneb; - -import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Schema; -import java.util.List; -import java.util.stream.Collectors; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarsSchema; - -public class BlobSidecars { - - @ArraySchema(schema = @Schema(type = "string", format = "byte")) - public final List blobSidecars; - - public BlobSidecars(@JsonProperty("blob_sidecars") final List blobSidecars) { - this.blobSidecars = blobSidecars; - } - - public BlobSidecars( - final tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecars blobSidecars) { - this.blobSidecars = - blobSidecars.getBlobSidecars().stream().map(BlobSidecar::new).collect(Collectors.toList()); - } - - public static BlobSidecars create( - final tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecars blobSidecars) { - return new BlobSidecars(blobSidecars); - } - - public tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecars - asInternalBlobSidecars(final BlobSidecarsSchema blobSidecarsSchema) { - return blobSidecarsSchema.create( - blobSidecars.stream() - .map( - blobSidecar -> - blobSidecar.asInternalBlobSidecar(blobSidecarsSchema.getBlobSidecarSchema())) - .collect(Collectors.toList())); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecars.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecars.java deleted file mode 100644 index d982fdf23a1..00000000000 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecars.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import java.util.List; -import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.infrastructure.ssz.containers.Container1; -import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; - -public class BlindedBlobSidecars - extends Container1> { - - BlindedBlobSidecars(final BlindedBlobSidecarsSchema type, final TreeNode backingNode) { - super(type, backingNode); - } - - public BlindedBlobSidecars( - final BlindedBlobSidecarsSchema schema, final List blindedBlobSidecars) { - super(schema, schema.getBlindedBlobSidecarsSchema().createFromElements(blindedBlobSidecars)); - } - - public List getBlindedBlobSidecars() { - return getField0().asList(); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecarsSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecarsSchema.java deleted file mode 100644 index c6b598b7c19..00000000000 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecarsSchema.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import java.util.List; -import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.infrastructure.ssz.containers.ContainerSchema1; -import tech.pegasys.teku.infrastructure.ssz.schema.SszFieldName; -import tech.pegasys.teku.infrastructure.ssz.schema.SszListSchema; -import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; -import tech.pegasys.teku.spec.config.SpecConfigDeneb; - -public class BlindedBlobSidecarsSchema - extends ContainerSchema1> { - - static final SszFieldName FIELD_BLINDED_BLOB_SIDECARS = () -> "blinded_blob_sidecars"; - - BlindedBlobSidecarsSchema( - final SpecConfigDeneb specConfig, final BlindedBlobSidecarSchema blindedBlobSidecarSchema) { - super( - "BlindedBlobSidecars", - namedSchema( - FIELD_BLINDED_BLOB_SIDECARS, - SszListSchema.create(blindedBlobSidecarSchema, specConfig.getMaxBlobsPerBlock()))); - } - - public static BlindedBlobSidecarsSchema create( - final SpecConfigDeneb specConfig, final BlindedBlobSidecarSchema blindedBlobSidecarSchema) { - return new BlindedBlobSidecarsSchema(specConfig, blindedBlobSidecarSchema); - } - - @SuppressWarnings("unchecked") - public SszListSchema getBlindedBlobSidecarsSchema() { - return (SszListSchema) - getChildSchema(getFieldIndex(FIELD_BLINDED_BLOB_SIDECARS)); - } - - public BlindedBlobSidecarSchema getBlindedBlobSidecarSchema() { - return (BlindedBlobSidecarSchema) getBlindedBlobSidecarsSchema().getElementSchema(); - } - - public BlindedBlobSidecars create(final List blindedBlobSidecars) { - return new BlindedBlobSidecars(this, blindedBlobSidecars); - } - - @Override - public BlindedBlobSidecars createFromBackingNode(final TreeNode node) { - return new BlindedBlobSidecars(this, node); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecars.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecars.java deleted file mode 100644 index 28019774b6e..00000000000 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecars.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import java.util.List; -import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.infrastructure.ssz.containers.Container1; -import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; - -public class BlobSidecars extends Container1> { - - BlobSidecars(final BlobSidecarsSchema type, final TreeNode backingNode) { - super(type, backingNode); - } - - public BlobSidecars(final BlobSidecarsSchema schema, final List blobSidecars) { - super(schema, schema.getBlobSidecarsSchema().createFromElements(blobSidecars)); - } - - public List getBlobSidecars() { - return getField0().asList(); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecarsSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecarsSchema.java deleted file mode 100644 index a8104b44244..00000000000 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecarsSchema.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import java.util.List; -import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.infrastructure.ssz.containers.ContainerSchema1; -import tech.pegasys.teku.infrastructure.ssz.schema.SszFieldName; -import tech.pegasys.teku.infrastructure.ssz.schema.SszListSchema; -import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; -import tech.pegasys.teku.spec.config.SpecConfigDeneb; - -public class BlobSidecarsSchema extends ContainerSchema1> { - - static final SszFieldName FIELD_BLOB_SIDECARS = () -> "blob_sidecars"; - - BlobSidecarsSchema(final SpecConfigDeneb specConfig, final BlobSidecarSchema blobSidecarSchema) { - super( - "BlobSidecars", - namedSchema( - FIELD_BLOB_SIDECARS, - SszListSchema.create(blobSidecarSchema, specConfig.getMaxBlobsPerBlock()))); - } - - public static BlobSidecarsSchema create( - final SpecConfigDeneb specConfig, final BlobSidecarSchema blobSidecarSchema) { - return new BlobSidecarsSchema(specConfig, blobSidecarSchema); - } - - @SuppressWarnings("unchecked") - public SszListSchema getBlobSidecarsSchema() { - return (SszListSchema) getChildSchema(getFieldIndex(FIELD_BLOB_SIDECARS)); - } - - public BlobSidecarSchema getBlobSidecarSchema() { - return (BlobSidecarSchema) getBlobSidecarsSchema().getElementSchema(); - } - - public BlobSidecars create(final List blobSidecars) { - return new BlobSidecars(this, blobSidecars); - } - - @Override - public BlobSidecars createFromBackingNode(final TreeNode node) { - return new BlobSidecars(this, node); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecars.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecars.java deleted file mode 100644 index 2d77a137779..00000000000 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecars.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import java.util.List; -import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.infrastructure.ssz.containers.Container1; -import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; - -public class SignedBlindedBlobSidecars - extends Container1> { - - SignedBlindedBlobSidecars( - final SignedBlindedBlobSidecarsSchema type, final TreeNode backingNode) { - super(type, backingNode); - } - - public SignedBlindedBlobSidecars( - final SignedBlindedBlobSidecarsSchema schema, - final List signedBlobSidecars) { - super( - schema, schema.getSignedBlindedBlobSidecarsSchema().createFromElements(signedBlobSidecars)); - } - - public List getSignedBlindedBlobSidecars() { - return getField0().asList(); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecarsSchema.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecarsSchema.java deleted file mode 100644 index 2a33ddc427c..00000000000 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecarsSchema.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import java.util.List; -import tech.pegasys.teku.infrastructure.ssz.SszList; -import tech.pegasys.teku.infrastructure.ssz.containers.ContainerSchema1; -import tech.pegasys.teku.infrastructure.ssz.schema.SszFieldName; -import tech.pegasys.teku.infrastructure.ssz.schema.SszListSchema; -import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode; -import tech.pegasys.teku.spec.config.SpecConfigDeneb; - -public class SignedBlindedBlobSidecarsSchema - extends ContainerSchema1> { - - static final SszFieldName FIELD_SIGNED_BLINDED_BLOB_SIDECARS = - () -> "signed_blinded_blob_sidecars"; - - SignedBlindedBlobSidecarsSchema( - final SpecConfigDeneb specConfig, - final SignedBlindedBlobSidecarSchema signedBlindedBlobSidecarSchema) { - super( - "SignedBlobSidecarsSchema", - namedSchema( - FIELD_SIGNED_BLINDED_BLOB_SIDECARS, - SszListSchema.create( - signedBlindedBlobSidecarSchema, specConfig.getMaxBlobsPerBlock()))); - } - - public static SignedBlindedBlobSidecarsSchema create( - final SpecConfigDeneb specConfig, - final SignedBlindedBlobSidecarSchema signedBlindedBlobSidecarSchema) { - return new SignedBlindedBlobSidecarsSchema(specConfig, signedBlindedBlobSidecarSchema); - } - - @SuppressWarnings("unchecked") - public SszListSchema getSignedBlindedBlobSidecarsSchema() { - return (SszListSchema) - getChildSchema(getFieldIndex(FIELD_SIGNED_BLINDED_BLOB_SIDECARS)); - } - - public SignedBlindedBlobSidecarSchema getSignedBlindedBlobSidecarSchema() { - return (SignedBlindedBlobSidecarSchema) getSignedBlindedBlobSidecarsSchema().getElementSchema(); - } - - public SignedBlindedBlobSidecars create( - final List signedBlindedBlobSidecars) { - return new SignedBlindedBlobSidecars(this, signedBlindedBlobSidecars); - } - - @Override - public SignedBlindedBlobSidecars createFromBackingNode(final TreeNode node) { - return new SignedBlindedBlobSidecars(this, node); - } -} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsDeneb.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsDeneb.java index a21b730c62d..ba853c7facc 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsDeneb.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/schemas/SchemaDefinitionsDeneb.java @@ -18,12 +18,9 @@ import java.util.Optional; import tech.pegasys.teku.spec.config.SpecConfigDeneb; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlindedBlobSidecarSchema; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlindedBlobSidecarsSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarSchema; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarsSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlindedBlobSidecarSchema; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlindedBlobSidecarsSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecarSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecarsSchema; import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlockSchema; @@ -70,12 +67,9 @@ public class SchemaDefinitionsDeneb extends SchemaDefinitionsCapella { private final BlobSchema blobSchema; private final BlobSidecarSchema blobSidecarSchema; private final SignedBlobSidecarSchema signedBlobSidecarSchema; - private final BlobSidecarsSchema blobSidecarsSchema; private final SignedBlobSidecarsSchema signedBlobSidecarsSchema; private final BlindedBlobSidecarSchema blindedBlobSidecarSchema; - private final BlindedBlobSidecarsSchema blindedBlobSidecarsSchema; private final SignedBlindedBlobSidecarSchema signedBlindedBlobSidecarSchema; - private final SignedBlindedBlobSidecarsSchema signedBlindedBlobSidecarsSchema; private final BlockContentsSchema blockContentsSchema; private final SignedBlockContentsSchema signedBlockContentsSchema; private final BlindedBlockContentsSchema blindedBlockContentsSchema; @@ -119,14 +113,9 @@ public SchemaDefinitionsDeneb(final SpecConfigDeneb specConfig) { this.signedBlobSidecarSchema = SignedBlobSidecarSchema.create(blobSidecarSchema); this.signedBlobSidecarsSchema = SignedBlobSidecarsSchema.create(specConfig, signedBlobSidecarSchema); - this.blobSidecarsSchema = BlobSidecarsSchema.create(specConfig, blobSidecarSchema); this.blindedBlobSidecarSchema = BlindedBlobSidecarSchema.create(); - this.blindedBlobSidecarsSchema = - BlindedBlobSidecarsSchema.create(specConfig, blindedBlobSidecarSchema); this.signedBlindedBlobSidecarSchema = SignedBlindedBlobSidecarSchema.create(blindedBlobSidecarSchema); - this.signedBlindedBlobSidecarsSchema = - SignedBlindedBlobSidecarsSchema.create(specConfig, signedBlindedBlobSidecarSchema); this.blockContentsSchema = BlockContentsSchema.create(specConfig, beaconBlockSchema, blobSidecarSchema); this.signedBlockContentsSchema = @@ -216,10 +205,6 @@ public SignedBlobSidecarSchema getSignedBlobSidecarSchema() { return signedBlobSidecarSchema; } - public BlobSidecarsSchema getBlobSidecarsSchema() { - return blobSidecarsSchema; - } - public SignedBlobSidecarsSchema getSignedBlobSidecarsSchema() { return signedBlobSidecarsSchema; } @@ -228,18 +213,10 @@ public BlindedBlobSidecarSchema getBlindedBlobSidecarSchema() { return blindedBlobSidecarSchema; } - public BlindedBlobSidecarsSchema getBlindedBlobSidecarsSchema() { - return blindedBlobSidecarsSchema; - } - public SignedBlindedBlobSidecarSchema getSignedBlindedBlobSidecarSchema() { return signedBlindedBlobSidecarSchema; } - public SignedBlindedBlobSidecarsSchema getSignedBlindedBlobSidecarsSchema() { - return signedBlindedBlobSidecarsSchema; - } - public BlockContentsSchema getBlockContentsSchema() { return blockContentsSchema; } diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecarsPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecarsPropertyTest.java deleted file mode 100644 index d3be26b8f08..00000000000 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlindedBlobSidecarsPropertyTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import static tech.pegasys.teku.spec.propertytest.util.PropertyTestHelper.assertDeserializeMutatedThrowsExpected; -import static tech.pegasys.teku.spec.propertytest.util.PropertyTestHelper.assertRoundTrip; - -import com.fasterxml.jackson.core.JsonProcessingException; -import net.jqwik.api.ForAll; -import net.jqwik.api.Property; -import tech.pegasys.teku.spec.propertytest.suppliers.blobs.versions.deneb.BlindedBlobSidecarsSupplier; - -public class BlindedBlobSidecarsPropertyTest { - - @Property - void roundTrip( - @ForAll(supplier = BlindedBlobSidecarsSupplier.class) - final BlindedBlobSidecars blindedBlobSidecars) - throws JsonProcessingException { - assertRoundTrip(blindedBlobSidecars); - } - - @Property - void deserializeMutated( - @ForAll(supplier = BlindedBlobSidecarsSupplier.class) - final BlindedBlobSidecars blindedBlobSidecars, - @ForAll final int seed) { - assertDeserializeMutatedThrowsExpected(blindedBlobSidecars, seed); - } -} diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecarsPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecarsPropertyTest.java deleted file mode 100644 index 58fd878a229..00000000000 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/BlobSidecarsPropertyTest.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import static tech.pegasys.teku.spec.propertytest.util.PropertyTestHelper.assertDeserializeMutatedThrowsExpected; -import static tech.pegasys.teku.spec.propertytest.util.PropertyTestHelper.assertRoundTrip; - -import com.fasterxml.jackson.core.JsonProcessingException; -import net.jqwik.api.ForAll; -import net.jqwik.api.Property; -import tech.pegasys.teku.spec.propertytest.suppliers.blobs.versions.deneb.BlobSidecarsSupplier; - -public class BlobSidecarsPropertyTest { - - @Property - void roundTrip(@ForAll(supplier = BlobSidecarsSupplier.class) final BlobSidecars blobSidecars) - throws JsonProcessingException { - assertRoundTrip(blobSidecars); - } - - @Property - void deserializeMutated( - @ForAll(supplier = BlobSidecarsSupplier.class) final BlobSidecars blobSidecars, - @ForAll final int seed) { - assertDeserializeMutatedThrowsExpected(blobSidecars, seed); - } -} diff --git a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecarsPropertyTest.java b/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecarsPropertyTest.java deleted file mode 100644 index 5c5445a25fd..00000000000 --- a/ethereum/spec/src/property-test/java/tech/pegasys/teku/spec/datastructures/blobs/versions/deneb/SignedBlindedBlobSidecarsPropertyTest.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.datastructures.blobs.versions.deneb; - -import static tech.pegasys.teku.spec.propertytest.util.PropertyTestHelper.assertDeserializeMutatedThrowsExpected; -import static tech.pegasys.teku.spec.propertytest.util.PropertyTestHelper.assertRoundTrip; - -import com.fasterxml.jackson.core.JsonProcessingException; -import net.jqwik.api.ForAll; -import net.jqwik.api.Property; -import tech.pegasys.teku.spec.propertytest.suppliers.blobs.versions.deneb.SignedBlindedBlobSidecarsSupplier; - -public class SignedBlindedBlobSidecarsPropertyTest { - - @Property - void roundTrip( - @ForAll(supplier = SignedBlindedBlobSidecarsSupplier.class) - final SignedBlindedBlobSidecars signedBlindedBlobSidecars) - throws JsonProcessingException { - assertRoundTrip(signedBlindedBlobSidecars); - } - - @Property - void deserializeMutated( - @ForAll(supplier = SignedBlindedBlobSidecarsSupplier.class) - final SignedBlindedBlobSidecars signedBlindedBlobSidecars, - @ForAll final int seed) { - assertDeserializeMutatedThrowsExpected(signedBlindedBlobSidecars, seed); - } -} diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/BlindedBlobSidecarsSupplier.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/BlindedBlobSidecarsSupplier.java deleted file mode 100644 index f8d0f25546c..00000000000 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/BlindedBlobSidecarsSupplier.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.propertytest.suppliers.blobs.versions.deneb; - -import tech.pegasys.teku.spec.SpecMilestone; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlindedBlobSidecars; -import tech.pegasys.teku.spec.propertytest.suppliers.DataStructureUtilSupplier; -import tech.pegasys.teku.spec.util.DataStructureUtil; - -public class BlindedBlobSidecarsSupplier extends DataStructureUtilSupplier { - - public BlindedBlobSidecarsSupplier() { - super(DataStructureUtil::randomBlindedBlobSidecars, SpecMilestone.DENEB); - } -} diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/BlobSidecarsSupplier.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/BlobSidecarsSupplier.java deleted file mode 100644 index 2a90775cdcb..00000000000 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/BlobSidecarsSupplier.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.propertytest.suppliers.blobs.versions.deneb; - -import tech.pegasys.teku.spec.SpecMilestone; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecars; -import tech.pegasys.teku.spec.propertytest.suppliers.DataStructureUtilSupplier; -import tech.pegasys.teku.spec.util.DataStructureUtil; - -public class BlobSidecarsSupplier extends DataStructureUtilSupplier { - - public BlobSidecarsSupplier() { - super(DataStructureUtil::randomBlobSidecars, SpecMilestone.DENEB); - } -} diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/SignedBlindedBlobSidecarsSupplier.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/SignedBlindedBlobSidecarsSupplier.java deleted file mode 100644 index 07a829996a8..00000000000 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/propertytest/suppliers/blobs/versions/deneb/SignedBlindedBlobSidecarsSupplier.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright ConsenSys Software Inc., 2023 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - */ - -package tech.pegasys.teku.spec.propertytest.suppliers.blobs.versions.deneb; - -import tech.pegasys.teku.spec.SpecMilestone; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlindedBlobSidecars; -import tech.pegasys.teku.spec.propertytest.suppliers.DataStructureUtilSupplier; -import tech.pegasys.teku.spec.util.DataStructureUtil; - -public class SignedBlindedBlobSidecarsSupplier - extends DataStructureUtilSupplier { - - public SignedBlindedBlobSidecarsSupplier() { - super(DataStructureUtil::randomSignedBlindedBlobSidecars, SpecMilestone.DENEB); - } -} diff --git a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java index eec68f462fc..037d9cfbc99 100644 --- a/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java +++ b/ethereum/spec/src/testFixtures/java/tech/pegasys/teku/spec/util/DataStructureUtil.java @@ -85,16 +85,13 @@ import tech.pegasys.teku.spec.constants.Domain; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlindedBlobSidecar; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlindedBlobSidecarSchema; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlindedBlobSidecars; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.Blob; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecar; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarSchema; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecars; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobsBundle; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlindedBlobSidecar; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlindedBlobSidecarSchema; -import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlindedBlobSidecars; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecar; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecarSchema; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecars; @@ -2168,31 +2165,12 @@ public List randomSignedBlindedBlobSidecars(int count) return signedBlindedBlobSidecars; } - public BlobSidecars randomBlobSidecars() { - final List blobSidecarList = randomBlobSidecars(4); - return new BlobSidecars(getSchemaDefinitionDeneb().getBlobSidecarsSchema(), blobSidecarList); - } - public SignedBlobSidecars randomSignedBlobSidecars() { final List signedBlobSidecarsList = randomSignedBlobSidecars(4); return new SignedBlobSidecars( getSchemaDefinitionDeneb().getSignedBlobSidecarsSchema(), signedBlobSidecarsList); } - public BlindedBlobSidecars randomBlindedBlobSidecars() { - final List blindedBlobSidecarList = randomBlindedBlobSidecars(4); - return new BlindedBlobSidecars( - getSchemaDefinitionDeneb().getBlindedBlobSidecarsSchema(), blindedBlobSidecarList); - } - - public SignedBlindedBlobSidecars randomSignedBlindedBlobSidecars() { - final List signedBlindedBlobSidecarList = - randomSignedBlindedBlobSidecars(spec.getMaxBlobsPerBlock().orElseThrow()); - return new SignedBlindedBlobSidecars( - getSchemaDefinitionDeneb().getSignedBlindedBlobSidecarsSchema(), - signedBlindedBlobSidecarList); - } - public BlockContents randomBlockContents() { return randomBlockContents(randomUInt64()); }