Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanBratanov committed Nov 7, 2023
1 parent 5a79b69 commit d7465b1
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 16 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import tech.pegasys.teku.infrastructure.ssz.tree.TreeNode;
import tech.pegasys.teku.spec.config.SpecConfigDeneb;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.Blob;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobKzgCommitmentsSchema;
import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSchema;
import tech.pegasys.teku.spec.datastructures.type.SszKZGCommitment;
import tech.pegasys.teku.spec.datastructures.type.SszKZGCommitmentSchema;
import tech.pegasys.teku.spec.datastructures.type.SszKZGProof;
import tech.pegasys.teku.spec.datastructures.type.SszKZGProofSchema;

Expand All @@ -30,17 +30,19 @@ public class BlobsBundleSchema
BlobsBundle, SszList<SszKZGCommitment>, SszList<SszKZGProof>, SszList<Blob>> {

public BlobsBundleSchema(
final String containerName, final BlobSchema blobSchema, final SpecConfigDeneb specConfig) {
final String containerName,
final BlobSchema blobSchema,
final BlobKzgCommitmentsSchema blobKzgCommitmentsSchema,
final SpecConfigDeneb specConfig) {
super(
containerName,
namedSchema("commitments", blobKzgCommitmentsSchema),
namedSchema(
"commitments",
"proofs",
SszListSchema.create(
SszKZGCommitmentSchema.INSTANCE, specConfig.getMaxBlobsPerBlock())),
SszKZGProofSchema.INSTANCE, specConfig.getMaxBlobCommitmentsPerBlock())),
namedSchema(
"proofs",
SszListSchema.create(SszKZGProofSchema.INSTANCE, specConfig.getMaxBlobsPerBlock())),
namedSchema("blobs", SszListSchema.create(blobSchema, specConfig.getMaxBlobsPerBlock())));
"blobs", SszListSchema.create(blobSchema, specConfig.getMaxBlobCommitmentsPerBlock())));
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ public SchemaDefinitionsDeneb(final SpecConfigDeneb specConfig) {
signedBlindedBlobSidecarSchema,
signedBlindedBeaconBlockSchema,
"SignedBlindedBlockContentsDeneb");
this.blobsBundleSchema = new BlobsBundleSchema("BlobsBundleDeneb", blobSchema, specConfig);
this.blobsBundleSchema =
new BlobsBundleSchema("BlobsBundleDeneb", blobSchema, blobKzgCommitmentsSchema, specConfig);
this.executionPayloadAndBlobsBundleSchema =
new ExecutionPayloadAndBlobsBundleSchema(executionPayloadSchemaDeneb, blobsBundleSchema);
this.blobSidecarsByRootRequestMessageSchema =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public void shouldSignBlobSidecar() {
final BLSSignature expectedSignature =
BLSSignature.fromBytesCompressed(
Bytes.fromBase64String(
"g2gwxuzLti3gnykvswX9BazzZjOJKDJPsPdKAueMe3Q18vKlQ6mr2P+z2XDZgHzZEFkCgGpAa6bbmB/NxSNywI8tJsy0ecrgFfX0uIK1CJpfnpboU8L4F3rqaVj/rGhh"));
"sIUsP7VzwCDgx0mx9QbaTwch3yt72w1uGqZWURUwlkRN51EwgXSiTbm7O8BKMbTOEiA9sKUjbNdy5uX145n+mDuxzPGMaejyb/ZdNqSbCjd6vXc67Y7PM/m8AcjSmIEs"));

final SafeFuture<BLSSignature> result = signer.signBlobSidecar(blobSidecar, fork);
asyncRunner.executeQueuedActions();
Expand All @@ -127,7 +127,7 @@ public void shouldSignBlindedBlobSidecar() {
final BLSSignature expectedSignature =
BLSSignature.fromBytesCompressed(
Bytes.fromBase64String(
"g2gwxuzLti3gnykvswX9BazzZjOJKDJPsPdKAueMe3Q18vKlQ6mr2P+z2XDZgHzZEFkCgGpAa6bbmB/NxSNywI8tJsy0ecrgFfX0uIK1CJpfnpboU8L4F3rqaVj/rGhh"));
"sIUsP7VzwCDgx0mx9QbaTwch3yt72w1uGqZWURUwlkRN51EwgXSiTbm7O8BKMbTOEiA9sKUjbNdy5uX145n+mDuxzPGMaejyb/ZdNqSbCjd6vXc67Y7PM/m8AcjSmIEs"));

final SafeFuture<BLSSignature> result = signer.signBlindedBlobSidecar(blindedBlobSidecar, fork);
asyncRunner.executeQueuedActions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2531,8 +2531,7 @@ public SignedBlindedBlobSidecar buildSignedBlinded() {
}

public SszList<SszKZGCommitment> randomSszKzgCommitmentList() {
final int count = randomInt(spec.getMaxBlobCommitmentsPerBlock().orElseThrow()) + 1;
return randomSszKzgCommitmentList(count);
return randomSszKzgCommitmentList(randomNumberOfBlobCommitmentsPerBlock());
}

public SszList<SszKZGCommitment> randomSszKzgCommitmentList(final int count) {
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit d7465b1

Please sign in to comment.