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: compute and get head once when producing block #6617

Merged
merged 3 commits into from
Apr 5, 2024

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Apr 1, 2024

Motivation

Description

Closes #6612

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

Merging #6617 (1ff22e0) into unstable (b81230a) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6617   +/-   ##
=========================================
  Coverage     61.61%   61.61%           
=========================================
  Files           556      556           
  Lines         58567    58567           
  Branches       1859     1859           
=========================================
  Hits          36084    36084           
  Misses        22442    22442           
  Partials         41       41           

@twoeths twoeths marked this pull request as ready for review April 1, 2024 08:36
@twoeths twoeths requested a review from a team as a code owner April 1, 2024 08:36
Copy link
Contributor

github-actions bot commented Apr 1, 2024

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 51b1aa4 Previous: b81230a Ratio
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.9991 ms/op 980.63 us/op 3.06
Full benchmark results
Benchmark suite Current: 51b1aa4 Previous: b81230a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 608.32 us/op 741.24 us/op 0.82
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 113.90 us/op 61.951 us/op 1.84
BLS verify - blst-native 1.3398 ms/op 1.1410 ms/op 1.17
BLS verifyMultipleSignatures 3 - blst-native 2.8300 ms/op 2.4279 ms/op 1.17
BLS verifyMultipleSignatures 8 - blst-native 6.3649 ms/op 5.3841 ms/op 1.18
BLS verifyMultipleSignatures 32 - blst-native 23.569 ms/op 19.738 ms/op 1.19
BLS verifyMultipleSignatures 64 - blst-native 45.176 ms/op 38.863 ms/op 1.16
BLS verifyMultipleSignatures 128 - blst-native 89.049 ms/op 77.105 ms/op 1.15
BLS deserializing 10000 signatures 925.54 ms/op 805.05 ms/op 1.15
BLS deserializing 100000 signatures 9.2420 s/op 8.4903 s/op 1.09
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.4097 ms/op 1.1497 ms/op 1.23
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.6342 ms/op 1.2859 ms/op 1.27
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4627 ms/op 2.4091 ms/op 1.02
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.6869 ms/op 4.0299 ms/op 0.91
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.0064 ms/op 5.0512 ms/op 1.19
BLS aggregatePubkeys 32 - blst-native 27.832 us/op 22.984 us/op 1.21
BLS aggregatePubkeys 128 - blst-native 107.92 us/op 87.589 us/op 1.23
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 93.556 ms/op 44.246 ms/op 2.11
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 82.481 ms/op 44.429 ms/op 1.86
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 64.906 ms/op 26.388 ms/op 2.46
getSlashingsAndExits - default max 261.05 us/op 137.94 us/op 1.89
getSlashingsAndExits - 2k 512.03 us/op 349.59 us/op 1.46
proposeBlockBody type=full, size=empty 6.4098 ms/op 4.2919 ms/op 1.49
isKnown best case - 1 super set check 319.00 ns/op 331.00 ns/op 0.96
isKnown normal case - 2 super set checks 311.00 ns/op 348.00 ns/op 0.89
isKnown worse case - 16 super set checks 301.00 ns/op 333.00 ns/op 0.90
InMemoryCheckpointStateCache - add get delete 5.7490 us/op 3.9940 us/op 1.44
validate api signedAggregateAndProof - struct 2.9788 ms/op 2.4774 ms/op 1.20
validate gossip signedAggregateAndProof - struct 2.7754 ms/op 2.3996 ms/op 1.16
validate gossip attestation - vc 640000 1.3453 ms/op 1.1623 ms/op 1.16
batch validate gossip attestation - vc 640000 - chunk 32 159.40 us/op 145.01 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 64 140.92 us/op 129.92 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 128 137.79 us/op 129.64 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 256 131.10 us/op 120.62 us/op 1.09
pickEth1Vote - no votes 1.1861 ms/op 855.88 us/op 1.39
pickEth1Vote - max votes 8.9473 ms/op 8.1741 ms/op 1.09
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.968 ms/op 14.227 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.849 ms/op 29.003 ms/op 0.93
pickEth1Vote - Eth1Data fastSerialize value x2048 626.68 us/op 560.04 us/op 1.12
pickEth1Vote - Eth1Data fastSerialize tree x2048 8.4224 ms/op 3.3175 ms/op 2.54
bytes32 toHexString 531.00 ns/op 501.00 ns/op 1.06
bytes32 Buffer.toString(hex) 284.00 ns/op 321.00 ns/op 0.88
bytes32 Buffer.toString(hex) from Uint8Array 433.00 ns/op 426.00 ns/op 1.02
bytes32 Buffer.toString(hex) + 0x 289.00 ns/op 310.00 ns/op 0.93
Object access 1 prop 0.16600 ns/op 0.20400 ns/op 0.81
Map access 1 prop 0.15500 ns/op 0.19900 ns/op 0.78
Object get x1000 7.7120 ns/op 5.4780 ns/op 1.41
Map get x1000 0.78300 ns/op 0.72400 ns/op 1.08
Object set x1000 51.094 ns/op 28.919 ns/op 1.77
Map set x1000 40.793 ns/op 17.432 ns/op 2.34
Return object 10000 times 0.23750 ns/op 0.23100 ns/op 1.03
Throw Error 10000 times 3.8875 us/op 2.8331 us/op 1.37
fastMsgIdFn sha256 / 200 bytes 3.3230 us/op 2.0300 us/op 1.64
fastMsgIdFn h32 xxhash / 200 bytes 275.00 ns/op 328.00 ns/op 0.84
fastMsgIdFn h64 xxhash / 200 bytes 330.00 ns/op 363.00 ns/op 0.91
fastMsgIdFn sha256 / 1000 bytes 11.274 us/op 6.0280 us/op 1.87
fastMsgIdFn h32 xxhash / 1000 bytes 391.00 ns/op 414.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 1000 bytes 410.00 ns/op 441.00 ns/op 0.93
fastMsgIdFn sha256 / 10000 bytes 102.84 us/op 50.785 us/op 2.03
fastMsgIdFn h32 xxhash / 10000 bytes 1.9820 us/op 1.8180 us/op 1.09
fastMsgIdFn h64 xxhash / 10000 bytes 1.3380 us/op 1.2320 us/op 1.09
send data - 1000 256B messages 21.354 ms/op 14.790 ms/op 1.44
send data - 1000 512B messages 24.934 ms/op 16.629 ms/op 1.50
send data - 1000 1024B messages 41.951 ms/op 21.103 ms/op 1.99
send data - 1000 1200B messages 38.821 ms/op 28.999 ms/op 1.34
send data - 1000 2048B messages 50.539 ms/op 36.765 ms/op 1.37
send data - 1000 4096B messages 41.956 ms/op 33.128 ms/op 1.27
send data - 1000 16384B messages 112.54 ms/op 91.816 ms/op 1.23
send data - 1000 65536B messages 428.84 ms/op 402.92 ms/op 1.06
enrSubnets - fastDeserialize 64 bits 1.3510 us/op 928.00 ns/op 1.46
enrSubnets - ssz BitVector 64 bits 417.00 ns/op 429.00 ns/op 0.97
enrSubnets - fastDeserialize 4 bits 163.00 ns/op 216.00 ns/op 0.75
enrSubnets - ssz BitVector 4 bits 415.00 ns/op 441.00 ns/op 0.94
prioritizePeers score -10:0 att 32-0.1 sync 2-0 106.52 us/op 67.568 us/op 1.58
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 127.01 us/op 81.496 us/op 1.56
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 179.07 us/op 108.46 us/op 1.65
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 285.28 us/op 178.89 us/op 1.59
prioritizePeers score 0:0 att 64-1 sync 4-1 335.31 us/op 205.41 us/op 1.63
array of 16000 items push then shift 1.5889 us/op 1.2302 us/op 1.29
LinkedList of 16000 items push then shift 9.0820 ns/op 6.9290 ns/op 1.31
array of 16000 items push then pop 96.727 ns/op 60.699 ns/op 1.59
LinkedList of 16000 items push then pop 8.8000 ns/op 5.6850 ns/op 1.55
array of 24000 items push then shift 2.3505 us/op 1.7844 us/op 1.32
LinkedList of 24000 items push then shift 8.7500 ns/op 6.4850 ns/op 1.35
array of 24000 items push then pop 108.10 ns/op 91.083 ns/op 1.19
LinkedList of 24000 items push then pop 8.5320 ns/op 5.5240 ns/op 1.54
intersect bitArray bitLen 8 5.8820 ns/op 4.5110 ns/op 1.30
intersect array and set length 8 62.545 ns/op 46.142 ns/op 1.36
intersect bitArray bitLen 128 35.240 ns/op 27.569 ns/op 1.28
intersect array and set length 128 850.39 ns/op 641.29 ns/op 1.33
bitArray.getTrueBitIndexes() bitLen 128 1.4530 us/op 1.1740 us/op 1.24
bitArray.getTrueBitIndexes() bitLen 248 2.4890 us/op 1.9920 us/op 1.25
bitArray.getTrueBitIndexes() bitLen 512 4.6670 us/op 3.7650 us/op 1.24
Buffer.concat 32 items 988.00 ns/op 819.00 ns/op 1.21
Uint8Array.set 32 items 1.9250 us/op 2.3360 us/op 0.82
Set add up to 64 items then delete first 4.1827 us/op 1.6373 us/op 2.55
OrderedSet add up to 64 items then delete first 5.2610 us/op 2.4929 us/op 2.11
Set add up to 64 items then delete last 4.4529 us/op 1.8568 us/op 2.40
OrderedSet add up to 64 items then delete last 5.5914 us/op 2.9089 us/op 1.92
Set add up to 64 items then delete middle 4.4297 us/op 1.8645 us/op 2.38
OrderedSet add up to 64 items then delete middle 6.7636 us/op 3.9968 us/op 1.69
Set add up to 128 items then delete first 8.9976 us/op 3.5988 us/op 2.50
OrderedSet add up to 128 items then delete first 11.850 us/op 5.4186 us/op 2.19
Set add up to 128 items then delete last 9.0145 us/op 3.5835 us/op 2.52
OrderedSet add up to 128 items then delete last 11.354 us/op 5.6539 us/op 2.01
Set add up to 128 items then delete middle 8.9771 us/op 3.5580 us/op 2.52
OrderedSet add up to 128 items then delete middle 16.814 us/op 10.136 us/op 1.66
Set add up to 256 items then delete first 18.793 us/op 7.0961 us/op 2.65
OrderedSet add up to 256 items then delete first 25.080 us/op 10.872 us/op 2.31
Set add up to 256 items then delete last 18.079 us/op 7.1092 us/op 2.54
OrderedSet add up to 256 items then delete last 23.044 us/op 11.335 us/op 2.03
Set add up to 256 items then delete middle 17.946 us/op 7.0789 us/op 2.54
OrderedSet add up to 256 items then delete middle 44.494 us/op 28.912 us/op 1.54
transfer serialized Status (84 B) 1.6770 us/op 1.3790 us/op 1.22
copy serialized Status (84 B) 1.3220 us/op 1.1690 us/op 1.13
transfer serialized SignedVoluntaryExit (112 B) 1.9480 us/op 1.3520 us/op 1.44
copy serialized SignedVoluntaryExit (112 B) 1.4410 us/op 1.2130 us/op 1.19
transfer serialized ProposerSlashing (416 B) 2.5620 us/op 2.4070 us/op 1.06
copy serialized ProposerSlashing (416 B) 2.5130 us/op 2.4290 us/op 1.03
transfer serialized Attestation (485 B) 3.0630 us/op 2.6740 us/op 1.15
copy serialized Attestation (485 B) 2.6410 us/op 2.5130 us/op 1.05
transfer serialized AttesterSlashing (33232 B) 2.8830 us/op 2.1870 us/op 1.32
copy serialized AttesterSlashing (33232 B) 5.4290 us/op 5.5640 us/op 0.98
transfer serialized Small SignedBeaconBlock (128000 B) 2.6600 us/op 2.5050 us/op 1.06
copy serialized Small SignedBeaconBlock (128000 B) 12.782 us/op 12.381 us/op 1.03
transfer serialized Avg SignedBeaconBlock (200000 B) 3.1570 us/op 1.9180 us/op 1.65
copy serialized Avg SignedBeaconBlock (200000 B) 19.362 us/op 18.075 us/op 1.07
transfer serialized BlobsSidecar (524380 B) 2.9590 us/op 2.1940 us/op 1.35
copy serialized BlobsSidecar (524380 B) 113.33 us/op 88.852 us/op 1.28
transfer serialized Big SignedBeaconBlock (1000000 B) 2.8570 us/op 2.5240 us/op 1.13
copy serialized Big SignedBeaconBlock (1000000 B) 153.40 us/op 159.43 us/op 0.96
pass gossip attestations to forkchoice per slot 3.8230 ms/op 2.5256 ms/op 1.51
forkChoice updateHead vc 100000 bc 64 eq 0 681.53 us/op 408.54 us/op 1.67
forkChoice updateHead vc 600000 bc 64 eq 0 4.5450 ms/op 3.5784 ms/op 1.27
forkChoice updateHead vc 1000000 bc 64 eq 0 6.7711 ms/op 4.4116 ms/op 1.53
forkChoice updateHead vc 600000 bc 320 eq 0 4.6603 ms/op 2.5246 ms/op 1.85
forkChoice updateHead vc 600000 bc 1200 eq 0 4.3224 ms/op 2.6956 ms/op 1.60
forkChoice updateHead vc 600000 bc 7200 eq 0 5.2412 ms/op 3.3738 ms/op 1.55
forkChoice updateHead vc 600000 bc 64 eq 1000 11.204 ms/op 9.5209 ms/op 1.18
forkChoice updateHead vc 600000 bc 64 eq 10000 11.908 ms/op 9.4277 ms/op 1.26
forkChoice updateHead vc 600000 bc 64 eq 300000 16.273 ms/op 12.048 ms/op 1.35
computeDeltas 500000 validators 300 proto nodes 6.6093 ms/op 3.0342 ms/op 2.18
computeDeltas 500000 validators 1200 proto nodes 6.6265 ms/op 2.9844 ms/op 2.22
computeDeltas 500000 validators 7200 proto nodes 6.4320 ms/op 3.0288 ms/op 2.12
computeDeltas 750000 validators 300 proto nodes 9.7556 ms/op 4.5354 ms/op 2.15
computeDeltas 750000 validators 1200 proto nodes 9.7263 ms/op 4.6162 ms/op 2.11
computeDeltas 750000 validators 7200 proto nodes 9.6751 ms/op 4.6233 ms/op 2.09
computeDeltas 1400000 validators 300 proto nodes 19.185 ms/op 9.0161 ms/op 2.13
computeDeltas 1400000 validators 1200 proto nodes 18.502 ms/op 8.8822 ms/op 2.08
computeDeltas 1400000 validators 7200 proto nodes 19.064 ms/op 8.9826 ms/op 2.12
computeDeltas 2100000 validators 300 proto nodes 28.292 ms/op 12.937 ms/op 2.19
computeDeltas 2100000 validators 1200 proto nodes 27.857 ms/op 13.041 ms/op 2.14
computeDeltas 2100000 validators 7200 proto nodes 26.826 ms/op 12.918 ms/op 2.08
altair processAttestation - 250000 vs - 7PWei normalcase 2.7248 ms/op 1.5009 ms/op 1.82
altair processAttestation - 250000 vs - 7PWei worstcase 4.1175 ms/op 2.2197 ms/op 1.85
altair processAttestation - setStatus - 1/6 committees join 198.91 us/op 74.590 us/op 2.67
altair processAttestation - setStatus - 1/3 committees join 368.34 us/op 141.54 us/op 2.60
altair processAttestation - setStatus - 1/2 committees join 503.93 us/op 207.75 us/op 2.43
altair processAttestation - setStatus - 2/3 committees join 603.45 us/op 283.65 us/op 2.13
altair processAttestation - setStatus - 4/5 committees join 811.86 us/op 397.04 us/op 2.04
altair processAttestation - setStatus - 100% committees join 955.24 us/op 495.81 us/op 1.93
altair processBlock - 250000 vs - 7PWei normalcase 9.5386 ms/op 6.4040 ms/op 1.49
altair processBlock - 250000 vs - 7PWei normalcase hashState 36.624 ms/op 29.608 ms/op 1.24
altair processBlock - 250000 vs - 7PWei worstcase 40.270 ms/op 34.108 ms/op 1.18
altair processBlock - 250000 vs - 7PWei worstcase hashState 99.749 ms/op 87.778 ms/op 1.14
phase0 processBlock - 250000 vs - 7PWei normalcase 3.5478 ms/op 1.9850 ms/op 1.79
phase0 processBlock - 250000 vs - 7PWei worstcase 28.913 ms/op 24.777 ms/op 1.17
altair processEth1Data - 250000 vs - 7PWei normalcase 473.47 us/op 266.64 us/op 1.78
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 15.858 us/op 6.8070 us/op 2.33
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 77.244 us/op 62.116 us/op 1.24
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 26.402 us/op 9.1430 us/op 2.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 12.325 us/op 13.503 us/op 0.91
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 204.97 us/op 152.52 us/op 1.34
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0178 ms/op 1.1049 ms/op 0.92
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 3.0274 ms/op 1.4843 ms/op 2.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.9991 ms/op 980.63 us/op 3.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0743 ms/op 2.2277 ms/op 1.38
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3537 ms/op 1.3811 ms/op 1.70
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6325 ms/op 3.3888 ms/op 1.37
Tree 40 250000 create 366.46 ms/op 275.48 ms/op 1.33
Tree 40 250000 get(125000) 190.19 ns/op 116.77 ns/op 1.63
Tree 40 250000 set(125000) 1.0070 us/op 748.87 ns/op 1.34
Tree 40 250000 toArray() 18.576 ms/op 9.6392 ms/op 1.93
Tree 40 250000 iterate all - toArray() + loop 18.666 ms/op 9.7428 ms/op 1.92
Tree 40 250000 iterate all - get(i) 65.726 ms/op 39.950 ms/op 1.65
MutableVector 250000 create 21.012 ms/op 11.104 ms/op 1.89
MutableVector 250000 get(125000) 6.5690 ns/op 5.5590 ns/op 1.18
MutableVector 250000 set(125000) 260.24 ns/op 199.63 ns/op 1.30
MutableVector 250000 toArray() 3.0380 ms/op 2.1733 ms/op 1.40
MutableVector 250000 iterate all - toArray() + loop 3.3553 ms/op 2.4001 ms/op 1.40
MutableVector 250000 iterate all - get(i) 1.5341 ms/op 1.3419 ms/op 1.14
Array 250000 create 2.9063 ms/op 2.0266 ms/op 1.43
Array 250000 clone - spread 1.2793 ms/op 1.0892 ms/op 1.17
Array 250000 get(125000) 1.0740 ns/op 1.0070 ns/op 1.07
Array 250000 set(125000) 4.1630 ns/op 1.2130 ns/op 3.43
Array 250000 iterate all - loop 166.31 us/op 153.01 us/op 1.09
effectiveBalanceIncrements clone Uint8Array 300000 28.383 us/op 13.785 us/op 2.06
effectiveBalanceIncrements clone MutableVector 300000 391.00 ns/op 396.00 ns/op 0.99
effectiveBalanceIncrements rw all Uint8Array 300000 200.25 us/op 183.05 us/op 1.09
effectiveBalanceIncrements rw all MutableVector 300000 83.759 ms/op 62.669 ms/op 1.34
phase0 afterProcessEpoch - 250000 vs - 7PWei 113.23 ms/op 76.949 ms/op 1.47
phase0 beforeProcessEpoch - 250000 vs - 7PWei 54.660 ms/op 41.843 ms/op 1.31
altair processEpoch - mainnet_e81889 535.29 ms/op 410.39 ms/op 1.30
mainnet_e81889 - altair beforeProcessEpoch 82.379 ms/op 70.880 ms/op 1.16
mainnet_e81889 - altair processJustificationAndFinalization 22.451 us/op 10.954 us/op 2.05
mainnet_e81889 - altair processInactivityUpdates 5.8209 ms/op 4.0060 ms/op 1.45
mainnet_e81889 - altair processRewardsAndPenalties 77.872 ms/op 63.589 ms/op 1.22
mainnet_e81889 - altair processRegistryUpdates 3.6580 us/op 1.4360 us/op 2.55
mainnet_e81889 - altair processSlashings 734.00 ns/op 558.00 ns/op 1.32
mainnet_e81889 - altair processEth1DataReset 938.00 ns/op 553.00 ns/op 1.70
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.5626 ms/op 1.7249 ms/op 1.49
mainnet_e81889 - altair processSlashingsReset 5.9220 us/op 2.6180 us/op 2.26
mainnet_e81889 - altair processRandaoMixesReset 6.2070 us/op 3.4280 us/op 1.81
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1520 us/op 1.2550 us/op 0.92
mainnet_e81889 - altair processParticipationFlagUpdates 2.2970 us/op 2.5490 us/op 0.90
mainnet_e81889 - altair processSyncCommitteeUpdates 691.00 ns/op 745.00 ns/op 0.93
mainnet_e81889 - altair afterProcessEpoch 118.87 ms/op 80.593 ms/op 1.47
capella processEpoch - mainnet_e217614 2.0799 s/op 1.6533 s/op 1.26
mainnet_e217614 - capella beforeProcessEpoch 454.36 ms/op 406.70 ms/op 1.12
mainnet_e217614 - capella processJustificationAndFinalization 22.513 us/op 11.529 us/op 1.95
mainnet_e217614 - capella processInactivityUpdates 20.579 ms/op 20.048 ms/op 1.03
mainnet_e217614 - capella processRewardsAndPenalties 586.31 ms/op 482.40 ms/op 1.22
mainnet_e217614 - capella processRegistryUpdates 30.975 us/op 20.768 us/op 1.49
mainnet_e217614 - capella processSlashings 899.00 ns/op 650.00 ns/op 1.38
mainnet_e217614 - capella processEth1DataReset 735.00 ns/op 620.00 ns/op 1.19
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2246 ms/op 3.4340 ms/op 1.23
mainnet_e217614 - capella processSlashingsReset 3.4760 us/op 2.9250 us/op 1.19
mainnet_e217614 - capella processRandaoMixesReset 7.1830 us/op 4.4160 us/op 1.63
mainnet_e217614 - capella processHistoricalRootsUpdate 1.0770 us/op 939.00 ns/op 1.15
mainnet_e217614 - capella processParticipationFlagUpdates 3.1000 us/op 1.2180 us/op 2.55
mainnet_e217614 - capella afterProcessEpoch 304.52 ms/op 233.20 ms/op 1.31
phase0 processEpoch - mainnet_e58758 520.81 ms/op 436.46 ms/op 1.19
mainnet_e58758 - phase0 beforeProcessEpoch 144.21 ms/op 131.36 ms/op 1.10
mainnet_e58758 - phase0 processJustificationAndFinalization 23.409 us/op 13.773 us/op 1.70
mainnet_e58758 - phase0 processRewardsAndPenalties 84.977 ms/op 56.785 ms/op 1.50
mainnet_e58758 - phase0 processRegistryUpdates 15.791 us/op 17.106 us/op 0.92
mainnet_e58758 - phase0 processSlashings 881.00 ns/op 887.00 ns/op 0.99
mainnet_e58758 - phase0 processEth1DataReset 751.00 ns/op 1.0370 us/op 0.72
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0753 ms/op 852.22 us/op 2.44
mainnet_e58758 - phase0 processSlashingsReset 3.7190 us/op 3.1920 us/op 1.17
mainnet_e58758 - phase0 processRandaoMixesReset 6.1750 us/op 4.4010 us/op 1.40
mainnet_e58758 - phase0 processHistoricalRootsUpdate 613.00 ns/op 690.00 ns/op 0.89
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.8420 us/op 5.1800 us/op 1.13
mainnet_e58758 - phase0 afterProcessEpoch 96.321 ms/op 71.587 ms/op 1.35
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2127 ms/op 1.2401 ms/op 0.98
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6213 ms/op 1.1358 ms/op 1.43
altair processInactivityUpdates - 250000 normalcase 37.954 ms/op 22.137 ms/op 1.71
altair processInactivityUpdates - 250000 worstcase 28.737 ms/op 25.006 ms/op 1.15
phase0 processRegistryUpdates - 250000 normalcase 12.495 us/op 6.6780 us/op 1.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 605.62 us/op 417.22 us/op 1.45
phase0 processRegistryUpdates - 250000 worstcase 0.5 142.41 ms/op 107.16 ms/op 1.33
altair processRewardsAndPenalties - 250000 normalcase 90.300 ms/op 71.250 ms/op 1.27
altair processRewardsAndPenalties - 250000 worstcase 80.635 ms/op 68.697 ms/op 1.17
phase0 getAttestationDeltas - 250000 normalcase 9.9470 ms/op 5.7930 ms/op 1.72
phase0 getAttestationDeltas - 250000 worstcase 9.0371 ms/op 6.3040 ms/op 1.43
phase0 processSlashings - 250000 worstcase 134.11 us/op 88.175 us/op 1.52
altair processSyncCommitteeUpdates - 250000 150.23 ms/op 114.03 ms/op 1.32
BeaconState.hashTreeRoot - No change 423.00 ns/op 353.00 ns/op 1.20
BeaconState.hashTreeRoot - 1 full validator 173.49 us/op 125.66 us/op 1.38
BeaconState.hashTreeRoot - 32 full validator 1.2618 ms/op 1.4299 ms/op 0.88
BeaconState.hashTreeRoot - 512 full validator 17.661 ms/op 13.356 ms/op 1.32
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 180.09 us/op 133.95 us/op 1.34
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1807 ms/op 2.2800 ms/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.837 ms/op 28.912 ms/op 0.96
BeaconState.hashTreeRoot - 1 balances 154.63 us/op 111.67 us/op 1.38
BeaconState.hashTreeRoot - 32 balances 1.6637 ms/op 976.40 us/op 1.70
BeaconState.hashTreeRoot - 512 balances 13.881 ms/op 9.6161 ms/op 1.44
BeaconState.hashTreeRoot - 250000 balances 241.02 ms/op 185.73 ms/op 1.30
aggregationBits - 2048 els - zipIndexesInBitList 27.293 us/op 20.392 us/op 1.34
byteArrayEquals 32 75.233 ns/op 64.624 ns/op 1.16
Buffer.compare 32 56.860 ns/op 36.037 ns/op 1.58
byteArrayEquals 1024 2.0703 us/op 1.6319 us/op 1.27
Buffer.compare 1024 71.983 ns/op 40.993 ns/op 1.76
byteArrayEquals 16384 33.133 us/op 25.977 us/op 1.28
Buffer.compare 16384 256.73 ns/op 216.31 ns/op 1.19
byteArrayEquals 123687377 246.14 ms/op 193.01 ms/op 1.28
Buffer.compare 123687377 6.8400 ms/op 5.3504 ms/op 1.28
byteArrayEquals 32 - diff last byte 73.565 ns/op 60.101 ns/op 1.22
Buffer.compare 32 - diff last byte 57.492 ns/op 35.714 ns/op 1.61
byteArrayEquals 1024 - diff last byte 2.1143 us/op 1.6537 us/op 1.28
Buffer.compare 1024 - diff last byte 74.470 ns/op 42.057 ns/op 1.77
byteArrayEquals 16384 - diff last byte 33.263 us/op 25.977 us/op 1.28
Buffer.compare 16384 - diff last byte 262.35 ns/op 194.82 ns/op 1.35
byteArrayEquals 123687377 - diff last byte 251.52 ms/op 197.44 ms/op 1.27
Buffer.compare 123687377 - diff last byte 7.9126 ms/op 5.3423 ms/op 1.48
byteArrayEquals 32 - random bytes 5.7830 ns/op 4.3600 ns/op 1.33
Buffer.compare 32 - random bytes 63.653 ns/op 37.463 ns/op 1.70
byteArrayEquals 1024 - random bytes 5.6930 ns/op 4.3160 ns/op 1.32
Buffer.compare 1024 - random bytes 62.832 ns/op 35.481 ns/op 1.77
byteArrayEquals 16384 - random bytes 5.7700 ns/op 4.3150 ns/op 1.34
Buffer.compare 16384 - random bytes 62.290 ns/op 35.501 ns/op 1.75
byteArrayEquals 123687377 - random bytes 9.0000 ns/op 7.7000 ns/op 1.17
Buffer.compare 123687377 - random bytes 65.740 ns/op 37.920 ns/op 1.73
regular array get 100000 times 45.365 us/op 39.562 us/op 1.15
wrappedArray get 100000 times 45.632 us/op 39.536 us/op 1.15
arrayWithProxy get 100000 times 16.313 ms/op 9.2001 ms/op 1.77
ssz.Root.equals 54.628 ns/op 53.856 ns/op 1.01
byteArrayEquals 54.477 ns/op 52.910 ns/op 1.03
Buffer.compare 11.376 ns/op 8.7930 ns/op 1.29
shuffle list - 16384 els 8.7602 ms/op 5.7431 ms/op 1.53
shuffle list - 250000 els 126.98 ms/op 85.682 ms/op 1.48
processSlot - 1 slots 16.609 us/op 13.511 us/op 1.23
processSlot - 32 slots 2.9477 ms/op 3.2630 ms/op 0.90
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 65.121 ms/op 54.166 ms/op 1.20
getCommitteeAssignments - req 1 vs - 250000 vc 2.8359 ms/op 2.3818 ms/op 1.19
getCommitteeAssignments - req 100 vs - 250000 vc 4.0297 ms/op 3.5242 ms/op 1.14
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3253 ms/op 3.7798 ms/op 1.14
findModifiedValidators - 10000 modified validators 375.63 ms/op 298.56 ms/op 1.26
findModifiedValidators - 1000 modified validators 233.16 ms/op 169.64 ms/op 1.37
findModifiedValidators - 100 modified validators 190.21 ms/op 135.48 ms/op 1.40
findModifiedValidators - 10 modified validators 179.61 ms/op 125.17 ms/op 1.43
findModifiedValidators - 1 modified validators 188.53 ms/op 129.09 ms/op 1.46
findModifiedValidators - no difference 202.05 ms/op 151.01 ms/op 1.34
compare ViewDUs 5.0345 s/op 3.8810 s/op 1.30
compare each validator Uint8Array 1.8664 s/op 1.6272 s/op 1.15
compare ViewDU to Uint8Array 1.1598 s/op 870.08 ms/op 1.33
migrate state 1000000 validators, 24 modified, 0 new 812.22 ms/op 729.48 ms/op 1.11
migrate state 1000000 validators, 1700 modified, 1000 new 1.1384 s/op 992.97 ms/op 1.15
migrate state 1000000 validators, 3400 modified, 2000 new 1.3194 s/op 1.0512 s/op 1.26
migrate state 1500000 validators, 24 modified, 0 new 782.29 ms/op 755.64 ms/op 1.04
migrate state 1500000 validators, 1700 modified, 1000 new 1.0558 s/op 962.97 ms/op 1.10
migrate state 1500000 validators, 3400 modified, 2000 new 1.3624 s/op 1.2063 s/op 1.13
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.8100 ns/op 5.3100 ns/op 0.91
state getBlockRootAtSlot - 250000 vs - 7PWei 721.24 ns/op 1.0902 us/op 0.66
computeProposers - vc 250000 9.6435 ms/op 7.3855 ms/op 1.31
computeEpochShuffling - vc 250000 129.12 ms/op 94.826 ms/op 1.36
getNextSyncCommittee - vc 250000 164.75 ms/op 112.02 ms/op 1.47
computeSigningRoot for AttestationData 26.308 us/op 19.211 us/op 1.37
hash AttestationData serialized data then Buffer.toString(base64) 2.4051 us/op 1.2738 us/op 1.89
toHexString serialized data 1.0914 us/op 769.46 ns/op 1.42
Buffer.toString(base64) 228.23 ns/op 143.26 ns/op 1.59

by benchmarkbot/action

@twoeths twoeths marked this pull request as draft April 1, 2024 09:08
@twoeths
Copy link
Contributor Author

twoeths commented Apr 1, 2024

n-historical state e2e test is failing, waiting for #6581 to have forkchoice.getProposerHead() in order to overwrite it in the ReorgedForkChoice

@twoeths
Copy link
Contributor Author

twoeths commented Apr 1, 2024

the getProposerHead() api is even not consumed after #6581, skipping the test for now, will enable it again once we have the proposer boost work in #5125

@twoeths twoeths marked this pull request as ready for review April 1, 2024 11:00
Copy link
Contributor

@ensi321 ensi321 left a comment

Choose a reason for hiding this comment

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

lgtm

@philknows philknows added this to the v1.18.0 milestone Apr 1, 2024
@twoeths twoeths merged commit 898cd90 into unstable Apr 5, 2024
19 of 20 checks passed
@twoeths twoeths deleted the tuyen/produce_block_compute_head_once branch April 5, 2024 09:55
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.18.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.

Get head once when producing block
4 participants