Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdi-aouadi committed Oct 30, 2024
1 parent c334670 commit 33d7314
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void shouldSignBlock() {
final BLSSignature expectedSignature =
BLSSignature.fromBytesCompressed(
Bytes.fromBase64String(
"pbSSuf7h70JkzI/U157flTWPZDuaBXgRLj1HLMoCwjA4Xd0hMdGewn7G2HLZiQcNC9G6FSd1+0BT5PwknYez4ya6TccwpaGnsvWYLPf3SNIX5Ug7Yi1CF1fvEr3x9sZ0"));
"owmSdVC0ohD8KseJ5xXVI8MrX+sJkrWJf7OMBbAJm4cugs0idsnksufjWdPmmtPDCgklh+oxhXxvNB32NkWMgS1WKBtC0/Ia4POxdURWx3klGx6w3og+yQGlPG/rJw2x"));

final SafeFuture<BLSSignature> result = signer.signBlock(block, fork);
asyncRunner.executeQueuedActions();
Expand All @@ -73,7 +73,7 @@ public void shouldSignBlindedBlock() {
final BLSSignature expectedSignature =
BLSSignature.fromBytesCompressed(
Bytes.fromBase64String(
"pbSSuf7h70JkzI/U157flTWPZDuaBXgRLj1HLMoCwjA4Xd0hMdGewn7G2HLZiQcNC9G6FSd1+0BT5PwknYez4ya6TccwpaGnsvWYLPf3SNIX5Ug7Yi1CF1fvEr3x9sZ0"));
"ly4cxcYQcaynv/9xraWIv7emeza+AFVLOJ0YFnxyqxSxP1nfjkxYS1tuf3x4Y9/qFdVGs6v1QE9/wDBd6DgMg7FhfyKARNTVbNDWlO3jf5pRxNUNiJXNUVs6L0evcIKV"));

final SafeFuture<BLSSignature> result = signer.signBlock(block, fork);
asyncRunner.executeQueuedActions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,14 @@ public void setup() {
public void onNewAttestation_afterMatchingAssignment() {
// Create a new DataStructureUtil so that generated attestations are not subject to change
// when access to the global DataStructureUtil changes
DataStructureUtil dataStructureUtil = new DataStructureUtil(spec);
final Attestation attestation = dataStructureUtil.randomAttestation(3);
final DataStructureUtil dataStructureUtil = new DataStructureUtil(spec);
final UInt64 slot = UInt64.valueOf(3);
final Attestation attestation = dataStructureUtil.randomAttestation(slot);
final Attestation attestation2 =
spec.getGenesisSchemaDefinitions()
.getAttestationSchema()
.create(
dataStructureUtil.randomBitlist(),
dataStructureUtil.randomBitlist(slot),
dataStructureUtil.randomAttestationData(UInt64.valueOf(13)),
dataStructureUtil.randomSignature());
final int subnetId = computeSubnetId(attestation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ void firstBlobSidecarIndexInNextBlockIsNotZero() {
dataStructureUtil.randomSignedBeaconBlock(1), 0);
final BlobSidecar blobSidecar2_1 =
dataStructureUtil.randomBlobSidecarWithValidInclusionProofForBlock(
dataStructureUtil.randomSignedBeaconBlock(2, blobSidecar1_0.getBlockRoot()), 1);
dataStructureUtil.randomSignedBeaconBlock(2, blobSidecar1_0.getBlockRoot(), true), 1);

assertDoesNotThrow(() -> listenerWrapper.onResponse(blobSidecar1_0).join());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ public void denebBlockSummary() {
final BeaconBlockBody block = dataStructureUtil.randomBeaconBlockBody(denebSlot);
assertThat(duty.getBlockSummary(block))
.containsExactly(
"Blobs: 1",
"4483248126065046120 (0%) gas, EL block: b736203ee72088edaf7eb5c7839744f5b1be69f748eea8fea77740914415c5b4 (4479943159631677864)");
"Blobs: 5",
"4491510546443434056 (0%) gas, EL block: 58913d3ec8a62b95e52fb1ee60ebddf392af6e1db902dd5bc3f1eea7003130ff (4488205580010065800)");
}

@Test
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"signingRoot" : "0x97efca47543ccd4fac17f16aecdc0aa9c58493fdf116ea5deaeb5e5fc34a6369",
"signingRoot" : "0x3f9c1cc3af54c94ee8a677aee350bb772b00c3864b7dfdd34ffaf6ab004d1f0a",
"type" : "BLOCK_V2",
"fork_info" : {
"fork" : {
"previous_version" : "0xc7dab83e",
"current_version" : "0x8e77ca3e",
"epoch" : "4522907744740301673"
"previous_version" : "0x003ea73e",
"current_version" : "0x135fa13e",
"epoch" : "4517950290795281992"
},
"genesis_validators_root" : "0x003ea73e885578bda77a6ee17f4c6c88227980d9e6e5fe448bdc2f93a5614b3e"
"genesis_validators_root" : "0xed1cad3ee8099978b13707b6acc357bb1b768147301dd68a5d5beccacb0094b3"
},
"beacon_block" : {
"version" : "BELLATRIX",
Expand All @@ -16,7 +16,7 @@
"proposer_index" : "4665021361504678828",
"parent_root" : "0xfd18cf40cc907a739be483f1ca0ee23ad65cdd3df23205eabc6d660a75d1f54e",
"state_root" : "0x103ac9406cdc59b89027eb1c9e97f607dd5fdccfa8fb2da4eaeea9d25032add9",
"body_root" : "0xbae795425cddcee74a9be8edb9489e071ba5b436852e28f585e844d9514a9575"
"body_root" : "0xada3b1be6d79e8300c701822a4358a8e8d323c74cf16dbd998db63273f032b34"
}
}
}
Loading

0 comments on commit 33d7314

Please sign in to comment.