Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SignedBlobSidecar container #7717

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -179,12 +179,7 @@ public class SszTestExecutor<T extends SszData> implements TestExecutor {
.put(
"ssz_static/BlobSidecar",
new SszTestExecutor<>(
schemas -> SchemaDefinitionsDeneb.required(schemas).getBlobSidecarOldSchema()))
.put(
"ssz_static/SignedBlobSidecar",
new SszTestExecutor<>(
schemas ->
SchemaDefinitionsDeneb.required(schemas).getSignedBlobSidecarOldSchema()))
schemas -> SchemaDefinitionsDeneb.required(schemas).getBlobSidecarSchema()))
.put(
"ssz_static/BlobIdentifier",
new SszTestExecutor<>(schemas -> BlobIdentifier.SSZ_SCHEMA))
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
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.BlobSidecarSchemaOld;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecarSchemaOld;
import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlockSchema;
import tech.pegasys.teku.spec.datastructures.blocks.BlockContainer;
import tech.pegasys.teku.spec.datastructures.blocks.BlockContainerSchema;
Expand Down Expand Up @@ -80,7 +79,6 @@ public class SchemaDefinitionsDeneb extends SchemaDefinitionsCapella {
private final SszListSchema<Blob, ? extends SszList<Blob>> blobsInBlockSchema;
private final BlobSidecarSchema blobSidecarSchema;
private final BlobSidecarSchemaOld blobSidecarOldSchema;
private final SignedBlobSidecarSchemaOld signedBlobSidecarOldSchema;
private final BlockContentsSchema blockContentsSchema;
private final SignedBlockContentsSchema signedBlockContentsSchema;
private final BlobsBundleSchema blobsBundleSchema;
Expand Down Expand Up @@ -132,7 +130,6 @@ public SchemaDefinitionsDeneb(final SpecConfigDeneb specConfig) {
blobSchema,
specConfig.getKzgCommitmentInclusionProofDepth());
this.blobSidecarOldSchema = BlobSidecarSchemaOld.create(blobSchema);
this.signedBlobSidecarOldSchema = SignedBlobSidecarSchemaOld.create(blobSidecarOldSchema);
this.blockContentsSchema =
BlockContentsSchema.create(specConfig, beaconBlockSchema, blobSchema, "BlockContentsDeneb");
this.signedBlockContentsSchema =
Expand Down Expand Up @@ -256,10 +253,6 @@ public BlobSidecarSchemaOld getBlobSidecarOldSchema() {
return blobSidecarOldSchema;
}

public SignedBlobSidecarSchemaOld getSignedBlobSidecarOldSchema() {
return signedBlobSidecarOldSchema;
}

public BlockContentsSchema getBlockContentsSchema() {
return blockContentsSchema;
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarOld;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarSchema;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSidecarSchemaOld;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecarOld;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.SignedBlobSidecarSchemaOld;
import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlock;
import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlockAndState;
import tech.pegasys.teku.spec.datastructures.blocks.BeaconBlockHeader;
Expand Down Expand Up @@ -2129,16 +2127,6 @@ public List<BlobSidecarOld> randomBlobSidecarsForBlockOld(
final SignedBeaconBlock block,
final BiFunction<Integer, RandomBlobSidecarOldBuilder, RandomBlobSidecarOldBuilder>
modifier) {
return randomSignedBlobSidecarsForBlock(block, modifier).stream()
.map(SignedBlobSidecarOld::getBlobSidecar)
.collect(toList());
}

@Deprecated
public List<SignedBlobSidecarOld> randomSignedBlobSidecarsForBlock(
final SignedBeaconBlock block,
final BiFunction<Integer, RandomBlobSidecarOldBuilder, RandomBlobSidecarOldBuilder>
modifier) {
final SszList<SszKZGCommitment> blobKzgCommitments =
BeaconBlockBodyDeneb.required(block.getBeaconBlock().orElseThrow().getBody())
.getBlobKzgCommitments();
Expand All @@ -2155,7 +2143,7 @@ public List<SignedBlobSidecarOld> randomSignedBlobSidecarsForBlock(
.kzgCommitment(blobKzgCommitments.get(index).getBytes())
.index(UInt64.valueOf(index));

return modifier.apply(index, builder).buildSigned();
return modifier.apply(index, builder).build();
})
.collect(toList());
}
Expand Down Expand Up @@ -2191,17 +2179,20 @@ public BlobSidecar randomBlobSidecar() {
return new RandomBlobSidecarBuilder().build();
}

@Deprecated
public BlobSidecarOld randomBlobSidecarOld() {
return new RandomBlobSidecarOldBuilder().build();
}

@Deprecated
public BlobSidecarOld randomBlobSidecarOld(final BlobIdentifier blobIdentifier) {
return new RandomBlobSidecarOldBuilder()
.index(blobIdentifier.getIndex())
.blockRoot(blobIdentifier.getBlockRoot())
.build();
}

@Deprecated
public List<BlobSidecarOld> randomBlobSidecarsOld(final int count) {
List<BlobSidecarOld> blobSidecars = new ArrayList<>();
for (int i = 0; i < count; i++) {
Expand All @@ -2227,11 +2218,13 @@ public List<BlobSidecar> randomBlobSidecars(final int count) {
return blobSidecars;
}

@Deprecated
public BlobSidecarOld randomBlobSidecarOld(
final UInt64 slot, final Bytes32 blockRoot, final UInt64 index) {
return new RandomBlobSidecarOldBuilder().slot(slot).index(index).blockRoot(blockRoot).build();
}

@Deprecated
public BlobSidecarOld randomBlobSidecarOld(
final UInt64 slot,
final Bytes32 blockRoot,
Expand All @@ -2245,10 +2238,6 @@ public BlobSidecarOld randomBlobSidecarOld(
.build();
}

public BlobSidecarOld randomBlobSidecarOld(final Bytes32 blockRoot, final UInt64 index) {
return new RandomBlobSidecarOldBuilder().index(index).blockRoot(blockRoot).build();
}

public BlobIdentifier randomBlobIdentifier() {
return randomBlobIdentifier(randomBytes32());
}
Expand Down Expand Up @@ -2302,18 +2291,6 @@ private BlobsBundle randomBlobsBundle(final Optional<Integer> count, final UInt6
.collect(toList()));
}

public SignedBlobSidecarOld randomSignedBlobSidecar() {
return new RandomBlobSidecarOldBuilder().buildSigned();
}

public List<SignedBlobSidecarOld> randomSignedBlobSidecars(final int count) {
final List<SignedBlobSidecarOld> signedBlobSidecars = new ArrayList<>();
for (int i = 0; i < count; i++) {
signedBlobSidecars.add(new RandomBlobSidecarOldBuilder().buildSigned());
}
return signedBlobSidecars;
}

public SignedBlockContents randomSignedBlockContents() {
return randomSignedBlockContents(randomSlot());
}
Expand Down Expand Up @@ -2342,6 +2319,7 @@ public BlockContents randomBlockContents(final UInt64 slot) {
.create(beaconBlock, kzgProofs, blobs);
}

@Deprecated
public RandomBlobSidecarOldBuilder createRandomBlobSidecarBuilderOld() {
return new RandomBlobSidecarOldBuilder();
}
Expand Down Expand Up @@ -2446,18 +2424,6 @@ public BlobSidecarOld build() {
kzgCommitment.orElse(randomBytes48()),
kzgProof.orElse(randomBytes48()));
}

public SignedBlobSidecarOld buildSigned(final Optional<BLSSignature> blsSignature) {
BlobSidecarOld blobSidecar = build();
final SignedBlobSidecarSchemaOld blobSidecarSchema =
getDenebSchemaDefinitions(slot.orElse(randomUInt64())).getSignedBlobSidecarOldSchema();

return blobSidecarSchema.create(blobSidecar, blsSignature.orElse(randomSignature()));
}

public SignedBlobSidecarOld buildSigned() {
return buildSigned(Optional.empty());
}
}

public class RandomBlobSidecarBuilder {
Expand Down
Loading