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: allow to configure api client when initializing light client #7121

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 2, 2024

Motivation

Since #6749 it is possible to configure the wire format. The light client uses SSZ by default, but for debugging purposes or just user preference we should allow to configure the LC to use JSON instead. Being able to control other api client options like timeout might be useful as well.

Description

  • allow to configure api client when initializing light client
  • fix README examples

@nflaig nflaig requested a review from a team as a code owner October 2, 2024 09:44
Copy link

codecov bot commented Oct 2, 2024

Codecov Report

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

Project coverage is 48.95%. Comparing base (c4952ee) to head (bd7bd13).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7121      +/-   ##
============================================
- Coverage     48.95%   48.95%   -0.01%     
============================================
  Files           597      597              
  Lines         39833    39833              
  Branches       2058     2067       +9     
============================================
- Hits          19500    19499       -1     
  Misses        20292    20292              
- Partials         41       42       +1     

Copy link
Contributor

github-actions bot commented Oct 2, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: b79a399 Previous: c4952ee Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 12.397 ms/op 39.401 ms/op 0.31
Full benchmark results
Benchmark suite Current: b79a399 Previous: c4952ee Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7833 ms/op 1.6946 ms/op 1.05
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 44.425 us/op 44.915 us/op 0.99
BLS verify - blst 881.46 us/op 937.17 us/op 0.94
BLS verifyMultipleSignatures 3 - blst 1.3904 ms/op 1.3394 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst 1.6317 ms/op 2.0250 ms/op 0.81
BLS verifyMultipleSignatures 32 - blst 4.7318 ms/op 5.7689 ms/op 0.82
BLS verifyMultipleSignatures 64 - blst 8.7590 ms/op 10.174 ms/op 0.86
BLS verifyMultipleSignatures 128 - blst 16.550 ms/op 17.953 ms/op 0.92
BLS deserializing 10000 signatures 650.63 ms/op 671.95 ms/op 0.97
BLS deserializing 100000 signatures 6.5014 s/op 6.7376 s/op 0.96
BLS verifyMultipleSignatures - same message - 3 - blst 1.0471 ms/op 910.73 us/op 1.15
BLS verifyMultipleSignatures - same message - 8 - blst 1.0846 ms/op 1.0690 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst 1.7407 ms/op 1.8096 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst 2.5094 ms/op 2.7168 ms/op 0.92
BLS verifyMultipleSignatures - same message - 128 - blst 4.2690 ms/op 4.3731 ms/op 0.98
BLS aggregatePubkeys 32 - blst 18.338 us/op 19.497 us/op 0.94
BLS aggregatePubkeys 128 - blst 65.080 us/op 69.259 us/op 0.94
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 67.971 ms/op 91.065 ms/op 0.75
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 43.057 ms/op 48.129 ms/op 0.89
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 36.378 ms/op 30.867 ms/op 1.18
getSlashingsAndExits - default max 82.667 us/op 88.792 us/op 0.93
getSlashingsAndExits - 2k 320.22 us/op 422.42 us/op 0.76
proposeBlockBody type=full, size=empty 5.4312 ms/op 5.0762 ms/op 1.07
isKnown best case - 1 super set check 521.00 ns/op 716.00 ns/op 0.73
isKnown normal case - 2 super set checks 519.00 ns/op 598.00 ns/op 0.87
isKnown worse case - 16 super set checks 508.00 ns/op 616.00 ns/op 0.82
InMemoryCheckpointStateCache - add get delete 3.3150 us/op 3.2260 us/op 1.03
updateUnfinalizedPubkeys - updating 10 pubkeys 1.4655 ms/op 981.16 us/op 1.49
updateUnfinalizedPubkeys - updating 100 pubkeys 4.2799 ms/op 3.2221 ms/op 1.33
updateUnfinalizedPubkeys - updating 1000 pubkeys 46.148 ms/op 40.461 ms/op 1.14
validate api signedAggregateAndProof - struct 1.7135 ms/op 1.6384 ms/op 1.05
validate gossip signedAggregateAndProof - struct 1.5145 ms/op 1.6408 ms/op 0.92
validate gossip attestation - vc 640000 1.0164 ms/op 1.0214 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 128.91 us/op 133.33 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 64 109.32 us/op 124.97 us/op 0.87
batch validate gossip attestation - vc 640000 - chunk 128 103.31 us/op 113.90 us/op 0.91
batch validate gossip attestation - vc 640000 - chunk 256 97.537 us/op 107.43 us/op 0.91
pickEth1Vote - no votes 902.03 us/op 856.92 us/op 1.05
pickEth1Vote - max votes 4.4034 ms/op 5.7749 ms/op 0.76
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.083 ms/op 15.075 ms/op 0.67
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.793 ms/op 20.515 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize value x2048 367.84 us/op 361.85 us/op 1.02
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.2669 ms/op 3.6332 ms/op 0.90
bytes32 toHexString 856.00 ns/op 637.00 ns/op 1.34
bytes32 Buffer.toString(hex) 496.00 ns/op 463.00 ns/op 1.07
bytes32 Buffer.toString(hex) from Uint8Array 644.00 ns/op 590.00 ns/op 1.09
bytes32 Buffer.toString(hex) + 0x 457.00 ns/op 469.00 ns/op 0.97
Object access 1 prop 0.35200 ns/op 0.34100 ns/op 1.03
Map access 1 prop 0.35500 ns/op 0.33800 ns/op 1.05
Object get x1000 5.3950 ns/op 5.2030 ns/op 1.04
Map get x1000 6.4090 ns/op 5.8140 ns/op 1.10
Object set x1000 25.303 ns/op 29.189 ns/op 0.87
Map set x1000 19.536 ns/op 23.100 ns/op 0.85
Return object 10000 times 0.31940 ns/op 0.30690 ns/op 1.04
Throw Error 10000 times 2.8455 us/op 2.7222 us/op 1.05
toHex 128.46 ns/op 114.40 ns/op 1.12
Buffer.from 105.64 ns/op 109.66 ns/op 0.96
shared Buffer 71.796 ns/op 71.557 ns/op 1.00
fastMsgIdFn sha256 / 200 bytes 2.3030 us/op 2.1600 us/op 1.07
fastMsgIdFn h32 xxhash / 200 bytes 528.00 ns/op 529.00 ns/op 1.00
fastMsgIdFn h64 xxhash / 200 bytes 519.00 ns/op 543.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 6.2400 us/op 6.1440 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 645.00 ns/op 618.00 ns/op 1.04
fastMsgIdFn h64 xxhash / 1000 bytes 557.00 ns/op 583.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 51.027 us/op 51.131 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 2.0450 us/op 2.0430 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.4010 us/op 1.3780 us/op 1.02
send data - 1000 256B messages 12.558 ms/op 11.889 ms/op 1.06
send data - 1000 512B messages 16.997 ms/op 17.469 ms/op 0.97
send data - 1000 1024B messages 26.131 ms/op 23.886 ms/op 1.09
send data - 1000 1200B messages 26.290 ms/op 27.162 ms/op 0.97
send data - 1000 2048B messages 32.774 ms/op 31.077 ms/op 1.05
send data - 1000 4096B messages 28.644 ms/op 29.136 ms/op 0.98
send data - 1000 16384B messages 71.736 ms/op 71.015 ms/op 1.01
send data - 1000 65536B messages 268.61 ms/op 264.70 ms/op 1.01
enrSubnets - fastDeserialize 64 bits 1.3480 us/op 1.1550 us/op 1.17
enrSubnets - ssz BitVector 64 bits 631.00 ns/op 605.00 ns/op 1.04
enrSubnets - fastDeserialize 4 bits 384.00 ns/op 340.00 ns/op 1.13
enrSubnets - ssz BitVector 4 bits 630.00 ns/op 573.00 ns/op 1.10
prioritizePeers score -10:0 att 32-0.1 sync 2-0 144.91 us/op 115.53 us/op 1.25
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 146.67 us/op 138.54 us/op 1.06
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 322.25 us/op 288.24 us/op 1.12
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 473.73 us/op 420.01 us/op 1.13
prioritizePeers score 0:0 att 64-1 sync 4-1 770.55 us/op 633.38 us/op 1.22
array of 16000 items push then shift 1.2820 us/op 1.3857 us/op 0.93
LinkedList of 16000 items push then shift 8.1900 ns/op 10.450 ns/op 0.78
array of 16000 items push then pop 129.15 ns/op 119.16 ns/op 1.08
LinkedList of 16000 items push then pop 6.5210 ns/op 6.9800 ns/op 0.93
array of 24000 items push then shift 1.8772 us/op 1.9482 us/op 0.96
LinkedList of 24000 items push then shift 7.3140 ns/op 9.2060 ns/op 0.79
array of 24000 items push then pop 117.27 ns/op 167.91 ns/op 0.70
LinkedList of 24000 items push then pop 7.0750 ns/op 6.6430 ns/op 1.07
intersect bitArray bitLen 8 5.7540 ns/op 6.2910 ns/op 0.91
intersect array and set length 8 49.935 ns/op 40.833 ns/op 1.22
intersect bitArray bitLen 128 26.457 ns/op 26.915 ns/op 0.98
intersect array and set length 128 666.85 ns/op 580.29 ns/op 1.15
bitArray.getTrueBitIndexes() bitLen 128 2.3990 us/op 1.3880 us/op 1.73
bitArray.getTrueBitIndexes() bitLen 248 4.4260 us/op 2.1380 us/op 2.07
bitArray.getTrueBitIndexes() bitLen 512 9.0730 us/op 4.0520 us/op 2.24
Buffer.concat 32 items 1.0570 us/op 1.1100 us/op 0.95
Uint8Array.set 32 items 1.6970 us/op 1.8420 us/op 0.92
Buffer.copy 2.0250 us/op 2.0570 us/op 0.98
Uint8Array.set - with subarray 3.0530 us/op 1.9710 us/op 1.55
Uint8Array.set - without subarray 1.8270 us/op 2.3740 us/op 0.77
getUint32 - dataview 497.00 ns/op 515.00 ns/op 0.97
getUint32 - manual 477.00 ns/op 407.00 ns/op 1.17
Set add up to 64 items then delete first 2.3633 us/op 1.8220 us/op 1.30
OrderedSet add up to 64 items then delete first 4.0801 us/op 2.7694 us/op 1.47
Set add up to 64 items then delete last 2.4155 us/op 2.0692 us/op 1.17
OrderedSet add up to 64 items then delete last 3.7948 us/op 3.0598 us/op 1.24
Set add up to 64 items then delete middle 2.7448 us/op 2.0351 us/op 1.35
OrderedSet add up to 64 items then delete middle 5.6154 us/op 4.4995 us/op 1.25
Set add up to 128 items then delete first 4.3882 us/op 4.0283 us/op 1.09
OrderedSet add up to 128 items then delete first 6.5966 us/op 6.4676 us/op 1.02
Set add up to 128 items then delete last 4.8388 us/op 3.9244 us/op 1.23
OrderedSet add up to 128 items then delete last 7.6197 us/op 6.1208 us/op 1.24
Set add up to 128 items then delete middle 5.0387 us/op 4.1056 us/op 1.23
OrderedSet add up to 128 items then delete middle 15.102 us/op 11.622 us/op 1.30
Set add up to 256 items then delete first 9.0748 us/op 8.4452 us/op 1.07
OrderedSet add up to 256 items then delete first 14.185 us/op 13.369 us/op 1.06
Set add up to 256 items then delete last 8.7129 us/op 7.7231 us/op 1.13
OrderedSet add up to 256 items then delete last 12.765 us/op 12.152 us/op 1.05
Set add up to 256 items then delete middle 8.1762 us/op 8.6431 us/op 0.95
OrderedSet add up to 256 items then delete middle 36.829 us/op 40.580 us/op 0.91
transfer serialized Status (84 B) 1.4710 us/op 1.5360 us/op 0.96
copy serialized Status (84 B) 1.3770 us/op 1.5710 us/op 0.88
transfer serialized SignedVoluntaryExit (112 B) 1.5470 us/op 1.8990 us/op 0.81
copy serialized SignedVoluntaryExit (112 B) 1.3700 us/op 1.5990 us/op 0.86
transfer serialized ProposerSlashing (416 B) 1.6370 us/op 2.1220 us/op 0.77
copy serialized ProposerSlashing (416 B) 1.5830 us/op 2.2710 us/op 0.70
transfer serialized Attestation (485 B) 1.6710 us/op 2.3070 us/op 0.72
copy serialized Attestation (485 B) 2.5330 us/op 2.0070 us/op 1.26
transfer serialized AttesterSlashing (33232 B) 2.9920 us/op 2.7500 us/op 1.09
copy serialized AttesterSlashing (33232 B) 10.433 us/op 10.288 us/op 1.01
transfer serialized Small SignedBeaconBlock (128000 B) 2.3050 us/op 5.0990 us/op 0.45
copy serialized Small SignedBeaconBlock (128000 B) 10.959 us/op 36.003 us/op 0.30
transfer serialized Avg SignedBeaconBlock (200000 B) 3.3280 us/op 6.4990 us/op 0.51
copy serialized Avg SignedBeaconBlock (200000 B) 15.003 us/op 46.535 us/op 0.32
transfer serialized BlobsSidecar (524380 B) 3.4130 us/op 6.8900 us/op 0.50
copy serialized BlobsSidecar (524380 B) 88.726 us/op 150.77 us/op 0.59
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1780 us/op 11.602 us/op 0.27
copy serialized Big SignedBeaconBlock (1000000 B) 269.43 us/op 277.13 us/op 0.97
pass gossip attestations to forkchoice per slot 2.5937 ms/op 2.7361 ms/op 0.95
forkChoice updateHead vc 100000 bc 64 eq 0 468.99 us/op 574.49 us/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 0 2.5317 ms/op 5.2710 ms/op 0.48
forkChoice updateHead vc 1000000 bc 64 eq 0 4.2984 ms/op 5.2055 ms/op 0.83
forkChoice updateHead vc 600000 bc 320 eq 0 2.5632 ms/op 3.2394 ms/op 0.79
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7524 ms/op 6.4222 ms/op 0.43
forkChoice updateHead vc 600000 bc 7200 eq 0 5.8436 ms/op 4.1893 ms/op 1.39
forkChoice updateHead vc 600000 bc 64 eq 1000 9.9255 ms/op 10.392 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 10000 9.9888 ms/op 11.071 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 300000 12.397 ms/op 39.401 ms/op 0.31
computeDeltas 500000 validators 300 proto nodes 3.6256 ms/op 3.9374 ms/op 0.92
computeDeltas 500000 validators 1200 proto nodes 3.2554 ms/op 3.5871 ms/op 0.91
computeDeltas 500000 validators 7200 proto nodes 3.2373 ms/op 3.2344 ms/op 1.00
computeDeltas 750000 validators 300 proto nodes 4.8516 ms/op 4.7662 ms/op 1.02
computeDeltas 750000 validators 1200 proto nodes 4.5157 ms/op 4.9063 ms/op 0.92
computeDeltas 750000 validators 7200 proto nodes 5.3790 ms/op 5.0055 ms/op 1.07
computeDeltas 1400000 validators 300 proto nodes 9.6332 ms/op 9.4754 ms/op 1.02
computeDeltas 1400000 validators 1200 proto nodes 9.5330 ms/op 9.3464 ms/op 1.02
computeDeltas 1400000 validators 7200 proto nodes 10.068 ms/op 9.0245 ms/op 1.12
computeDeltas 2100000 validators 300 proto nodes 14.600 ms/op 13.354 ms/op 1.09
computeDeltas 2100000 validators 1200 proto nodes 14.142 ms/op 14.015 ms/op 1.01
computeDeltas 2100000 validators 7200 proto nodes 13.551 ms/op 13.923 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei normalcase 1.4216 ms/op 2.6067 ms/op 0.55
altair processAttestation - 250000 vs - 7PWei worstcase 2.2555 ms/op 2.9098 ms/op 0.78
altair processAttestation - setStatus - 1/6 committees join 70.368 us/op 91.382 us/op 0.77
altair processAttestation - setStatus - 1/3 committees join 135.58 us/op 155.10 us/op 0.87
altair processAttestation - setStatus - 1/2 committees join 219.16 us/op 213.37 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 260.59 us/op 258.58 us/op 1.01
altair processAttestation - setStatus - 4/5 committees join 395.25 us/op 426.69 us/op 0.93
altair processAttestation - setStatus - 100% committees join 485.58 us/op 477.86 us/op 1.02
altair processBlock - 250000 vs - 7PWei normalcase 5.5075 ms/op 3.7279 ms/op 1.48
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.952 ms/op 29.322 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase 36.559 ms/op 38.824 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 70.786 ms/op 63.643 ms/op 1.11
phase0 processBlock - 250000 vs - 7PWei normalcase 1.7037 ms/op 2.1858 ms/op 0.78
phase0 processBlock - 250000 vs - 7PWei worstcase 23.402 ms/op 26.657 ms/op 0.88
altair processEth1Data - 250000 vs - 7PWei normalcase 243.53 us/op 261.93 us/op 0.93
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.4560 us/op 4.6260 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 27.471 us/op 30.042 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 4.6880 us/op 8.1610 us/op 0.57
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.9780 us/op 5.3660 us/op 0.93
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 133.73 us/op 125.32 us/op 1.07
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 848.70 us/op 837.27 us/op 1.01
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1732 ms/op 1.2457 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1004 ms/op 1.2107 ms/op 0.91
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7156 ms/op 3.0637 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.2742 ms/op 1.3082 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.8369 ms/op 3.3498 ms/op 0.85
Tree 40 250000 create 198.56 ms/op 272.50 ms/op 0.73
Tree 40 250000 get(125000) 117.23 ns/op 122.28 ns/op 0.96
Tree 40 250000 set(125000) 520.11 ns/op 522.53 ns/op 1.00
Tree 40 250000 toArray() 9.6928 ms/op 11.194 ms/op 0.87
Tree 40 250000 iterate all - toArray() + loop 9.6793 ms/op 11.920 ms/op 0.81
Tree 40 250000 iterate all - get(i) 40.441 ms/op 44.349 ms/op 0.91
Array 250000 create 2.3359 ms/op 2.3675 ms/op 0.99
Array 250000 clone - spread 1.2501 ms/op 1.2220 ms/op 1.02
Array 250000 get(125000) 0.58800 ns/op 0.58300 ns/op 1.01
Array 250000 set(125000) 0.60000 ns/op 0.59000 ns/op 1.02
Array 250000 iterate all - loop 78.882 us/op 77.864 us/op 1.01
phase0 afterProcessEpoch - 250000 vs - 7PWei 75.414 ms/op 79.343 ms/op 0.95
Array.fill - length 1000000 2.5355 ms/op 2.5448 ms/op 1.00
Array push - length 1000000 14.358 ms/op 16.919 ms/op 0.85
Array.get 0.26970 ns/op 0.26616 ns/op 1.01
Uint8Array.get 0.34597 ns/op 0.34989 ns/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 12.199 ms/op 22.147 ms/op 0.55
altair processEpoch - mainnet_e81889 262.01 ms/op 333.49 ms/op 0.79
mainnet_e81889 - altair beforeProcessEpoch 16.754 ms/op 20.381 ms/op 0.82
mainnet_e81889 - altair processJustificationAndFinalization 11.216 us/op 13.123 us/op 0.85
mainnet_e81889 - altair processInactivityUpdates 4.0927 ms/op 5.6160 ms/op 0.73
mainnet_e81889 - altair processRewardsAndPenalties 50.166 ms/op 46.602 ms/op 1.08
mainnet_e81889 - altair processRegistryUpdates 2.2570 us/op 3.1950 us/op 0.71
mainnet_e81889 - altair processSlashings 746.00 ns/op 906.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 770.00 ns/op 781.00 ns/op 0.99
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5089 ms/op 1.0523 ms/op 1.43
mainnet_e81889 - altair processSlashingsReset 3.5800 us/op 4.5710 us/op 0.78
mainnet_e81889 - altair processRandaoMixesReset 2.6600 us/op 6.5130 us/op 0.41
mainnet_e81889 - altair processHistoricalRootsUpdate 800.00 ns/op 1.2930 us/op 0.62
mainnet_e81889 - altair processParticipationFlagUpdates 2.6150 us/op 3.0950 us/op 0.84
mainnet_e81889 - altair processSyncCommitteeUpdates 852.00 ns/op 1.0450 us/op 0.82
mainnet_e81889 - altair afterProcessEpoch 79.758 ms/op 80.579 ms/op 0.99
capella processEpoch - mainnet_e217614 1.1081 s/op 1.2541 s/op 0.88
mainnet_e217614 - capella beforeProcessEpoch 67.095 ms/op 77.425 ms/op 0.87
mainnet_e217614 - capella processJustificationAndFinalization 13.590 us/op 24.038 us/op 0.57
mainnet_e217614 - capella processInactivityUpdates 13.726 ms/op 16.628 ms/op 0.83
mainnet_e217614 - capella processRewardsAndPenalties 238.34 ms/op 228.03 ms/op 1.05
mainnet_e217614 - capella processRegistryUpdates 13.072 us/op 12.621 us/op 1.04
mainnet_e217614 - capella processSlashings 707.00 ns/op 808.00 ns/op 0.88
mainnet_e217614 - capella processEth1DataReset 694.00 ns/op 869.00 ns/op 0.80
mainnet_e217614 - capella processEffectiveBalanceUpdates 11.227 ms/op 17.439 ms/op 0.64
mainnet_e217614 - capella processSlashingsReset 2.5640 us/op 2.7220 us/op 0.94
mainnet_e217614 - capella processRandaoMixesReset 2.0950 us/op 4.8510 us/op 0.43
mainnet_e217614 - capella processHistoricalRootsUpdate 690.00 ns/op 960.00 ns/op 0.72
mainnet_e217614 - capella processParticipationFlagUpdates 3.6600 us/op 2.0820 us/op 1.76
mainnet_e217614 - capella afterProcessEpoch 195.89 ms/op 199.52 ms/op 0.98
phase0 processEpoch - mainnet_e58758 332.16 ms/op 363.87 ms/op 0.91
mainnet_e58758 - phase0 beforeProcessEpoch 73.976 ms/op 101.57 ms/op 0.73
mainnet_e58758 - phase0 processJustificationAndFinalization 12.964 us/op 25.700 us/op 0.50
mainnet_e58758 - phase0 processRewardsAndPenalties 27.121 ms/op 33.643 ms/op 0.81
mainnet_e58758 - phase0 processRegistryUpdates 6.6350 us/op 9.2500 us/op 0.72
mainnet_e58758 - phase0 processSlashings 705.00 ns/op 923.00 ns/op 0.76
mainnet_e58758 - phase0 processEth1DataReset 704.00 ns/op 900.00 ns/op 0.78
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 810.41 us/op 932.29 us/op 0.87
mainnet_e58758 - phase0 processSlashingsReset 2.7720 us/op 4.6520 us/op 0.60
mainnet_e58758 - phase0 processRandaoMixesReset 3.5380 us/op 6.6190 us/op 0.53
mainnet_e58758 - phase0 processHistoricalRootsUpdate 403.00 ns/op 1.3840 us/op 0.29
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.7840 us/op 5.7160 us/op 0.31
mainnet_e58758 - phase0 afterProcessEpoch 64.953 ms/op 68.843 ms/op 0.94
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1022 ms/op 1.3297 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8485 ms/op 1.7735 ms/op 1.04
altair processInactivityUpdates - 250000 normalcase 16.057 ms/op 17.135 ms/op 0.94
altair processInactivityUpdates - 250000 worstcase 17.461 ms/op 14.121 ms/op 1.24
phase0 processRegistryUpdates - 250000 normalcase 6.8490 us/op 7.8540 us/op 0.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 320.05 us/op 304.69 us/op 1.05
phase0 processRegistryUpdates - 250000 worstcase 0.5 113.95 ms/op 109.94 ms/op 1.04
altair processRewardsAndPenalties - 250000 normalcase 39.339 ms/op 34.886 ms/op 1.13
altair processRewardsAndPenalties - 250000 worstcase 41.378 ms/op 39.458 ms/op 1.05
phase0 getAttestationDeltas - 250000 normalcase 6.5387 ms/op 12.608 ms/op 0.52
phase0 getAttestationDeltas - 250000 worstcase 6.2739 ms/op 9.4703 ms/op 0.66
phase0 processSlashings - 250000 worstcase 99.133 us/op 109.41 us/op 0.91
altair processSyncCommitteeUpdates - 250000 95.714 ms/op 151.99 ms/op 0.63
BeaconState.hashTreeRoot - No change 435.00 ns/op 464.00 ns/op 0.94
BeaconState.hashTreeRoot - 1 full validator 119.55 us/op 77.361 us/op 1.55
BeaconState.hashTreeRoot - 32 full validator 817.02 us/op 829.38 us/op 0.99
BeaconState.hashTreeRoot - 512 full validator 7.4211 ms/op 9.7565 ms/op 0.76
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 112.68 us/op 113.55 us/op 0.99
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4988 ms/op 2.3560 ms/op 0.64
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 22.952 ms/op 22.902 ms/op 1.00
BeaconState.hashTreeRoot - 1 balances 118.76 us/op 115.52 us/op 1.03
BeaconState.hashTreeRoot - 32 balances 1.1957 ms/op 1.0087 ms/op 1.19
BeaconState.hashTreeRoot - 512 balances 11.271 ms/op 8.8718 ms/op 1.27
BeaconState.hashTreeRoot - 250000 balances 198.63 ms/op 181.64 ms/op 1.09
aggregationBits - 2048 els - zipIndexesInBitList 23.025 us/op 21.612 us/op 1.07
byteArrayEquals 32 45.972 ns/op 46.721 ns/op 0.98
Buffer.compare 32 14.919 ns/op 15.698 ns/op 0.95
byteArrayEquals 1024 1.2348 us/op 1.2908 us/op 0.96
Buffer.compare 1024 23.218 ns/op 23.808 ns/op 0.98
byteArrayEquals 16384 19.813 us/op 20.572 us/op 0.96
Buffer.compare 16384 170.71 ns/op 205.46 ns/op 0.83
byteArrayEquals 123687377 149.34 ms/op 153.00 ms/op 0.98
Buffer.compare 123687377 5.6256 ms/op 5.7950 ms/op 0.97
byteArrayEquals 32 - diff last byte 47.039 ns/op 47.689 ns/op 0.99
Buffer.compare 32 - diff last byte 15.627 ns/op 15.997 ns/op 0.98
byteArrayEquals 1024 - diff last byte 1.2541 us/op 1.2763 us/op 0.98
Buffer.compare 1024 - diff last byte 22.424 ns/op 23.363 ns/op 0.96
byteArrayEquals 16384 - diff last byte 19.854 us/op 20.119 us/op 0.99
Buffer.compare 16384 - diff last byte 165.93 ns/op 210.99 ns/op 0.79
byteArrayEquals 123687377 - diff last byte 150.09 ms/op 169.65 ms/op 0.88
Buffer.compare 123687377 - diff last byte 5.5537 ms/op 8.4081 ms/op 0.66
byteArrayEquals 32 - random bytes 4.8880 ns/op 6.2710 ns/op 0.78
Buffer.compare 32 - random bytes 15.481 ns/op 16.693 ns/op 0.93
byteArrayEquals 1024 - random bytes 4.8980 ns/op 5.4450 ns/op 0.90
Buffer.compare 1024 - random bytes 15.500 ns/op 16.472 ns/op 0.94
byteArrayEquals 16384 - random bytes 4.8960 ns/op 5.1700 ns/op 0.95
Buffer.compare 16384 - random bytes 15.296 ns/op 24.636 ns/op 0.62
byteArrayEquals 123687377 - random bytes 7.8000 ns/op 12.700 ns/op 0.61
Buffer.compare 123687377 - random bytes 18.400 ns/op 24.780 ns/op 0.74
regular array get 100000 times 30.536 us/op 36.457 us/op 0.84
wrappedArray get 100000 times 30.549 us/op 35.053 us/op 0.87
arrayWithProxy get 100000 times 9.6643 ms/op 14.201 ms/op 0.68
ssz.Root.equals 43.137 ns/op 50.217 ns/op 0.86
byteArrayEquals 42.352 ns/op 44.982 ns/op 0.94
Buffer.compare 8.8820 ns/op 11.925 ns/op 0.74
shuffle list - 16384 els 5.5614 ms/op 6.1818 ms/op 0.90
shuffle list - 250000 els 81.887 ms/op 95.974 ms/op 0.85
processSlot - 1 slots 11.748 us/op 25.539 us/op 0.46
processSlot - 32 slots 2.4469 ms/op 4.4241 ms/op 0.55
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 37.333 ms/op 48.401 ms/op 0.77
getCommitteeAssignments - req 1 vs - 250000 vc 1.8635 ms/op 2.8399 ms/op 0.66
getCommitteeAssignments - req 100 vs - 250000 vc 3.6906 ms/op 3.8325 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9245 ms/op 4.1166 ms/op 0.95
findModifiedValidators - 10000 modified validators 239.05 ms/op 368.27 ms/op 0.65
findModifiedValidators - 1000 modified validators 150.52 ms/op 185.05 ms/op 0.81
findModifiedValidators - 100 modified validators 168.76 ms/op 157.50 ms/op 1.07
findModifiedValidators - 10 modified validators 189.78 ms/op 155.50 ms/op 1.22
findModifiedValidators - 1 modified validators 147.12 ms/op 164.46 ms/op 0.89
findModifiedValidators - no difference 156.29 ms/op 162.09 ms/op 0.96
compare ViewDUs 3.1282 s/op 3.3071 s/op 0.95
compare each validator Uint8Array 1.4742 s/op 1.7701 s/op 0.83
compare ViewDU to Uint8Array 968.60 ms/op 1.1703 s/op 0.83
migrate state 1000000 validators, 24 modified, 0 new 840.15 ms/op 856.14 ms/op 0.98
migrate state 1000000 validators, 1700 modified, 1000 new 1.1689 s/op 1.0154 s/op 1.15
migrate state 1000000 validators, 3400 modified, 2000 new 1.3278 s/op 1.1183 s/op 1.19
migrate state 1500000 validators, 24 modified, 0 new 1.0138 s/op 858.41 ms/op 1.18
migrate state 1500000 validators, 1700 modified, 1000 new 1.1334 s/op 1.0294 s/op 1.10
migrate state 1500000 validators, 3400 modified, 2000 new 1.1651 s/op 1.2878 s/op 0.90
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.9000 ns/op 6.7100 ns/op 1.03
state getBlockRootAtSlot - 250000 vs - 7PWei 547.53 ns/op 918.39 ns/op 0.60
computeProposers - vc 250000 5.5190 ms/op 7.0708 ms/op 0.78
computeEpochShuffling - vc 250000 83.671 ms/op 82.463 ms/op 1.01
getNextSyncCommittee - vc 250000 104.25 ms/op 136.61 ms/op 0.76
computeSigningRoot for AttestationData 23.847 us/op 18.798 us/op 1.27
hash AttestationData serialized data then Buffer.toString(base64) 1.2393 us/op 1.2294 us/op 1.01
toHexString serialized data 871.40 ns/op 865.34 ns/op 1.01
Buffer.toString(base64) 167.12 ns/op 150.31 ns/op 1.11
nodejs block root to RootHex using toHex 131.75 ns/op 130.30 ns/op 1.01
nodejs block root to RootHex using toRootHex 82.943 ns/op 80.894 ns/op 1.03
browser block root to RootHex using the deprecated toHexString 211.40 ns/op 214.74 ns/op 0.98
browser block root to RootHex using toHex 169.54 ns/op 171.78 ns/op 0.99
browser block root to RootHex using toRootHex 150.52 ns/op 153.82 ns/op 0.98

by benchmarkbot/action

@nazarhussain nazarhussain merged commit b457778 into unstable Oct 2, 2024
20 checks passed
@nazarhussain nazarhussain deleted the nflaig/lc-api-init branch October 2, 2024 13:05
@wemeetagain
Copy link
Member

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