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: add yamux stream muxer #5886

Merged
merged 3 commits into from
Jul 24, 2024
Merged

feat: add yamux stream muxer #5886

merged 3 commits into from
Jul 24, 2024

Conversation

wemeetagain
Copy link
Member

Motivation

Description

  • Add yamux as first stream muxer

@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2023

⚠️ 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: e534061 Previous: a187851 Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 52.730 ms/op 11.461 ms/op 4.60
Array.fill - length 1000000 9.4998 ms/op 2.6593 ms/op 3.57
Full benchmark results
Benchmark suite Current: e534061 Previous: a187851 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 510.58 us/op 606.23 us/op 0.84
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 52.424 us/op 45.837 us/op 1.14
BLS verify - blst-native 1.2459 ms/op 1.1165 ms/op 1.12
BLS verifyMultipleSignatures 3 - blst-native 2.7360 ms/op 2.3767 ms/op 1.15
BLS verifyMultipleSignatures 8 - blst-native 5.8967 ms/op 5.2756 ms/op 1.12
BLS verifyMultipleSignatures 32 - blst-native 21.652 ms/op 19.375 ms/op 1.12
BLS verifyMultipleSignatures 64 - blst-native 42.350 ms/op 38.338 ms/op 1.10
BLS verifyMultipleSignatures 128 - blst-native 84.908 ms/op 76.302 ms/op 1.11
BLS deserializing 10000 signatures 943.90 ms/op 804.42 ms/op 1.17
BLS deserializing 100000 signatures 9.6211 s/op 7.8570 s/op 1.22
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.4670 ms/op 1.0811 ms/op 1.36
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5847 ms/op 1.2262 ms/op 1.29
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.7863 ms/op 1.9292 ms/op 1.44
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0862 ms/op 2.8615 ms/op 1.43
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.8949 ms/op 5.8578 ms/op 1.01
BLS aggregatePubkeys 32 - blst-native 28.309 us/op 22.399 us/op 1.26
BLS aggregatePubkeys 128 - blst-native 108.85 us/op 84.889 us/op 1.28
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 90.125 ms/op 65.233 ms/op 1.38
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 78.683 ms/op 44.040 ms/op 1.79
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 45.563 ms/op 30.846 ms/op 1.48
getSlashingsAndExits - default max 168.75 us/op 75.006 us/op 2.25
getSlashingsAndExits - 2k 431.36 us/op 229.16 us/op 1.88
proposeBlockBody type=full, size=empty 7.3429 ms/op 5.0749 ms/op 1.45
isKnown best case - 1 super set check 605.00 ns/op 468.00 ns/op 1.29
isKnown normal case - 2 super set checks 605.00 ns/op 447.00 ns/op 1.35
isKnown worse case - 16 super set checks 713.00 ns/op 446.00 ns/op 1.60
InMemoryCheckpointStateCache - add get delete 7.4290 us/op 4.1830 us/op 1.78
validate api signedAggregateAndProof - struct 2.9592 ms/op 2.2777 ms/op 1.30
validate gossip signedAggregateAndProof - struct 3.0121 ms/op 2.2783 ms/op 1.32
validate gossip attestation - vc 640000 1.4898 ms/op 1.1311 ms/op 1.32
batch validate gossip attestation - vc 640000 - chunk 32 187.00 us/op 130.92 us/op 1.43
batch validate gossip attestation - vc 640000 - chunk 64 162.97 us/op 119.31 us/op 1.37
batch validate gossip attestation - vc 640000 - chunk 128 146.02 us/op 120.03 us/op 1.22
batch validate gossip attestation - vc 640000 - chunk 256 147.93 us/op 115.95 us/op 1.28
pickEth1Vote - no votes 1.5129 ms/op 974.47 us/op 1.55
pickEth1Vote - max votes 14.563 ms/op 9.4175 ms/op 1.55
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.935 ms/op 17.379 ms/op 1.15
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 30.064 ms/op 23.154 ms/op 1.30
pickEth1Vote - Eth1Data fastSerialize value x2048 743.38 us/op 384.74 us/op 1.93
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.1099 ms/op 6.3647 ms/op 0.96
bytes32 toHexString 866.00 ns/op 811.00 ns/op 1.07
bytes32 Buffer.toString(hex) 344.00 ns/op 446.00 ns/op 0.77
bytes32 Buffer.toString(hex) from Uint8Array 562.00 ns/op 653.00 ns/op 0.86
bytes32 Buffer.toString(hex) + 0x 306.00 ns/op 458.00 ns/op 0.67
Object access 1 prop 0.21600 ns/op 0.35600 ns/op 0.61
Map access 1 prop 0.15900 ns/op 0.32100 ns/op 0.50
Object get x1000 7.1630 ns/op 5.0340 ns/op 1.42
Map get x1000 7.6940 ns/op 5.8510 ns/op 1.31
Object set x1000 47.846 ns/op 24.059 ns/op 1.99
Map set x1000 36.277 ns/op 19.652 ns/op 1.85
Return object 10000 times 0.33700 ns/op 0.30110 ns/op 1.12
Throw Error 10000 times 3.8082 us/op 2.7287 us/op 1.40
fastMsgIdFn sha256 / 200 bytes 2.5930 us/op 2.0640 us/op 1.26
fastMsgIdFn h32 xxhash / 200 bytes 333.00 ns/op 489.00 ns/op 0.68
fastMsgIdFn h64 xxhash / 200 bytes 315.00 ns/op 448.00 ns/op 0.70
fastMsgIdFn sha256 / 1000 bytes 8.3180 us/op 6.0270 us/op 1.38
fastMsgIdFn h32 xxhash / 1000 bytes 468.00 ns/op 613.00 ns/op 0.76
fastMsgIdFn h64 xxhash / 1000 bytes 402.00 ns/op 530.00 ns/op 0.76
fastMsgIdFn sha256 / 10000 bytes 76.888 us/op 50.929 us/op 1.51
fastMsgIdFn h32 xxhash / 10000 bytes 2.1450 us/op 1.9990 us/op 1.07
fastMsgIdFn h64 xxhash / 10000 bytes 1.3700 us/op 1.3460 us/op 1.02
send data - 1000 256B messages 17.813 ms/op 11.206 ms/op 1.59
send data - 1000 512B messages 22.587 ms/op 14.035 ms/op 1.61
send data - 1000 1024B messages 36.735 ms/op 20.762 ms/op 1.77
send data - 1000 1200B messages 44.166 ms/op 24.921 ms/op 1.77
send data - 1000 2048B messages 42.040 ms/op 32.038 ms/op 1.31
send data - 1000 4096B messages 39.365 ms/op 28.422 ms/op 1.39
send data - 1000 16384B messages 87.254 ms/op 65.628 ms/op 1.33
send data - 1000 65536B messages 239.09 ms/op 261.60 ms/op 0.91
enrSubnets - fastDeserialize 64 bits 1.3360 us/op 1.0690 us/op 1.25
enrSubnets - ssz BitVector 64 bits 471.00 ns/op 510.00 ns/op 0.92
enrSubnets - fastDeserialize 4 bits 201.00 ns/op 316.00 ns/op 0.64
enrSubnets - ssz BitVector 4 bits 472.00 ns/op 501.00 ns/op 0.94
prioritizePeers score -10:0 att 32-0.1 sync 2-0 203.66 us/op 121.69 us/op 1.67
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 218.50 us/op 148.05 us/op 1.48
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 386.89 us/op 277.94 us/op 1.39
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 578.30 us/op 389.01 us/op 1.49
prioritizePeers score 0:0 att 64-1 sync 4-1 924.64 us/op 461.59 us/op 2.00
array of 16000 items push then shift 1.9403 us/op 1.2888 us/op 1.51
LinkedList of 16000 items push then shift 10.916 ns/op 6.3560 ns/op 1.72
array of 16000 items push then pop 156.48 ns/op 77.437 ns/op 2.02
LinkedList of 16000 items push then pop 9.4700 ns/op 6.2330 ns/op 1.52
array of 24000 items push then shift 2.6924 us/op 1.8854 us/op 1.43
LinkedList of 24000 items push then shift 8.4940 ns/op 6.2710 ns/op 1.35
array of 24000 items push then pop 206.44 ns/op 106.71 ns/op 1.93
LinkedList of 24000 items push then pop 8.3090 ns/op 6.1740 ns/op 1.35
intersect bitArray bitLen 8 7.5360 ns/op 5.4260 ns/op 1.39
intersect array and set length 8 62.325 ns/op 38.798 ns/op 1.61
intersect bitArray bitLen 128 34.947 ns/op 26.568 ns/op 1.32
intersect array and set length 128 916.24 ns/op 579.38 ns/op 1.58
bitArray.getTrueBitIndexes() bitLen 128 2.5090 us/op 2.0460 us/op 1.23
bitArray.getTrueBitIndexes() bitLen 248 4.4810 us/op 3.3180 us/op 1.35
bitArray.getTrueBitIndexes() bitLen 512 9.4740 us/op 7.2360 us/op 1.31
Buffer.concat 32 items 1.0520 us/op 1.0370 us/op 1.01
Uint8Array.set 32 items 1.6920 us/op 1.9650 us/op 0.86
Buffer.copy 2.2200 us/op 1.8530 us/op 1.20
Uint8Array.set - with subarray 2.9950 us/op 2.3730 us/op 1.26
Uint8Array.set - without subarray 1.9050 us/op 1.6350 us/op 1.17
getUint32 - dataview 357.00 ns/op 393.00 ns/op 0.91
getUint32 - manual 274.00 ns/op 333.00 ns/op 0.82
Set add up to 64 items then delete first 2.9621 us/op 1.8030 us/op 1.64
OrderedSet add up to 64 items then delete first 4.1496 us/op 2.7786 us/op 1.49
Set add up to 64 items then delete last 3.3861 us/op 2.0493 us/op 1.65
OrderedSet add up to 64 items then delete last 5.3986 us/op 3.0805 us/op 1.75
Set add up to 64 items then delete middle 3.7850 us/op 2.0472 us/op 1.85
OrderedSet add up to 64 items then delete middle 8.3844 us/op 4.4905 us/op 1.87
Set add up to 128 items then delete first 7.3428 us/op 4.0481 us/op 1.81
OrderedSet add up to 128 items then delete first 10.460 us/op 6.3118 us/op 1.66
Set add up to 128 items then delete last 6.6261 us/op 3.9431 us/op 1.68
OrderedSet add up to 128 items then delete last 9.9133 us/op 5.9383 us/op 1.67
Set add up to 128 items then delete middle 6.6940 us/op 3.9274 us/op 1.70
OrderedSet add up to 128 items then delete middle 19.353 us/op 11.462 us/op 1.69
Set add up to 256 items then delete first 16.334 us/op 7.8725 us/op 2.07
OrderedSet add up to 256 items then delete first 22.261 us/op 12.496 us/op 1.78
Set add up to 256 items then delete last 14.488 us/op 7.6698 us/op 1.89
OrderedSet add up to 256 items then delete last 23.596 us/op 11.775 us/op 2.00
Set add up to 256 items then delete middle 15.622 us/op 7.6649 us/op 2.04
OrderedSet add up to 256 items then delete middle 51.531 us/op 34.172 us/op 1.51
transfer serialized Status (84 B) 1.6540 us/op 1.4660 us/op 1.13
copy serialized Status (84 B) 1.5270 us/op 1.2770 us/op 1.20
transfer serialized SignedVoluntaryExit (112 B) 1.8120 us/op 1.7220 us/op 1.05
copy serialized SignedVoluntaryExit (112 B) 1.7630 us/op 1.3770 us/op 1.28
transfer serialized ProposerSlashing (416 B) 2.5930 us/op 2.5080 us/op 1.03
copy serialized ProposerSlashing (416 B) 2.8690 us/op 2.1300 us/op 1.35
transfer serialized Attestation (485 B) 3.0110 us/op 2.5410 us/op 1.18
copy serialized Attestation (485 B) 3.2390 us/op 1.6880 us/op 1.92
transfer serialized AttesterSlashing (33232 B) 3.9340 us/op 2.3670 us/op 1.66
copy serialized AttesterSlashing (33232 B) 12.298 us/op 4.7330 us/op 2.60
transfer serialized Small SignedBeaconBlock (128000 B) 5.9030 us/op 2.6120 us/op 2.26
copy serialized Small SignedBeaconBlock (128000 B) 45.207 us/op 9.8960 us/op 4.57
transfer serialized Avg SignedBeaconBlock (200000 B) 7.4850 us/op 3.1720 us/op 2.36
copy serialized Avg SignedBeaconBlock (200000 B) 44.738 us/op 13.154 us/op 3.40
transfer serialized BlobsSidecar (524380 B) 4.3610 us/op 3.0550 us/op 1.43
copy serialized BlobsSidecar (524380 B) 91.189 us/op 68.769 us/op 1.33
transfer serialized Big SignedBeaconBlock (1000000 B) 4.4460 us/op 3.4170 us/op 1.30
copy serialized Big SignedBeaconBlock (1000000 B) 246.57 us/op 139.87 us/op 1.76
pass gossip attestations to forkchoice per slot 3.9008 ms/op 2.8454 ms/op 1.37
forkChoice updateHead vc 100000 bc 64 eq 0 554.00 us/op 429.52 us/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 0 4.6059 ms/op 2.6335 ms/op 1.75
forkChoice updateHead vc 1000000 bc 64 eq 0 7.3641 ms/op 4.0901 ms/op 1.80
forkChoice updateHead vc 600000 bc 320 eq 0 4.9690 ms/op 2.5488 ms/op 1.95
forkChoice updateHead vc 600000 bc 1200 eq 0 4.9505 ms/op 2.4017 ms/op 2.06
forkChoice updateHead vc 600000 bc 7200 eq 0 5.6331 ms/op 2.9818 ms/op 1.89
forkChoice updateHead vc 600000 bc 64 eq 1000 13.439 ms/op 9.7019 ms/op 1.39
forkChoice updateHead vc 600000 bc 64 eq 10000 14.277 ms/op 9.2357 ms/op 1.55
forkChoice updateHead vc 600000 bc 64 eq 300000 52.730 ms/op 11.461 ms/op 4.60
computeDeltas 500000 validators 300 proto nodes 5.3247 ms/op 2.9697 ms/op 1.79
computeDeltas 500000 validators 1200 proto nodes 4.8441 ms/op 2.9215 ms/op 1.66
computeDeltas 500000 validators 7200 proto nodes 4.3342 ms/op 2.9614 ms/op 1.46
computeDeltas 750000 validators 300 proto nodes 6.2862 ms/op 4.3454 ms/op 1.45
computeDeltas 750000 validators 1200 proto nodes 6.3495 ms/op 4.4183 ms/op 1.44
computeDeltas 750000 validators 7200 proto nodes 6.1625 ms/op 4.4305 ms/op 1.39
computeDeltas 1400000 validators 300 proto nodes 11.990 ms/op 8.3808 ms/op 1.43
computeDeltas 1400000 validators 1200 proto nodes 13.085 ms/op 8.4509 ms/op 1.55
computeDeltas 1400000 validators 7200 proto nodes 13.450 ms/op 9.2530 ms/op 1.45
computeDeltas 2100000 validators 300 proto nodes 19.896 ms/op 13.959 ms/op 1.43
computeDeltas 2100000 validators 1200 proto nodes 20.143 ms/op 13.298 ms/op 1.51
computeDeltas 2100000 validators 7200 proto nodes 20.439 ms/op 13.386 ms/op 1.53
altair processAttestation - 250000 vs - 7PWei normalcase 4.0084 ms/op 1.5041 ms/op 2.66
altair processAttestation - 250000 vs - 7PWei worstcase 4.1539 ms/op 3.1507 ms/op 1.32
altair processAttestation - setStatus - 1/6 committees join 180.63 us/op 68.968 us/op 2.62
altair processAttestation - setStatus - 1/3 committees join 353.71 us/op 134.95 us/op 2.62
altair processAttestation - setStatus - 1/2 committees join 427.22 us/op 225.61 us/op 1.89
altair processAttestation - setStatus - 2/3 committees join 540.48 us/op 257.52 us/op 2.10
altair processAttestation - setStatus - 4/5 committees join 758.48 us/op 449.84 us/op 1.69
altair processAttestation - setStatus - 100% committees join 933.92 us/op 503.47 us/op 1.85
altair processBlock - 250000 vs - 7PWei normalcase 9.8887 ms/op 4.0707 ms/op 2.43
altair processBlock - 250000 vs - 7PWei normalcase hashState 33.487 ms/op 25.935 ms/op 1.29
altair processBlock - 250000 vs - 7PWei worstcase 54.670 ms/op 39.036 ms/op 1.40
altair processBlock - 250000 vs - 7PWei worstcase hashState 106.01 ms/op 88.144 ms/op 1.20
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3314 ms/op 1.9021 ms/op 1.75
phase0 processBlock - 250000 vs - 7PWei worstcase 34.472 ms/op 27.488 ms/op 1.25
altair processEth1Data - 250000 vs - 7PWei normalcase 519.77 us/op 380.62 us/op 1.37
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.7570 us/op 5.1730 us/op 1.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 35.440 us/op 19.113 us/op 1.85
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 12.493 us/op 7.2580 us/op 1.72
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.5500 us/op 5.2830 us/op 1.43
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 108.84 us/op 82.898 us/op 1.31
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2489 ms/op 821.18 us/op 1.52
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4922 ms/op 635.91 us/op 2.35
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.3689 ms/op 1.1000 ms/op 1.24
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.4415 ms/op 2.0933 ms/op 1.64
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0525 ms/op 1.2368 ms/op 1.66
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.0361 ms/op 3.0925 ms/op 1.63
Tree 40 250000 create 491.88 ms/op 189.00 ms/op 2.60
Tree 40 250000 get(125000) 173.10 ns/op 127.14 ns/op 1.36
Tree 40 250000 set(125000) 1.7123 us/op 559.68 ns/op 3.06
Tree 40 250000 toArray() 25.848 ms/op 18.856 ms/op 1.37
Tree 40 250000 iterate all - toArray() + loop 24.958 ms/op 20.434 ms/op 1.22
Tree 40 250000 iterate all - get(i) 74.136 ms/op 53.011 ms/op 1.40
MutableVector 250000 create 15.087 ms/op 10.976 ms/op 1.37
MutableVector 250000 get(125000) 7.8560 ns/op 5.8780 ns/op 1.34
MutableVector 250000 set(125000) 568.27 ns/op 172.54 ns/op 3.29
MutableVector 250000 toArray() 5.1100 ms/op 3.0119 ms/op 1.70
MutableVector 250000 iterate all - toArray() + loop 5.1395 ms/op 2.8388 ms/op 1.81
MutableVector 250000 iterate all - get(i) 1.8165 ms/op 1.4776 ms/op 1.23
Array 250000 create 4.7282 ms/op 2.4759 ms/op 1.91
Array 250000 clone - spread 2.9902 ms/op 1.3799 ms/op 2.17
Array 250000 get(125000) 0.51200 ns/op 0.59000 ns/op 0.87
Array 250000 set(125000) 0.54500 ns/op 0.59500 ns/op 0.92
Array 250000 iterate all - loop 123.17 us/op 75.656 us/op 1.63
effectiveBalanceIncrements clone Uint8Array 300000 73.328 us/op 13.832 us/op 5.30
effectiveBalanceIncrements clone MutableVector 300000 160.00 ns/op 311.00 ns/op 0.51
effectiveBalanceIncrements rw all Uint8Array 300000 226.32 us/op 164.43 us/op 1.38
effectiveBalanceIncrements rw all MutableVector 300000 157.40 ms/op 55.282 ms/op 2.85
phase0 afterProcessEpoch - 250000 vs - 7PWei 101.19 ms/op 75.617 ms/op 1.34
Array.fill - length 1000000 9.4998 ms/op 2.6593 ms/op 3.57
Array push - length 1000000 34.991 ms/op 16.453 ms/op 2.13
Array.get 0.33430 ns/op 0.26444 ns/op 1.26
Uint8Array.get 0.51913 ns/op 0.36169 ns/op 1.44
phase0 beforeProcessEpoch - 250000 vs - 7PWei 27.219 ms/op 20.721 ms/op 1.31
altair processEpoch - mainnet_e81889 422.33 ms/op 318.88 ms/op 1.32
mainnet_e81889 - altair beforeProcessEpoch 37.839 ms/op 29.862 ms/op 1.27
mainnet_e81889 - altair processJustificationAndFinalization 16.004 us/op 11.449 us/op 1.40
mainnet_e81889 - altair processInactivityUpdates 8.0971 ms/op 5.4551 ms/op 1.48
mainnet_e81889 - altair processRewardsAndPenalties 53.805 ms/op 47.671 ms/op 1.13
mainnet_e81889 - altair processRegistryUpdates 2.8560 us/op 2.4930 us/op 1.15
mainnet_e81889 - altair processSlashings 821.00 ns/op 759.00 ns/op 1.08
mainnet_e81889 - altair processEth1DataReset 625.00 ns/op 905.00 ns/op 0.69
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7952 ms/op 949.35 us/op 1.89
mainnet_e81889 - altair processSlashingsReset 3.3920 us/op 2.6300 us/op 1.29
mainnet_e81889 - altair processRandaoMixesReset 7.5480 us/op 8.7160 us/op 0.87
mainnet_e81889 - altair processHistoricalRootsUpdate 824.00 ns/op 1.0110 us/op 0.82
mainnet_e81889 - altair processParticipationFlagUpdates 3.6120 us/op 2.9370 us/op 1.23
mainnet_e81889 - altair processSyncCommitteeUpdates 688.00 ns/op 901.00 ns/op 0.76
mainnet_e81889 - altair afterProcessEpoch 102.07 ms/op 79.859 ms/op 1.28
capella processEpoch - mainnet_e217614 1.1594 s/op 1.3005 s/op 0.89
mainnet_e217614 - capella beforeProcessEpoch 132.53 ms/op 135.76 ms/op 0.98
mainnet_e217614 - capella processJustificationAndFinalization 17.548 us/op 14.864 us/op 1.18
mainnet_e217614 - capella processInactivityUpdates 18.585 ms/op 16.407 ms/op 1.13
mainnet_e217614 - capella processRewardsAndPenalties 270.16 ms/op 255.14 ms/op 1.06
mainnet_e217614 - capella processRegistryUpdates 17.760 us/op 19.195 us/op 0.93
mainnet_e217614 - capella processSlashings 527.00 ns/op 926.00 ns/op 0.57
mainnet_e217614 - capella processEth1DataReset 840.00 ns/op 902.00 ns/op 0.93
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.634 ms/op 8.9169 ms/op 1.53
mainnet_e217614 - capella processSlashingsReset 5.8550 us/op 4.5250 us/op 1.29
mainnet_e217614 - capella processRandaoMixesReset 11.214 us/op 12.589 us/op 0.89
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1660 us/op 1.3750 us/op 0.85
mainnet_e217614 - capella processParticipationFlagUpdates 3.1380 us/op 3.6400 us/op 0.86
mainnet_e217614 - capella afterProcessEpoch 267.91 ms/op 246.20 ms/op 1.09
phase0 processEpoch - mainnet_e58758 340.82 ms/op 363.67 ms/op 0.94
mainnet_e58758 - phase0 beforeProcessEpoch 82.751 ms/op 89.030 ms/op 0.93
mainnet_e58758 - phase0 processJustificationAndFinalization 20.352 us/op 15.946 us/op 1.28
mainnet_e58758 - phase0 processRewardsAndPenalties 37.258 ms/op 33.642 ms/op 1.11
mainnet_e58758 - phase0 processRegistryUpdates 7.5660 us/op 9.9460 us/op 0.76
mainnet_e58758 - phase0 processSlashings 293.00 ns/op 755.00 ns/op 0.39
mainnet_e58758 - phase0 processEth1DataReset 351.00 ns/op 868.00 ns/op 0.40
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.7197 ms/op 1.1903 ms/op 1.44
mainnet_e58758 - phase0 processSlashingsReset 3.3450 us/op 5.4090 us/op 0.62
mainnet_e58758 - phase0 processRandaoMixesReset 5.1500 us/op 4.9230 us/op 1.05
mainnet_e58758 - phase0 processHistoricalRootsUpdate 710.00 ns/op 733.00 ns/op 0.97
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.2300 us/op 3.5490 us/op 0.91
mainnet_e58758 - phase0 afterProcessEpoch 77.496 ms/op 70.572 ms/op 1.10
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8510 ms/op 838.35 us/op 2.21
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.0823 ms/op 1.4688 ms/op 1.42
altair processInactivityUpdates - 250000 normalcase 21.099 ms/op 16.473 ms/op 1.28
altair processInactivityUpdates - 250000 worstcase 21.425 ms/op 16.366 ms/op 1.31
phase0 processRegistryUpdates - 250000 normalcase 9.5330 us/op 6.2100 us/op 1.54
phase0 processRegistryUpdates - 250000 badcase_full_deposits 454.57 us/op 315.37 us/op 1.44
phase0 processRegistryUpdates - 250000 worstcase 0.5 137.86 ms/op 121.32 ms/op 1.14
altair processRewardsAndPenalties - 250000 normalcase 52.992 ms/op 46.546 ms/op 1.14
altair processRewardsAndPenalties - 250000 worstcase 45.984 ms/op 48.849 ms/op 0.94
phase0 getAttestationDeltas - 250000 normalcase 7.5370 ms/op 6.2050 ms/op 1.21
phase0 getAttestationDeltas - 250000 worstcase 7.6231 ms/op 6.5646 ms/op 1.16
phase0 processSlashings - 250000 worstcase 96.725 us/op 96.968 us/op 1.00
altair processSyncCommitteeUpdates - 250000 137.76 ms/op 110.12 ms/op 1.25
BeaconState.hashTreeRoot - No change 316.00 ns/op 499.00 ns/op 0.63
BeaconState.hashTreeRoot - 1 full validator 116.06 us/op 123.40 us/op 0.94
BeaconState.hashTreeRoot - 32 full validator 951.42 us/op 1.1565 ms/op 0.82
BeaconState.hashTreeRoot - 512 full validator 10.218 ms/op 10.183 ms/op 1.00
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 116.81 us/op 100.68 us/op 1.16
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7273 ms/op 1.3539 ms/op 1.28
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.508 ms/op 15.876 ms/op 1.29
BeaconState.hashTreeRoot - 1 balances 86.447 us/op 70.436 us/op 1.23
BeaconState.hashTreeRoot - 32 balances 887.70 us/op 716.03 us/op 1.24
BeaconState.hashTreeRoot - 512 balances 7.4284 ms/op 7.4096 ms/op 1.00
BeaconState.hashTreeRoot - 250000 balances 169.25 ms/op 166.70 ms/op 1.02
aggregationBits - 2048 els - zipIndexesInBitList 25.848 us/op 23.655 us/op 1.09
byteArrayEquals 32 54.642 ns/op 49.244 ns/op 1.11
Buffer.compare 32 17.805 ns/op 15.743 ns/op 1.13
byteArrayEquals 1024 1.6353 us/op 1.2890 us/op 1.27
Buffer.compare 1024 25.178 ns/op 23.816 ns/op 1.06
byteArrayEquals 16384 26.230 us/op 20.510 us/op 1.28
Buffer.compare 16384 212.44 ns/op 207.03 ns/op 1.03
byteArrayEquals 123687377 197.97 ms/op 150.43 ms/op 1.32
Buffer.compare 123687377 7.2028 ms/op 5.6031 ms/op 1.29
byteArrayEquals 32 - diff last byte 53.361 ns/op 46.468 ns/op 1.15
Buffer.compare 32 - diff last byte 17.424 ns/op 15.278 ns/op 1.14
byteArrayEquals 1024 - diff last byte 1.6241 us/op 1.2317 us/op 1.32
Buffer.compare 1024 - diff last byte 27.515 ns/op 22.044 ns/op 1.25
byteArrayEquals 16384 - diff last byte 25.798 us/op 19.552 us/op 1.32
Buffer.compare 16384 - diff last byte 194.49 ns/op 195.92 ns/op 0.99
byteArrayEquals 123687377 - diff last byte 200.56 ms/op 152.31 ms/op 1.32
Buffer.compare 123687377 - diff last byte 8.3433 ms/op 4.6294 ms/op 1.80
byteArrayEquals 32 - random bytes 5.5510 ns/op 4.8760 ns/op 1.14
Buffer.compare 32 - random bytes 18.020 ns/op 16.187 ns/op 1.11
byteArrayEquals 1024 - random bytes 5.5400 ns/op 4.8740 ns/op 1.14
Buffer.compare 1024 - random bytes 17.968 ns/op 16.148 ns/op 1.11
byteArrayEquals 16384 - random bytes 5.5730 ns/op 4.8650 ns/op 1.15
Buffer.compare 16384 - random bytes 18.451 ns/op 16.168 ns/op 1.14
byteArrayEquals 123687377 - random bytes 7.2000 ns/op 8.0000 ns/op 0.90
Buffer.compare 123687377 - random bytes 19.760 ns/op 19.090 ns/op 1.04
regular array get 100000 times 44.834 us/op 31.354 us/op 1.43
wrappedArray get 100000 times 34.351 us/op 31.525 us/op 1.09
arrayWithProxy get 100000 times 17.337 ms/op 9.9194 ms/op 1.75
ssz.Root.equals 48.157 ns/op 43.441 ns/op 1.11
byteArrayEquals 47.422 ns/op 43.406 ns/op 1.09
Buffer.compare 11.118 ns/op 9.1940 ns/op 1.21
shuffle list - 16384 els 6.5464 ms/op 5.6795 ms/op 1.15
shuffle list - 250000 els 95.623 ms/op 83.913 ms/op 1.14
processSlot - 1 slots 17.959 us/op 12.478 us/op 1.44
processSlot - 32 slots 3.4653 ms/op 3.0737 ms/op 1.13
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 38.679 ms/op 40.805 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 2.3261 ms/op 1.8096 ms/op 1.29
getCommitteeAssignments - req 100 vs - 250000 vc 4.6231 ms/op 3.5752 ms/op 1.29
getCommitteeAssignments - req 1000 vs - 250000 vc 4.9345 ms/op 3.7473 ms/op 1.32
findModifiedValidators - 10000 modified validators 320.16 ms/op 275.85 ms/op 1.16
findModifiedValidators - 1000 modified validators 200.95 ms/op 185.55 ms/op 1.08
findModifiedValidators - 100 modified validators 209.93 ms/op 177.48 ms/op 1.18
findModifiedValidators - 10 modified validators 196.27 ms/op 168.82 ms/op 1.16
findModifiedValidators - 1 modified validators 223.46 ms/op 152.57 ms/op 1.46
findModifiedValidators - no difference 210.39 ms/op 132.47 ms/op 1.59
compare ViewDUs 3.5490 s/op 3.2337 s/op 1.10
compare each validator Uint8Array 1.3266 s/op 1.4556 s/op 0.91
compare ViewDU to Uint8Array 1.3421 s/op 759.16 ms/op 1.77
migrate state 1000000 validators, 24 modified, 0 new 727.61 ms/op 539.62 ms/op 1.35
migrate state 1000000 validators, 1700 modified, 1000 new 1.1797 s/op 758.27 ms/op 1.56
migrate state 1000000 validators, 3400 modified, 2000 new 1.6122 s/op 971.46 ms/op 1.66
migrate state 1500000 validators, 24 modified, 0 new 736.20 ms/op 477.34 ms/op 1.54
migrate state 1500000 validators, 1700 modified, 1000 new 980.79 ms/op 796.34 ms/op 1.23
migrate state 1500000 validators, 3400 modified, 2000 new 1.3527 s/op 957.66 ms/op 1.41
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2700 ns/op 6.0400 ns/op 0.87
state getBlockRootAtSlot - 250000 vs - 7PWei 645.48 ns/op 765.00 ns/op 0.84
computeProposers - vc 250000 8.5441 ms/op 6.0735 ms/op 1.41
computeEpochShuffling - vc 250000 102.26 ms/op 81.941 ms/op 1.25
getNextSyncCommittee - vc 250000 136.99 ms/op 101.83 ms/op 1.35
computeSigningRoot for AttestationData 20.989 us/op 19.818 us/op 1.06
hash AttestationData serialized data then Buffer.toString(base64) 1.6313 us/op 1.1484 us/op 1.42
toHexString serialized data 1.1138 us/op 719.35 ns/op 1.55
Buffer.toString(base64) 222.40 ns/op 129.78 ns/op 1.71

by benchmarkbot/action

@twoeths
Copy link
Contributor

twoeths commented Jan 3, 2024

some monitors on this branch:

  • rss is higher than unstable (only 9.5GB to 10.5GB - 1k node) while heap memories are the same
Screenshot 2024-01-03 at 15 40 31
  • gc rate is a little bit (~0.1%) higher than stable/unstable (1% to 1.2% - 1k node)
Screenshot 2024-01-03 at 15 43 29

Some other metrics are the same:

  • % head late (>4s)
  • Block source (should be mostly from gossip)
  • number of mesh peers on 1k is better than that of stable, but on *16 is a little bit worse. I'd say this metric is the same as well
  • missed attestations ratio
  • gossip block received delay
  • gossipsub forward messages/peers

I think it's pretty close, if we can resolve the issue in rss then it's good to go

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 62.49%. Comparing base (a187851) to head (ccea055).

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #5886   +/-   ##
=========================================
  Coverage     62.49%   62.49%           
=========================================
  Files           576      576           
  Lines         61178    61179    +1     
  Branches       2134     2139    +5     
=========================================
+ Hits          38235    38236    +1     
  Misses        22904    22904           
  Partials         39       39           

@wemeetagain
Copy link
Member Author

@tuyennhv this has been running for the past 4 days on feat3

Seems to be similar results, specifically, rss is still higher, 10.5 vs 9.5

@philknows philknows added this to the v1.20.0 milestone Jun 4, 2024
@philknows philknows marked this pull request as ready for review June 4, 2024 14:21
@philknows philknows requested a review from a team as a code owner June 4, 2024 14:21
@philknows
Copy link
Member

Based on standup today, needs another round of testing. We need to deploy this one also for testing via Docker deploy. Higher priority given to this over snappyjs due to PRs being pushed to deprecate mplex for yamux. Tagged for v1.20 target if it can make it in. No longer a draft to signal for testing/reviews.

@philknows philknows modified the milestones: v1.20.0, v1.21.0 Jul 10, 2024
@twoeths
Copy link
Contributor

twoeths commented Jul 24, 2024

metrics look all good to me
rss is just the same to `feat1

@wemeetagain wemeetagain merged commit acbedaf into unstable Jul 24, 2024
17 of 20 checks passed
@wemeetagain wemeetagain deleted the cayman/yamux branch July 24, 2024 14:36
twoeths added a commit that referenced this pull request Jul 31, 2024
This was referenced Jul 31, 2024
wemeetagain pushed a commit that referenced this pull request Aug 1, 2024
* Revert "feat: add yamux stream muxer (#5886)"

This reverts commit acbedaf.

* chore: update yarn.lock
philknows pushed a commit that referenced this pull request Aug 1, 2024
* Revert "feat: add yamux stream muxer (#5886)"

This reverts commit acbedaf.

* chore: update yarn.lock
@wemeetagain
Copy link
Member Author

🎉 This PR is included in v1.21.0 🎉

philknows pushed a commit that referenced this pull request Sep 3, 2024
* Revert "feat: add yamux stream muxer (#5886)"

This reverts commit acbedaf.

* chore: update yarn.lock
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.

Add yamux as first streamMuxer
3 participants