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: use napi-rs blst bindings #6894

Merged
merged 20 commits into from
Jul 25, 2024
Merged

feat: use napi-rs blst bindings #6894

merged 20 commits into from
Jul 25, 2024

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Jun 17, 2024

Motivation

Description

Closes #6462

@wemeetagain wemeetagain requested a review from a team as a code owner June 17, 2024 23:07
@wemeetagain wemeetagain marked this pull request as draft June 17, 2024 23:08
@wemeetagain wemeetagain changed the title blst napi rs feat: use napi-rs blst bindings Jun 17, 2024
@wemeetagain wemeetagain marked this pull request as ready for review July 22, 2024 15:54
@wemeetagain
Copy link
Member Author

ready for re-review, rebased off unstable and deployed to feat2

@philknows philknows added this to the v1.21.0 milestone Jul 22, 2024
@twoeths
Copy link
Contributor

twoeths commented Jul 23, 2024

metrics look comparable to stable mainnet node in terms of:

  • gossipsub: mesh peers, gossip traffic, forward peers
  • attestation job time + job wait time

and that's with randomness added so it's an awesome result. Some other metrics I found it different to stable:

  • signature set verification time / set is 1.5x faster
  • from worker latency is 1.5x slower

CPU pause time rate is awesome (scavenge is ~2.3 % compared to 2.7% on stable and unstable)

Screenshot 2024-07-23 at 10 11 40

same to lg1k, it's ~0.75% vs ~0.89% which lead to greater epoch transition time (~2.6s on stable 1k and ~2 to ~2.3s on unstable 1k)

Screenshot 2024-07-23 at 10 15 17

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 62.16216% with 14 lines in your changes missing coverage. Please review.

Project coverage is 62.49%. Comparing base (acbedaf) to head (3754e58).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6894      +/-   ##
============================================
- Coverage     62.49%   62.49%   -0.01%     
============================================
  Files           576      576              
  Lines         61179    61170       -9     
  Branches       2131     2141      +10     
============================================
- Hits          38235    38228       -7     
+ Misses        22905    22903       -2     
  Partials         39       39              

Copy link
Contributor

github-actions bot commented Jul 23, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 223ed75 Previous: acbedaf Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8708 ms/op 705.92 us/op 2.65
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.305 us/op 93.777 us/op 0.48
BLS verify - blst 795.91 us/op
BLS verifyMultipleSignatures 3 - blst 1.1996 ms/op
BLS verifyMultipleSignatures 8 - blst 1.6532 ms/op
BLS verifyMultipleSignatures 32 - blst 4.8201 ms/op
BLS verifyMultipleSignatures 64 - blst 8.9616 ms/op
BLS verifyMultipleSignatures 128 - blst 17.052 ms/op
BLS deserializing 10000 signatures 684.65 ms/op 974.23 ms/op 0.70
BLS deserializing 100000 signatures 6.8106 s/op 9.5185 s/op 0.72
BLS verifyMultipleSignatures - same message - 3 - blst 921.09 us/op
BLS verifyMultipleSignatures - same message - 8 - blst 1.0072 ms/op
BLS verifyMultipleSignatures - same message - 32 - blst 1.6941 ms/op
BLS verifyMultipleSignatures - same message - 64 - blst 2.5441 ms/op
BLS verifyMultipleSignatures - same message - 128 - blst 4.2930 ms/op
BLS aggregatePubkeys 32 - blst 20.100 us/op
BLS aggregatePubkeys 128 - blst 69.953 us/op
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 51.449 ms/op 57.904 ms/op 0.89
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 59.092 ms/op 56.823 ms/op 1.04
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.798 ms/op 34.943 ms/op 0.91
getSlashingsAndExits - default max 83.923 us/op 102.13 us/op 0.82
getSlashingsAndExits - 2k 244.09 us/op 303.77 us/op 0.80
proposeBlockBody type=full, size=empty 5.7917 ms/op 6.0272 ms/op 0.96
isKnown best case - 1 super set check 283.00 ns/op 306.00 ns/op 0.92
isKnown normal case - 2 super set checks 275.00 ns/op 347.00 ns/op 0.79
isKnown worse case - 16 super set checks 278.00 ns/op 325.00 ns/op 0.86
InMemoryCheckpointStateCache - add get delete 6.1290 us/op 5.8100 us/op 1.05
validate api signedAggregateAndProof - struct 1.3671 ms/op 2.7625 ms/op 0.49
validate gossip signedAggregateAndProof - struct 1.3655 ms/op 2.7755 ms/op 0.49
validate gossip attestation - vc 640000 829.88 us/op 1.3228 ms/op 0.63
batch validate gossip attestation - vc 640000 - chunk 32 120.87 us/op 164.61 us/op 0.73
batch validate gossip attestation - vc 640000 - chunk 64 107.64 us/op 142.67 us/op 0.75
batch validate gossip attestation - vc 640000 - chunk 128 108.28 us/op 136.13 us/op 0.80
batch validate gossip attestation - vc 640000 - chunk 256 99.344 us/op 133.97 us/op 0.74
pickEth1Vote - no votes 1.0420 ms/op 1.2007 ms/op 0.87
pickEth1Vote - max votes 10.153 ms/op 8.6694 ms/op 1.17
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.988 ms/op 13.325 ms/op 1.20
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.676 ms/op 19.184 ms/op 1.23
pickEth1Vote - Eth1Data fastSerialize value x2048 497.65 us/op 594.84 us/op 0.84
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.5102 ms/op 5.8418 ms/op 0.77
bytes32 toHexString 418.00 ns/op 470.00 ns/op 0.89
bytes32 Buffer.toString(hex) 247.00 ns/op 269.00 ns/op 0.92
bytes32 Buffer.toString(hex) from Uint8Array 359.00 ns/op 405.00 ns/op 0.89
bytes32 Buffer.toString(hex) + 0x 247.00 ns/op 271.00 ns/op 0.91
Object access 1 prop 0.13600 ns/op 0.15400 ns/op 0.88
Map access 1 prop 0.13700 ns/op 0.14100 ns/op 0.97
Object get x1000 5.9060 ns/op 6.4040 ns/op 0.92
Map get x1000 6.4710 ns/op 7.0420 ns/op 0.92
Object set x1000 31.445 ns/op 39.399 ns/op 0.80
Map set x1000 21.629 ns/op 31.175 ns/op 0.69
Return object 10000 times 0.29130 ns/op 0.30990 ns/op 0.94
Throw Error 10000 times 3.3121 us/op 3.5987 us/op 0.92
fastMsgIdFn sha256 / 200 bytes 2.1530 us/op 2.3770 us/op 0.91
fastMsgIdFn h32 xxhash / 200 bytes 230.00 ns/op 295.00 ns/op 0.78
fastMsgIdFn h64 xxhash / 200 bytes 269.00 ns/op 305.00 ns/op 0.88
fastMsgIdFn sha256 / 1000 bytes 7.1410 us/op 7.7940 us/op 0.92
fastMsgIdFn h32 xxhash / 1000 bytes 364.00 ns/op 430.00 ns/op 0.85
fastMsgIdFn h64 xxhash / 1000 bytes 338.00 ns/op 362.00 ns/op 0.93
fastMsgIdFn sha256 / 10000 bytes 63.349 us/op 66.224 us/op 0.96
fastMsgIdFn h32 xxhash / 10000 bytes 1.8320 us/op 2.0250 us/op 0.90
fastMsgIdFn h64 xxhash / 10000 bytes 1.2130 us/op 1.3030 us/op 0.93
send data - 1000 256B messages 11.091 ms/op 13.956 ms/op 0.79
send data - 1000 512B messages 15.581 ms/op 18.760 ms/op 0.83
send data - 1000 1024B messages 24.658 ms/op 30.142 ms/op 0.82
send data - 1000 1200B messages 17.488 ms/op 27.161 ms/op 0.64
send data - 1000 2048B messages 31.380 ms/op 34.040 ms/op 0.92
send data - 1000 4096B messages 30.199 ms/op 31.040 ms/op 0.97
send data - 1000 16384B messages 70.867 ms/op 70.371 ms/op 1.01
send data - 1000 65536B messages 213.20 ms/op 240.01 ms/op 0.89
enrSubnets - fastDeserialize 64 bits 1.0320 us/op 1.1750 us/op 0.88
enrSubnets - ssz BitVector 64 bits 343.00 ns/op 412.00 ns/op 0.83
enrSubnets - fastDeserialize 4 bits 145.00 ns/op 172.00 ns/op 0.84
enrSubnets - ssz BitVector 4 bits 342.00 ns/op 377.00 ns/op 0.91
prioritizePeers score -10:0 att 32-0.1 sync 2-0 146.76 us/op 170.21 us/op 0.86
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 167.66 us/op 166.83 us/op 1.00
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 247.47 us/op 267.86 us/op 0.92
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 394.76 us/op 404.48 us/op 0.98
prioritizePeers score 0:0 att 64-1 sync 4-1 566.39 us/op 699.31 us/op 0.81
array of 16000 items push then shift 1.5991 us/op 1.7061 us/op 0.94
LinkedList of 16000 items push then shift 7.2310 ns/op 7.6150 ns/op 0.95
array of 16000 items push then pop 75.902 ns/op 129.40 ns/op 0.59
LinkedList of 16000 items push then pop 7.0660 ns/op 7.5060 ns/op 0.94
array of 24000 items push then shift 2.4432 us/op 2.4504 us/op 1.00
LinkedList of 24000 items push then shift 6.9000 ns/op 7.6480 ns/op 0.90
array of 24000 items push then pop 152.69 ns/op 140.19 ns/op 1.09
LinkedList of 24000 items push then pop 6.7650 ns/op 7.4730 ns/op 0.91
intersect bitArray bitLen 8 6.2200 ns/op 6.5310 ns/op 0.95
intersect array and set length 8 44.857 ns/op 50.766 ns/op 0.88
intersect bitArray bitLen 128 29.504 ns/op 30.488 ns/op 0.97
intersect array and set length 128 661.75 ns/op 867.92 ns/op 0.76
bitArray.getTrueBitIndexes() bitLen 128 1.8570 us/op 2.4850 us/op 0.75
bitArray.getTrueBitIndexes() bitLen 248 2.7890 us/op 3.4340 us/op 0.81
bitArray.getTrueBitIndexes() bitLen 512 5.8710 us/op 7.5180 us/op 0.78
Buffer.concat 32 items 905.00 ns/op 1.0180 us/op 0.89
Uint8Array.set 32 items 1.5810 us/op 1.7150 us/op 0.92
Buffer.copy 1.8170 us/op 2.0160 us/op 0.90
Uint8Array.set - with subarray 2.6740 us/op 2.5390 us/op 1.05
Uint8Array.set - without subarray 1.5820 us/op 1.3910 us/op 1.14
getUint32 - dataview 231.00 ns/op 239.00 ns/op 0.97
getUint32 - manual 155.00 ns/op 145.00 ns/op 1.07
Set add up to 64 items then delete first 2.1946 us/op 2.4022 us/op 0.91
OrderedSet add up to 64 items then delete first 3.3503 us/op 3.5662 us/op 0.94
Set add up to 64 items then delete last 2.5005 us/op 2.5252 us/op 0.99
OrderedSet add up to 64 items then delete last 3.9089 us/op 3.7025 us/op 1.06
Set add up to 64 items then delete middle 2.5171 us/op 2.5864 us/op 0.97
OrderedSet add up to 64 items then delete middle 5.0686 us/op 5.2985 us/op 0.96
Set add up to 128 items then delete first 4.8590 us/op 5.2252 us/op 0.93
OrderedSet add up to 128 items then delete first 7.2807 us/op 8.0660 us/op 0.90
Set add up to 128 items then delete last 5.0719 us/op 4.9852 us/op 1.02
OrderedSet add up to 128 items then delete last 7.5594 us/op 7.3892 us/op 1.02
Set add up to 128 items then delete middle 4.8248 us/op 5.0900 us/op 0.95
OrderedSet add up to 128 items then delete middle 13.418 us/op 13.821 us/op 0.97
Set add up to 256 items then delete first 9.6090 us/op 10.661 us/op 0.90
OrderedSet add up to 256 items then delete first 14.734 us/op 16.379 us/op 0.90
Set add up to 256 items then delete last 9.5779 us/op 9.7056 us/op 0.99
OrderedSet add up to 256 items then delete last 15.008 us/op 14.435 us/op 1.04
Set add up to 256 items then delete middle 9.7001 us/op 10.030 us/op 0.97
OrderedSet add up to 256 items then delete middle 38.792 us/op 41.572 us/op 0.93
transfer serialized Status (84 B) 1.4670 us/op 1.3690 us/op 1.07
copy serialized Status (84 B) 1.1950 us/op 1.1120 us/op 1.07
transfer serialized SignedVoluntaryExit (112 B) 1.6230 us/op 1.4170 us/op 1.15
copy serialized SignedVoluntaryExit (112 B) 1.2680 us/op 1.1570 us/op 1.10
transfer serialized ProposerSlashing (416 B) 2.4860 us/op 2.0060 us/op 1.24
copy serialized ProposerSlashing (416 B) 2.5550 us/op 1.6530 us/op 1.55
transfer serialized Attestation (485 B) 2.5500 us/op 1.9800 us/op 1.29
copy serialized Attestation (485 B) 2.5290 us/op 1.6550 us/op 1.53
transfer serialized AttesterSlashing (33232 B) 2.8310 us/op 2.3120 us/op 1.22
copy serialized AttesterSlashing (33232 B) 5.9000 us/op 5.1570 us/op 1.14
transfer serialized Small SignedBeaconBlock (128000 B) 3.0190 us/op 2.9190 us/op 1.03
copy serialized Small SignedBeaconBlock (128000 B) 15.015 us/op 14.274 us/op 1.05
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2320 us/op 3.1520 us/op 1.03
copy serialized Avg SignedBeaconBlock (200000 B) 19.739 us/op 21.957 us/op 0.90
transfer serialized BlobsSidecar (524380 B) 2.6210 us/op 2.9270 us/op 0.90
copy serialized BlobsSidecar (524380 B) 90.783 us/op 84.057 us/op 1.08
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9860 us/op 3.1300 us/op 0.95
copy serialized Big SignedBeaconBlock (1000000 B) 363.84 us/op 245.04 us/op 1.48
pass gossip attestations to forkchoice per slot 3.3233 ms/op 3.3176 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 504.58 us/op 500.66 us/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 3.1122 ms/op 3.0763 ms/op 1.01
forkChoice updateHead vc 1000000 bc 64 eq 0 5.3488 ms/op 5.3751 ms/op 1.00
forkChoice updateHead vc 600000 bc 320 eq 0 3.1306 ms/op 3.1066 ms/op 1.01
forkChoice updateHead vc 600000 bc 1200 eq 0 3.1834 ms/op 3.1295 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6998 ms/op 3.6705 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 1000 10.889 ms/op 10.889 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 10000 10.566 ms/op 10.763 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 300000 14.680 ms/op 14.730 ms/op 1.00
computeDeltas 500000 validators 300 proto nodes 3.5499 ms/op 3.6971 ms/op 0.96
computeDeltas 500000 validators 1200 proto nodes 3.5772 ms/op 3.6437 ms/op 0.98
computeDeltas 500000 validators 7200 proto nodes 3.5226 ms/op 3.6294 ms/op 0.97
computeDeltas 750000 validators 300 proto nodes 5.2428 ms/op 5.3501 ms/op 0.98
computeDeltas 750000 validators 1200 proto nodes 5.2136 ms/op 5.4066 ms/op 0.96
computeDeltas 750000 validators 7200 proto nodes 5.2049 ms/op 5.5998 ms/op 0.93
computeDeltas 1400000 validators 300 proto nodes 9.7054 ms/op 10.690 ms/op 0.91
computeDeltas 1400000 validators 1200 proto nodes 9.8098 ms/op 10.659 ms/op 0.92
computeDeltas 1400000 validators 7200 proto nodes 9.7750 ms/op 10.685 ms/op 0.91
computeDeltas 2100000 validators 300 proto nodes 14.557 ms/op 16.934 ms/op 0.86
computeDeltas 2100000 validators 1200 proto nodes 14.468 ms/op 18.804 ms/op 0.77
computeDeltas 2100000 validators 7200 proto nodes 14.303 ms/op 20.717 ms/op 0.69
altair processAttestation - 250000 vs - 7PWei normalcase 2.5375 ms/op 3.0288 ms/op 0.84
altair processAttestation - 250000 vs - 7PWei worstcase 3.5396 ms/op 4.2361 ms/op 0.84
altair processAttestation - setStatus - 1/6 committees join 86.766 us/op 139.95 us/op 0.62
altair processAttestation - setStatus - 1/3 committees join 376.27 us/op 262.72 us/op 1.43
altair processAttestation - setStatus - 1/2 committees join 251.74 us/op 289.56 us/op 0.87
altair processAttestation - setStatus - 2/3 committees join 542.90 us/op 388.11 us/op 1.40
altair processAttestation - setStatus - 4/5 committees join 490.77 us/op 587.49 us/op 0.84
altair processAttestation - setStatus - 100% committees join 585.57 us/op 659.68 us/op 0.89
altair processBlock - 250000 vs - 7PWei normalcase 5.6444 ms/op 6.9179 ms/op 0.82
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.268 ms/op 28.568 ms/op 0.88
altair processBlock - 250000 vs - 7PWei worstcase 34.940 ms/op 51.285 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.350 ms/op 93.634 ms/op 0.80
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7976 ms/op 3.3632 ms/op 0.53
phase0 processBlock - 250000 vs - 7PWei worstcase 19.885 ms/op 32.684 ms/op 0.61
altair processEth1Data - 250000 vs - 7PWei normalcase 281.46 us/op 470.69 us/op 0.60
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.9710 us/op 9.9280 us/op 0.50
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 18.196 us/op 38.799 us/op 0.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.4870 us/op 13.465 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.3980 us/op 9.0430 us/op 0.60
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 77.162 us/op 171.99 us/op 0.45
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 651.27 us/op 933.92 us/op 0.70
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 895.63 us/op 1.1502 ms/op 0.78
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 908.60 us/op 1.0389 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4673 ms/op 3.4261 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6404 ms/op 1.8550 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7717 ms/op 4.8588 ms/op 0.78
Tree 40 250000 create 206.76 ms/op 329.73 ms/op 0.63
Tree 40 250000 get(125000) 147.66 ns/op 165.09 ns/op 0.89
Tree 40 250000 set(125000) 646.86 ns/op 780.63 ns/op 0.83
Tree 40 250000 toArray() 16.639 ms/op 23.166 ms/op 0.72
Tree 40 250000 iterate all - toArray() + loop 15.697 ms/op 23.077 ms/op 0.68
Tree 40 250000 iterate all - get(i) 50.584 ms/op 61.124 ms/op 0.83
MutableVector 250000 create 7.7863 ms/op 13.385 ms/op 0.58
MutableVector 250000 get(125000) 6.5830 ns/op 6.5850 ns/op 1.00
MutableVector 250000 set(125000) 189.80 ns/op 256.71 ns/op 0.74
MutableVector 250000 toArray() 3.4551 ms/op 4.3222 ms/op 0.80
MutableVector 250000 iterate all - toArray() + loop 3.5871 ms/op 4.6936 ms/op 0.76
MutableVector 250000 iterate all - get(i) 1.5313 ms/op 1.6093 ms/op 0.95
Array 250000 create 2.9750 ms/op 3.9232 ms/op 0.76
Array 250000 clone - spread 1.2954 ms/op 1.7557 ms/op 0.74
Array 250000 get(125000) 0.41300 ns/op 0.46500 ns/op 0.89
Array 250000 set(125000) 0.42900 ns/op 0.49600 ns/op 0.86
Array 250000 iterate all - loop 104.31 us/op 115.08 us/op 0.91
effectiveBalanceIncrements clone Uint8Array 300000 24.200 us/op 54.436 us/op 0.44
effectiveBalanceIncrements clone MutableVector 300000 127.00 ns/op 136.00 ns/op 0.93
effectiveBalanceIncrements rw all Uint8Array 300000 198.35 us/op 209.02 us/op 0.95
effectiveBalanceIncrements rw all MutableVector 300000 60.555 ms/op 78.575 ms/op 0.77
phase0 afterProcessEpoch - 250000 vs - 7PWei 87.757 ms/op 92.901 ms/op 0.94
Array.fill - length 1000000 3.4152 ms/op 3.7726 ms/op 0.91
Array push - length 1000000 18.383 ms/op 18.810 ms/op 0.98
Array.get 0.28068 ns/op 0.29909 ns/op 0.94
Uint8Array.get 0.43579 ns/op 0.46041 ns/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 22.218 ms/op 24.173 ms/op 0.92
altair processEpoch - mainnet_e81889 350.21 ms/op 329.76 ms/op 1.06
mainnet_e81889 - altair beforeProcessEpoch 28.589 ms/op 30.416 ms/op 0.94
mainnet_e81889 - altair processJustificationAndFinalization 11.630 us/op 16.130 us/op 0.72
mainnet_e81889 - altair processInactivityUpdates 5.1654 ms/op 5.6465 ms/op 0.91
mainnet_e81889 - altair processRewardsAndPenalties 38.866 ms/op 43.269 ms/op 0.90
mainnet_e81889 - altair processRegistryUpdates 1.7090 us/op 1.6930 us/op 1.01
mainnet_e81889 - altair processSlashings 371.00 ns/op 404.00 ns/op 0.92
mainnet_e81889 - altair processEth1DataReset 265.00 ns/op 324.00 ns/op 0.82
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1532 ms/op 1.9350 ms/op 0.60
mainnet_e81889 - altair processSlashingsReset 3.4880 us/op 2.7710 us/op 1.26
mainnet_e81889 - altair processRandaoMixesReset 3.4760 us/op 4.9030 us/op 0.71
mainnet_e81889 - altair processHistoricalRootsUpdate 571.00 ns/op 608.00 ns/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 1.8460 us/op 2.4810 us/op 0.74
mainnet_e81889 - altair processSyncCommitteeUpdates 445.00 ns/op 662.00 ns/op 0.67
mainnet_e81889 - altair afterProcessEpoch 92.462 ms/op 99.445 ms/op 0.93
capella processEpoch - mainnet_e217614 1.2426 s/op 1.1960 s/op 1.04
mainnet_e217614 - capella beforeProcessEpoch 113.79 ms/op 157.00 ms/op 0.72
mainnet_e217614 - capella processJustificationAndFinalization 13.831 us/op 19.755 us/op 0.70
mainnet_e217614 - capella processInactivityUpdates 17.946 ms/op 20.710 ms/op 0.87
mainnet_e217614 - capella processRewardsAndPenalties 234.90 ms/op 249.66 ms/op 0.94
mainnet_e217614 - capella processRegistryUpdates 12.537 us/op 17.163 us/op 0.73
mainnet_e217614 - capella processSlashings 435.00 ns/op 590.00 ns/op 0.74
mainnet_e217614 - capella processEth1DataReset 288.00 ns/op 1.6710 us/op 0.17
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.992 ms/op 6.6440 ms/op 1.80
mainnet_e217614 - capella processSlashingsReset 3.6160 us/op 6.9830 us/op 0.52
mainnet_e217614 - capella processRandaoMixesReset 5.6640 us/op 6.9670 us/op 0.81
mainnet_e217614 - capella processHistoricalRootsUpdate 331.00 ns/op 845.00 ns/op 0.39
mainnet_e217614 - capella processParticipationFlagUpdates 1.7420 us/op 3.1220 us/op 0.56
mainnet_e217614 - capella afterProcessEpoch 254.27 ms/op 318.84 ms/op 0.80
phase0 processEpoch - mainnet_e58758 380.43 ms/op 378.43 ms/op 1.01
mainnet_e58758 - phase0 beforeProcessEpoch 87.088 ms/op 84.563 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 14.977 us/op 15.865 us/op 0.94
mainnet_e58758 - phase0 processRewardsAndPenalties 32.231 ms/op 28.694 ms/op 1.12
mainnet_e58758 - phase0 processRegistryUpdates 8.3300 us/op 8.7790 us/op 0.95
mainnet_e58758 - phase0 processSlashings 411.00 ns/op 328.00 ns/op 1.25
mainnet_e58758 - phase0 processEth1DataReset 502.00 ns/op 405.00 ns/op 1.24
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 970.64 us/op 1.0546 ms/op 0.92
mainnet_e58758 - phase0 processSlashingsReset 2.6730 us/op 3.6480 us/op 0.73
mainnet_e58758 - phase0 processRandaoMixesReset 4.3770 us/op 5.6670 us/op 0.77
mainnet_e58758 - phase0 processHistoricalRootsUpdate 484.00 ns/op 411.00 ns/op 1.18
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.5290 us/op 3.6310 us/op 0.70
mainnet_e58758 - phase0 afterProcessEpoch 77.210 ms/op 83.764 ms/op 0.92
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1239 ms/op 1.4010 ms/op 0.80
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1039 ms/op 2.1482 ms/op 0.98
altair processInactivityUpdates - 250000 normalcase 15.454 ms/op 15.620 ms/op 0.99
altair processInactivityUpdates - 250000 worstcase 14.581 ms/op 15.787 ms/op 0.92
phase0 processRegistryUpdates - 250000 normalcase 6.5140 us/op 6.6130 us/op 0.99
phase0 processRegistryUpdates - 250000 badcase_full_deposits 270.79 us/op 336.09 us/op 0.81
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.87 ms/op 126.38 ms/op 0.89
altair processRewardsAndPenalties - 250000 normalcase 41.263 ms/op 39.023 ms/op 1.06
altair processRewardsAndPenalties - 250000 worstcase 34.267 ms/op 43.415 ms/op 0.79
phase0 getAttestationDeltas - 250000 normalcase 7.3706 ms/op 10.465 ms/op 0.70
phase0 getAttestationDeltas - 250000 worstcase 7.4887 ms/op 9.8331 ms/op 0.76
phase0 processSlashings - 250000 worstcase 73.689 us/op 131.67 us/op 0.56
altair processSyncCommitteeUpdates - 250000 118.75 ms/op 139.07 ms/op 0.85
BeaconState.hashTreeRoot - No change 257.00 ns/op 330.00 ns/op 0.78
BeaconState.hashTreeRoot - 1 full validator 97.668 us/op 94.970 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 859.52 us/op 1.0986 ms/op 0.78
BeaconState.hashTreeRoot - 512 full validator 13.329 ms/op 13.627 ms/op 0.98
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 134.49 us/op 133.37 us/op 1.01
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6286 ms/op 1.9309 ms/op 0.84
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.805 ms/op 26.295 ms/op 0.75
BeaconState.hashTreeRoot - 1 balances 88.979 us/op 111.19 us/op 0.80
BeaconState.hashTreeRoot - 32 balances 873.26 us/op 950.69 us/op 0.92
BeaconState.hashTreeRoot - 512 balances 9.1901 ms/op 10.051 ms/op 0.91
BeaconState.hashTreeRoot - 250000 balances 183.27 ms/op 199.46 ms/op 0.92
aggregationBits - 2048 els - zipIndexesInBitList 47.577 us/op 39.800 us/op 1.20
byteArrayEquals 32 54.848 ns/op 56.435 ns/op 0.97
Buffer.compare 32 16.797 ns/op 18.388 ns/op 0.91
byteArrayEquals 1024 1.5658 us/op 1.6900 us/op 0.93
Buffer.compare 1024 25.005 ns/op 27.411 ns/op 0.91
byteArrayEquals 16384 24.891 us/op 26.783 us/op 0.93
Buffer.compare 16384 196.98 ns/op 214.57 ns/op 0.92
byteArrayEquals 123687377 193.28 ms/op 209.84 ms/op 0.92
Buffer.compare 123687377 6.0996 ms/op 12.310 ms/op 0.50
byteArrayEquals 32 - diff last byte 53.354 ns/op 55.830 ns/op 0.96
Buffer.compare 32 - diff last byte 17.348 ns/op 18.660 ns/op 0.93
byteArrayEquals 1024 - diff last byte 1.6073 us/op 1.7741 us/op 0.91
Buffer.compare 1024 - diff last byte 25.500 ns/op 28.297 ns/op 0.90
byteArrayEquals 16384 - diff last byte 25.558 us/op 27.190 us/op 0.94
Buffer.compare 16384 - diff last byte 179.43 ns/op 202.69 ns/op 0.89
byteArrayEquals 123687377 - diff last byte 189.05 ms/op 215.71 ms/op 0.88
Buffer.compare 123687377 - diff last byte 6.1937 ms/op 13.068 ms/op 0.47
byteArrayEquals 32 - random bytes 5.1570 ns/op 6.2890 ns/op 0.82
Buffer.compare 32 - random bytes 17.236 ns/op 22.963 ns/op 0.75
byteArrayEquals 1024 - random bytes 5.1370 ns/op 5.9140 ns/op 0.87
Buffer.compare 1024 - random bytes 17.180 ns/op 21.376 ns/op 0.80
byteArrayEquals 16384 - random bytes 5.1440 ns/op 5.8820 ns/op 0.87
Buffer.compare 16384 - random bytes 17.165 ns/op 19.714 ns/op 0.87
byteArrayEquals 123687377 - random bytes 7.8400 ns/op 7.6300 ns/op 1.03
Buffer.compare 123687377 - random bytes 18.450 ns/op 22.910 ns/op 0.81
regular array get 100000 times 32.992 us/op 38.770 us/op 0.85
wrappedArray get 100000 times 33.079 us/op 38.866 us/op 0.85
arrayWithProxy get 100000 times 13.303 ms/op 14.325 ms/op 0.93
ssz.Root.equals 46.041 ns/op 78.742 ns/op 0.58
byteArrayEquals 45.662 ns/op 54.778 ns/op 0.83
Buffer.compare 10.407 ns/op 12.662 ns/op 0.82
shuffle list - 16384 els 6.2142 ms/op 7.5179 ms/op 0.83
shuffle list - 250000 els 90.577 ms/op 109.13 ms/op 0.83
processSlot - 1 slots 12.219 us/op 20.309 us/op 0.60
processSlot - 32 slots 2.0958 ms/op 4.4798 ms/op 0.47
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.995 ms/op 56.616 ms/op 0.67
getCommitteeAssignments - req 1 vs - 250000 vc 2.1482 ms/op 2.7230 ms/op 0.79
getCommitteeAssignments - req 100 vs - 250000 vc 4.1343 ms/op 4.6810 ms/op 0.88
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4798 ms/op 5.4693 ms/op 0.82
findModifiedValidators - 10000 modified validators 253.31 ms/op 639.99 ms/op 0.40
findModifiedValidators - 1000 modified validators 188.63 ms/op 521.32 ms/op 0.36
findModifiedValidators - 100 modified validators 141.52 ms/op 269.72 ms/op 0.52
findModifiedValidators - 10 modified validators 142.51 ms/op 221.68 ms/op 0.64
findModifiedValidators - 1 modified validators 137.02 ms/op 238.97 ms/op 0.57
findModifiedValidators - no difference 149.61 ms/op 239.54 ms/op 0.62
compare ViewDUs 3.0735 s/op 4.0283 s/op 0.76
compare each validator Uint8Array 1.4356 s/op 1.9621 s/op 0.73
compare ViewDU to Uint8Array 971.41 ms/op 1.6151 s/op 0.60
migrate state 1000000 validators, 24 modified, 0 new 496.27 ms/op 1.0114 s/op 0.49
migrate state 1000000 validators, 1700 modified, 1000 new 755.77 ms/op 1.4437 s/op 0.52
migrate state 1000000 validators, 3400 modified, 2000 new 1.0054 s/op 1.4091 s/op 0.71
migrate state 1500000 validators, 24 modified, 0 new 577.95 ms/op 749.13 ms/op 0.77
migrate state 1500000 validators, 1700 modified, 1000 new 806.45 ms/op 1.0148 s/op 0.79
migrate state 1500000 validators, 3400 modified, 2000 new 957.40 ms/op 1.3640 s/op 0.70
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2800 ns/op 5.7900 ns/op 0.74
state getBlockRootAtSlot - 250000 vs - 7PWei 748.36 ns/op 844.20 ns/op 0.89
computeProposers - vc 250000 7.8144 ms/op 9.5885 ms/op 0.81
computeEpochShuffling - vc 250000 91.249 ms/op 102.42 ms/op 0.89
getNextSyncCommittee - vc 250000 123.39 ms/op 142.41 ms/op 0.87
computeSigningRoot for AttestationData 22.516 us/op 25.768 us/op 0.87
hash AttestationData serialized data then Buffer.toString(base64) 1.5116 us/op 1.7402 us/op 0.87
toHexString serialized data 857.59 ns/op 1.4137 us/op 0.61
Buffer.toString(base64) 174.04 ns/op 258.04 ns/op 0.67

by benchmarkbot/action

Copy link
Contributor

@twoeths twoeths left a comment

Choose a reason for hiding this comment

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

persist "Attnet count with > 0 mesh peers" from the mainnet node deploying this branch

Screenshot 2024-07-25 at 14 12 52

vs unstable/stable mainnet node
Screenshot 2024-07-25 at 14 13 09

@twoeths twoeths merged commit 2b62754 into unstable Jul 25, 2024
20 checks passed
@twoeths twoeths deleted the cayman/blst-napi-rs branch July 25, 2024 07:14
twoeths added a commit that referenced this pull request Jul 31, 2024
@wemeetagain
Copy link
Member Author

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

Add randomizing factors to bls same message verification
3 participants