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

fix: the unknown block sync timeout #6031

Merged
merged 5 commits into from
Oct 13, 2023
Merged

fix: the unknown block sync timeout #6031

merged 5 commits into from
Oct 13, 2023

Conversation

nazarhussain
Copy link
Contributor

Motivation

Make the sim tests stable.

Description

Found this edge case which was causing timeout for sim test quite often.

If a node is started on the epoch boundary then the unknownBlockSync get disabled and node hang up on the head.

Steps to test or reproduce

  • Run all test.

@nazarhussain nazarhussain requested a review from a team as a code owner October 11, 2023 12:18
@nazarhussain nazarhussain self-assigned this Oct 11, 2023
// So we are adding a particular delay to ensure that the `unknownBlockSync` is enabled.
const syncStartSlot = this.chain.clock.currentSlot;
// Having one epoch time for the node to connect to peers and start a syncing process
const epochCheckFotSyncSlot = syncStartSlot + SLOTS_PER_EPOCH;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think one epoch would be enough time margin for a node to connect to peers and do the syncing before we start checking the sync progress. But this time could be changed based on node behavior.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the comment and solution look great, I just don't feel right having this fix in prod code because onClockEpoch is designed to witness the genesis event as well.

Could you move this code to the above if/else code block for test code only? something like:

if (!opts.disableRangeSync) {
      // prod code
      ...
     this.chain.clock.on(ClockEvent.epoch, this.onClockEpoch);
} else {
   // test code, this is needed for Unknown block sync sim test
   ...
   // TODO: fix sim test here
}

@github-actions
Copy link
Contributor

github-actions bot commented Oct 11, 2023

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 9bba153 Previous: dd57c96 Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 15.456 ms/op 88.335 ms/op 0.17
Full benchmark results
Benchmark suite Current: 9bba153 Previous: dd57c96 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 538.10 us/op 680.42 us/op 0.79
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 85.027 us/op 112.03 us/op 0.76
BLS verify - blst-native 1.3217 ms/op 1.3601 ms/op 0.97
BLS verifyMultipleSignatures 3 - blst-native 2.7737 ms/op 2.8564 ms/op 0.97
BLS verifyMultipleSignatures 8 - blst-native 6.0741 ms/op 6.4900 ms/op 0.94
BLS verifyMultipleSignatures 32 - blst-native 22.244 ms/op 22.918 ms/op 0.97
BLS verifyMultipleSignatures 64 - blst-native 43.871 ms/op 45.284 ms/op 0.97
BLS verifyMultipleSignatures 128 - blst-native 87.431 ms/op 95.066 ms/op 0.92
BLS deserializing 10000 signatures 892.39 ms/op 978.36 ms/op 0.91
BLS deserializing 100000 signatures 8.9018 s/op 9.5646 s/op 0.93
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3232 ms/op 1.4697 ms/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.4959 ms/op 1.6434 ms/op 0.91
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.3131 ms/op 2.5435 ms/op 0.91
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.3935 ms/op 3.8145 ms/op 0.89
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.3110 ms/op 6.1118 ms/op 1.03
BLS aggregatePubkeys 32 - blst-native 25.439 us/op 29.177 us/op 0.87
BLS aggregatePubkeys 128 - blst-native 99.181 us/op 108.27 us/op 0.92
getAttestationsForBlock 38.974 ms/op 52.333 ms/op 0.74
isKnown best case - 1 super set check 316.00 ns/op 482.00 ns/op 0.66
isKnown normal case - 2 super set checks 290.00 ns/op 544.00 ns/op 0.53
isKnown worse case - 16 super set checks 386.00 ns/op 554.00 ns/op 0.70
CheckpointStateCache - add get delete 5.1320 us/op 6.1070 us/op 0.84
validate api signedAggregateAndProof - struct 2.7532 ms/op 2.8547 ms/op 0.96
validate gossip signedAggregateAndProof - struct 2.7802 ms/op 2.8749 ms/op 0.97
validate gossip attestation - vc 640000 1.3426 ms/op 1.4516 ms/op 0.92
batch validate gossip attestation - vc 640000 - chunk 32 155.41 us/op 185.80 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 64 139.14 us/op 172.57 us/op 0.81
batch validate gossip attestation - vc 640000 - chunk 128 126.72 us/op 167.20 us/op 0.76
batch validate gossip attestation - vc 640000 - chunk 256 122.28 us/op 155.61 us/op 0.79
pickEth1Vote - no votes 1.2056 ms/op 1.4083 ms/op 0.86
pickEth1Vote - max votes 10.593 ms/op 11.242 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.863 ms/op 19.152 ms/op 1.04
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.547 ms/op 33.941 ms/op 0.78
pickEth1Vote - Eth1Data fastSerialize value x2048 558.97 us/op 705.94 us/op 0.79
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.3497 ms/op 7.4659 ms/op 0.72
bytes32 toHexString 447.00 ns/op 650.00 ns/op 0.69
bytes32 Buffer.toString(hex) 276.00 ns/op 310.00 ns/op 0.89
bytes32 Buffer.toString(hex) from Uint8Array 397.00 ns/op 497.00 ns/op 0.80
bytes32 Buffer.toString(hex) + 0x 284.00 ns/op 304.00 ns/op 0.93
Object access 1 prop 0.14600 ns/op 0.17300 ns/op 0.84
Map access 1 prop 0.14100 ns/op 0.15300 ns/op 0.92
Object get x1000 6.7620 ns/op 7.6550 ns/op 0.88
Map get x1000 0.55400 ns/op 0.69300 ns/op 0.80
Object set x1000 44.365 ns/op 57.540 ns/op 0.77
Map set x1000 35.877 ns/op 51.645 ns/op 0.69
Return object 10000 times 0.23260 ns/op 0.35580 ns/op 0.65
Throw Error 10000 times 3.6295 us/op 4.4007 us/op 0.82
fastMsgIdFn sha256 / 200 bytes 3.0900 us/op 3.5520 us/op 0.87
fastMsgIdFn h32 xxhash / 200 bytes 250.00 ns/op 333.00 ns/op 0.75
fastMsgIdFn h64 xxhash / 200 bytes 313.00 ns/op 387.00 ns/op 0.81
fastMsgIdFn sha256 / 1000 bytes 10.747 us/op 12.046 us/op 0.89
fastMsgIdFn h32 xxhash / 1000 bytes 362.00 ns/op 456.00 ns/op 0.79
fastMsgIdFn h64 xxhash / 1000 bytes 382.00 ns/op 460.00 ns/op 0.83
fastMsgIdFn sha256 / 10000 bytes 99.694 us/op 108.97 us/op 0.91
fastMsgIdFn h32 xxhash / 10000 bytes 1.7800 us/op 2.0560 us/op 0.87
fastMsgIdFn h64 xxhash / 10000 bytes 1.2150 us/op 1.4970 us/op 0.81
send data - 1000 256B messages 17.125 ms/op 22.125 ms/op 0.77
send data - 1000 512B messages 24.996 ms/op 28.731 ms/op 0.87
send data - 1000 1024B messages 37.725 ms/op 44.872 ms/op 0.84
send data - 1000 1200B messages 20.822 ms/op 24.596 ms/op 0.85
send data - 1000 2048B messages 29.551 ms/op 40.100 ms/op 0.74
send data - 1000 4096B messages 31.275 ms/op 37.291 ms/op 0.84
send data - 1000 16384B messages 72.162 ms/op 97.833 ms/op 0.74
send data - 1000 65536B messages 263.15 ms/op 353.54 ms/op 0.74
enrSubnets - fastDeserialize 64 bits 1.2050 us/op 1.6390 us/op 0.74
enrSubnets - ssz BitVector 64 bits 390.00 ns/op 506.00 ns/op 0.77
enrSubnets - fastDeserialize 4 bits 152.00 ns/op 210.00 ns/op 0.72
enrSubnets - ssz BitVector 4 bits 391.00 ns/op 508.00 ns/op 0.77
prioritizePeers score -10:0 att 32-0.1 sync 2-0 95.833 us/op 129.47 us/op 0.74
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 126.31 us/op 168.16 us/op 0.75
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 156.04 us/op 201.64 us/op 0.77
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 280.45 us/op 355.02 us/op 0.79
prioritizePeers score 0:0 att 64-1 sync 4-1 326.10 us/op 450.26 us/op 0.72
array of 16000 items push then shift 1.5631 us/op 1.8508 us/op 0.84
LinkedList of 16000 items push then shift 8.7820 ns/op 12.897 ns/op 0.68
array of 16000 items push then pop 74.417 ns/op 112.01 ns/op 0.66
LinkedList of 16000 items push then pop 8.5670 ns/op 10.431 ns/op 0.82
array of 24000 items push then shift 2.3293 us/op 2.8564 us/op 0.82
LinkedList of 24000 items push then shift 8.7060 ns/op 14.192 ns/op 0.61
array of 24000 items push then pop 86.011 ns/op 183.50 ns/op 0.47
LinkedList of 24000 items push then pop 8.6010 ns/op 10.922 ns/op 0.79
intersect bitArray bitLen 8 6.6260 ns/op 8.8400 ns/op 0.75
intersect array and set length 8 52.007 ns/op 90.062 ns/op 0.58
intersect bitArray bitLen 128 31.151 ns/op 47.588 ns/op 0.65
intersect array and set length 128 721.07 ns/op 1.0986 us/op 0.66
bitArray.getTrueBitIndexes() bitLen 128 1.3030 us/op 1.8980 us/op 0.69
bitArray.getTrueBitIndexes() bitLen 248 2.2310 us/op 3.4030 us/op 0.66
bitArray.getTrueBitIndexes() bitLen 512 4.3780 us/op 6.8540 us/op 0.64
Buffer.concat 32 items 889.00 ns/op 1.1980 us/op 0.74
Uint8Array.set 32 items 1.5920 us/op 2.5900 us/op 0.61
Set add up to 64 items then delete first 4.0931 us/op 5.0740 us/op 0.81
OrderedSet add up to 64 items then delete first 5.2231 us/op 7.0188 us/op 0.74
Set add up to 64 items then delete last 4.4959 us/op 5.4232 us/op 0.83
OrderedSet add up to 64 items then delete last 5.7933 us/op 7.3169 us/op 0.79
Set add up to 64 items then delete middle 4.5274 us/op 5.3195 us/op 0.85
OrderedSet add up to 64 items then delete middle 7.0577 us/op 8.5849 us/op 0.82
Set add up to 128 items then delete first 8.9996 us/op 11.172 us/op 0.81
OrderedSet add up to 128 items then delete first 11.317 us/op 14.954 us/op 0.76
Set add up to 128 items then delete last 9.0020 us/op 10.966 us/op 0.82
OrderedSet add up to 128 items then delete last 11.816 us/op 13.912 us/op 0.85
Set add up to 128 items then delete middle 8.9631 us/op 10.778 us/op 0.83
OrderedSet add up to 128 items then delete middle 17.074 us/op 22.762 us/op 0.75
Set add up to 256 items then delete first 18.262 us/op 21.855 us/op 0.84
OrderedSet add up to 256 items then delete first 23.413 us/op 30.881 us/op 0.76
Set add up to 256 items then delete last 17.889 us/op 21.260 us/op 0.84
OrderedSet add up to 256 items then delete last 23.821 us/op 28.199 us/op 0.84
Set add up to 256 items then delete middle 17.787 us/op 21.170 us/op 0.84
OrderedSet add up to 256 items then delete middle 44.250 us/op 60.644 us/op 0.73
transfer serialized Status (84 B) 1.8120 us/op 1.9960 us/op 0.91
copy serialized Status (84 B) 1.4680 us/op 1.7850 us/op 0.82
transfer serialized SignedVoluntaryExit (112 B) 1.9680 us/op 2.0910 us/op 0.94
copy serialized SignedVoluntaryExit (112 B) 1.5900 us/op 1.8080 us/op 0.88
transfer serialized ProposerSlashing (416 B) 2.3840 us/op 2.8660 us/op 0.83
copy serialized ProposerSlashing (416 B) 1.9050 us/op 3.4450 us/op 0.55
transfer serialized Attestation (485 B) 2.1060 us/op 4.2390 us/op 0.50
copy serialized Attestation (485 B) 1.9230 us/op 3.3660 us/op 0.57
transfer serialized AttesterSlashing (33232 B) 2.5000 us/op 3.6970 us/op 0.68
copy serialized AttesterSlashing (33232 B) 4.7250 us/op 13.429 us/op 0.35
transfer serialized Small SignedBeaconBlock (128000 B) 2.3680 us/op 3.4980 us/op 0.68
copy serialized Small SignedBeaconBlock (128000 B) 11.591 us/op 35.871 us/op 0.32
transfer serialized Avg SignedBeaconBlock (200000 B) 2.6530 us/op 4.4240 us/op 0.60
copy serialized Avg SignedBeaconBlock (200000 B) 17.349 us/op 50.054 us/op 0.35
transfer serialized BlobsSidecar (524380 B) 2.7340 us/op 5.3010 us/op 0.52
copy serialized BlobsSidecar (524380 B) 81.473 us/op 149.08 us/op 0.55
transfer serialized Big SignedBeaconBlock (1000000 B) 2.7890 us/op 4.1670 us/op 0.67
copy serialized Big SignedBeaconBlock (1000000 B) 149.90 us/op 274.56 us/op 0.55
pass gossip attestations to forkchoice per slot 3.6853 ms/op 4.9374 ms/op 0.75
forkChoice updateHead vc 100000 bc 64 eq 0 654.33 us/op 888.60 us/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 0 4.9687 ms/op 11.033 ms/op 0.45
forkChoice updateHead vc 1000000 bc 64 eq 0 7.3344 ms/op 10.475 ms/op 0.70
forkChoice updateHead vc 600000 bc 320 eq 0 4.0643 ms/op 6.4049 ms/op 0.63
forkChoice updateHead vc 600000 bc 1200 eq 0 4.1896 ms/op 7.5518 ms/op 0.55
forkChoice updateHead vc 600000 bc 7200 eq 0 5.2295 ms/op 10.622 ms/op 0.49
forkChoice updateHead vc 600000 bc 64 eq 1000 10.797 ms/op 16.653 ms/op 0.65
forkChoice updateHead vc 600000 bc 64 eq 10000 11.729 ms/op 20.399 ms/op 0.57
forkChoice updateHead vc 600000 bc 64 eq 300000 15.456 ms/op 88.335 ms/op 0.17
computeDeltas 500000 validators 300 proto nodes 6.1782 ms/op 8.6790 ms/op 0.71
computeDeltas 500000 validators 1200 proto nodes 6.1422 ms/op 8.7260 ms/op 0.70
computeDeltas 500000 validators 7200 proto nodes 6.1369 ms/op 7.9387 ms/op 0.77
computeDeltas 750000 validators 300 proto nodes 9.1763 ms/op 11.484 ms/op 0.80
computeDeltas 750000 validators 1200 proto nodes 9.2469 ms/op 12.578 ms/op 0.74
computeDeltas 750000 validators 7200 proto nodes 9.1771 ms/op 12.423 ms/op 0.74
computeDeltas 1400000 validators 300 proto nodes 17.419 ms/op 22.460 ms/op 0.78
computeDeltas 1400000 validators 1200 proto nodes 17.462 ms/op 20.934 ms/op 0.83
computeDeltas 1400000 validators 7200 proto nodes 17.317 ms/op 21.790 ms/op 0.79
computeDeltas 2100000 validators 300 proto nodes 26.266 ms/op 31.942 ms/op 0.82
computeDeltas 2100000 validators 1200 proto nodes 25.952 ms/op 31.184 ms/op 0.83
computeDeltas 2100000 validators 7200 proto nodes 26.306 ms/op 29.809 ms/op 0.88
computeProposerBoostScoreFromBalances 500000 validators 3.1960 ms/op 3.5952 ms/op 0.89
computeProposerBoostScoreFromBalances 750000 validators 3.2216 ms/op 3.3421 ms/op 0.96
computeProposerBoostScoreFromBalances 1400000 validators 3.2249 ms/op 3.3626 ms/op 0.96
computeProposerBoostScoreFromBalances 2100000 validators 3.2178 ms/op 3.3232 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei normalcase 2.6566 ms/op 2.7419 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei worstcase 3.1585 ms/op 3.9086 ms/op 0.81
altair processAttestation - setStatus - 1/6 committees join 189.39 us/op 170.65 us/op 1.11
altair processAttestation - setStatus - 1/3 committees join 349.67 us/op 334.36 us/op 1.05
altair processAttestation - setStatus - 1/2 committees join 485.32 us/op 447.91 us/op 1.08
altair processAttestation - setStatus - 2/3 committees join 604.94 us/op 564.67 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 823.42 us/op 760.28 us/op 1.08
altair processAttestation - setStatus - 100% committees join 946.36 us/op 899.60 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 6.9741 ms/op 6.7072 ms/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.857 ms/op 29.619 ms/op 0.91
altair processBlock - 250000 vs - 7PWei worstcase 36.110 ms/op 37.304 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 90.304 ms/op 86.801 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6223 ms/op 2.3133 ms/op 1.13
phase0 processBlock - 250000 vs - 7PWei worstcase 31.825 ms/op 29.745 ms/op 1.07
altair processEth1Data - 250000 vs - 7PWei normalcase 492.15 us/op 493.45 us/op 1.00
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 13.268 us/op 11.396 us/op 1.16
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 40.776 us/op 59.282 us/op 0.69
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 21.545 us/op 16.224 us/op 1.33
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 17.052 us/op 12.273 us/op 1.39
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 192.56 us/op 149.63 us/op 1.29
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3765 ms/op 1.0991 ms/op 1.25
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5234 ms/op 1.6311 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4940 ms/op 1.4817 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.2237 ms/op 3.2136 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4825 ms/op 2.8058 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.3645 ms/op 4.7254 ms/op 1.14
Tree 40 250000 create 333.71 ms/op 323.86 ms/op 1.03
Tree 40 250000 get(125000) 200.24 ns/op 195.99 ns/op 1.02
Tree 40 250000 set(125000) 888.53 ns/op 932.36 ns/op 0.95
Tree 40 250000 toArray() 20.529 ms/op 18.777 ms/op 1.09
Tree 40 250000 iterate all - toArray() + loop 20.040 ms/op 17.235 ms/op 1.16
Tree 40 250000 iterate all - get(i) 70.368 ms/op 70.608 ms/op 1.00
MutableVector 250000 create 11.136 ms/op 10.703 ms/op 1.04
MutableVector 250000 get(125000) 7.1730 ns/op 6.2390 ns/op 1.15
MutableVector 250000 set(125000) 236.43 ns/op 238.90 ns/op 0.99
MutableVector 250000 toArray() 3.0319 ms/op 2.9413 ms/op 1.03
MutableVector 250000 iterate all - toArray() + loop 3.2501 ms/op 3.0498 ms/op 1.07
MutableVector 250000 iterate all - get(i) 1.5340 ms/op 1.5063 ms/op 1.02
Array 250000 create 2.6985 ms/op 2.6665 ms/op 1.01
Array 250000 clone - spread 969.99 us/op 1.1090 ms/op 0.87
Array 250000 get(125000) 0.50400 ns/op 0.54600 ns/op 0.92
Array 250000 set(125000) 0.57400 ns/op 0.62000 ns/op 0.93
Array 250000 iterate all - loop 82.919 us/op 81.409 us/op 1.02
effectiveBalanceIncrements clone Uint8Array 300000 23.375 us/op 24.078 us/op 0.97
effectiveBalanceIncrements clone MutableVector 300000 264.00 ns/op 322.00 ns/op 0.82
effectiveBalanceIncrements rw all Uint8Array 300000 179.03 us/op 174.67 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 74.744 ms/op 78.170 ms/op 0.96
phase0 afterProcessEpoch - 250000 vs - 7PWei 113.60 ms/op 112.83 ms/op 1.01
phase0 beforeProcessEpoch - 250000 vs - 7PWei 39.227 ms/op 31.937 ms/op 1.23
altair processEpoch - mainnet_e81889 494.89 ms/op 443.31 ms/op 1.12
mainnet_e81889 - altair beforeProcessEpoch 53.024 ms/op 62.032 ms/op 0.85
mainnet_e81889 - altair processJustificationAndFinalization 18.757 us/op 12.867 us/op 1.46
mainnet_e81889 - altair processInactivityUpdates 8.9925 ms/op 6.0910 ms/op 1.48
mainnet_e81889 - altair processRewardsAndPenalties 54.845 ms/op 53.318 ms/op 1.03
mainnet_e81889 - altair processRegistryUpdates 2.7060 us/op 2.3840 us/op 1.14
mainnet_e81889 - altair processSlashings 863.00 ns/op 482.00 ns/op 1.79
mainnet_e81889 - altair processEth1DataReset 766.00 ns/op 529.00 ns/op 1.45
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2786 ms/op 1.2540 ms/op 1.02
mainnet_e81889 - altair processSlashingsReset 6.4490 us/op 2.6030 us/op 2.48
mainnet_e81889 - altair processRandaoMixesReset 6.9820 us/op 4.7340 us/op 1.47
mainnet_e81889 - altair processHistoricalRootsUpdate 2.0060 us/op 859.00 ns/op 2.34
mainnet_e81889 - altair processParticipationFlagUpdates 2.2630 us/op 2.1520 us/op 1.05
mainnet_e81889 - altair processSyncCommitteeUpdates 507.00 ns/op 507.00 ns/op 1.00
mainnet_e81889 - altair afterProcessEpoch 129.17 ms/op 124.19 ms/op 1.04
capella processEpoch - mainnet_e217614 1.8437 s/op 1.5059 s/op 1.22
mainnet_e217614 - capella beforeProcessEpoch 329.49 ms/op 242.51 ms/op 1.36
mainnet_e217614 - capella processJustificationAndFinalization 26.196 us/op 19.006 us/op 1.38
mainnet_e217614 - capella processInactivityUpdates 25.081 ms/op 21.083 ms/op 1.19
mainnet_e217614 - capella processRewardsAndPenalties 322.23 ms/op 264.30 ms/op 1.22
mainnet_e217614 - capella processRegistryUpdates 35.774 us/op 18.839 us/op 1.90
mainnet_e217614 - capella processSlashings 991.00 ns/op 874.00 ns/op 1.13
mainnet_e217614 - capella processEth1DataReset 1.0350 us/op 478.00 ns/op 2.17
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.3274 ms/op 4.0882 ms/op 1.30
mainnet_e217614 - capella processSlashingsReset 6.6580 us/op 3.9730 us/op 1.68
mainnet_e217614 - capella processRandaoMixesReset 13.003 us/op 4.2040 us/op 3.09
mainnet_e217614 - capella processHistoricalRootsUpdate 1.4550 us/op 614.00 ns/op 2.37
mainnet_e217614 - capella processParticipationFlagUpdates 4.7440 us/op 4.3470 us/op 1.09
mainnet_e217614 - capella afterProcessEpoch 342.61 ms/op 304.51 ms/op 1.13
phase0 processEpoch - mainnet_e58758 590.26 ms/op 474.10 ms/op 1.25
mainnet_e58758 - phase0 beforeProcessEpoch 166.51 ms/op 121.84 ms/op 1.37
mainnet_e58758 - phase0 processJustificationAndFinalization 38.345 us/op 21.905 us/op 1.75
mainnet_e58758 - phase0 processRewardsAndPenalties 74.919 ms/op 53.293 ms/op 1.41
mainnet_e58758 - phase0 processRegistryUpdates 21.754 us/op 15.347 us/op 1.42
mainnet_e58758 - phase0 processSlashings 1.4690 us/op 1.0450 us/op 1.41
mainnet_e58758 - phase0 processEth1DataReset 1.2730 us/op 1.1960 us/op 1.06
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 4.1047 ms/op 1.9886 ms/op 2.06
mainnet_e58758 - phase0 processSlashingsReset 6.1370 us/op 6.6390 us/op 0.92
mainnet_e58758 - phase0 processRandaoMixesReset 11.514 us/op 5.3380 us/op 2.16
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.1510 us/op 651.00 ns/op 1.77
mainnet_e58758 - phase0 processParticipationRecordUpdates 10.032 us/op 6.1900 us/op 1.62
mainnet_e58758 - phase0 afterProcessEpoch 115.75 ms/op 106.59 ms/op 1.09
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.4139 ms/op 1.3366 ms/op 1.81
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6009 ms/op 1.5328 ms/op 1.70
altair processInactivityUpdates - 250000 normalcase 24.503 ms/op 31.331 ms/op 0.78
altair processInactivityUpdates - 250000 worstcase 23.664 ms/op 28.759 ms/op 0.82
phase0 processRegistryUpdates - 250000 normalcase 20.357 us/op 12.736 us/op 1.60
phase0 processRegistryUpdates - 250000 badcase_full_deposits 622.82 us/op 382.49 us/op 1.63
phase0 processRegistryUpdates - 250000 worstcase 0.5 192.26 ms/op 144.29 ms/op 1.33
altair processRewardsAndPenalties - 250000 normalcase 60.645 ms/op 68.755 ms/op 0.88
altair processRewardsAndPenalties - 250000 worstcase 69.616 ms/op 67.380 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 11.573 ms/op 8.0920 ms/op 1.43
phase0 getAttestationDeltas - 250000 worstcase 12.913 ms/op 8.2977 ms/op 1.56
phase0 processSlashings - 250000 worstcase 2.9059 ms/op 2.4873 ms/op 1.17
altair processSyncCommitteeUpdates - 250000 176.14 ms/op 161.46 ms/op 1.09
BeaconState.hashTreeRoot - No change 552.00 ns/op 420.00 ns/op 1.31
BeaconState.hashTreeRoot - 1 full validator 183.87 us/op 126.87 us/op 1.45
BeaconState.hashTreeRoot - 32 full validator 2.0326 ms/op 1.5118 ms/op 1.34
BeaconState.hashTreeRoot - 512 full validator 20.151 ms/op 15.080 ms/op 1.34
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 224.00 us/op 165.83 us/op 1.35
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 4.0203 ms/op 2.7881 ms/op 1.44
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 38.614 ms/op 32.436 ms/op 1.19
BeaconState.hashTreeRoot - 1 balances 201.04 us/op 168.59 us/op 1.19
BeaconState.hashTreeRoot - 32 balances 1.9251 ms/op 1.4042 ms/op 1.37
BeaconState.hashTreeRoot - 512 balances 15.861 ms/op 11.933 ms/op 1.33
BeaconState.hashTreeRoot - 250000 balances 278.43 ms/op 200.30 ms/op 1.39
aggregationBits - 2048 els - zipIndexesInBitList 35.264 us/op 20.259 us/op 1.74
regular array get 100000 times 37.468 us/op 46.161 us/op 0.81
wrappedArray get 100000 times 44.097 us/op 37.757 us/op 1.17
arrayWithProxy get 100000 times 15.380 ms/op 15.252 ms/op 1.01
ssz.Root.equals 313.00 ns/op 245.00 ns/op 1.28
byteArrayEquals 313.00 ns/op 255.00 ns/op 1.23
shuffle list - 16384 els 8.1636 ms/op 7.3812 ms/op 1.11
shuffle list - 250000 els 110.60 ms/op 109.76 ms/op 1.01
processSlot - 1 slots 22.248 us/op 20.564 us/op 1.08
processSlot - 32 slots 4.3857 ms/op 4.5419 ms/op 0.97
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 52.776 ms/op 57.670 ms/op 0.92
getCommitteeAssignments - req 1 vs - 250000 vc 2.5201 ms/op 2.5494 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 3.6756 ms/op 3.6808 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0460 ms/op 4.1743 ms/op 0.97
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5000 ns/op 5.3100 ns/op 0.85
state getBlockRootAtSlot - 250000 vs - 7PWei 696.55 ns/op 696.32 ns/op 1.00
computeProposers - vc 250000 8.9891 ms/op 9.4045 ms/op 0.96
computeEpochShuffling - vc 250000 102.85 ms/op 107.99 ms/op 0.95
getNextSyncCommittee - vc 250000 158.96 ms/op 162.94 ms/op 0.98
computeSigningRoot for AttestationData 24.088 us/op 32.828 us/op 0.73
hash AttestationData serialized data then Buffer.toString(base64) 2.3276 us/op 2.5219 us/op 0.92
toHexString serialized data 1.0743 us/op 1.8537 us/op 0.58
Buffer.toString(base64) 211.46 ns/op 301.04 ns/op 0.70

by benchmarkbot/action

@nazarhussain nazarhussain added the scope-testing Issues for adding test coverage, fixing existing tests or testing strategies. label Oct 11, 2023
// So we are adding a particular delay to ensure that the `unknownBlockSync` is enabled.
const syncStartSlot = this.chain.clock.currentSlot;
// Having one epoch time for the node to connect to peers and start a syncing process
const epochCheckFotSyncSlot = syncStartSlot + SLOTS_PER_EPOCH;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const epochCheckFotSyncSlot = syncStartSlot + SLOTS_PER_EPOCH;
const epochCheckForSyncSlot = syncStartSlot + SLOTS_PER_EPOCH;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will fix this typo in upcoming PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed by @tuyennhv already, see 1f36e8d

@twoeths twoeths enabled auto-merge (squash) October 13, 2023 01:27
@twoeths twoeths merged commit 48f9a08 into unstable Oct 13, 2023
15 checks passed
@twoeths twoeths deleted the nh/sim-fix branch October 13, 2023 01:38
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.12.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope-testing Issues for adding test coverage, fixing existing tests or testing strategies.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants