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

feat: only extract roots of early gossip messages #7208

Open
wants to merge 2 commits into
base: unstable
Choose a base branch
from

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Oct 30, 2024

Motivation

Description

  • only extract roots of gossip messages coming before beacon block, this could save up to 0.4% of gc time on a test mainnet node subscribing to all subnets
  • for skipped slots, it fallbacks to extracting roots of all gossip messages which is the same to unstable, but it's rare

Closes #7205

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 3.70370% with 26 lines in your changes missing coverage. Please review.

Project coverage is 49.19%. Comparing base (558ec2f) to head (9c9f063).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7208      +/-   ##
============================================
- Coverage     49.21%   49.19%   -0.02%     
============================================
  Files           598      598              
  Lines         39803    39821      +18     
  Branches       2102     2103       +1     
============================================
+ Hits          19588    19590       +2     
- Misses        20175    20191      +16     
  Partials         40       40              

Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 3025683 Previous: 558ec2f Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 13.577 ms/op 51.362 ms/op 0.26
Full benchmark results
Benchmark suite Current: 3025683 Previous: 558ec2f Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9151 ms/op 1.8128 ms/op 1.06
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 44.503 us/op 48.881 us/op 0.91
BLS verify - blst 813.11 us/op 834.47 us/op 0.97
BLS verifyMultipleSignatures 3 - blst 1.1491 ms/op 1.2204 ms/op 0.94
BLS verifyMultipleSignatures 8 - blst 1.6221 ms/op 1.6628 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst 4.7828 ms/op 4.8985 ms/op 0.98
BLS verifyMultipleSignatures 64 - blst 8.9328 ms/op 8.8855 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst 17.023 ms/op 17.142 ms/op 0.99
BLS deserializing 10000 signatures 671.39 ms/op 681.01 ms/op 0.99
BLS deserializing 100000 signatures 6.6974 s/op 6.9392 s/op 0.97
BLS verifyMultipleSignatures - same message - 3 - blst 870.95 us/op 944.15 us/op 0.92
BLS verifyMultipleSignatures - same message - 8 - blst 1.0113 ms/op 1.1259 ms/op 0.90
BLS verifyMultipleSignatures - same message - 32 - blst 1.6766 ms/op 1.8836 ms/op 0.89
BLS verifyMultipleSignatures - same message - 64 - blst 2.5596 ms/op 2.7701 ms/op 0.92
BLS verifyMultipleSignatures - same message - 128 - blst 4.2602 ms/op 4.4765 ms/op 0.95
BLS aggregatePubkeys 32 - blst 19.125 us/op 20.853 us/op 0.92
BLS aggregatePubkeys 128 - blst 68.006 us/op 72.497 us/op 0.94
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.697 ms/op 57.309 ms/op 1.08
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 66.492 ms/op 57.738 ms/op 1.15
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 38.898 ms/op 52.412 ms/op 0.74
getSlashingsAndExits - default max 88.571 us/op 106.19 us/op 0.83
getSlashingsAndExits - 2k 258.21 us/op 328.95 us/op 0.78
proposeBlockBody type=full, size=empty 5.6984 ms/op 7.6912 ms/op 0.74
isKnown best case - 1 super set check 297.00 ns/op 491.00 ns/op 0.60
isKnown normal case - 2 super set checks 282.00 ns/op 447.00 ns/op 0.63
isKnown worse case - 16 super set checks 283.00 ns/op 477.00 ns/op 0.59
InMemoryCheckpointStateCache - add get delete 2.6440 us/op 3.4140 us/op 0.77
updateUnfinalizedPubkeys - updating 10 pubkeys 814.20 us/op 1.4364 ms/op 0.57
updateUnfinalizedPubkeys - updating 100 pubkeys 2.9152 ms/op 3.8202 ms/op 0.76
updateUnfinalizedPubkeys - updating 1000 pubkeys 47.393 ms/op 58.064 ms/op 0.82
validate api signedAggregateAndProof - struct 1.3542 ms/op 1.5093 ms/op 0.90
validate gossip signedAggregateAndProof - struct 1.3236 ms/op 1.5061 ms/op 0.88
batch validate gossip attestation - vc 640000 - chunk 32 123.54 us/op 156.58 us/op 0.79
batch validate gossip attestation - vc 640000 - chunk 64 110.63 us/op 143.72 us/op 0.77
batch validate gossip attestation - vc 640000 - chunk 128 105.81 us/op 136.83 us/op 0.77
batch validate gossip attestation - vc 640000 - chunk 256 104.79 us/op 134.85 us/op 0.78
pickEth1Vote - no votes 1.1891 ms/op 1.3662 ms/op 0.87
pickEth1Vote - max votes 6.0450 ms/op 8.8989 ms/op 0.68
pickEth1Vote - Eth1Data hashTreeRoot value x2048 22.569 ms/op 21.928 ms/op 1.03
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 25.040 ms/op 32.162 ms/op 0.78
pickEth1Vote - Eth1Data fastSerialize value x2048 484.12 us/op 605.68 us/op 0.80
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.0730 ms/op 3.4028 ms/op 1.20
bytes32 toHexString 454.00 ns/op 649.00 ns/op 0.70
bytes32 Buffer.toString(hex) 263.00 ns/op 302.00 ns/op 0.87
bytes32 Buffer.toString(hex) from Uint8Array 381.00 ns/op 519.00 ns/op 0.73
bytes32 Buffer.toString(hex) + 0x 261.00 ns/op 289.00 ns/op 0.90
Object access 1 prop 0.13900 ns/op 0.19700 ns/op 0.71
Map access 1 prop 0.14000 ns/op 0.16300 ns/op 0.86
Object get x1000 6.0620 ns/op 7.3500 ns/op 0.82
Map get x1000 6.7300 ns/op 7.0140 ns/op 0.96
Object set x1000 35.518 ns/op 56.050 ns/op 0.63
Map set x1000 24.839 ns/op 40.295 ns/op 0.62
Return object 10000 times 0.30930 ns/op 0.35680 ns/op 0.87
Throw Error 10000 times 3.5903 us/op 4.4255 us/op 0.81
toHex 157.13 ns/op 224.74 ns/op 0.70
Buffer.from 141.89 ns/op 197.41 ns/op 0.72
shared Buffer 89.595 ns/op 113.30 ns/op 0.79
fastMsgIdFn sha256 / 200 bytes 2.3810 us/op 2.6630 us/op 0.89
fastMsgIdFn h32 xxhash / 200 bytes 244.00 ns/op 330.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 200 bytes 280.00 ns/op 317.00 ns/op 0.88
fastMsgIdFn sha256 / 1000 bytes 7.7000 us/op 8.5910 us/op 0.90
fastMsgIdFn h32 xxhash / 1000 bytes 413.00 ns/op 474.00 ns/op 0.87
fastMsgIdFn h64 xxhash / 1000 bytes 364.00 ns/op 386.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 66.146 us/op 74.776 us/op 0.88
fastMsgIdFn h32 xxhash / 10000 bytes 1.9410 us/op 2.0920 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 1.2750 us/op 1.3560 us/op 0.94
send data - 1000 256B messages 13.043 ms/op 16.075 ms/op 0.81
send data - 1000 512B messages 17.783 ms/op 22.137 ms/op 0.80
send data - 1000 1024B messages 25.677 ms/op 35.662 ms/op 0.72
send data - 1000 1200B messages 26.759 ms/op 35.352 ms/op 0.76
send data - 1000 2048B messages 32.024 ms/op 39.380 ms/op 0.81
send data - 1000 4096B messages 30.996 ms/op 40.439 ms/op 0.77
send data - 1000 16384B messages 72.478 ms/op 100.88 ms/op 0.72
send data - 1000 65536B messages 247.95 ms/op 280.37 ms/op 0.88
enrSubnets - fastDeserialize 64 bits 1.2000 us/op 1.6020 us/op 0.75
enrSubnets - ssz BitVector 64 bits 369.00 ns/op 578.00 ns/op 0.64
enrSubnets - fastDeserialize 4 bits 149.00 ns/op 272.00 ns/op 0.55
enrSubnets - ssz BitVector 4 bits 352.00 ns/op 561.00 ns/op 0.63
prioritizePeers score -10:0 att 32-0.1 sync 2-0 132.69 us/op 222.93 us/op 0.60
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 159.09 us/op 222.18 us/op 0.72
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 225.75 us/op 439.87 us/op 0.51
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 395.85 us/op 476.52 us/op 0.83
prioritizePeers score 0:0 att 64-1 sync 4-1 498.60 us/op 1.0838 ms/op 0.46
array of 16000 items push then shift 1.6361 us/op 1.8060 us/op 0.91
LinkedList of 16000 items push then shift 7.1580 ns/op 10.100 ns/op 0.71
array of 16000 items push then pop 106.62 ns/op 199.87 ns/op 0.53
LinkedList of 16000 items push then pop 6.8890 ns/op 13.962 ns/op 0.49
array of 24000 items push then shift 2.3970 us/op 2.9061 us/op 0.82
LinkedList of 24000 items push then shift 7.1020 ns/op 13.565 ns/op 0.52
array of 24000 items push then pop 135.97 ns/op 223.89 ns/op 0.61
LinkedList of 24000 items push then pop 6.8200 ns/op 11.656 ns/op 0.59
intersect bitArray bitLen 8 6.2990 ns/op 10.494 ns/op 0.60
intersect array and set length 8 43.611 ns/op 117.79 ns/op 0.37
intersect bitArray bitLen 128 29.338 ns/op 38.758 ns/op 0.76
intersect array and set length 128 652.93 ns/op 1.0739 us/op 0.61
bitArray.getTrueBitIndexes() bitLen 128 1.3160 us/op 2.8400 us/op 0.46
bitArray.getTrueBitIndexes() bitLen 248 2.1450 us/op 5.2560 us/op 0.41
bitArray.getTrueBitIndexes() bitLen 512 4.3800 us/op 12.385 us/op 0.35
Buffer.concat 32 items 931.00 ns/op 1.2090 us/op 0.77
Uint8Array.set 32 items 1.9070 us/op 2.0270 us/op 0.94
Buffer.copy 2.0240 us/op 2.4230 us/op 0.84
Uint8Array.set - with subarray 2.9540 us/op 4.2350 us/op 0.70
Uint8Array.set - without subarray 1.4050 us/op 2.0910 us/op 0.67
getUint32 - dataview 229.00 ns/op 389.00 ns/op 0.59
getUint32 - manual 151.00 ns/op 346.00 ns/op 0.44
Set add up to 64 items then delete first 2.1436 us/op 4.2833 us/op 0.50
OrderedSet add up to 64 items then delete first 3.2213 us/op 6.6868 us/op 0.48
Set add up to 64 items then delete last 2.4222 us/op 4.2365 us/op 0.57
OrderedSet add up to 64 items then delete last 3.6986 us/op 6.4645 us/op 0.57
Set add up to 64 items then delete middle 2.5256 us/op 4.2279 us/op 0.60
OrderedSet add up to 64 items then delete middle 5.2017 us/op 7.8873 us/op 0.66
Set add up to 128 items then delete first 5.0677 us/op 8.0824 us/op 0.63
OrderedSet add up to 128 items then delete first 7.8938 us/op 13.715 us/op 0.58
Set add up to 128 items then delete last 4.9793 us/op 8.2653 us/op 0.60
OrderedSet add up to 128 items then delete last 7.2293 us/op 12.790 us/op 0.57
Set add up to 128 items then delete middle 4.8612 us/op 8.6188 us/op 0.56
OrderedSet add up to 128 items then delete middle 14.361 us/op 20.475 us/op 0.70
Set add up to 256 items then delete first 10.307 us/op 16.423 us/op 0.63
OrderedSet add up to 256 items then delete first 16.147 us/op 26.977 us/op 0.60
Set add up to 256 items then delete last 9.6758 us/op 17.403 us/op 0.56
OrderedSet add up to 256 items then delete last 14.450 us/op 27.114 us/op 0.53
Set add up to 256 items then delete middle 9.5994 us/op 16.606 us/op 0.58
OrderedSet add up to 256 items then delete middle 41.976 us/op 55.088 us/op 0.76
transfer serialized Status (84 B) 1.3880 us/op 1.8380 us/op 0.76
copy serialized Status (84 B) 1.1560 us/op 1.6270 us/op 0.71
transfer serialized SignedVoluntaryExit (112 B) 1.4890 us/op 1.9820 us/op 0.75
copy serialized SignedVoluntaryExit (112 B) 1.3170 us/op 1.6490 us/op 0.80
transfer serialized ProposerSlashing (416 B) 1.9150 us/op 2.5680 us/op 0.75
copy serialized ProposerSlashing (416 B) 2.2620 us/op 2.5680 us/op 0.88
transfer serialized Attestation (485 B) 2.4030 us/op 2.2250 us/op 1.08
copy serialized Attestation (485 B) 2.0590 us/op 2.2090 us/op 0.93
transfer serialized AttesterSlashing (33232 B) 2.2310 us/op 2.4770 us/op 0.90
copy serialized AttesterSlashing (33232 B) 6.2880 us/op 14.131 us/op 0.44
transfer serialized Small SignedBeaconBlock (128000 B) 2.2610 us/op 3.6240 us/op 0.62
copy serialized Small SignedBeaconBlock (128000 B) 14.422 us/op 48.689 us/op 0.30
transfer serialized Avg SignedBeaconBlock (200000 B) 2.6300 us/op 4.7570 us/op 0.55
copy serialized Avg SignedBeaconBlock (200000 B) 19.137 us/op 47.247 us/op 0.41
transfer serialized BlobsSidecar (524380 B) 2.5700 us/op 4.6720 us/op 0.55
copy serialized BlobsSidecar (524380 B) 73.429 us/op 182.30 us/op 0.40
transfer serialized Big SignedBeaconBlock (1000000 B) 2.8740 us/op 12.202 us/op 0.24
copy serialized Big SignedBeaconBlock (1000000 B) 156.40 us/op 322.74 us/op 0.48
pass gossip attestations to forkchoice per slot 2.8376 ms/op 3.7746 ms/op 0.75
forkChoice updateHead vc 100000 bc 64 eq 0 489.64 us/op 658.45 us/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 0 3.2981 ms/op 4.6199 ms/op 0.71
forkChoice updateHead vc 1000000 bc 64 eq 0 4.9370 ms/op 7.3518 ms/op 0.67
forkChoice updateHead vc 600000 bc 320 eq 0 2.7940 ms/op 4.2606 ms/op 0.66
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7659 ms/op 5.0303 ms/op 0.55
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5513 ms/op 5.8325 ms/op 0.61
forkChoice updateHead vc 600000 bc 64 eq 1000 10.195 ms/op 11.727 ms/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 10000 10.118 ms/op 12.161 ms/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 300000 13.577 ms/op 51.362 ms/op 0.26
computeDeltas 500000 validators 300 proto nodes 4.0947 ms/op 5.7635 ms/op 0.71
computeDeltas 500000 validators 1200 proto nodes 4.0285 ms/op 4.5034 ms/op 0.89
computeDeltas 500000 validators 7200 proto nodes 4.0447 ms/op 4.3393 ms/op 0.93
computeDeltas 750000 validators 300 proto nodes 6.0657 ms/op 6.3750 ms/op 0.95
computeDeltas 750000 validators 1200 proto nodes 5.9913 ms/op 6.2290 ms/op 0.96
computeDeltas 750000 validators 7200 proto nodes 5.9948 ms/op 6.2800 ms/op 0.95
computeDeltas 1400000 validators 300 proto nodes 11.249 ms/op 11.346 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 11.105 ms/op 11.980 ms/op 0.93
computeDeltas 1400000 validators 7200 proto nodes 11.153 ms/op 11.762 ms/op 0.95
computeDeltas 2100000 validators 300 proto nodes 16.718 ms/op 16.862 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 17.015 ms/op 17.571 ms/op 0.97
computeDeltas 2100000 validators 7200 proto nodes 17.783 ms/op 17.535 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei normalcase 1.9774 ms/op 2.0283 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei worstcase 2.8838 ms/op 3.9519 ms/op 0.73
altair processAttestation - setStatus - 1/6 committees join 100.39 us/op 106.39 us/op 0.94
altair processAttestation - setStatus - 1/3 committees join 192.67 us/op 180.57 us/op 1.07
altair processAttestation - setStatus - 1/2 committees join 263.63 us/op 255.89 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 334.38 us/op 363.91 us/op 0.92
altair processAttestation - setStatus - 4/5 committees join 496.94 us/op 492.84 us/op 1.01
altair processAttestation - setStatus - 100% committees join 579.40 us/op 607.37 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 6.2295 ms/op 8.5337 ms/op 0.73
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.672 ms/op 28.307 ms/op 0.87
altair processBlock - 250000 vs - 7PWei worstcase 35.031 ms/op 42.287 ms/op 0.83
altair processBlock - 250000 vs - 7PWei worstcase hashState 71.771 ms/op 77.951 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8068 ms/op 2.1719 ms/op 0.83
phase0 processBlock - 250000 vs - 7PWei worstcase 21.533 ms/op 23.994 ms/op 0.90
altair processEth1Data - 250000 vs - 7PWei normalcase 316.24 us/op 509.83 us/op 0.62
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.3070 us/op 7.7840 us/op 0.81
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 41.877 us/op 48.967 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.709 us/op 11.586 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.7080 us/op 8.5950 us/op 0.78
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 150.00 us/op 171.23 us/op 0.88
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.0164 ms/op 1.2241 ms/op 0.83
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4634 ms/op 1.6217 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4603 ms/op 1.6701 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8275 ms/op 4.1393 ms/op 0.92
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.5069 ms/op 1.6666 ms/op 0.90
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7831 ms/op 4.2471 ms/op 0.89
Tree 40 250000 create 209.52 ms/op 272.95 ms/op 0.77
Tree 40 250000 get(125000) 145.63 ns/op 163.93 ns/op 0.89
Tree 40 250000 set(125000) 657.53 ns/op 747.66 ns/op 0.88
Tree 40 250000 toArray() 15.693 ms/op 22.922 ms/op 0.68
Tree 40 250000 iterate all - toArray() + loop 15.738 ms/op 23.477 ms/op 0.67
Tree 40 250000 iterate all - get(i) 53.381 ms/op 65.546 ms/op 0.81
Array 250000 create 2.9423 ms/op 4.0295 ms/op 0.73
Array 250000 clone - spread 1.4884 ms/op 1.8829 ms/op 0.79
Array 250000 get(125000) 0.42300 ns/op 0.48300 ns/op 0.88
Array 250000 set(125000) 0.42600 ns/op 0.49400 ns/op 0.86
Array 250000 iterate all - loop 82.853 us/op 117.91 us/op 0.70
phase0 afterProcessEpoch - 250000 vs - 7PWei 49.705 ms/op 56.505 ms/op 0.88
Array.fill - length 1000000 3.6755 ms/op 4.5277 ms/op 0.81
Array push - length 1000000 16.643 ms/op 19.962 ms/op 0.83
Array.get 0.27803 ns/op 0.30565 ns/op 0.91
Uint8Array.get 0.43812 ns/op 0.47308 ns/op 0.93
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.074 ms/op 21.472 ms/op 0.84
altair processEpoch - mainnet_e81889 262.72 ms/op 336.82 ms/op 0.78
mainnet_e81889 - altair beforeProcessEpoch 18.726 ms/op 23.500 ms/op 0.80
mainnet_e81889 - altair processJustificationAndFinalization 12.454 us/op 18.573 us/op 0.67
mainnet_e81889 - altair processInactivityUpdates 5.1877 ms/op 7.2852 ms/op 0.71
mainnet_e81889 - altair processRewardsAndPenalties 45.174 ms/op 43.194 ms/op 1.05
mainnet_e81889 - altair processRegistryUpdates 1.7600 us/op 2.5270 us/op 0.70
mainnet_e81889 - altair processSlashings 374.00 ns/op 516.00 ns/op 0.72
mainnet_e81889 - altair processEth1DataReset 304.00 ns/op 548.00 ns/op 0.55
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9376 ms/op 1.5290 ms/op 1.27
mainnet_e81889 - altair processSlashingsReset 3.7480 us/op 5.5320 us/op 0.68
mainnet_e81889 - altair processRandaoMixesReset 4.2400 us/op 11.046 us/op 0.38
mainnet_e81889 - altair processHistoricalRootsUpdate 468.00 ns/op 755.00 ns/op 0.62
mainnet_e81889 - altair processParticipationFlagUpdates 2.1900 us/op 3.9910 us/op 0.55
mainnet_e81889 - altair processSyncCommitteeUpdates 453.00 ns/op 836.00 ns/op 0.54
mainnet_e81889 - altair afterProcessEpoch 50.300 ms/op 54.902 ms/op 0.92
capella processEpoch - mainnet_e217614 988.53 ms/op 1.1815 s/op 0.84
mainnet_e217614 - capella beforeProcessEpoch 68.226 ms/op 81.092 ms/op 0.84
mainnet_e217614 - capella processJustificationAndFinalization 14.660 us/op 19.352 us/op 0.76
mainnet_e217614 - capella processInactivityUpdates 17.114 ms/op 19.617 ms/op 0.87
mainnet_e217614 - capella processRewardsAndPenalties 213.29 ms/op 255.82 ms/op 0.83
mainnet_e217614 - capella processRegistryUpdates 12.947 us/op 22.312 us/op 0.58
mainnet_e217614 - capella processSlashings 386.00 ns/op 1.1270 us/op 0.34
mainnet_e217614 - capella processEth1DataReset 368.00 ns/op 719.00 ns/op 0.51
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.644 ms/op 18.669 ms/op 0.78
mainnet_e217614 - capella processSlashingsReset 3.0010 us/op 6.0880 us/op 0.49
mainnet_e217614 - capella processRandaoMixesReset 3.5990 us/op 12.248 us/op 0.29
mainnet_e217614 - capella processHistoricalRootsUpdate 547.00 ns/op 1.1470 us/op 0.48
mainnet_e217614 - capella processParticipationFlagUpdates 2.1180 us/op 3.5780 us/op 0.59
mainnet_e217614 - capella afterProcessEpoch 122.18 ms/op 131.83 ms/op 0.93
phase0 processEpoch - mainnet_e58758 318.63 ms/op 367.03 ms/op 0.87
mainnet_e58758 - phase0 beforeProcessEpoch 66.599 ms/op 102.91 ms/op 0.65
mainnet_e58758 - phase0 processJustificationAndFinalization 16.403 us/op 22.999 us/op 0.71
mainnet_e58758 - phase0 processRewardsAndPenalties 29.557 ms/op 30.964 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 6.9110 us/op 12.023 us/op 0.57
mainnet_e58758 - phase0 processSlashings 373.00 ns/op 600.00 ns/op 0.62
mainnet_e58758 - phase0 processEth1DataReset 298.00 ns/op 1.4260 us/op 0.21
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2289 ms/op 1.4508 ms/op 0.85
mainnet_e58758 - phase0 processSlashingsReset 3.2940 us/op 5.7440 us/op 0.57
mainnet_e58758 - phase0 processRandaoMixesReset 4.0680 us/op 8.4070 us/op 0.48
mainnet_e58758 - phase0 processHistoricalRootsUpdate 302.00 ns/op 1.1300 us/op 0.27
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.8710 us/op 6.4070 us/op 0.45
mainnet_e58758 - phase0 afterProcessEpoch 41.787 ms/op 49.570 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4000 ms/op 1.7527 ms/op 0.80
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1550 ms/op 2.2092 ms/op 0.98
altair processInactivityUpdates - 250000 normalcase 14.071 ms/op 19.631 ms/op 0.72
altair processInactivityUpdates - 250000 worstcase 14.134 ms/op 20.415 ms/op 0.69
phase0 processRegistryUpdates - 250000 normalcase 6.2180 us/op 12.897 us/op 0.48
phase0 processRegistryUpdates - 250000 badcase_full_deposits 233.33 us/op 356.66 us/op 0.65
phase0 processRegistryUpdates - 250000 worstcase 0.5 115.87 ms/op 122.76 ms/op 0.94
altair processRewardsAndPenalties - 250000 normalcase 33.054 ms/op 44.413 ms/op 0.74
altair processRewardsAndPenalties - 250000 worstcase 35.910 ms/op 51.845 ms/op 0.69
phase0 getAttestationDeltas - 250000 normalcase 7.4509 ms/op 9.8066 ms/op 0.76
phase0 getAttestationDeltas - 250000 worstcase 7.1011 ms/op 10.437 ms/op 0.68
phase0 processSlashings - 250000 worstcase 76.561 us/op 121.22 us/op 0.63
altair processSyncCommitteeUpdates - 250000 117.46 ms/op 178.84 ms/op 0.66
BeaconState.hashTreeRoot - No change 236.00 ns/op 401.00 ns/op 0.59
BeaconState.hashTreeRoot - 1 full validator 98.051 us/op 136.48 us/op 0.72
BeaconState.hashTreeRoot - 32 full validator 1.2415 ms/op 1.2506 ms/op 0.99
BeaconState.hashTreeRoot - 512 full validator 10.032 ms/op 12.324 ms/op 0.81
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 127.50 us/op 151.26 us/op 0.84
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8603 ms/op 1.7160 ms/op 1.08
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 16.929 ms/op 22.434 ms/op 0.75
BeaconState.hashTreeRoot - 1 balances 77.805 us/op 107.03 us/op 0.73
BeaconState.hashTreeRoot - 32 balances 856.91 us/op 1.3836 ms/op 0.62
BeaconState.hashTreeRoot - 512 balances 7.3749 ms/op 9.8484 ms/op 0.75
BeaconState.hashTreeRoot - 250000 balances 181.03 ms/op 161.79 ms/op 1.12
aggregationBits - 2048 els - zipIndexesInBitList 25.157 us/op 32.695 us/op 0.77
byteArrayEquals 32 55.349 ns/op 58.961 ns/op 0.94
Buffer.compare 32 17.240 ns/op 19.646 ns/op 0.88
byteArrayEquals 1024 1.5573 us/op 1.7849 us/op 0.87
Buffer.compare 1024 24.465 ns/op 27.787 ns/op 0.88
byteArrayEquals 16384 25.000 us/op 27.154 us/op 0.92
Buffer.compare 16384 194.27 ns/op 216.25 ns/op 0.90
byteArrayEquals 123687377 192.76 ms/op 195.98 ms/op 0.98
Buffer.compare 123687377 9.8686 ms/op 7.8371 ms/op 1.26
byteArrayEquals 32 - diff last byte 54.261 ns/op 53.895 ns/op 1.01
Buffer.compare 32 - diff last byte 17.798 ns/op 17.629 ns/op 1.01
byteArrayEquals 1024 - diff last byte 1.6481 us/op 1.6263 us/op 1.01
Buffer.compare 1024 - diff last byte 26.965 ns/op 26.045 ns/op 1.04
byteArrayEquals 16384 - diff last byte 26.282 us/op 25.868 us/op 1.02
Buffer.compare 16384 - diff last byte 207.71 ns/op 185.91 ns/op 1.12
byteArrayEquals 123687377 - diff last byte 187.93 ms/op 194.06 ms/op 0.97
Buffer.compare 123687377 - diff last byte 6.4684 ms/op 6.8421 ms/op 0.95
byteArrayEquals 32 - random bytes 5.0980 ns/op 5.3570 ns/op 0.95
Buffer.compare 32 - random bytes 16.946 ns/op 17.470 ns/op 0.97
byteArrayEquals 1024 - random bytes 5.0890 ns/op 5.5210 ns/op 0.92
Buffer.compare 1024 - random bytes 17.021 ns/op 17.806 ns/op 0.96
byteArrayEquals 16384 - random bytes 5.1280 ns/op 5.3590 ns/op 0.96
Buffer.compare 16384 - random bytes 16.935 ns/op 17.769 ns/op 0.95
byteArrayEquals 123687377 - random bytes 6.3600 ns/op 6.7500 ns/op 0.94
Buffer.compare 123687377 - random bytes 18.250 ns/op 19.060 ns/op 0.96
regular array get 100000 times 32.827 us/op 45.107 us/op 0.73
wrappedArray get 100000 times 32.342 us/op 33.966 us/op 0.95
arrayWithProxy get 100000 times 13.939 ms/op 15.348 ms/op 0.91
ssz.Root.equals 45.642 ns/op 48.114 ns/op 0.95
byteArrayEquals 44.827 ns/op 46.071 ns/op 0.97
Buffer.compare 10.327 ns/op 10.431 ns/op 0.99
processSlot - 1 slots 14.656 us/op 16.621 us/op 0.88
processSlot - 32 slots 2.4380 ms/op 3.0612 ms/op 0.80
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.360 ms/op 38.334 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 2.1796 ms/op 2.2818 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.1954 ms/op 4.3758 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5189 ms/op 4.6412 ms/op 0.97
findModifiedValidators - 10000 modified validators 277.82 ms/op 287.27 ms/op 0.97
findModifiedValidators - 1000 modified validators 200.62 ms/op 204.34 ms/op 0.98
findModifiedValidators - 100 modified validators 171.86 ms/op 205.72 ms/op 0.84
findModifiedValidators - 10 modified validators 151.27 ms/op 215.93 ms/op 0.70
findModifiedValidators - 1 modified validators 172.48 ms/op 195.48 ms/op 0.88
findModifiedValidators - no difference 176.23 ms/op 198.21 ms/op 0.89
compare ViewDUs 3.0845 s/op 3.4022 s/op 0.91
compare each validator Uint8Array 1.1329 s/op 1.5343 s/op 0.74
compare ViewDU to Uint8Array 1.0788 s/op 1.2391 s/op 0.87
migrate state 1000000 validators, 24 modified, 0 new 711.62 ms/op 760.93 ms/op 0.94
migrate state 1000000 validators, 1700 modified, 1000 new 1.0285 s/op 952.66 ms/op 1.08
migrate state 1000000 validators, 3400 modified, 2000 new 1.2112 s/op 1.1375 s/op 1.06
migrate state 1500000 validators, 24 modified, 0 new 686.62 ms/op 707.30 ms/op 0.97
migrate state 1500000 validators, 1700 modified, 1000 new 927.42 ms/op 862.99 ms/op 1.07
migrate state 1500000 validators, 3400 modified, 2000 new 1.1601 s/op 981.79 ms/op 1.18
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.5100 ns/op 4.4300 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 506.78 ns/op 586.48 ns/op 0.86
computeProposers - vc 250000 6.9744 ms/op 7.1967 ms/op 0.97
computeEpochShuffling - vc 250000 41.635 ms/op 42.083 ms/op 0.99
getNextSyncCommittee - vc 250000 127.13 ms/op 123.04 ms/op 1.03
computeSigningRoot for AttestationData 23.014 us/op 23.016 us/op 1.00
hash AttestationData serialized data then Buffer.toString(base64) 1.6392 us/op 1.5359 us/op 1.07
toHexString serialized data 899.34 ns/op 871.52 ns/op 1.03
Buffer.toString(base64) 179.46 ns/op 171.00 ns/op 1.05
nodejs block root to RootHex using toHex 158.53 ns/op 164.45 ns/op 0.96
nodejs block root to RootHex using toRootHex 91.034 ns/op 92.257 ns/op 0.99
browser block root to RootHex using the deprecated toHexString 229.66 ns/op 225.50 ns/op 1.02
browser block root to RootHex using toHex 183.99 ns/op 186.09 ns/op 0.99
browser block root to RootHex using toRootHex 166.19 ns/op 160.59 ns/op 1.03

by benchmarkbot/action

@twoeths twoeths marked this pull request as ready for review October 30, 2024 02:31
@twoeths twoeths requested a review from a team as a code owner October 30, 2024 02:31
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.

Do not extract roots for all gossip messages
1 participant