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: queue messages at gossipsub #7189

Closed
wants to merge 2 commits into from

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Oct 22, 2024

Motivation

  • when subscribing to all subnets, there are ~300ms delay between the time we first see gossip block at network thread and gossip handler
  • there's a hypothesis that the queued attestations in main thread may cause this

Description

  • this PR queue attestations of unknown root in network thread, specifically in the gossip class
  • however the result is the same, I still see the delay, it seems that queuing at gossip side does not help a lot. Need to revisit this later to see if it helps
  • it seems to me the latency from network thread to main thread is due to garbage collection instead, could be the structural clone

part of #7188

Copy link
Contributor

⚠️ 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: 4c9fb88 Previous: 0e4ea98 Ratio
forkChoice updateHead vc 100000 bc 64 eq 0 1.6070 ms/op 494.87 us/op 3.25
Full benchmark results
Benchmark suite Current: 4c9fb88 Previous: 0e4ea98 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.0351 ms/op 2.0059 ms/op 1.01
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 54.054 us/op 52.802 us/op 1.02
BLS verify - blst 866.51 us/op 1.0596 ms/op 0.82
BLS verifyMultipleSignatures 3 - blst 1.4757 ms/op 1.5554 ms/op 0.95
BLS verifyMultipleSignatures 8 - blst 1.8078 ms/op 2.1669 ms/op 0.83
BLS verifyMultipleSignatures 32 - blst 4.9768 ms/op 6.5700 ms/op 0.76
BLS verifyMultipleSignatures 64 - blst 10.703 ms/op 10.692 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst 18.602 ms/op 16.812 ms/op 1.11
BLS deserializing 10000 signatures 694.29 ms/op 677.33 ms/op 1.03
BLS deserializing 100000 signatures 6.9042 s/op 6.8036 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 973.17 us/op 1.1141 ms/op 0.87
BLS verifyMultipleSignatures - same message - 8 - blst 1.0654 ms/op 1.2213 ms/op 0.87
BLS verifyMultipleSignatures - same message - 32 - blst 1.8892 ms/op 1.9477 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.8159 ms/op 2.7373 ms/op 1.03
BLS verifyMultipleSignatures - same message - 128 - blst 4.6109 ms/op 4.2726 ms/op 1.08
BLS aggregatePubkeys 32 - blst 21.222 us/op 19.929 us/op 1.06
BLS aggregatePubkeys 128 - blst 72.413 us/op 69.957 us/op 1.04
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 60.473 ms/op 68.645 ms/op 0.88
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 52.292 ms/op 82.275 ms/op 0.64
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 44.745 ms/op 49.766 ms/op 0.90
getSlashingsAndExits - default max 115.02 us/op 99.023 us/op 1.16
getSlashingsAndExits - 2k 335.67 us/op 341.76 us/op 0.98
proposeBlockBody type=full, size=empty 6.9600 ms/op 7.0070 ms/op 0.99
isKnown best case - 1 super set check 415.00 ns/op 333.00 ns/op 1.25
isKnown normal case - 2 super set checks 321.00 ns/op 401.00 ns/op 0.80
isKnown worse case - 16 super set checks 297.00 ns/op 391.00 ns/op 0.76
InMemoryCheckpointStateCache - add get delete 3.0420 us/op 3.1950 us/op 0.95
updateUnfinalizedPubkeys - updating 10 pubkeys 1.2658 ms/op 1.4246 ms/op 0.89
updateUnfinalizedPubkeys - updating 100 pubkeys 3.9006 ms/op 3.6270 ms/op 1.08
updateUnfinalizedPubkeys - updating 1000 pubkeys 55.818 ms/op 62.567 ms/op 0.89
validate api signedAggregateAndProof - struct 1.4545 ms/op 2.9206 ms/op 0.50
validate gossip signedAggregateAndProof - struct 1.4234 ms/op 2.0658 ms/op 0.69
batch validate gossip attestation - vc 640000 - chunk 32 131.68 us/op 137.91 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 64 120.83 us/op 122.73 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 115.51 us/op 114.01 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 112.66 us/op 108.49 us/op 1.04
pickEth1Vote - no votes 1.2011 ms/op 1.0255 ms/op 1.17
pickEth1Vote - max votes 6.6444 ms/op 7.1150 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.947 ms/op 15.159 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 26.046 ms/op 22.728 ms/op 1.15
pickEth1Vote - Eth1Data fastSerialize value x2048 579.44 us/op 452.00 us/op 1.28
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.9768 ms/op 4.0139 ms/op 0.99
bytes32 toHexString 583.00 ns/op 434.00 ns/op 1.34
bytes32 Buffer.toString(hex) 265.00 ns/op 250.00 ns/op 1.06
bytes32 Buffer.toString(hex) from Uint8Array 450.00 ns/op 362.00 ns/op 1.24
bytes32 Buffer.toString(hex) + 0x 252.00 ns/op 254.00 ns/op 0.99
Object access 1 prop 0.16800 ns/op 0.13300 ns/op 1.26
Map access 1 prop 0.14300 ns/op 0.13100 ns/op 1.09
Object get x1000 6.0030 ns/op 6.0210 ns/op 1.00
Map get x1000 6.3780 ns/op 6.3380 ns/op 1.01
Object set x1000 40.701 ns/op 33.319 ns/op 1.22
Map set x1000 25.853 ns/op 22.099 ns/op 1.17
Return object 10000 times 0.29850 ns/op 0.28680 ns/op 1.04
Throw Error 10000 times 3.3761 us/op 3.3022 us/op 1.02
toHex 160.24 ns/op 145.89 ns/op 1.10
Buffer.from 145.32 ns/op 148.93 ns/op 0.98
shared Buffer 98.741 ns/op 87.221 ns/op 1.13
fastMsgIdFn sha256 / 200 bytes 2.3590 us/op 2.1690 us/op 1.09
fastMsgIdFn h32 xxhash / 200 bytes 252.00 ns/op 231.00 ns/op 1.09
fastMsgIdFn h64 xxhash / 200 bytes 276.00 ns/op 265.00 ns/op 1.04
fastMsgIdFn sha256 / 1000 bytes 7.6020 us/op 7.2990 us/op 1.04
fastMsgIdFn h32 xxhash / 1000 bytes 401.00 ns/op 360.00 ns/op 1.11
fastMsgIdFn h64 xxhash / 1000 bytes 355.00 ns/op 334.00 ns/op 1.06
fastMsgIdFn sha256 / 10000 bytes 63.827 us/op 64.585 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9240 us/op 1.8310 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.2110 us/op 1.2120 us/op 1.00
send data - 1000 256B messages 12.248 ms/op 13.121 ms/op 0.93
send data - 1000 512B messages 17.857 ms/op 16.463 ms/op 1.08
send data - 1000 1024B messages 25.854 ms/op 28.366 ms/op 0.91
send data - 1000 1200B messages 27.832 ms/op 27.838 ms/op 1.00
send data - 1000 2048B messages 35.579 ms/op 33.181 ms/op 1.07
send data - 1000 4096B messages 31.227 ms/op 31.330 ms/op 1.00
send data - 1000 16384B messages 76.038 ms/op 71.958 ms/op 1.06
send data - 1000 65536B messages 211.08 ms/op 221.19 ms/op 0.95
enrSubnets - fastDeserialize 64 bits 1.0870 us/op 1.0810 us/op 1.01
enrSubnets - ssz BitVector 64 bits 390.00 ns/op 348.00 ns/op 1.12
enrSubnets - fastDeserialize 4 bits 174.00 ns/op 142.00 ns/op 1.23
enrSubnets - ssz BitVector 4 bits 379.00 ns/op 352.00 ns/op 1.08
prioritizePeers score -10:0 att 32-0.1 sync 2-0 163.52 us/op 159.62 us/op 1.02
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 170.94 us/op 139.29 us/op 1.23
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 265.10 us/op 229.53 us/op 1.15
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 390.74 us/op 600.01 us/op 0.65
prioritizePeers score 0:0 att 64-1 sync 4-1 752.45 us/op 857.27 us/op 0.88
array of 16000 items push then shift 1.6687 us/op 1.6195 us/op 1.03
LinkedList of 16000 items push then shift 7.5980 ns/op 7.0970 ns/op 1.07
array of 16000 items push then pop 140.14 ns/op 114.10 ns/op 1.23
LinkedList of 16000 items push then pop 8.1720 ns/op 6.9250 ns/op 1.18
array of 24000 items push then shift 2.4868 us/op 2.3825 us/op 1.04
LinkedList of 24000 items push then shift 8.2070 ns/op 6.9990 ns/op 1.17
array of 24000 items push then pop 177.24 ns/op 135.84 ns/op 1.30
LinkedList of 24000 items push then pop 7.9910 ns/op 6.8360 ns/op 1.17
intersect bitArray bitLen 8 6.9000 ns/op 6.3530 ns/op 1.09
intersect array and set length 8 85.409 ns/op 46.517 ns/op 1.84
intersect bitArray bitLen 128 31.674 ns/op 29.311 ns/op 1.08
intersect array and set length 128 929.34 ns/op 671.89 ns/op 1.38
bitArray.getTrueBitIndexes() bitLen 128 2.3410 us/op 2.5700 us/op 0.91
bitArray.getTrueBitIndexes() bitLen 248 4.1340 us/op 3.7180 us/op 1.11
bitArray.getTrueBitIndexes() bitLen 512 8.9100 us/op 8.1740 us/op 1.09
Buffer.concat 32 items 1.1470 us/op 898.00 ns/op 1.28
Uint8Array.set 32 items 1.7430 us/op 1.3780 us/op 1.26
Buffer.copy 2.0120 us/op 1.6790 us/op 1.20
Uint8Array.set - with subarray 3.4200 us/op 2.6400 us/op 1.30
Uint8Array.set - without subarray 1.7000 us/op 1.4980 us/op 1.13
getUint32 - dataview 323.00 ns/op 248.00 ns/op 1.30
getUint32 - manual 279.00 ns/op 155.00 ns/op 1.80
Set add up to 64 items then delete first 3.3826 us/op 2.2287 us/op 1.52
OrderedSet add up to 64 items then delete first 4.9705 us/op 3.2775 us/op 1.52
Set add up to 64 items then delete last 3.2662 us/op 2.5198 us/op 1.30
OrderedSet add up to 64 items then delete last 5.2989 us/op 3.7371 us/op 1.42
Set add up to 64 items then delete middle 3.2528 us/op 2.5631 us/op 1.27
OrderedSet add up to 64 items then delete middle 6.7418 us/op 5.2585 us/op 1.28
Set add up to 128 items then delete first 6.6286 us/op 5.0662 us/op 1.31
OrderedSet add up to 128 items then delete first 9.8282 us/op 7.9946 us/op 1.23
Set add up to 128 items then delete last 6.5990 us/op 4.9965 us/op 1.32
OrderedSet add up to 128 items then delete last 10.647 us/op 7.3425 us/op 1.45
Set add up to 128 items then delete middle 7.0039 us/op 4.9084 us/op 1.43
OrderedSet add up to 128 items then delete middle 17.283 us/op 13.875 us/op 1.25
Set add up to 256 items then delete first 13.802 us/op 10.742 us/op 1.28
OrderedSet add up to 256 items then delete first 20.409 us/op 16.271 us/op 1.25
Set add up to 256 items then delete last 13.393 us/op 9.9144 us/op 1.35
OrderedSet add up to 256 items then delete last 21.441 us/op 14.786 us/op 1.45
Set add up to 256 items then delete middle 14.197 us/op 9.8693 us/op 1.44
OrderedSet add up to 256 items then delete middle 46.561 us/op 41.582 us/op 1.12
transfer serialized Status (84 B) 1.6750 us/op 1.3790 us/op 1.21
copy serialized Status (84 B) 1.3200 us/op 1.1390 us/op 1.16
transfer serialized SignedVoluntaryExit (112 B) 1.4980 us/op 1.4480 us/op 1.03
copy serialized SignedVoluntaryExit (112 B) 1.2730 us/op 1.1630 us/op 1.09
transfer serialized ProposerSlashing (416 B) 1.8630 us/op 1.5040 us/op 1.24
copy serialized ProposerSlashing (416 B) 2.0430 us/op 1.4370 us/op 1.42
transfer serialized Attestation (485 B) 2.8600 us/op 1.6060 us/op 1.78
copy serialized Attestation (485 B) 2.3920 us/op 1.4530 us/op 1.65
transfer serialized AttesterSlashing (33232 B) 2.7880 us/op 1.8320 us/op 1.52
copy serialized AttesterSlashing (33232 B) 9.8660 us/op 4.6940 us/op 2.10
transfer serialized Small SignedBeaconBlock (128000 B) 3.4560 us/op 2.5760 us/op 1.34
copy serialized Small SignedBeaconBlock (128000 B) 43.176 us/op 15.471 us/op 2.79
transfer serialized Avg SignedBeaconBlock (200000 B) 5.2980 us/op 3.1770 us/op 1.67
copy serialized Avg SignedBeaconBlock (200000 B) 56.630 us/op 23.055 us/op 2.46
transfer serialized BlobsSidecar (524380 B) 4.1080 us/op 2.7930 us/op 1.47
copy serialized BlobsSidecar (524380 B) 154.63 us/op 87.570 us/op 1.77
transfer serialized Big SignedBeaconBlock (1000000 B) 6.1640 us/op 2.7740 us/op 2.22
copy serialized Big SignedBeaconBlock (1000000 B) 272.15 us/op 146.23 us/op 1.86
pass gossip attestations to forkchoice per slot 3.3429 ms/op 2.8189 ms/op 1.19
forkChoice updateHead vc 100000 bc 64 eq 0 1.6070 ms/op 494.87 us/op 3.25
forkChoice updateHead vc 600000 bc 64 eq 0 6.0608 ms/op 2.7596 ms/op 2.20
forkChoice updateHead vc 1000000 bc 64 eq 0 6.6253 ms/op 6.2508 ms/op 1.06
forkChoice updateHead vc 600000 bc 320 eq 0 3.7114 ms/op 2.7565 ms/op 1.35
forkChoice updateHead vc 600000 bc 1200 eq 0 3.6813 ms/op 2.8289 ms/op 1.30
forkChoice updateHead vc 600000 bc 7200 eq 0 4.7640 ms/op 3.5496 ms/op 1.34
forkChoice updateHead vc 600000 bc 64 eq 1000 10.842 ms/op 10.159 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 10000 10.859 ms/op 10.276 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 300000 26.316 ms/op 13.353 ms/op 1.97
computeDeltas 500000 validators 300 proto nodes 5.6490 ms/op 4.0134 ms/op 1.41
computeDeltas 500000 validators 1200 proto nodes 5.1074 ms/op 4.0557 ms/op 1.26
computeDeltas 500000 validators 7200 proto nodes 5.4759 ms/op 3.9924 ms/op 1.37
computeDeltas 750000 validators 300 proto nodes 6.9466 ms/op 5.9964 ms/op 1.16
computeDeltas 750000 validators 1200 proto nodes 7.3789 ms/op 5.9374 ms/op 1.24
computeDeltas 750000 validators 7200 proto nodes 8.2532 ms/op 6.0071 ms/op 1.37
computeDeltas 1400000 validators 300 proto nodes 14.544 ms/op 11.315 ms/op 1.29
computeDeltas 1400000 validators 1200 proto nodes 14.501 ms/op 11.231 ms/op 1.29
computeDeltas 1400000 validators 7200 proto nodes 15.116 ms/op 11.052 ms/op 1.37
computeDeltas 2100000 validators 300 proto nodes 22.773 ms/op 17.513 ms/op 1.30
computeDeltas 2100000 validators 1200 proto nodes 20.339 ms/op 17.427 ms/op 1.17
computeDeltas 2100000 validators 7200 proto nodes 21.133 ms/op 17.349 ms/op 1.22
altair processAttestation - 250000 vs - 7PWei normalcase 2.9537 ms/op 1.7914 ms/op 1.65
altair processAttestation - 250000 vs - 7PWei worstcase 4.2747 ms/op 2.6506 ms/op 1.61
altair processAttestation - setStatus - 1/6 committees join 169.90 us/op 119.07 us/op 1.43
altair processAttestation - setStatus - 1/3 committees join 290.68 us/op 314.41 us/op 0.92
altair processAttestation - setStatus - 1/2 committees join 390.08 us/op 647.38 us/op 0.60
altair processAttestation - setStatus - 2/3 committees join 532.88 us/op 409.69 us/op 1.30
altair processAttestation - setStatus - 4/5 committees join 682.55 us/op 578.15 us/op 1.18
altair processAttestation - setStatus - 100% committees join 859.93 us/op 656.51 us/op 1.31
altair processBlock - 250000 vs - 7PWei normalcase 10.177 ms/op 5.7935 ms/op 1.76
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.703 ms/op 28.395 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 43.696 ms/op 42.061 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase hashState 88.605 ms/op 82.579 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9312 ms/op 2.2153 ms/op 1.32
phase0 processBlock - 250000 vs - 7PWei worstcase 29.526 ms/op 27.230 ms/op 1.08
altair processEth1Data - 250000 vs - 7PWei normalcase 547.67 us/op 325.79 us/op 1.68
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.040 us/op 11.211 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 71.658 us/op 44.406 us/op 1.61
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.365 us/op 13.624 us/op 1.35
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.876 us/op 8.8280 us/op 1.23
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 213.83 us/op 188.31 us/op 1.14
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.6329 ms/op 2.0246 ms/op 0.81
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8188 ms/op 1.4585 ms/op 1.25
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.0177 ms/op 2.8397 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 7.4412 ms/op 3.4683 ms/op 2.15
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4025 ms/op 2.2159 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.8071 ms/op 3.5533 ms/op 1.63
Tree 40 250000 create 507.30 ms/op 217.81 ms/op 2.33
Tree 40 250000 get(125000) 171.46 ns/op 143.42 ns/op 1.20
Tree 40 250000 set(125000) 1.2224 us/op 588.05 ns/op 2.08
Tree 40 250000 toArray() 25.693 ms/op 14.802 ms/op 1.74
Tree 40 250000 iterate all - toArray() + loop 27.338 ms/op 15.171 ms/op 1.80
Tree 40 250000 iterate all - get(i) 69.120 ms/op 47.480 ms/op 1.46
Array 250000 create 4.8417 ms/op 2.8945 ms/op 1.67
Array 250000 clone - spread 2.7907 ms/op 1.3508 ms/op 2.07
Array 250000 get(125000) 0.52700 ns/op 0.42500 ns/op 1.24
Array 250000 set(125000) 0.58400 ns/op 0.43600 ns/op 1.34
Array 250000 iterate all - loop 93.880 us/op 95.755 us/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 58.697 ms/op 49.622 ms/op 1.18
Array.fill - length 1000000 9.4038 ms/op 3.4872 ms/op 2.70
Array push - length 1000000 46.987 ms/op 16.828 ms/op 2.79
Array.get 0.37153 ns/op 0.27044 ns/op 1.37
Uint8Array.get 0.48450 ns/op 0.43505 ns/op 1.11
phase0 beforeProcessEpoch - 250000 vs - 7PWei 34.316 ms/op 17.839 ms/op 1.92
altair processEpoch - mainnet_e81889 391.46 ms/op 297.97 ms/op 1.31
mainnet_e81889 - altair beforeProcessEpoch 28.256 ms/op 18.335 ms/op 1.54
mainnet_e81889 - altair processJustificationAndFinalization 22.240 us/op 19.988 us/op 1.11
mainnet_e81889 - altair processInactivityUpdates 7.7998 ms/op 5.0530 ms/op 1.54
mainnet_e81889 - altair processRewardsAndPenalties 50.017 ms/op 64.222 ms/op 0.78
mainnet_e81889 - altair processRegistryUpdates 4.9940 us/op 2.9400 us/op 1.70
mainnet_e81889 - altair processSlashings 896.00 ns/op 659.00 ns/op 1.36
mainnet_e81889 - altair processEth1DataReset 955.00 ns/op 513.00 ns/op 1.86
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.2305 ms/op 1.9235 ms/op 1.16
mainnet_e81889 - altair processSlashingsReset 6.8560 us/op 6.8690 us/op 1.00
mainnet_e81889 - altair processRandaoMixesReset 9.6620 us/op 7.4850 us/op 1.29
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0210 us/op 911.00 ns/op 1.12
mainnet_e81889 - altair processParticipationFlagUpdates 2.4100 us/op 3.7520 us/op 0.64
mainnet_e81889 - altair processSyncCommitteeUpdates 590.00 ns/op 722.00 ns/op 0.82
mainnet_e81889 - altair afterProcessEpoch 53.685 ms/op 50.620 ms/op 1.06
capella processEpoch - mainnet_e217614 1.1283 s/op 1.1344 s/op 0.99
mainnet_e217614 - capella beforeProcessEpoch 82.290 ms/op 61.019 ms/op 1.35
mainnet_e217614 - capella processJustificationAndFinalization 19.272 us/op 22.511 us/op 0.86
mainnet_e217614 - capella processInactivityUpdates 19.259 ms/op 15.967 ms/op 1.21
mainnet_e217614 - capella processRewardsAndPenalties 247.66 ms/op 270.00 ms/op 0.92
mainnet_e217614 - capella processRegistryUpdates 19.808 us/op 19.918 us/op 0.99
mainnet_e217614 - capella processSlashings 506.00 ns/op 732.00 ns/op 0.69
mainnet_e217614 - capella processEth1DataReset 362.00 ns/op 611.00 ns/op 0.59
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.335 ms/op 5.6653 ms/op 2.88
mainnet_e217614 - capella processSlashingsReset 4.6800 us/op 4.5450 us/op 1.03
mainnet_e217614 - capella processRandaoMixesReset 6.3550 us/op 6.6060 us/op 0.96
mainnet_e217614 - capella processHistoricalRootsUpdate 407.00 ns/op 850.00 ns/op 0.48
mainnet_e217614 - capella processParticipationFlagUpdates 2.9080 us/op 2.9460 us/op 0.99
mainnet_e217614 - capella afterProcessEpoch 132.11 ms/op 120.15 ms/op 1.10
phase0 processEpoch - mainnet_e58758 358.56 ms/op 363.92 ms/op 0.99
mainnet_e58758 - phase0 beforeProcessEpoch 87.250 ms/op 83.096 ms/op 1.05
mainnet_e58758 - phase0 processJustificationAndFinalization 16.127 us/op 23.684 us/op 0.68
mainnet_e58758 - phase0 processRewardsAndPenalties 31.643 ms/op 47.389 ms/op 0.67
mainnet_e58758 - phase0 processRegistryUpdates 6.7620 us/op 12.281 us/op 0.55
mainnet_e58758 - phase0 processSlashings 324.00 ns/op 676.00 ns/op 0.48
mainnet_e58758 - phase0 processEth1DataReset 305.00 ns/op 527.00 ns/op 0.58
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3419 ms/op 2.0810 ms/op 0.64
mainnet_e58758 - phase0 processSlashingsReset 8.4030 us/op 5.1410 us/op 1.63
mainnet_e58758 - phase0 processRandaoMixesReset 4.8230 us/op 6.3750 us/op 0.76
mainnet_e58758 - phase0 processHistoricalRootsUpdate 547.00 ns/op 531.00 ns/op 1.03
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.5080 us/op 4.6800 us/op 0.96
mainnet_e58758 - phase0 afterProcessEpoch 44.731 ms/op 42.539 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3591 ms/op 3.3776 ms/op 0.40
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5453 ms/op 2.3472 ms/op 1.08
altair processInactivityUpdates - 250000 normalcase 17.309 ms/op 23.162 ms/op 0.75
altair processInactivityUpdates - 250000 worstcase 16.022 ms/op 24.159 ms/op 0.66
phase0 processRegistryUpdates - 250000 normalcase 7.2190 us/op 10.383 us/op 0.70
phase0 processRegistryUpdates - 250000 badcase_full_deposits 293.11 us/op 460.18 us/op 0.64
phase0 processRegistryUpdates - 250000 worstcase 0.5 130.59 ms/op 139.75 ms/op 0.93
altair processRewardsAndPenalties - 250000 normalcase 38.452 ms/op 51.788 ms/op 0.74
altair processRewardsAndPenalties - 250000 worstcase 40.953 ms/op 48.848 ms/op 0.84
phase0 getAttestationDeltas - 250000 normalcase 8.7789 ms/op 7.7934 ms/op 1.13
phase0 getAttestationDeltas - 250000 worstcase 7.7623 ms/op 7.2403 ms/op 1.07
phase0 processSlashings - 250000 worstcase 104.92 us/op 126.00 us/op 0.83
altair processSyncCommitteeUpdates - 250000 138.73 ms/op 115.66 ms/op 1.20
BeaconState.hashTreeRoot - No change 259.00 ns/op 251.00 ns/op 1.03
BeaconState.hashTreeRoot - 1 full validator 94.893 us/op 146.89 us/op 0.65
BeaconState.hashTreeRoot - 32 full validator 996.06 us/op 1.5020 ms/op 0.66
BeaconState.hashTreeRoot - 512 full validator 11.930 ms/op 13.068 ms/op 0.91
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 185.21 us/op 187.56 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9552 ms/op 1.6186 ms/op 1.21
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 22.109 ms/op 23.598 ms/op 0.94
BeaconState.hashTreeRoot - 1 balances 110.70 us/op 116.84 us/op 0.95
BeaconState.hashTreeRoot - 32 balances 1.0065 ms/op 1.1942 ms/op 0.84
BeaconState.hashTreeRoot - 512 balances 8.6947 ms/op 9.2271 ms/op 0.94
BeaconState.hashTreeRoot - 250000 balances 161.80 ms/op 202.80 ms/op 0.80
aggregationBits - 2048 els - zipIndexesInBitList 27.783 us/op 23.327 us/op 1.19
byteArrayEquals 32 53.737 ns/op 53.052 ns/op 1.01
Buffer.compare 32 17.074 ns/op 17.554 ns/op 0.97
byteArrayEquals 1024 1.5938 us/op 1.5679 us/op 1.02
Buffer.compare 1024 25.453 ns/op 26.176 ns/op 0.97
byteArrayEquals 16384 25.315 us/op 24.974 us/op 1.01
Buffer.compare 16384 191.23 ns/op 199.88 ns/op 0.96
byteArrayEquals 123687377 193.00 ms/op 187.99 ms/op 1.03
Buffer.compare 123687377 7.3305 ms/op 6.1809 ms/op 1.19
byteArrayEquals 32 - diff last byte 52.776 ns/op 51.299 ns/op 1.03
Buffer.compare 32 - diff last byte 17.238 ns/op 17.332 ns/op 0.99
byteArrayEquals 1024 - diff last byte 1.5967 us/op 1.5502 us/op 1.03
Buffer.compare 1024 - diff last byte 25.331 ns/op 26.672 ns/op 0.95
byteArrayEquals 16384 - diff last byte 25.092 us/op 24.672 us/op 1.02
Buffer.compare 16384 - diff last byte 195.28 ns/op 199.16 ns/op 0.98
byteArrayEquals 123687377 - diff last byte 193.77 ms/op 187.82 ms/op 1.03
Buffer.compare 123687377 - diff last byte 7.9879 ms/op 6.7051 ms/op 1.19
byteArrayEquals 32 - random bytes 5.3190 ns/op 5.1590 ns/op 1.03
Buffer.compare 32 - random bytes 17.489 ns/op 18.071 ns/op 0.97
byteArrayEquals 1024 - random bytes 5.4590 ns/op 5.1550 ns/op 1.06
Buffer.compare 1024 - random bytes 18.722 ns/op 17.869 ns/op 1.05
byteArrayEquals 16384 - random bytes 5.4600 ns/op 5.0950 ns/op 1.07
Buffer.compare 16384 - random bytes 18.248 ns/op 18.745 ns/op 0.97
byteArrayEquals 123687377 - random bytes 7.1600 ns/op 6.4100 ns/op 1.12
Buffer.compare 123687377 - random bytes 20.080 ns/op 18.860 ns/op 1.06
regular array get 100000 times 35.416 us/op 32.559 us/op 1.09
wrappedArray get 100000 times 35.522 us/op 32.445 us/op 1.09
arrayWithProxy get 100000 times 14.467 ms/op 14.220 ms/op 1.02
ssz.Root.equals 47.414 ns/op 45.424 ns/op 1.04
byteArrayEquals 45.614 ns/op 44.491 ns/op 1.03
Buffer.compare 11.710 ns/op 10.171 ns/op 1.15
processSlot - 1 slots 17.546 us/op 11.831 us/op 1.48
processSlot - 32 slots 3.3511 ms/op 2.7696 ms/op 1.21
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.193 ms/op 39.277 ms/op 0.92
getCommitteeAssignments - req 1 vs - 250000 vc 2.1636 ms/op 2.1123 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 4.1059 ms/op 4.1146 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3958 ms/op 4.4277 ms/op 0.99
findModifiedValidators - 10000 modified validators 273.80 ms/op 261.94 ms/op 1.05
findModifiedValidators - 1000 modified validators 202.76 ms/op 159.60 ms/op 1.27
findModifiedValidators - 100 modified validators 240.55 ms/op 152.11 ms/op 1.58
findModifiedValidators - 10 modified validators 198.77 ms/op 156.31 ms/op 1.27
findModifiedValidators - 1 modified validators 194.40 ms/op 143.64 ms/op 1.35
findModifiedValidators - no difference 178.58 ms/op 150.84 ms/op 1.18
compare ViewDUs 3.0488 s/op 3.1957 s/op 0.95
compare each validator Uint8Array 1.8804 s/op 928.71 ms/op 2.02
compare ViewDU to Uint8Array 1.2892 s/op 1.0545 s/op 1.22
migrate state 1000000 validators, 24 modified, 0 new 745.94 ms/op 655.26 ms/op 1.14
migrate state 1000000 validators, 1700 modified, 1000 new 982.98 ms/op 982.23 ms/op 1.00
migrate state 1000000 validators, 3400 modified, 2000 new 1.2414 s/op 1.1929 s/op 1.04
migrate state 1500000 validators, 24 modified, 0 new 779.36 ms/op 773.48 ms/op 1.01
migrate state 1500000 validators, 1700 modified, 1000 new 979.12 ms/op 996.45 ms/op 0.98
migrate state 1500000 validators, 3400 modified, 2000 new 1.1729 s/op 1.2524 s/op 0.94
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1800 ns/op 4.0300 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 831.44 ns/op 816.48 ns/op 1.02
computeProposers - vc 250000 7.9251 ms/op 6.3398 ms/op 1.25
computeEpochShuffling - vc 250000 42.012 ms/op 39.817 ms/op 1.06
getNextSyncCommittee - vc 250000 146.20 ms/op 123.20 ms/op 1.19
computeSigningRoot for AttestationData 28.462 us/op 27.111 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 1.6059 us/op 1.5294 us/op 1.05
toHexString serialized data 921.05 ns/op 862.93 ns/op 1.07
Buffer.toString(base64) 204.69 ns/op 183.56 ns/op 1.12
nodejs block root to RootHex using toHex 173.33 ns/op 158.96 ns/op 1.09
nodejs block root to RootHex using toRootHex 105.29 ns/op 95.524 ns/op 1.10
browser block root to RootHex using the deprecated toHexString 269.00 ns/op 233.49 ns/op 1.15
browser block root to RootHex using toHex 190.38 ns/op 177.86 ns/op 1.07
browser block root to RootHex using toRootHex 168.67 ns/op 158.27 ns/op 1.07

by benchmarkbot/action

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.

1 participant