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: enable gossipsub batch publish #6597

Merged
merged 1 commit into from
Apr 2, 2024
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 26, 2024

Motivation

Improve memory on network thread

Description

Enable batchPublish option to serialize message once and send to all peers when publishing

related to #6595 #6106

@twoeths twoeths requested a review from a team as a code owner March 26, 2024 02:59
@twoeths twoeths added this to the v1.18.0 milestone Mar 26, 2024
Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Merging #6597 (918f920) into unstable (129f300) will decrease coverage by 0.01%.
Report is 5 commits behind head on unstable.
The diff coverage is 0.00%.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6597      +/-   ##
============================================
- Coverage     61.49%   61.49%   -0.01%     
============================================
  Files           556      556              
  Lines         58895    58897       +2     
  Branches       1856     1856              
============================================
  Hits          36216    36216              
- Misses        22638    22640       +2     
  Partials         41       41              

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 5308434 Previous: d135329 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 557.89 us/op 365.06 us/op 1.53
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 86.348 us/op 51.297 us/op 1.68
BLS verify - blst-native 1.3203 ms/op 1.1349 ms/op 1.16
BLS verifyMultipleSignatures 3 - blst-native 2.7907 ms/op 2.4363 ms/op 1.15
BLS verifyMultipleSignatures 8 - blst-native 6.0976 ms/op 5.3926 ms/op 1.13
BLS verifyMultipleSignatures 32 - blst-native 22.280 ms/op 19.735 ms/op 1.13
BLS verifyMultipleSignatures 64 - blst-native 43.722 ms/op 39.115 ms/op 1.12
BLS verifyMultipleSignatures 128 - blst-native 87.274 ms/op 76.972 ms/op 1.13
BLS deserializing 10000 signatures 900.41 ms/op 803.66 ms/op 1.12
BLS deserializing 100000 signatures 9.3182 s/op 8.4169 s/op 1.11
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3467 ms/op 1.1069 ms/op 1.22
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5205 ms/op 1.2873 ms/op 1.18
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.8599 ms/op 2.0504 ms/op 1.39
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0889 ms/op 3.8499 ms/op 1.06
BLS verifyMultipleSignatures - same message - 128 - blst-native 7.2902 ms/op 5.1797 ms/op 1.41
BLS aggregatePubkeys 32 - blst-native 27.646 us/op 23.182 us/op 1.19
BLS aggregatePubkeys 128 - blst-native 101.40 us/op 90.670 us/op 1.12
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 64.740 ms/op 46.103 ms/op 1.40
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 67.703 ms/op 42.594 ms/op 1.59
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 42.318 ms/op 26.769 ms/op 1.58
getSlashingsAndExits - default max 242.43 us/op 124.47 us/op 1.95
getSlashingsAndExits - 2k 525.04 us/op 343.15 us/op 1.53
proposeBlockBody type=full, size=empty 6.3016 ms/op 4.6563 ms/op 1.35
isKnown best case - 1 super set check 632.00 ns/op 345.00 ns/op 1.83
isKnown normal case - 2 super set checks 699.00 ns/op 348.00 ns/op 2.01
isKnown worse case - 16 super set checks 593.00 ns/op 341.00 ns/op 1.74
CheckpointStateCache - add get delete 6.9420 us/op 4.4210 us/op 1.57
validate api signedAggregateAndProof - struct 2.8562 ms/op 2.4298 ms/op 1.18
validate gossip signedAggregateAndProof - struct 2.8641 ms/op 2.4331 ms/op 1.18
validate gossip attestation - vc 640000 1.4024 ms/op 1.1589 ms/op 1.21
batch validate gossip attestation - vc 640000 - chunk 32 171.62 us/op 145.26 us/op 1.18
batch validate gossip attestation - vc 640000 - chunk 64 149.53 us/op 130.37 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 128 139.62 us/op 127.69 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 128.60 us/op 127.68 us/op 1.01
pickEth1Vote - no votes 1.1840 ms/op 1.1854 ms/op 1.00
pickEth1Vote - max votes 11.602 ms/op 13.628 ms/op 0.85
pickEth1Vote - Eth1Data hashTreeRoot value x2048 22.608 ms/op 19.254 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 31.773 ms/op 37.803 ms/op 0.84
pickEth1Vote - Eth1Data fastSerialize value x2048 619.80 us/op 487.55 us/op 1.27
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.8180 ms/op 5.7913 ms/op 1.35
bytes32 toHexString 505.00 ns/op 527.00 ns/op 0.96
bytes32 Buffer.toString(hex) 297.00 ns/op 363.00 ns/op 0.82
bytes32 Buffer.toString(hex) from Uint8Array 442.00 ns/op 525.00 ns/op 0.84
bytes32 Buffer.toString(hex) + 0x 296.00 ns/op 352.00 ns/op 0.84
Object access 1 prop 0.16500 ns/op 0.21600 ns/op 0.76
Map access 1 prop 0.16100 ns/op 0.20600 ns/op 0.78
Object get x1000 7.6630 ns/op 5.4340 ns/op 1.41
Map get x1000 0.76100 ns/op 0.75200 ns/op 1.01
Object set x1000 50.595 ns/op 26.408 ns/op 1.92
Map set x1000 40.004 ns/op 17.459 ns/op 2.29
Return object 10000 times 0.23920 ns/op 0.23660 ns/op 1.01
Throw Error 10000 times 3.8958 us/op 2.7799 us/op 1.40
fastMsgIdFn sha256 / 200 bytes 3.3380 us/op 2.0530 us/op 1.63
fastMsgIdFn h32 xxhash / 200 bytes 285.00 ns/op 304.00 ns/op 0.94
fastMsgIdFn h64 xxhash / 200 bytes 352.00 ns/op 378.00 ns/op 0.93
fastMsgIdFn sha256 / 1000 bytes 11.456 us/op 6.5910 us/op 1.74
fastMsgIdFn h32 xxhash / 1000 bytes 407.00 ns/op 458.00 ns/op 0.89
fastMsgIdFn h64 xxhash / 1000 bytes 422.00 ns/op 448.00 ns/op 0.94
fastMsgIdFn sha256 / 10000 bytes 105.14 us/op 56.457 us/op 1.86
fastMsgIdFn h32 xxhash / 10000 bytes 1.9170 us/op 1.9230 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.3340 us/op 1.3050 us/op 1.02
send data - 1000 256B messages 20.053 ms/op 11.706 ms/op 1.71
send data - 1000 512B messages 24.119 ms/op 19.366 ms/op 1.25
send data - 1000 1024B messages 42.619 ms/op 23.606 ms/op 1.81
send data - 1000 1200B messages 40.194 ms/op 30.024 ms/op 1.34
send data - 1000 2048B messages 47.693 ms/op 39.924 ms/op 1.19
send data - 1000 4096B messages 44.101 ms/op 41.722 ms/op 1.06
send data - 1000 16384B messages 114.18 ms/op 92.381 ms/op 1.24
send data - 1000 65536B messages 430.98 ms/op 392.16 ms/op 1.10
enrSubnets - fastDeserialize 64 bits 1.1970 us/op 1.3600 us/op 0.88
enrSubnets - ssz BitVector 64 bits 425.00 ns/op 591.00 ns/op 0.72
enrSubnets - fastDeserialize 4 bits 172.00 ns/op 291.00 ns/op 0.59
enrSubnets - ssz BitVector 4 bits 408.00 ns/op 627.00 ns/op 0.65
prioritizePeers score -10:0 att 32-0.1 sync 2-0 103.11 us/op 76.093 us/op 1.36
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 122.92 us/op 87.646 us/op 1.40
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 154.70 us/op 157.82 us/op 0.98
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 284.43 us/op 209.44 us/op 1.36
prioritizePeers score 0:0 att 64-1 sync 4-1 329.97 us/op 253.32 us/op 1.30
array of 16000 items push then shift 1.6048 us/op 1.3591 us/op 1.18
LinkedList of 16000 items push then shift 8.8820 ns/op 5.9380 ns/op 1.50
array of 16000 items push then pop 71.536 ns/op 59.748 ns/op 1.20
LinkedList of 16000 items push then pop 8.6430 ns/op 6.2640 ns/op 1.38
array of 24000 items push then shift 2.3757 us/op 1.9665 us/op 1.21
LinkedList of 24000 items push then shift 8.5970 ns/op 6.4010 ns/op 1.34
array of 24000 items push then pop 98.503 ns/op 94.927 ns/op 1.04
LinkedList of 24000 items push then pop 8.5570 ns/op 5.7960 ns/op 1.48
intersect bitArray bitLen 8 5.7050 ns/op 5.1730 ns/op 1.10
intersect array and set length 8 62.524 ns/op 53.879 ns/op 1.16
intersect bitArray bitLen 128 35.261 ns/op 30.425 ns/op 1.16
intersect array and set length 128 858.66 ns/op 723.14 ns/op 1.19
bitArray.getTrueBitIndexes() bitLen 128 1.4890 us/op 1.1680 us/op 1.27
bitArray.getTrueBitIndexes() bitLen 248 2.4520 us/op 2.1530 us/op 1.14
bitArray.getTrueBitIndexes() bitLen 512 4.9470 us/op 3.9050 us/op 1.27
Buffer.concat 32 items 998.00 ns/op 917.00 ns/op 1.09
Uint8Array.set 32 items 2.4660 us/op 2.2330 us/op 1.10
Set add up to 64 items then delete first 4.3307 us/op 1.7942 us/op 2.41
OrderedSet add up to 64 items then delete first 5.4306 us/op 2.7967 us/op 1.94
Set add up to 64 items then delete last 4.6451 us/op 2.0520 us/op 2.26
OrderedSet add up to 64 items then delete last 5.8072 us/op 3.6388 us/op 1.60
Set add up to 64 items then delete middle 4.5875 us/op 2.3582 us/op 1.95
OrderedSet add up to 64 items then delete middle 6.9864 us/op 4.3853 us/op 1.59
Set add up to 128 items then delete first 9.2648 us/op 4.0523 us/op 2.29
OrderedSet add up to 128 items then delete first 12.137 us/op 6.2053 us/op 1.96
Set add up to 128 items then delete last 9.2594 us/op 3.9009 us/op 2.37
OrderedSet add up to 128 items then delete last 11.733 us/op 5.8268 us/op 2.01
Set add up to 128 items then delete middle 9.1963 us/op 3.7877 us/op 2.43
OrderedSet add up to 128 items then delete middle 17.280 us/op 10.586 us/op 1.63
Set add up to 256 items then delete first 19.817 us/op 7.4573 us/op 2.66
OrderedSet add up to 256 items then delete first 26.205 us/op 12.323 us/op 2.13
Set add up to 256 items then delete last 18.424 us/op 7.5691 us/op 2.43
OrderedSet add up to 256 items then delete last 23.424 us/op 11.584 us/op 2.02
Set add up to 256 items then delete middle 18.277 us/op 7.6491 us/op 2.39
OrderedSet add up to 256 items then delete middle 45.047 us/op 32.966 us/op 1.37
transfer serialized Status (84 B) 1.6790 us/op 1.6120 us/op 1.04
copy serialized Status (84 B) 1.3250 us/op 1.3350 us/op 0.99
transfer serialized SignedVoluntaryExit (112 B) 2.0160 us/op 1.9960 us/op 1.01
copy serialized SignedVoluntaryExit (112 B) 1.4660 us/op 1.6230 us/op 0.90
transfer serialized ProposerSlashing (416 B) 2.4040 us/op 3.0690 us/op 0.78
copy serialized ProposerSlashing (416 B) 2.1160 us/op 2.1430 us/op 0.99
transfer serialized Attestation (485 B) 2.6300 us/op 2.2130 us/op 1.19
copy serialized Attestation (485 B) 2.1770 us/op 2.0220 us/op 1.08
transfer serialized AttesterSlashing (33232 B) 2.7800 us/op 1.6900 us/op 1.64
copy serialized AttesterSlashing (33232 B) 5.5530 us/op 5.4430 us/op 1.02
transfer serialized Small SignedBeaconBlock (128000 B) 3.3830 us/op 2.9670 us/op 1.14
copy serialized Small SignedBeaconBlock (128000 B) 14.969 us/op 10.564 us/op 1.42
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6290 us/op 2.4530 us/op 1.48
copy serialized Avg SignedBeaconBlock (200000 B) 22.411 us/op 13.723 us/op 1.63
transfer serialized BlobsSidecar (524380 B) 3.2740 us/op 3.4960 us/op 0.94
copy serialized BlobsSidecar (524380 B) 84.564 us/op 83.369 us/op 1.01
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9720 us/op 3.9780 us/op 0.75
copy serialized Big SignedBeaconBlock (1000000 B) 412.28 us/op 234.82 us/op 1.76
pass gossip attestations to forkchoice per slot 4.3779 ms/op 2.9575 ms/op 1.48
forkChoice updateHead vc 100000 bc 64 eq 0 726.68 us/op 527.97 us/op 1.38
forkChoice updateHead vc 600000 bc 64 eq 0 4.2633 ms/op 5.7747 ms/op 0.74
forkChoice updateHead vc 1000000 bc 64 eq 0 6.9925 ms/op 5.4067 ms/op 1.29
forkChoice updateHead vc 600000 bc 320 eq 0 4.0858 ms/op 2.7443 ms/op 1.49
forkChoice updateHead vc 600000 bc 1200 eq 0 4.1855 ms/op 2.7463 ms/op 1.52
forkChoice updateHead vc 600000 bc 7200 eq 0 5.1049 ms/op 3.5329 ms/op 1.44
forkChoice updateHead vc 600000 bc 64 eq 1000 10.977 ms/op 10.133 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 10000 11.655 ms/op 10.128 ms/op 1.15
forkChoice updateHead vc 600000 bc 64 eq 300000 15.404 ms/op 12.594 ms/op 1.22
computeDeltas 500000 validators 300 proto nodes 6.5570 ms/op 3.4747 ms/op 1.89
computeDeltas 500000 validators 1200 proto nodes 6.6018 ms/op 3.3772 ms/op 1.95
computeDeltas 500000 validators 7200 proto nodes 6.3408 ms/op 3.0121 ms/op 2.11
computeDeltas 750000 validators 300 proto nodes 9.5990 ms/op 4.5213 ms/op 2.12
computeDeltas 750000 validators 1200 proto nodes 9.6560 ms/op 4.5307 ms/op 2.13
computeDeltas 750000 validators 7200 proto nodes 9.6732 ms/op 4.6341 ms/op 2.09
computeDeltas 1400000 validators 300 proto nodes 18.486 ms/op 9.0115 ms/op 2.05
computeDeltas 1400000 validators 1200 proto nodes 19.466 ms/op 9.4191 ms/op 2.07
computeDeltas 1400000 validators 7200 proto nodes 18.464 ms/op 9.1084 ms/op 2.03
computeDeltas 2100000 validators 300 proto nodes 28.115 ms/op 13.969 ms/op 2.01
computeDeltas 2100000 validators 1200 proto nodes 28.337 ms/op 14.288 ms/op 1.98
computeDeltas 2100000 validators 7200 proto nodes 27.773 ms/op 14.012 ms/op 1.98
altair processAttestation - 250000 vs - 7PWei normalcase 2.1276 ms/op 2.4173 ms/op 0.88
altair processAttestation - 250000 vs - 7PWei worstcase 3.3745 ms/op 2.6852 ms/op 1.26
altair processAttestation - setStatus - 1/6 committees join 183.17 us/op 100.26 us/op 1.83
altair processAttestation - setStatus - 1/3 committees join 348.35 us/op 206.86 us/op 1.68
altair processAttestation - setStatus - 1/2 committees join 451.45 us/op 300.49 us/op 1.50
altair processAttestation - setStatus - 2/3 committees join 635.84 us/op 407.25 us/op 1.56
altair processAttestation - setStatus - 4/5 committees join 768.01 us/op 523.75 us/op 1.47
altair processAttestation - setStatus - 100% committees join 959.14 us/op 629.09 us/op 1.52
altair processBlock - 250000 vs - 7PWei normalcase 10.347 ms/op 10.785 ms/op 0.96
altair processBlock - 250000 vs - 7PWei normalcase hashState 37.855 ms/op 29.330 ms/op 1.29
altair processBlock - 250000 vs - 7PWei worstcase 40.470 ms/op 33.396 ms/op 1.21
altair processBlock - 250000 vs - 7PWei worstcase hashState 92.284 ms/op 74.073 ms/op 1.25
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6878 ms/op 2.3157 ms/op 1.16
phase0 processBlock - 250000 vs - 7PWei worstcase 28.279 ms/op 29.433 ms/op 0.96
altair processEth1Data - 250000 vs - 7PWei normalcase 508.23 us/op 507.32 us/op 1.00
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.2660 us/op 11.519 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 59.264 us/op 73.932 us/op 0.80
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 19.596 us/op 15.179 us/op 1.29
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.2840 us/op 14.602 us/op 0.50
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 281.50 us/op 192.00 us/op 1.47
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.2350 ms/op 1.0900 ms/op 2.05
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.6851 ms/op 1.4876 ms/op 1.80
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4411 ms/op 1.2381 ms/op 1.16
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.3761 ms/op 2.5060 ms/op 1.35
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5702 ms/op 1.9340 ms/op 1.33
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.9555 ms/op 5.0832 ms/op 0.97
Tree 40 250000 create 338.54 ms/op 401.51 ms/op 0.84
Tree 40 250000 get(125000) 195.62 ns/op 122.64 ns/op 1.60
Tree 40 250000 set(125000) 946.23 ns/op 860.17 ns/op 1.10
Tree 40 250000 toArray() 18.529 ms/op 21.895 ms/op 0.85
Tree 40 250000 iterate all - toArray() + loop 18.817 ms/op 20.601 ms/op 0.91
Tree 40 250000 iterate all - get(i) 65.784 ms/op 51.079 ms/op 1.29
MutableVector 250000 create 22.060 ms/op 12.536 ms/op 1.76
MutableVector 250000 get(125000) 6.4200 ns/op 5.7400 ns/op 1.12
MutableVector 250000 set(125000) 243.37 ns/op 224.26 ns/op 1.09
MutableVector 250000 toArray() 3.3421 ms/op 3.6423 ms/op 0.92
MutableVector 250000 iterate all - toArray() + loop 3.7807 ms/op 3.6411 ms/op 1.04
MutableVector 250000 iterate all - get(i) 1.5336 ms/op 1.3153 ms/op 1.17
Array 250000 create 2.9812 ms/op 2.4155 ms/op 1.23
Array 250000 clone - spread 1.2721 ms/op 1.2703 ms/op 1.00
Array 250000 get(125000) 1.0280 ns/op 1.1770 ns/op 0.87
Array 250000 set(125000) 4.1160 ns/op 1.4480 ns/op 2.84
Array 250000 iterate all - loop 166.28 us/op 163.04 us/op 1.02
effectiveBalanceIncrements clone Uint8Array 300000 27.749 us/op 38.405 us/op 0.72
effectiveBalanceIncrements clone MutableVector 300000 354.00 ns/op 454.00 ns/op 0.78
effectiveBalanceIncrements rw all Uint8Array 300000 201.26 us/op 184.96 us/op 1.09
effectiveBalanceIncrements rw all MutableVector 300000 82.408 ms/op 68.615 ms/op 1.20
phase0 afterProcessEpoch - 250000 vs - 7PWei 110.41 ms/op 78.763 ms/op 1.40
phase0 beforeProcessEpoch - 250000 vs - 7PWei 54.747 ms/op 49.836 ms/op 1.10
altair processEpoch - mainnet_e81889 530.61 ms/op 439.00 ms/op 1.21
mainnet_e81889 - altair beforeProcessEpoch 85.877 ms/op 75.323 ms/op 1.14
mainnet_e81889 - altair processJustificationAndFinalization 23.489 us/op 15.029 us/op 1.56
mainnet_e81889 - altair processInactivityUpdates 5.9980 ms/op 4.8498 ms/op 1.24
mainnet_e81889 - altair processRewardsAndPenalties 84.241 ms/op 48.796 ms/op 1.73
mainnet_e81889 - altair processRegistryUpdates 2.3710 us/op 2.7110 us/op 0.87
mainnet_e81889 - altair processSlashings 570.00 ns/op 682.00 ns/op 0.84
mainnet_e81889 - altair processEth1DataReset 516.00 ns/op 1.0250 us/op 0.50
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2699 ms/op 1.1546 ms/op 1.10
mainnet_e81889 - altair processSlashingsReset 5.1530 us/op 3.5790 us/op 1.44
mainnet_e81889 - altair processRandaoMixesReset 7.0710 us/op 6.1010 us/op 1.16
mainnet_e81889 - altair processHistoricalRootsUpdate 1.3880 us/op 1.1040 us/op 1.26
mainnet_e81889 - altair processParticipationFlagUpdates 2.2270 us/op 4.9320 us/op 0.45
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0200 us/op 1.3270 us/op 0.77
mainnet_e81889 - altair afterProcessEpoch 120.05 ms/op 84.617 ms/op 1.42
capella processEpoch - mainnet_e217614 2.0716 s/op 2.4381 s/op 0.85
mainnet_e217614 - capella beforeProcessEpoch 498.63 ms/op 625.85 ms/op 0.80
mainnet_e217614 - capella processJustificationAndFinalization 22.487 us/op 15.705 us/op 1.43
mainnet_e217614 - capella processInactivityUpdates 16.968 ms/op 23.045 ms/op 0.74
mainnet_e217614 - capella processRewardsAndPenalties 563.23 ms/op 482.34 ms/op 1.17
mainnet_e217614 - capella processRegistryUpdates 16.534 us/op 22.054 us/op 0.75
mainnet_e217614 - capella processSlashings 627.00 ns/op 763.00 ns/op 0.82
mainnet_e217614 - capella processEth1DataReset 667.00 ns/op 664.00 ns/op 1.00
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.1341 ms/op 3.5931 ms/op 1.15
mainnet_e217614 - capella processSlashingsReset 3.5730 us/op 4.2490 us/op 0.84
mainnet_e217614 - capella processRandaoMixesReset 7.0590 us/op 5.2400 us/op 1.35
mainnet_e217614 - capella processHistoricalRootsUpdate 794.00 ns/op 907.00 ns/op 0.88
mainnet_e217614 - capella processParticipationFlagUpdates 2.1430 us/op 2.1350 us/op 1.00
mainnet_e217614 - capella afterProcessEpoch 306.10 ms/op 222.78 ms/op 1.37
phase0 processEpoch - mainnet_e58758 515.59 ms/op 479.94 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 156.16 ms/op 148.18 ms/op 1.05
mainnet_e58758 - phase0 processJustificationAndFinalization 25.674 us/op 18.032 us/op 1.42
mainnet_e58758 - phase0 processRewardsAndPenalties 85.619 ms/op 66.842 ms/op 1.28
mainnet_e58758 - phase0 processRegistryUpdates 17.744 us/op 17.299 us/op 1.03
mainnet_e58758 - phase0 processSlashings 888.00 ns/op 1.4320 us/op 0.62
mainnet_e58758 - phase0 processEth1DataReset 684.00 ns/op 1.0200 us/op 0.67
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0529 ms/op 1.3589 ms/op 1.51
mainnet_e58758 - phase0 processSlashingsReset 3.9510 us/op 5.6730 us/op 0.70
mainnet_e58758 - phase0 processRandaoMixesReset 6.2380 us/op 6.6950 us/op 0.93
mainnet_e58758 - phase0 processHistoricalRootsUpdate 798.00 ns/op 1.0640 us/op 0.75
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.5970 us/op 5.8340 us/op 0.79
mainnet_e58758 - phase0 afterProcessEpoch 94.404 ms/op 72.772 ms/op 1.30
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.2790 ms/op 1.0090 ms/op 2.26
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6934 ms/op 1.1832 ms/op 2.28
altair processInactivityUpdates - 250000 normalcase 29.067 ms/op 25.163 ms/op 1.16
altair processInactivityUpdates - 250000 worstcase 30.163 ms/op 26.347 ms/op 1.14
phase0 processRegistryUpdates - 250000 normalcase 14.661 us/op 12.187 us/op 1.20
phase0 processRegistryUpdates - 250000 badcase_full_deposits 594.47 us/op 492.29 us/op 1.21
phase0 processRegistryUpdates - 250000 worstcase 0.5 128.37 ms/op 123.01 ms/op 1.04
altair processRewardsAndPenalties - 250000 normalcase 97.496 ms/op 56.354 ms/op 1.73
altair processRewardsAndPenalties - 250000 worstcase 86.018 ms/op 54.672 ms/op 1.57
phase0 getAttestationDeltas - 250000 normalcase 8.9643 ms/op 7.5195 ms/op 1.19
phase0 getAttestationDeltas - 250000 worstcase 9.0151 ms/op 10.225 ms/op 0.88
phase0 processSlashings - 250000 worstcase 131.09 us/op 99.230 us/op 1.32
altair processSyncCommitteeUpdates - 250000 158.46 ms/op 153.45 ms/op 1.03
BeaconState.hashTreeRoot - No change 363.00 ns/op 664.00 ns/op 0.55
BeaconState.hashTreeRoot - 1 full validator 175.89 us/op 133.47 us/op 1.32
BeaconState.hashTreeRoot - 32 full validator 1.7956 ms/op 1.7171 ms/op 1.05
BeaconState.hashTreeRoot - 512 full validator 18.824 ms/op 13.275 ms/op 1.42
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 158.24 us/op 123.88 us/op 1.28
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5928 ms/op 1.8277 ms/op 1.42
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 33.718 ms/op 36.089 ms/op 0.93
BeaconState.hashTreeRoot - 1 balances 145.41 us/op 142.29 us/op 1.02
BeaconState.hashTreeRoot - 32 balances 1.2980 ms/op 913.85 us/op 1.42
BeaconState.hashTreeRoot - 512 balances 12.781 ms/op 10.740 ms/op 1.19
BeaconState.hashTreeRoot - 250000 balances 235.37 ms/op 140.22 ms/op 1.68
aggregationBits - 2048 els - zipIndexesInBitList 26.528 us/op 21.865 us/op 1.21
byteArrayEquals 32 75.530 ns/op 66.257 ns/op 1.14
Buffer.compare 32 56.329 ns/op 37.899 ns/op 1.49
byteArrayEquals 1024 2.0572 us/op 1.8009 us/op 1.14
Buffer.compare 1024 70.450 ns/op 48.462 ns/op 1.45
byteArrayEquals 16384 32.741 us/op 29.888 us/op 1.10
Buffer.compare 16384 252.29 ns/op 205.07 ns/op 1.23
byteArrayEquals 123687377 246.15 ms/op 218.82 ms/op 1.12
Buffer.compare 123687377 6.1194 ms/op 4.9248 ms/op 1.24
byteArrayEquals 32 - diff last byte 72.163 ns/op 65.709 ns/op 1.10
Buffer.compare 32 - diff last byte 56.683 ns/op 40.188 ns/op 1.41
byteArrayEquals 1024 - diff last byte 2.0452 us/op 1.8206 us/op 1.12
Buffer.compare 1024 - diff last byte 71.824 ns/op 48.011 ns/op 1.50
byteArrayEquals 16384 - diff last byte 32.611 us/op 28.908 us/op 1.13
Buffer.compare 16384 - diff last byte 280.67 ns/op 209.25 ns/op 1.34
byteArrayEquals 123687377 - diff last byte 246.18 ms/op 216.41 ms/op 1.14
Buffer.compare 123687377 - diff last byte 6.2117 ms/op 5.8740 ms/op 1.06
byteArrayEquals 32 - random bytes 5.4240 ns/op 5.6560 ns/op 0.96
Buffer.compare 32 - random bytes 60.868 ns/op 41.146 ns/op 1.48
byteArrayEquals 1024 - random bytes 5.1750 ns/op 5.0040 ns/op 1.03
Buffer.compare 1024 - random bytes 61.162 ns/op 39.968 ns/op 1.53
byteArrayEquals 16384 - random bytes 5.1800 ns/op 4.7840 ns/op 1.08
Buffer.compare 16384 - random bytes 60.407 ns/op 40.443 ns/op 1.49
byteArrayEquals 123687377 - random bytes 8.3900 ns/op 8.8200 ns/op 0.95
Buffer.compare 123687377 - random bytes 63.600 ns/op 43.030 ns/op 1.48
regular array get 100000 times 43.993 us/op 43.808 us/op 1.00
wrappedArray get 100000 times 44.049 us/op 43.581 us/op 1.01
arrayWithProxy get 100000 times 14.412 ms/op 11.404 ms/op 1.26
ssz.Root.equals 53.867 ns/op 58.718 ns/op 0.92
byteArrayEquals 52.782 ns/op 60.298 ns/op 0.88
Buffer.compare 10.768 ns/op 11.585 ns/op 0.93
shuffle list - 16384 els 8.2362 ms/op 6.1922 ms/op 1.33
shuffle list - 250000 els 119.88 ms/op 90.116 ms/op 1.33
processSlot - 1 slots 18.799 us/op 21.114 us/op 0.89
processSlot - 32 slots 4.0815 ms/op 3.6472 ms/op 1.12
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 62.039 ms/op 51.320 ms/op 1.21
getCommitteeAssignments - req 1 vs - 250000 vc 2.6772 ms/op 2.3691 ms/op 1.13
getCommitteeAssignments - req 100 vs - 250000 vc 3.8604 ms/op 3.5901 ms/op 1.08
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2180 ms/op 3.8887 ms/op 1.08
findModifiedValidators - 10000 modified validators 531.36 ms/op 447.09 ms/op 1.19
findModifiedValidators - 1000 modified validators 427.38 ms/op 383.59 ms/op 1.11
findModifiedValidators - 100 modified validators 444.06 ms/op 354.75 ms/op 1.25
findModifiedValidators - 10 modified validators 411.22 ms/op 386.79 ms/op 1.06
findModifiedValidators - 1 modified validators 412.04 ms/op 367.51 ms/op 1.12
findModifiedValidators - no difference 419.59 ms/op 374.44 ms/op 1.12
compare ViewDUs 4.9206 s/op 4.0641 s/op 1.21
compare each validator Uint8Array 2.0606 s/op 1.6915 s/op 1.22
compare ViewDU to Uint8Array 1.1204 s/op 856.75 ms/op 1.31
migrate state 1000000 validators, 24 modified, 0 new 917.44 ms/op 735.61 ms/op 1.25
migrate state 1000000 validators, 1700 modified, 1000 new 1.2116 s/op 1.0152 s/op 1.19
migrate state 1000000 validators, 3400 modified, 2000 new 1.4478 s/op 1.1358 s/op 1.27
migrate state 1500000 validators, 24 modified, 0 new 884.65 ms/op 839.69 ms/op 1.05
migrate state 1500000 validators, 1700 modified, 1000 new 1.2167 s/op 1.0012 s/op 1.22
migrate state 1500000 validators, 3400 modified, 2000 new 1.4034 s/op 1.2197 s/op 1.15
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1900 ns/op 4.7800 ns/op 0.88
state getBlockRootAtSlot - 250000 vs - 7PWei 930.37 ns/op 726.57 ns/op 1.28
computeProposers - vc 250000 9.5846 ms/op 6.6540 ms/op 1.44
computeEpochShuffling - vc 250000 119.79 ms/op 90.390 ms/op 1.33
getNextSyncCommittee - vc 250000 159.83 ms/op 112.67 ms/op 1.42
computeSigningRoot for AttestationData 33.429 us/op 25.397 us/op 1.32
hash AttestationData serialized data then Buffer.toString(base64) 2.2051 us/op 1.2606 us/op 1.75
toHexString serialized data 1.0347 us/op 789.15 ns/op 1.31
Buffer.toString(base64) 223.20 ns/op 147.13 ns/op 1.52

by benchmarkbot/action

@twoeths twoeths merged commit c0addb7 into unstable Apr 2, 2024
17 of 20 checks passed
@twoeths twoeths deleted the tuyen/batch_publish branch April 2, 2024 14:25
@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.

3 participants