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: return finalized as false if finalized epoch is genesis epoch #6965

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jul 18, 2024

Motivation

E2E tests and Sim endpoint tests are failing since we merged #6963. The issue happens because removed handling "head" explicitly but actual problem is that we rather need to check genesis slot / epoch explicitly as it is done in LC server for example.

finalizedCheckpoint.epoch !== 0 &&

Description

Return finalized as false in metadata if finalized epoch is genesis epoch / block slot

@nflaig nflaig force-pushed the nflaig/finalized-genesis-epoch-slot branch from 3a1056f to c0e88ac Compare July 18, 2024 20:52
@nflaig nflaig changed the title fix: return finalized as false in metadata if genesis slot or epoch fix: return finalized as false if called with genesis slot or epoch Jul 18, 2024
@nflaig nflaig force-pushed the nflaig/finalized-genesis-epoch-slot branch from c0e88ac to 079e87a Compare July 18, 2024 20:54
Copy link

codecov bot commented Jul 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.49%. Comparing base (fed08fe) to head (d7534fc).
Report is 7 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6965   +/-   ##
=========================================
  Coverage     62.49%   62.49%           
=========================================
  Files           576      576           
  Lines         61171    61180    +9     
  Branches       2133     2138    +5     
=========================================
+ Hits          38230    38236    +6     
- Misses        22902    22905    +3     
  Partials         39       39           

@nflaig nflaig marked this pull request as ready for review July 18, 2024 21:25
@nflaig nflaig requested a review from a team as a code owner July 18, 2024 21:25
Copy link
Contributor

github-actions bot commented Jul 18, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b51888b Previous: 02cc65b Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 815.88 us/op 803.99 us/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 76.602 us/op 46.515 us/op 1.65
BLS verify - blst-native 1.3346 ms/op 1.2209 ms/op 1.09
BLS verifyMultipleSignatures 3 - blst-native 2.9538 ms/op 2.5850 ms/op 1.14
BLS verifyMultipleSignatures 8 - blst-native 6.2464 ms/op 5.7064 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst-native 23.474 ms/op 20.943 ms/op 1.12
BLS verifyMultipleSignatures 64 - blst-native 47.105 ms/op 41.239 ms/op 1.14
BLS verifyMultipleSignatures 128 - blst-native 92.289 ms/op 81.841 ms/op 1.13
BLS deserializing 10000 signatures 954.24 ms/op 836.72 ms/op 1.14
BLS deserializing 100000 signatures 9.5386 s/op 8.4870 s/op 1.12
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3811 ms/op 1.2223 ms/op 1.13
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5493 ms/op 1.3877 ms/op 1.12
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4529 ms/op 2.1694 ms/op 1.13
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.5396 ms/op 3.2132 ms/op 1.10
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.8896 ms/op 6.0415 ms/op 0.97
BLS aggregatePubkeys 32 - blst-native 27.228 us/op 24.884 us/op 1.09
BLS aggregatePubkeys 128 - blst-native 108.75 us/op 97.879 us/op 1.11
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 87.666 ms/op 64.907 ms/op 1.35
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 70.051 ms/op 57.415 ms/op 1.22
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 48.655 ms/op 32.816 ms/op 1.48
getSlashingsAndExits - default max 148.67 us/op 86.824 us/op 1.71
getSlashingsAndExits - 2k 782.72 us/op 284.35 us/op 2.75
proposeBlockBody type=full, size=empty 8.2184 ms/op 5.9427 ms/op 1.38
isKnown best case - 1 super set check 675.00 ns/op 313.00 ns/op 2.16
isKnown normal case - 2 super set checks 708.00 ns/op 332.00 ns/op 2.13
isKnown worse case - 16 super set checks 716.00 ns/op 322.00 ns/op 2.22
InMemoryCheckpointStateCache - add get delete 9.2130 us/op 5.4110 us/op 1.70
validate api signedAggregateAndProof - struct 3.0065 ms/op 2.6882 ms/op 1.12
validate gossip signedAggregateAndProof - struct 2.7559 ms/op 2.6943 ms/op 1.02
validate gossip attestation - vc 640000 1.3721 ms/op 1.2816 ms/op 1.07
batch validate gossip attestation - vc 640000 - chunk 32 165.46 us/op 156.49 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 151.35 us/op 139.93 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 128 141.80 us/op 139.70 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 163.91 us/op 129.79 us/op 1.26
pickEth1Vote - no votes 1.3373 ms/op 1.1001 ms/op 1.22
pickEth1Vote - max votes 12.934 ms/op 9.6016 ms/op 1.35
pickEth1Vote - Eth1Data hashTreeRoot value x2048 23.705 ms/op 16.772 ms/op 1.41
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 30.752 ms/op 22.892 ms/op 1.34
pickEth1Vote - Eth1Data fastSerialize value x2048 666.97 us/op 594.08 us/op 1.12
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.1433 ms/op 7.5402 ms/op 0.68
bytes32 toHexString 687.00 ns/op 567.00 ns/op 1.21
bytes32 Buffer.toString(hex) 314.00 ns/op 275.00 ns/op 1.14
bytes32 Buffer.toString(hex) from Uint8Array 526.00 ns/op 394.00 ns/op 1.34
bytes32 Buffer.toString(hex) + 0x 307.00 ns/op 264.00 ns/op 1.16
Object access 1 prop 0.22400 ns/op 0.15100 ns/op 1.48
Map access 1 prop 0.14700 ns/op 0.13300 ns/op 1.11
Object get x1000 6.5970 ns/op 6.0760 ns/op 1.09
Map get x1000 7.9540 ns/op 6.4790 ns/op 1.23
Object set x1000 59.962 ns/op 40.419 ns/op 1.48
Map set x1000 39.879 ns/op 23.492 ns/op 1.70
Return object 10000 times 0.32130 ns/op 0.29800 ns/op 1.08
Throw Error 10000 times 3.9887 us/op 3.5467 us/op 1.12
fastMsgIdFn sha256 / 200 bytes 2.8620 us/op 2.3060 us/op 1.24
fastMsgIdFn h32 xxhash / 200 bytes 383.00 ns/op 283.00 ns/op 1.35
fastMsgIdFn h64 xxhash / 200 bytes 342.00 ns/op 274.00 ns/op 1.25
fastMsgIdFn sha256 / 1000 bytes 8.6810 us/op 7.3610 us/op 1.18
fastMsgIdFn h32 xxhash / 1000 bytes 623.00 ns/op 411.00 ns/op 1.52
fastMsgIdFn h64 xxhash / 1000 bytes 506.00 ns/op 341.00 ns/op 1.48
fastMsgIdFn sha256 / 10000 bytes 75.249 us/op 62.932 us/op 1.20
fastMsgIdFn h32 xxhash / 10000 bytes 2.1230 us/op 1.8870 us/op 1.13
fastMsgIdFn h64 xxhash / 10000 bytes 1.3210 us/op 1.2270 us/op 1.08
send data - 1000 256B messages 13.786 ms/op 13.862 ms/op 0.99
send data - 1000 512B messages 20.499 ms/op 18.014 ms/op 1.14
send data - 1000 1024B messages 34.827 ms/op 27.868 ms/op 1.25
send data - 1000 1200B messages 31.455 ms/op 27.315 ms/op 1.15
send data - 1000 2048B messages 48.387 ms/op 33.121 ms/op 1.46
send data - 1000 4096B messages 38.675 ms/op 29.131 ms/op 1.33
send data - 1000 16384B messages 80.593 ms/op 72.308 ms/op 1.11
send data - 1000 65536B messages 230.64 ms/op 218.97 ms/op 1.05
enrSubnets - fastDeserialize 64 bits 1.4840 us/op 1.1310 us/op 1.31
enrSubnets - ssz BitVector 64 bits 480.00 ns/op 391.00 ns/op 1.23
enrSubnets - fastDeserialize 4 bits 215.00 ns/op 155.00 ns/op 1.39
enrSubnets - ssz BitVector 4 bits 468.00 ns/op 393.00 ns/op 1.19
prioritizePeers score -10:0 att 32-0.1 sync 2-0 199.44 us/op 154.67 us/op 1.29
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 237.78 us/op 194.74 us/op 1.22
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 306.82 us/op 274.72 us/op 1.12
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 534.07 us/op 417.99 us/op 1.28
prioritizePeers score 0:0 att 64-1 sync 4-1 848.82 us/op 747.48 us/op 1.14
array of 16000 items push then shift 1.8587 us/op 1.6598 us/op 1.12
LinkedList of 16000 items push then shift 11.613 ns/op 7.4770 ns/op 1.55
array of 16000 items push then pop 164.53 ns/op 129.31 ns/op 1.27
LinkedList of 16000 items push then pop 8.7280 ns/op 7.3920 ns/op 1.18
array of 24000 items push then shift 2.6574 us/op 2.4411 us/op 1.09
LinkedList of 24000 items push then shift 10.115 ns/op 7.6290 ns/op 1.33
array of 24000 items push then pop 195.28 ns/op 150.04 ns/op 1.30
LinkedList of 24000 items push then pop 8.1790 ns/op 7.3220 ns/op 1.12
intersect bitArray bitLen 8 7.0120 ns/op 6.3620 ns/op 1.10
intersect array and set length 8 68.429 ns/op 47.568 ns/op 1.44
intersect bitArray bitLen 128 32.628 ns/op 29.930 ns/op 1.09
intersect array and set length 128 894.34 ns/op 671.38 ns/op 1.33
bitArray.getTrueBitIndexes() bitLen 128 1.8250 us/op 2.0180 us/op 0.90
bitArray.getTrueBitIndexes() bitLen 248 2.7770 us/op 3.6190 us/op 0.77
bitArray.getTrueBitIndexes() bitLen 512 6.1200 us/op 7.3560 us/op 0.83
Buffer.concat 32 items 1.0110 us/op 970.00 ns/op 1.04
Uint8Array.set 32 items 1.8440 us/op 1.8020 us/op 1.02
Buffer.copy 2.0400 us/op 2.2280 us/op 0.92
Uint8Array.set - with subarray 2.8380 us/op 2.9510 us/op 0.96
Uint8Array.set - without subarray 1.6180 us/op 1.5010 us/op 1.08
getUint32 - dataview 285.00 ns/op 261.00 ns/op 1.09
getUint32 - manual 172.00 ns/op 171.00 ns/op 1.01
Set add up to 64 items then delete first 2.8199 us/op 2.3634 us/op 1.19
OrderedSet add up to 64 items then delete first 4.4067 us/op 3.7812 us/op 1.17
Set add up to 64 items then delete last 3.4278 us/op 2.7515 us/op 1.25
OrderedSet add up to 64 items then delete last 4.2279 us/op 3.8063 us/op 1.11
Set add up to 64 items then delete middle 3.4138 us/op 2.8337 us/op 1.20
OrderedSet add up to 64 items then delete middle 6.7578 us/op 5.6321 us/op 1.20
Set add up to 128 items then delete first 6.5894 us/op 5.3258 us/op 1.24
OrderedSet add up to 128 items then delete first 10.391 us/op 8.4127 us/op 1.24
Set add up to 128 items then delete last 6.5540 us/op 5.1591 us/op 1.27
OrderedSet add up to 128 items then delete last 8.1050 us/op 7.3668 us/op 1.10
Set add up to 128 items then delete middle 5.9628 us/op 4.9179 us/op 1.21
OrderedSet add up to 128 items then delete middle 16.766 us/op 13.708 us/op 1.22
Set add up to 256 items then delete first 12.468 us/op 11.363 us/op 1.10
OrderedSet add up to 256 items then delete first 19.825 us/op 19.235 us/op 1.03
Set add up to 256 items then delete last 11.034 us/op 10.717 us/op 1.03
OrderedSet add up to 256 items then delete last 18.801 us/op 16.654 us/op 1.13
Set add up to 256 items then delete middle 12.596 us/op 10.181 us/op 1.24
OrderedSet add up to 256 items then delete middle 47.953 us/op 42.704 us/op 1.12
transfer serialized Status (84 B) 1.6990 us/op 1.4230 us/op 1.19
copy serialized Status (84 B) 1.4500 us/op 1.2150 us/op 1.19
transfer serialized SignedVoluntaryExit (112 B) 1.7780 us/op 1.6170 us/op 1.10
copy serialized SignedVoluntaryExit (112 B) 1.5130 us/op 1.2940 us/op 1.17
transfer serialized ProposerSlashing (416 B) 2.1200 us/op 2.1740 us/op 0.98
copy serialized ProposerSlashing (416 B) 2.4070 us/op 1.6480 us/op 1.46
transfer serialized Attestation (485 B) 2.1580 us/op 1.9930 us/op 1.08
copy serialized Attestation (485 B) 2.3070 us/op 1.9630 us/op 1.18
transfer serialized AttesterSlashing (33232 B) 2.0760 us/op 2.4160 us/op 0.86
copy serialized AttesterSlashing (33232 B) 8.3530 us/op 6.2040 us/op 1.35
transfer serialized Small SignedBeaconBlock (128000 B) 2.5970 us/op 3.2330 us/op 0.80
copy serialized Small SignedBeaconBlock (128000 B) 19.982 us/op 17.309 us/op 1.15
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9080 us/op 3.3300 us/op 0.87
copy serialized Avg SignedBeaconBlock (200000 B) 31.080 us/op 24.708 us/op 1.26
transfer serialized BlobsSidecar (524380 B) 3.6290 us/op 3.6640 us/op 0.99
copy serialized BlobsSidecar (524380 B) 115.67 us/op 135.64 us/op 0.85
transfer serialized Big SignedBeaconBlock (1000000 B) 4.7840 us/op 3.7190 us/op 1.29
copy serialized Big SignedBeaconBlock (1000000 B) 187.51 us/op 381.08 us/op 0.49
pass gossip attestations to forkchoice per slot 3.7072 ms/op 3.4016 ms/op 1.09
forkChoice updateHead vc 100000 bc 64 eq 0 552.35 us/op 507.57 us/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 0 4.2503 ms/op 3.0812 ms/op 1.38
forkChoice updateHead vc 1000000 bc 64 eq 0 6.7972 ms/op 5.4017 ms/op 1.26
forkChoice updateHead vc 600000 bc 320 eq 0 3.7033 ms/op 3.0706 ms/op 1.21
forkChoice updateHead vc 600000 bc 1200 eq 0 3.9671 ms/op 2.9622 ms/op 1.34
forkChoice updateHead vc 600000 bc 7200 eq 0 4.4383 ms/op 3.8472 ms/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 1000 11.635 ms/op 10.298 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 10000 12.250 ms/op 10.981 ms/op 1.12
forkChoice updateHead vc 600000 bc 64 eq 300000 30.526 ms/op 14.753 ms/op 2.07
computeDeltas 500000 validators 300 proto nodes 4.2542 ms/op 3.4305 ms/op 1.24
computeDeltas 500000 validators 1200 proto nodes 4.2060 ms/op 3.4169 ms/op 1.23
computeDeltas 500000 validators 7200 proto nodes 4.2252 ms/op 3.4661 ms/op 1.22
computeDeltas 750000 validators 300 proto nodes 6.1572 ms/op 5.1120 ms/op 1.20
computeDeltas 750000 validators 1200 proto nodes 5.8105 ms/op 5.1584 ms/op 1.13
computeDeltas 750000 validators 7200 proto nodes 6.0792 ms/op 5.2424 ms/op 1.16
computeDeltas 1400000 validators 300 proto nodes 11.015 ms/op 10.069 ms/op 1.09
computeDeltas 1400000 validators 1200 proto nodes 11.167 ms/op 9.9348 ms/op 1.12
computeDeltas 1400000 validators 7200 proto nodes 11.423 ms/op 9.9049 ms/op 1.15
computeDeltas 2100000 validators 300 proto nodes 17.243 ms/op 14.999 ms/op 1.15
computeDeltas 2100000 validators 1200 proto nodes 16.529 ms/op 14.848 ms/op 1.11
computeDeltas 2100000 validators 7200 proto nodes 15.842 ms/op 15.374 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 1.9389 ms/op 1.8441 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei worstcase 3.0760 ms/op 2.5664 ms/op 1.20
altair processAttestation - setStatus - 1/6 committees join 143.13 us/op 89.997 us/op 1.59
altair processAttestation - setStatus - 1/3 committees join 258.68 us/op 181.65 us/op 1.42
altair processAttestation - setStatus - 1/2 committees join 374.25 us/op 252.96 us/op 1.48
altair processAttestation - setStatus - 2/3 committees join 582.94 us/op 336.67 us/op 1.73
altair processAttestation - setStatus - 4/5 committees join 746.82 us/op 477.62 us/op 1.56
altair processAttestation - setStatus - 100% committees join 877.40 us/op 577.29 us/op 1.52
altair processBlock - 250000 vs - 7PWei normalcase 6.8560 ms/op 4.0651 ms/op 1.69
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.502 ms/op 23.387 ms/op 1.60
altair processBlock - 250000 vs - 7PWei worstcase 54.312 ms/op 39.700 ms/op 1.37
altair processBlock - 250000 vs - 7PWei worstcase hashState 109.86 ms/op 76.584 ms/op 1.43
phase0 processBlock - 250000 vs - 7PWei normalcase 3.1499 ms/op 2.2358 ms/op 1.41
phase0 processBlock - 250000 vs - 7PWei worstcase 34.658 ms/op 26.648 ms/op 1.30
altair processEth1Data - 250000 vs - 7PWei normalcase 625.35 us/op 313.46 us/op 1.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.8000 us/op 5.5850 us/op 1.58
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 37.570 us/op 27.009 us/op 1.39
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 16.737 us/op 8.9900 us/op 1.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.896 us/op 6.5160 us/op 1.67
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 180.12 us/op 108.84 us/op 1.65
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0586 ms/op 731.00 us/op 1.45
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5218 ms/op 939.69 us/op 1.62
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5335 ms/op 913.30 us/op 1.68
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.1736 ms/op 2.5147 ms/op 1.66
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0290 ms/op 1.7303 ms/op 1.17
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.3791 ms/op 3.9016 ms/op 1.89
Tree 40 250000 create 638.21 ms/op 225.81 ms/op 2.83
Tree 40 250000 get(125000) 187.95 ns/op 147.67 ns/op 1.27
Tree 40 250000 set(125000) 2.2146 us/op 726.98 ns/op 3.05
Tree 40 250000 toArray() 28.810 ms/op 20.618 ms/op 1.40
Tree 40 250000 iterate all - toArray() + loop 32.739 ms/op 20.493 ms/op 1.60
Tree 40 250000 iterate all - get(i) 71.090 ms/op 58.765 ms/op 1.21
MutableVector 250000 create 18.833 ms/op 10.564 ms/op 1.78
MutableVector 250000 get(125000) 7.3120 ns/op 7.6670 ns/op 0.95
MutableVector 250000 set(125000) 729.06 ns/op 195.82 ns/op 3.72
MutableVector 250000 toArray() 6.8051 ms/op 3.9471 ms/op 1.72
MutableVector 250000 iterate all - toArray() + loop 7.1422 ms/op 4.1018 ms/op 1.74
MutableVector 250000 iterate all - get(i) 1.8038 ms/op 1.7094 ms/op 1.06
Array 250000 create 6.5355 ms/op 3.5654 ms/op 1.83
Array 250000 clone - spread 6.3828 ms/op 1.4138 ms/op 4.51
Array 250000 get(125000) 0.52500 ns/op 0.41400 ns/op 1.27
Array 250000 set(125000) 0.57900 ns/op 0.43700 ns/op 1.32
Array 250000 iterate all - loop 105.67 us/op 82.888 us/op 1.27
effectiveBalanceIncrements clone Uint8Array 300000 90.764 us/op 37.500 us/op 2.42
effectiveBalanceIncrements clone MutableVector 300000 167.00 ns/op 126.00 ns/op 1.33
effectiveBalanceIncrements rw all Uint8Array 300000 233.37 us/op 198.01 us/op 1.18
effectiveBalanceIncrements rw all MutableVector 300000 215.96 ms/op 65.350 ms/op 3.30
phase0 afterProcessEpoch - 250000 vs - 7PWei 108.17 ms/op 89.498 ms/op 1.21
Array.fill - length 1000000 10.167 ms/op 3.7055 ms/op 2.74
Array push - length 1000000 35.406 ms/op 19.106 ms/op 1.85
Array.get 0.32523 ns/op 0.28661 ns/op 1.13
Uint8Array.get 0.48996 ns/op 0.44829 ns/op 1.09
phase0 beforeProcessEpoch - 250000 vs - 7PWei 44.321 ms/op 23.782 ms/op 1.86
altair processEpoch - mainnet_e81889 468.80 ms/op 338.12 ms/op 1.39
mainnet_e81889 - altair beforeProcessEpoch 46.643 ms/op 27.935 ms/op 1.67
mainnet_e81889 - altair processJustificationAndFinalization 20.406 us/op 11.085 us/op 1.84
mainnet_e81889 - altair processInactivityUpdates 9.6262 ms/op 5.3987 ms/op 1.78
mainnet_e81889 - altair processRewardsAndPenalties 58.758 ms/op 47.340 ms/op 1.24
mainnet_e81889 - altair processRegistryUpdates 4.3270 us/op 1.8540 us/op 2.33
mainnet_e81889 - altair processSlashings 1.2530 us/op 377.00 ns/op 3.32
mainnet_e81889 - altair processEth1DataReset 571.00 ns/op 263.00 ns/op 2.17
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9251 ms/op 1.1312 ms/op 1.70
mainnet_e81889 - altair processSlashingsReset 8.0860 us/op 2.5670 us/op 3.15
mainnet_e81889 - altair processRandaoMixesReset 8.0720 us/op 3.3190 us/op 2.43
mainnet_e81889 - altair processHistoricalRootsUpdate 991.00 ns/op 320.00 ns/op 3.10
mainnet_e81889 - altair processParticipationFlagUpdates 3.4970 us/op 1.7340 us/op 2.02
mainnet_e81889 - altair processSyncCommitteeUpdates 953.00 ns/op 353.00 ns/op 2.70
mainnet_e81889 - altair afterProcessEpoch 97.384 ms/op 90.477 ms/op 1.08
capella processEpoch - mainnet_e217614 1.2601 s/op 1.0876 s/op 1.16
mainnet_e217614 - capella beforeProcessEpoch 129.15 ms/op 110.12 ms/op 1.17
mainnet_e217614 - capella processJustificationAndFinalization 16.476 us/op 13.641 us/op 1.21
mainnet_e217614 - capella processInactivityUpdates 19.999 ms/op 17.311 ms/op 1.16
mainnet_e217614 - capella processRewardsAndPenalties 255.40 ms/op 225.20 ms/op 1.13
mainnet_e217614 - capella processRegistryUpdates 15.062 us/op 12.770 us/op 1.18
mainnet_e217614 - capella processSlashings 420.00 ns/op 395.00 ns/op 1.06
mainnet_e217614 - capella processEth1DataReset 575.00 ns/op 324.00 ns/op 1.77
mainnet_e217614 - capella processEffectiveBalanceUpdates 12.973 ms/op 12.783 ms/op 1.01
mainnet_e217614 - capella processSlashingsReset 5.3930 us/op 3.5490 us/op 1.52
mainnet_e217614 - capella processRandaoMixesReset 4.4120 us/op 3.8270 us/op 1.15
mainnet_e217614 - capella processHistoricalRootsUpdate 577.00 ns/op 1.2860 us/op 0.45
mainnet_e217614 - capella processParticipationFlagUpdates 2.8740 us/op 2.1110 us/op 1.36
mainnet_e217614 - capella afterProcessEpoch 274.95 ms/op 277.36 ms/op 0.99
phase0 processEpoch - mainnet_e58758 379.81 ms/op 343.56 ms/op 1.11
mainnet_e58758 - phase0 beforeProcessEpoch 82.466 ms/op 73.719 ms/op 1.12
mainnet_e58758 - phase0 processJustificationAndFinalization 19.937 us/op 12.680 us/op 1.57
mainnet_e58758 - phase0 processRewardsAndPenalties 38.111 ms/op 36.896 ms/op 1.03
mainnet_e58758 - phase0 processRegistryUpdates 12.033 us/op 8.2830 us/op 1.45
mainnet_e58758 - phase0 processSlashings 510.00 ns/op 373.00 ns/op 1.37
mainnet_e58758 - phase0 processEth1DataReset 410.00 ns/op 345.00 ns/op 1.19
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2759 ms/op 991.51 us/op 1.29
mainnet_e58758 - phase0 processSlashingsReset 5.1710 us/op 3.2330 us/op 1.60
mainnet_e58758 - phase0 processRandaoMixesReset 6.0570 us/op 3.2340 us/op 1.87
mainnet_e58758 - phase0 processHistoricalRootsUpdate 517.00 ns/op 318.00 ns/op 1.63
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6600 us/op 2.2660 us/op 1.62
mainnet_e58758 - phase0 afterProcessEpoch 83.576 ms/op 77.792 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5094 ms/op 1.2301 ms/op 1.23
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3096 ms/op 1.9397 ms/op 1.19
altair processInactivityUpdates - 250000 normalcase 18.817 ms/op 15.115 ms/op 1.24
altair processInactivityUpdates - 250000 worstcase 19.899 ms/op 19.318 ms/op 1.03
phase0 processRegistryUpdates - 250000 normalcase 9.4190 us/op 7.9240 us/op 1.19
phase0 processRegistryUpdates - 250000 badcase_full_deposits 358.04 us/op 290.69 us/op 1.23
phase0 processRegistryUpdates - 250000 worstcase 0.5 143.68 ms/op 128.70 ms/op 1.12
altair processRewardsAndPenalties - 250000 normalcase 51.247 ms/op 40.972 ms/op 1.25
altair processRewardsAndPenalties - 250000 worstcase 52.875 ms/op 39.059 ms/op 1.35
phase0 getAttestationDeltas - 250000 normalcase 8.7302 ms/op 7.6960 ms/op 1.13
phase0 getAttestationDeltas - 250000 worstcase 12.721 ms/op 8.1176 ms/op 1.57
phase0 processSlashings - 250000 worstcase 129.25 us/op 98.161 us/op 1.32
altair processSyncCommitteeUpdates - 250000 157.49 ms/op 134.11 ms/op 1.17
BeaconState.hashTreeRoot - No change 455.00 ns/op 283.00 ns/op 1.61
BeaconState.hashTreeRoot - 1 full validator 128.09 us/op 105.91 us/op 1.21
BeaconState.hashTreeRoot - 32 full validator 1.2396 ms/op 1.5351 ms/op 0.81
BeaconState.hashTreeRoot - 512 full validator 15.351 ms/op 11.656 ms/op 1.32
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 164.53 us/op 144.54 us/op 1.14
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.4963 ms/op 1.9351 ms/op 1.29
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.587 ms/op 26.553 ms/op 1.15
BeaconState.hashTreeRoot - 1 balances 135.59 us/op 125.14 us/op 1.08
BeaconState.hashTreeRoot - 32 balances 994.86 us/op 943.41 us/op 1.05
BeaconState.hashTreeRoot - 512 balances 12.077 ms/op 8.1507 ms/op 1.48
BeaconState.hashTreeRoot - 250000 balances 188.82 ms/op 160.28 ms/op 1.18
aggregationBits - 2048 els - zipIndexesInBitList 40.726 us/op 26.073 us/op 1.56
byteArrayEquals 32 58.497 ns/op 55.151 ns/op 1.06
Buffer.compare 32 19.372 ns/op 17.763 ns/op 1.09
byteArrayEquals 1024 1.8610 us/op 1.6281 us/op 1.14
Buffer.compare 1024 31.184 ns/op 26.211 ns/op 1.19
byteArrayEquals 16384 28.585 us/op 26.132 us/op 1.09
Buffer.compare 16384 214.29 ns/op 207.60 ns/op 1.03
byteArrayEquals 123687377 212.55 ms/op 196.62 ms/op 1.08
Buffer.compare 123687377 9.8358 ms/op 6.7633 ms/op 1.45
byteArrayEquals 32 - diff last byte 57.835 ns/op 54.572 ns/op 1.06
Buffer.compare 32 - diff last byte 18.624 ns/op 18.039 ns/op 1.03
byteArrayEquals 1024 - diff last byte 1.7174 us/op 1.6473 us/op 1.04
Buffer.compare 1024 - diff last byte 29.671 ns/op 27.426 ns/op 1.08
byteArrayEquals 16384 - diff last byte 28.004 us/op 26.168 us/op 1.07
Buffer.compare 16384 - diff last byte 222.49 ns/op 210.46 ns/op 1.06
byteArrayEquals 123687377 - diff last byte 212.33 ms/op 197.13 ms/op 1.08
Buffer.compare 123687377 - diff last byte 10.846 ms/op 6.7137 ms/op 1.62
byteArrayEquals 32 - random bytes 6.2060 ns/op 5.3870 ns/op 1.15
Buffer.compare 32 - random bytes 23.083 ns/op 17.834 ns/op 1.29
byteArrayEquals 1024 - random bytes 6.0240 ns/op 5.3180 ns/op 1.13
Buffer.compare 1024 - random bytes 19.536 ns/op 17.717 ns/op 1.10
byteArrayEquals 16384 - random bytes 5.7000 ns/op 5.3510 ns/op 1.07
Buffer.compare 16384 - random bytes 19.546 ns/op 17.748 ns/op 1.10
byteArrayEquals 123687377 - random bytes 7.4500 ns/op 6.8200 ns/op 1.09
Buffer.compare 123687377 - random bytes 21.820 ns/op 19.320 ns/op 1.13
regular array get 100000 times 45.722 us/op 34.942 us/op 1.31
wrappedArray get 100000 times 36.211 us/op 34.622 us/op 1.05
arrayWithProxy get 100000 times 14.845 ms/op 14.006 ms/op 1.06
ssz.Root.equals 51.672 ns/op 47.531 ns/op 1.09
byteArrayEquals 50.158 ns/op 46.887 ns/op 1.07
Buffer.compare 11.042 ns/op 10.911 ns/op 1.01
shuffle list - 16384 els 6.7473 ms/op 6.2230 ms/op 1.08
shuffle list - 250000 els 104.83 ms/op 91.908 ms/op 1.14
processSlot - 1 slots 19.025 us/op 12.923 us/op 1.47
processSlot - 32 slots 3.2571 ms/op 2.7179 ms/op 1.20
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 38.982 ms/op 37.372 ms/op 1.04
getCommitteeAssignments - req 1 vs - 250000 vc 2.3467 ms/op 2.0763 ms/op 1.13
getCommitteeAssignments - req 100 vs - 250000 vc 4.4191 ms/op 3.9912 ms/op 1.11
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7623 ms/op 4.2972 ms/op 1.11
findModifiedValidators - 10000 modified validators 294.53 ms/op 244.34 ms/op 1.21
findModifiedValidators - 1000 modified validators 202.52 ms/op 168.48 ms/op 1.20
findModifiedValidators - 100 modified validators 219.80 ms/op 164.55 ms/op 1.34
findModifiedValidators - 10 modified validators 218.43 ms/op 175.30 ms/op 1.25
findModifiedValidators - 1 modified validators 192.34 ms/op 174.46 ms/op 1.10
findModifiedValidators - no difference 192.78 ms/op 159.42 ms/op 1.21
compare ViewDUs 3.5060 s/op 2.9619 s/op 1.18
compare each validator Uint8Array 1.2879 s/op 1.4884 s/op 0.87
compare ViewDU to Uint8Array 1.2076 s/op 938.25 ms/op 1.29
migrate state 1000000 validators, 24 modified, 0 new 665.20 ms/op 585.95 ms/op 1.14
migrate state 1000000 validators, 1700 modified, 1000 new 880.73 ms/op 813.41 ms/op 1.08
migrate state 1000000 validators, 3400 modified, 2000 new 1.1195 s/op 994.35 ms/op 1.13
migrate state 1500000 validators, 24 modified, 0 new 628.03 ms/op 609.53 ms/op 1.03
migrate state 1500000 validators, 1700 modified, 1000 new 879.17 ms/op 796.52 ms/op 1.10
migrate state 1500000 validators, 3400 modified, 2000 new 975.61 ms/op 941.21 ms/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3600 ns/op 4.2200 ns/op 1.03
state getBlockRootAtSlot - 250000 vs - 7PWei 445.04 ns/op 709.03 ns/op 0.63
computeProposers - vc 250000 7.1535 ms/op 7.2621 ms/op 0.99
computeEpochShuffling - vc 250000 98.464 ms/op 91.171 ms/op 1.08
getNextSyncCommittee - vc 250000 125.98 ms/op 122.07 ms/op 1.03
computeSigningRoot for AttestationData 21.501 us/op 22.652 us/op 0.95
hash AttestationData serialized data then Buffer.toString(base64) 1.5868 us/op 1.4781 us/op 1.07
toHexString serialized data 980.68 ns/op 842.53 ns/op 1.16
Buffer.toString(base64) 209.05 ns/op 172.78 ns/op 1.21

by benchmarkbot/action

@nflaig nflaig changed the title fix: return finalized as false if called with genesis slot or epoch fix: return finalized as false if finalized epoch is genesis epoch Jul 22, 2024
@nflaig nflaig merged commit 27012f9 into unstable Jul 23, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/finalized-genesis-epoch-slot branch July 23, 2024 09:49
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.21.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants