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

fix: add workaround to fix fetching state from checkpointz #6874

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jun 10, 2024

Motivation

Adds temporary workaround to fix fetching state from Checkpointz.

Description

@nflaig nflaig requested a review from a team as a code owner June 10, 2024 18:00
@@ -102,7 +102,7 @@ export function createApiRequest<E extends Endpoint>(
return new Request(url, {
...init,
method: definition.method,
headers: mergeHeaders(headers, req.headers),
headers: mergeHeaders(headers, req.headers, init.headers),
Copy link
Member Author

@nflaig nflaig Jun 10, 2024

Choose a reason for hiding this comment

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

This is anyways better imo, we should allow the user to override any header manually via request init

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 59.52381% with 17 lines in your changes missing coverage. Please review.

Project coverage is 62.75%. Comparing base (ff253a7) to head (a8cc842).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6874      +/-   ##
============================================
- Coverage     62.75%   62.75%   -0.01%     
============================================
  Files           578      578              
  Lines         61264    61278      +14     
  Branches       2114     2112       -2     
============================================
+ Hits          38449    38457       +8     
- Misses        22776    22783       +7     
+ Partials         39       38       -1     

@wemeetagain wemeetagain merged commit 26e9bc4 into unstable Jun 10, 2024
20 of 21 checks passed
@wemeetagain wemeetagain deleted the nflaig/checkpointz-workaround branch June 10, 2024 18:39
Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: a0ac2bc Previous: ff253a7 Ratio
forkChoice updateHead vc 600000 bc 64 eq 300000 15.544 ms/op 73.838 ms/op 0.21
Full benchmark results
Benchmark suite Current: a0ac2bc Previous: ff253a7 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 588.84 us/op 566.25 us/op 1.04
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 79.716 us/op 60.172 us/op 1.32
BLS verify - blst-native 1.3892 ms/op 1.3310 ms/op 1.04
BLS verifyMultipleSignatures 3 - blst-native 2.9474 ms/op 2.8969 ms/op 1.02
BLS verifyMultipleSignatures 8 - blst-native 6.3545 ms/op 6.4035 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 23.205 ms/op 23.830 ms/op 0.97
BLS verifyMultipleSignatures 64 - blst-native 52.664 ms/op 48.311 ms/op 1.09
BLS verifyMultipleSignatures 128 - blst-native 94.748 ms/op 100.25 ms/op 0.95
BLS deserializing 10000 signatures 972.11 ms/op 949.93 ms/op 1.02
BLS deserializing 100000 signatures 9.7219 s/op 9.7080 s/op 1.00
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3029 ms/op 1.5031 ms/op 0.87
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5078 ms/op 1.6520 ms/op 0.91
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4613 ms/op 2.6124 ms/op 0.94
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.4611 ms/op 3.8801 ms/op 0.89
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.7991 ms/op 7.2870 ms/op 0.93
BLS aggregatePubkeys 32 - blst-native 28.503 us/op 29.809 us/op 0.96
BLS aggregatePubkeys 128 - blst-native 111.51 us/op 107.20 us/op 1.04
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 75.123 ms/op 88.909 ms/op 0.84
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 69.300 ms/op 72.533 ms/op 0.96
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 35.946 ms/op 40.182 ms/op 0.89
getSlashingsAndExits - default max 134.68 us/op 180.05 us/op 0.75
getSlashingsAndExits - 2k 325.93 us/op 550.80 us/op 0.59
proposeBlockBody type=full, size=empty 6.0014 ms/op 7.3523 ms/op 0.82
isKnown best case - 1 super set check 441.00 ns/op 710.00 ns/op 0.62
isKnown normal case - 2 super set checks 400.00 ns/op 737.00 ns/op 0.54
isKnown worse case - 16 super set checks 419.00 ns/op 710.00 ns/op 0.59
InMemoryCheckpointStateCache - add get delete 5.6450 us/op 7.1850 us/op 0.79
validate api signedAggregateAndProof - struct 2.7504 ms/op 3.2465 ms/op 0.85
validate gossip signedAggregateAndProof - struct 2.7408 ms/op 2.9356 ms/op 0.93
validate gossip attestation - vc 640000 1.3294 ms/op 1.4338 ms/op 0.93
batch validate gossip attestation - vc 640000 - chunk 32 163.82 us/op 194.93 us/op 0.84
batch validate gossip attestation - vc 640000 - chunk 64 135.10 us/op 156.41 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 128 124.40 us/op 140.62 us/op 0.88
batch validate gossip attestation - vc 640000 - chunk 256 128.92 us/op 131.45 us/op 0.98
pickEth1Vote - no votes 1.1547 ms/op 1.3909 ms/op 0.83
pickEth1Vote - max votes 10.078 ms/op 12.256 ms/op 0.82
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.651 ms/op 19.315 ms/op 0.86
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.006 ms/op 23.485 ms/op 0.98
pickEth1Vote - Eth1Data fastSerialize value x2048 486.94 us/op 542.01 us/op 0.90
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.8567 ms/op 4.3803 ms/op 1.34
bytes32 toHexString 468.00 ns/op 568.00 ns/op 0.82
bytes32 Buffer.toString(hex) 258.00 ns/op 272.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 442.00 ns/op 488.00 ns/op 0.91
bytes32 Buffer.toString(hex) + 0x 248.00 ns/op 313.00 ns/op 0.79
Object access 1 prop 0.14500 ns/op 0.19000 ns/op 0.76
Map access 1 prop 0.14300 ns/op 0.14600 ns/op 0.98
Object get x1000 6.1680 ns/op 6.3450 ns/op 0.97
Map get x1000 7.6180 ns/op 6.9510 ns/op 1.10
Object set x1000 34.781 ns/op 50.200 ns/op 0.69
Map set x1000 23.723 ns/op 33.821 ns/op 0.70
Return object 10000 times 0.29730 ns/op 0.32030 ns/op 0.93
Throw Error 10000 times 3.4295 us/op 3.5825 us/op 0.96
fastMsgIdFn sha256 / 200 bytes 2.3360 us/op 2.5110 us/op 0.93
fastMsgIdFn h32 xxhash / 200 bytes 279.00 ns/op 322.00 ns/op 0.87
fastMsgIdFn h64 xxhash / 200 bytes 284.00 ns/op 318.00 ns/op 0.89
fastMsgIdFn sha256 / 1000 bytes 7.4690 us/op 8.4530 us/op 0.88
fastMsgIdFn h32 xxhash / 1000 bytes 398.00 ns/op 480.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 1000 bytes 354.00 ns/op 390.00 ns/op 0.91
fastMsgIdFn sha256 / 10000 bytes 64.589 us/op 72.701 us/op 0.89
fastMsgIdFn h32 xxhash / 10000 bytes 1.8770 us/op 2.1760 us/op 0.86
fastMsgIdFn h64 xxhash / 10000 bytes 1.2190 us/op 1.4060 us/op 0.87
send data - 1000 256B messages 12.982 ms/op 17.160 ms/op 0.76
send data - 1000 512B messages 16.648 ms/op 23.000 ms/op 0.72
send data - 1000 1024B messages 27.106 ms/op 32.074 ms/op 0.85
send data - 1000 1200B messages 19.475 ms/op 23.999 ms/op 0.81
send data - 1000 2048B messages 33.432 ms/op 36.771 ms/op 0.91
send data - 1000 4096B messages 26.240 ms/op 36.951 ms/op 0.71
send data - 1000 16384B messages 77.955 ms/op 91.637 ms/op 0.85
send data - 1000 65536B messages 220.59 ms/op 249.69 ms/op 0.88
enrSubnets - fastDeserialize 64 bits 1.2710 us/op 1.7370 us/op 0.73
enrSubnets - ssz BitVector 64 bits 403.00 ns/op 494.00 ns/op 0.82
enrSubnets - fastDeserialize 4 bits 202.00 ns/op 227.00 ns/op 0.89
enrSubnets - ssz BitVector 4 bits 432.00 ns/op 483.00 ns/op 0.89
prioritizePeers score -10:0 att 32-0.1 sync 2-0 209.56 us/op 204.31 us/op 1.03
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 205.96 us/op 223.82 us/op 0.92
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 319.67 us/op 356.19 us/op 0.90
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 420.99 us/op 515.38 us/op 0.82
prioritizePeers score 0:0 att 64-1 sync 4-1 855.84 us/op 1.0434 ms/op 0.82
array of 16000 items push then shift 1.7419 us/op 2.1462 us/op 0.81
LinkedList of 16000 items push then shift 8.4910 ns/op 10.144 ns/op 0.84
array of 16000 items push then pop 153.93 ns/op 165.37 ns/op 0.93
LinkedList of 16000 items push then pop 9.3420 ns/op 8.8790 ns/op 1.05
array of 24000 items push then shift 2.6148 us/op 3.2436 us/op 0.81
LinkedList of 24000 items push then shift 9.0200 ns/op 10.557 ns/op 0.85
array of 24000 items push then pop 202.06 ns/op 218.51 ns/op 0.92
LinkedList of 24000 items push then pop 8.4780 ns/op 9.1160 ns/op 0.93
intersect bitArray bitLen 8 7.1640 ns/op 7.4280 ns/op 0.96
intersect array and set length 8 59.435 ns/op 71.239 ns/op 0.83
intersect bitArray bitLen 128 33.728 ns/op 33.053 ns/op 1.02
intersect array and set length 128 938.85 ns/op 958.40 ns/op 0.98
bitArray.getTrueBitIndexes() bitLen 128 2.0570 us/op 2.1850 us/op 0.94
bitArray.getTrueBitIndexes() bitLen 248 3.7140 us/op 4.7000 us/op 0.79
bitArray.getTrueBitIndexes() bitLen 512 9.7200 us/op 9.1070 us/op 1.07
Buffer.concat 32 items 1.2390 us/op 1.1960 us/op 1.04
Uint8Array.set 32 items 1.9240 us/op 1.9110 us/op 1.01
Buffer.copy 2.1040 us/op 2.3880 us/op 0.88
Uint8Array.set - with subarray 3.0460 us/op 3.7480 us/op 0.81
Uint8Array.set - without subarray 1.5810 us/op 1.8990 us/op 0.83
Set add up to 64 items then delete first 3.0514 us/op 3.3985 us/op 0.90
OrderedSet add up to 64 items then delete first 4.9182 us/op 5.3623 us/op 0.92
Set add up to 64 items then delete last 3.1843 us/op 3.9550 us/op 0.81
OrderedSet add up to 64 items then delete last 4.8684 us/op 5.7294 us/op 0.85
Set add up to 64 items then delete middle 2.8248 us/op 3.6915 us/op 0.77
OrderedSet add up to 64 items then delete middle 6.3200 us/op 7.6669 us/op 0.82
Set add up to 128 items then delete first 6.6247 us/op 7.3534 us/op 0.90
OrderedSet add up to 128 items then delete first 9.6487 us/op 11.574 us/op 0.83
Set add up to 128 items then delete last 5.7466 us/op 7.1334 us/op 0.81
OrderedSet add up to 128 items then delete last 9.1421 us/op 11.443 us/op 0.80
Set add up to 128 items then delete middle 6.3896 us/op 7.5259 us/op 0.85
OrderedSet add up to 128 items then delete middle 16.413 us/op 18.675 us/op 0.88
Set add up to 256 items then delete first 12.633 us/op 16.399 us/op 0.77
OrderedSet add up to 256 items then delete first 18.843 us/op 25.764 us/op 0.73
Set add up to 256 items then delete last 11.956 us/op 15.176 us/op 0.79
OrderedSet add up to 256 items then delete last 18.761 us/op 23.902 us/op 0.78
Set add up to 256 items then delete middle 12.441 us/op 15.139 us/op 0.82
OrderedSet add up to 256 items then delete middle 47.799 us/op 56.248 us/op 0.85
transfer serialized Status (84 B) 1.6070 us/op 1.8610 us/op 0.86
copy serialized Status (84 B) 1.3510 us/op 1.6060 us/op 0.84
transfer serialized SignedVoluntaryExit (112 B) 1.6630 us/op 2.1790 us/op 0.76
copy serialized SignedVoluntaryExit (112 B) 1.4530 us/op 1.7400 us/op 0.84
transfer serialized ProposerSlashing (416 B) 2.6950 us/op 2.6390 us/op 1.02
copy serialized ProposerSlashing (416 B) 2.0050 us/op 2.0590 us/op 0.97
transfer serialized Attestation (485 B) 2.0050 us/op 2.2810 us/op 0.88
copy serialized Attestation (485 B) 1.9060 us/op 2.8450 us/op 0.67
transfer serialized AttesterSlashing (33232 B) 1.8640 us/op 2.8980 us/op 0.64
copy serialized AttesterSlashing (33232 B) 6.6970 us/op 10.141 us/op 0.66
transfer serialized Small SignedBeaconBlock (128000 B) 2.4630 us/op 4.0000 us/op 0.62
copy serialized Small SignedBeaconBlock (128000 B) 21.787 us/op 32.794 us/op 0.66
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9520 us/op 5.2380 us/op 0.56
copy serialized Avg SignedBeaconBlock (200000 B) 28.756 us/op 48.345 us/op 0.59
transfer serialized BlobsSidecar (524380 B) 3.7690 us/op 6.4660 us/op 0.58
copy serialized BlobsSidecar (524380 B) 89.392 us/op 147.44 us/op 0.61
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6770 us/op 6.6190 us/op 0.56
copy serialized Big SignedBeaconBlock (1000000 B) 145.98 us/op 267.26 us/op 0.55
pass gossip attestations to forkchoice per slot 3.2452 ms/op 4.0568 ms/op 0.80
forkChoice updateHead vc 100000 bc 64 eq 0 509.38 us/op 613.60 us/op 0.83
forkChoice updateHead vc 600000 bc 64 eq 0 3.4559 ms/op 4.2988 ms/op 0.80
forkChoice updateHead vc 1000000 bc 64 eq 0 5.5399 ms/op 7.4005 ms/op 0.75
forkChoice updateHead vc 600000 bc 320 eq 0 3.1724 ms/op 4.0507 ms/op 0.78
forkChoice updateHead vc 600000 bc 1200 eq 0 3.2528 ms/op 4.4448 ms/op 0.73
forkChoice updateHead vc 600000 bc 7200 eq 0 4.0213 ms/op 6.0651 ms/op 0.66
forkChoice updateHead vc 600000 bc 64 eq 1000 10.964 ms/op 20.542 ms/op 0.53
forkChoice updateHead vc 600000 bc 64 eq 10000 10.984 ms/op 19.573 ms/op 0.56
forkChoice updateHead vc 600000 bc 64 eq 300000 15.544 ms/op 73.838 ms/op 0.21
computeDeltas 500000 validators 300 proto nodes 3.7738 ms/op 6.9559 ms/op 0.54
computeDeltas 500000 validators 1200 proto nodes 3.7357 ms/op 6.8333 ms/op 0.55
computeDeltas 500000 validators 7200 proto nodes 3.6880 ms/op 6.2646 ms/op 0.59
computeDeltas 750000 validators 300 proto nodes 5.3536 ms/op 9.1945 ms/op 0.58
computeDeltas 750000 validators 1200 proto nodes 5.2938 ms/op 7.7589 ms/op 0.68
computeDeltas 750000 validators 7200 proto nodes 5.1133 ms/op 7.5843 ms/op 0.67
computeDeltas 1400000 validators 300 proto nodes 9.4975 ms/op 15.151 ms/op 0.63
computeDeltas 1400000 validators 1200 proto nodes 10.101 ms/op 12.889 ms/op 0.78
computeDeltas 1400000 validators 7200 proto nodes 12.339 ms/op 12.181 ms/op 1.01
computeDeltas 2100000 validators 300 proto nodes 18.919 ms/op 19.190 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 17.886 ms/op 18.545 ms/op 0.96
computeDeltas 2100000 validators 7200 proto nodes 19.892 ms/op 17.256 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei normalcase 3.4755 ms/op 1.9577 ms/op 1.78
altair processAttestation - 250000 vs - 7PWei worstcase 4.3137 ms/op 3.1392 ms/op 1.37
altair processAttestation - setStatus - 1/6 committees join 181.34 us/op 105.78 us/op 1.71
altair processAttestation - setStatus - 1/3 committees join 309.54 us/op 207.41 us/op 1.49
altair processAttestation - setStatus - 1/2 committees join 330.05 us/op 266.74 us/op 1.24
altair processAttestation - setStatus - 2/3 committees join 441.51 us/op 349.49 us/op 1.26
altair processAttestation - setStatus - 4/5 committees join 656.65 us/op 531.29 us/op 1.24
altair processAttestation - setStatus - 100% committees join 798.55 us/op 622.15 us/op 1.28
altair processBlock - 250000 vs - 7PWei normalcase 5.1225 ms/op 6.4184 ms/op 0.80
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.243 ms/op 30.924 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase 45.059 ms/op 43.337 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase hashState 79.203 ms/op 92.219 ms/op 0.86
phase0 processBlock - 250000 vs - 7PWei normalcase 2.3527 ms/op 2.0154 ms/op 1.17
phase0 processBlock - 250000 vs - 7PWei worstcase 29.319 ms/op 31.958 ms/op 0.92
altair processEth1Data - 250000 vs - 7PWei normalcase 319.42 us/op 346.27 us/op 0.92
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.0810 us/op 8.7450 us/op 1.04
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 38.894 us/op 30.755 us/op 1.26
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.563 us/op 10.042 us/op 1.45
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.9540 us/op 8.0380 us/op 1.11
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 144.88 us/op 113.30 us/op 1.28
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 811.18 us/op 818.73 us/op 0.99
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 939.38 us/op 1.0784 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 928.62 us/op 1.0657 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.9471 ms/op 3.1223 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6484 ms/op 1.8687 ms/op 0.88
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.3426 ms/op 4.3715 ms/op 1.22
Tree 40 250000 create 322.49 ms/op 243.61 ms/op 1.32
Tree 40 250000 get(125000) 167.96 ns/op 164.91 ns/op 1.02
Tree 40 250000 set(125000) 1.3165 us/op 733.35 ns/op 1.80
Tree 40 250000 toArray() 21.805 ms/op 19.248 ms/op 1.13
Tree 40 250000 iterate all - toArray() + loop 23.005 ms/op 19.422 ms/op 1.18
Tree 40 250000 iterate all - get(i) 61.871 ms/op 60.574 ms/op 1.02
MutableVector 250000 create 9.6385 ms/op 10.912 ms/op 0.88
MutableVector 250000 get(125000) 6.4660 ns/op 7.3540 ns/op 0.88
MutableVector 250000 set(125000) 480.56 ns/op 233.65 ns/op 2.06
MutableVector 250000 toArray() 4.8503 ms/op 4.6253 ms/op 1.05
MutableVector 250000 iterate all - toArray() + loop 4.8890 ms/op 4.4357 ms/op 1.10
MutableVector 250000 iterate all - get(i) 1.6619 ms/op 1.7378 ms/op 0.96
Array 250000 create 4.4735 ms/op 4.3207 ms/op 1.04
Array 250000 clone - spread 2.0553 ms/op 1.7960 ms/op 1.14
Array 250000 get(125000) 0.45800 ns/op 0.46500 ns/op 0.98
Array 250000 set(125000) 0.48800 ns/op 0.47700 ns/op 1.02
Array 250000 iterate all - loop 114.27 us/op 92.672 us/op 1.23
effectiveBalanceIncrements clone Uint8Array 300000 63.646 us/op 38.460 us/op 1.65
effectiveBalanceIncrements clone MutableVector 300000 142.00 ns/op 133.00 ns/op 1.07
effectiveBalanceIncrements rw all Uint8Array 300000 211.53 us/op 211.71 us/op 1.00
effectiveBalanceIncrements rw all MutableVector 300000 126.86 ms/op 91.456 ms/op 1.39
phase0 afterProcessEpoch - 250000 vs - 7PWei 92.262 ms/op 97.275 ms/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 43.162 ms/op 43.945 ms/op 0.98
altair processEpoch - mainnet_e81889 439.32 ms/op 439.50 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 62.303 ms/op 73.329 ms/op 0.85
mainnet_e81889 - altair processJustificationAndFinalization 23.579 us/op 14.015 us/op 1.68
mainnet_e81889 - altair processInactivityUpdates 8.0568 ms/op 6.9989 ms/op 1.15
mainnet_e81889 - altair processRewardsAndPenalties 41.860 ms/op 41.222 ms/op 1.02
mainnet_e81889 - altair processRegistryUpdates 2.2290 us/op 1.8640 us/op 1.20
mainnet_e81889 - altair processSlashings 710.00 ns/op 812.00 ns/op 0.87
mainnet_e81889 - altair processEth1DataReset 1.5940 us/op 575.00 ns/op 2.77
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2173 ms/op 2.4997 ms/op 0.49
mainnet_e81889 - altair processSlashingsReset 4.7720 us/op 6.8780 us/op 0.69
mainnet_e81889 - altair processRandaoMixesReset 6.5330 us/op 7.2970 us/op 0.90
mainnet_e81889 - altair processHistoricalRootsUpdate 756.00 ns/op 641.00 ns/op 1.18
mainnet_e81889 - altair processParticipationFlagUpdates 3.2020 us/op 2.3640 us/op 1.35
mainnet_e81889 - altair processSyncCommitteeUpdates 651.00 ns/op 810.00 ns/op 0.80
mainnet_e81889 - altair afterProcessEpoch 94.292 ms/op 112.68 ms/op 0.84
capella processEpoch - mainnet_e217614 1.6852 s/op 1.4401 s/op 1.17
mainnet_e217614 - capella beforeProcessEpoch 284.76 ms/op 286.88 ms/op 0.99
mainnet_e217614 - capella processJustificationAndFinalization 24.532 us/op 16.452 us/op 1.49
mainnet_e217614 - capella processInactivityUpdates 21.585 ms/op 19.248 ms/op 1.12
mainnet_e217614 - capella processRewardsAndPenalties 235.12 ms/op 246.54 ms/op 0.95
mainnet_e217614 - capella processRegistryUpdates 19.571 us/op 14.596 us/op 1.34
mainnet_e217614 - capella processSlashings 402.00 ns/op 347.00 ns/op 1.16
mainnet_e217614 - capella processEth1DataReset 594.00 ns/op 349.00 ns/op 1.70
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.6409 ms/op 11.053 ms/op 0.51
mainnet_e217614 - capella processSlashingsReset 5.4750 us/op 8.8330 us/op 0.62
mainnet_e217614 - capella processRandaoMixesReset 5.8470 us/op 5.0850 us/op 1.15
mainnet_e217614 - capella processHistoricalRootsUpdate 712.00 ns/op 879.00 ns/op 0.81
mainnet_e217614 - capella processParticipationFlagUpdates 2.6490 us/op 3.1340 us/op 0.85
mainnet_e217614 - capella afterProcessEpoch 245.60 ms/op 314.47 ms/op 0.78
phase0 processEpoch - mainnet_e58758 388.01 ms/op 364.75 ms/op 1.06
mainnet_e58758 - phase0 beforeProcessEpoch 109.73 ms/op 127.01 ms/op 0.86
mainnet_e58758 - phase0 processJustificationAndFinalization 14.941 us/op 19.252 us/op 0.78
mainnet_e58758 - phase0 processRewardsAndPenalties 35.735 ms/op 36.423 ms/op 0.98
mainnet_e58758 - phase0 processRegistryUpdates 12.845 us/op 11.929 us/op 1.08
mainnet_e58758 - phase0 processSlashings 692.00 ns/op 383.00 ns/op 1.81
mainnet_e58758 - phase0 processEth1DataReset 473.00 ns/op 505.00 ns/op 0.94
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 946.04 us/op 991.31 us/op 0.95
mainnet_e58758 - phase0 processSlashingsReset 2.5140 us/op 4.0890 us/op 0.61
mainnet_e58758 - phase0 processRandaoMixesReset 5.0990 us/op 7.3400 us/op 0.69
mainnet_e58758 - phase0 processHistoricalRootsUpdate 499.00 ns/op 607.00 ns/op 0.82
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.7640 us/op 4.8440 us/op 0.57
mainnet_e58758 - phase0 afterProcessEpoch 82.287 ms/op 89.425 ms/op 0.92
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1670 ms/op 1.4396 ms/op 0.81
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9370 ms/op 2.1449 ms/op 0.90
altair processInactivityUpdates - 250000 normalcase 18.787 ms/op 18.924 ms/op 0.99
altair processInactivityUpdates - 250000 worstcase 16.905 ms/op 21.260 ms/op 0.80
phase0 processRegistryUpdates - 250000 normalcase 6.8840 us/op 9.4300 us/op 0.73
phase0 processRegistryUpdates - 250000 badcase_full_deposits 300.25 us/op 289.62 us/op 1.04
phase0 processRegistryUpdates - 250000 worstcase 0.5 111.07 ms/op 114.31 ms/op 0.97
altair processRewardsAndPenalties - 250000 normalcase 43.582 ms/op 45.700 ms/op 0.95
altair processRewardsAndPenalties - 250000 worstcase 43.733 ms/op 65.785 ms/op 0.66
phase0 getAttestationDeltas - 250000 normalcase 7.9942 ms/op 9.6050 ms/op 0.83
phase0 getAttestationDeltas - 250000 worstcase 7.8268 ms/op 11.642 ms/op 0.67
phase0 processSlashings - 250000 worstcase 98.263 us/op 102.58 us/op 0.96
altair processSyncCommitteeUpdates - 250000 123.06 ms/op 179.78 ms/op 0.68
BeaconState.hashTreeRoot - No change 282.00 ns/op 507.00 ns/op 0.56
BeaconState.hashTreeRoot - 1 full validator 121.39 us/op 175.07 us/op 0.69
BeaconState.hashTreeRoot - 32 full validator 1.2868 ms/op 1.9233 ms/op 0.67
BeaconState.hashTreeRoot - 512 full validator 10.315 ms/op 17.904 ms/op 0.58
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 111.86 us/op 196.01 us/op 0.57
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5424 ms/op 2.5191 ms/op 0.61
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.812 ms/op 32.824 ms/op 0.73
BeaconState.hashTreeRoot - 1 balances 105.91 us/op 134.62 us/op 0.79
BeaconState.hashTreeRoot - 32 balances 815.21 us/op 1.2079 ms/op 0.67
BeaconState.hashTreeRoot - 512 balances 8.0722 ms/op 12.975 ms/op 0.62
BeaconState.hashTreeRoot - 250000 balances 149.37 ms/op 190.83 ms/op 0.78
aggregationBits - 2048 els - zipIndexesInBitList 26.269 us/op 41.732 us/op 0.63
byteArrayEquals 32 54.847 ns/op 64.204 ns/op 0.85
Buffer.compare 32 46.465 ns/op 52.805 ns/op 0.88
byteArrayEquals 1024 1.6752 us/op 1.8491 us/op 0.91
Buffer.compare 1024 53.845 ns/op 61.445 ns/op 0.88
byteArrayEquals 16384 27.787 us/op 29.277 us/op 0.95
Buffer.compare 16384 247.50 ns/op 279.75 ns/op 0.88
byteArrayEquals 123687377 197.05 ms/op 212.44 ms/op 0.93
Buffer.compare 123687377 7.4859 ms/op 8.9582 ms/op 0.84
byteArrayEquals 32 - diff last byte 53.648 ns/op 54.916 ns/op 0.98
Buffer.compare 32 - diff last byte 47.027 ns/op 55.497 ns/op 0.85
byteArrayEquals 1024 - diff last byte 1.6187 us/op 1.7685 us/op 0.92
Buffer.compare 1024 - diff last byte 55.565 ns/op 62.152 ns/op 0.89
byteArrayEquals 16384 - diff last byte 25.789 us/op 28.866 us/op 0.89
Buffer.compare 16384 - diff last byte 235.46 ns/op 288.39 ns/op 0.82
byteArrayEquals 123687377 - diff last byte 193.35 ms/op 210.37 ms/op 0.92
Buffer.compare 123687377 - diff last byte 6.5017 ms/op 8.8891 ms/op 0.73
byteArrayEquals 32 - random bytes 5.2040 ns/op 5.6210 ns/op 0.93
Buffer.compare 32 - random bytes 47.469 ns/op 54.833 ns/op 0.87
byteArrayEquals 1024 - random bytes 5.1780 ns/op 7.3370 ns/op 0.71
Buffer.compare 1024 - random bytes 45.388 ns/op 51.563 ns/op 0.88
byteArrayEquals 16384 - random bytes 5.2360 ns/op 6.0820 ns/op 0.86
Buffer.compare 16384 - random bytes 45.473 ns/op 53.694 ns/op 0.85
byteArrayEquals 123687377 - random bytes 6.5200 ns/op 7.8100 ns/op 0.83
Buffer.compare 123687377 - random bytes 46.970 ns/op 54.650 ns/op 0.86
regular array get 100000 times 41.430 us/op 43.602 us/op 0.95
wrappedArray get 100000 times 33.395 us/op 36.436 us/op 0.92
arrayWithProxy get 100000 times 12.963 ms/op 14.761 ms/op 0.88
ssz.Root.equals 45.868 ns/op 51.417 ns/op 0.89
byteArrayEquals 45.212 ns/op 49.865 ns/op 0.91
Buffer.compare 10.459 ns/op 11.951 ns/op 0.88
shuffle list - 16384 els 6.2349 ms/op 6.9445 ms/op 0.90
shuffle list - 250000 els 91.871 ms/op 99.759 ms/op 0.92
processSlot - 1 slots 12.155 us/op 17.818 us/op 0.68
processSlot - 32 slots 2.5099 ms/op 3.4824 ms/op 0.72
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.976 ms/op 39.533 ms/op 0.94
getCommitteeAssignments - req 1 vs - 250000 vc 2.1735 ms/op 2.6162 ms/op 0.83
getCommitteeAssignments - req 100 vs - 250000 vc 4.1703 ms/op 4.9802 ms/op 0.84
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4404 ms/op 5.4003 ms/op 0.82
findModifiedValidators - 10000 modified validators 262.12 ms/op 345.76 ms/op 0.76
findModifiedValidators - 1000 modified validators 194.64 ms/op 249.88 ms/op 0.78
findModifiedValidators - 100 modified validators 199.98 ms/op 253.70 ms/op 0.79
findModifiedValidators - 10 modified validators 170.33 ms/op 293.37 ms/op 0.58
findModifiedValidators - 1 modified validators 169.52 ms/op 239.71 ms/op 0.71
findModifiedValidators - no difference 186.11 ms/op 225.06 ms/op 0.83
compare ViewDUs 3.0003 s/op 3.7701 s/op 0.80
compare each validator Uint8Array 1.5065 s/op 1.6611 s/op 0.91
compare ViewDU to Uint8Array 1.1129 s/op 1.4805 s/op 0.75
migrate state 1000000 validators, 24 modified, 0 new 585.85 ms/op 796.27 ms/op 0.74
migrate state 1000000 validators, 1700 modified, 1000 new 815.69 ms/op 1.0720 s/op 0.76
migrate state 1000000 validators, 3400 modified, 2000 new 953.27 ms/op 1.3014 s/op 0.73
migrate state 1500000 validators, 24 modified, 0 new 575.98 ms/op 865.61 ms/op 0.67
migrate state 1500000 validators, 1700 modified, 1000 new 816.22 ms/op 932.88 ms/op 0.87
migrate state 1500000 validators, 3400 modified, 2000 new 1.1477 s/op 1.2246 s/op 0.94
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.9100 ns/op 5.1500 ns/op 1.15
state getBlockRootAtSlot - 250000 vs - 7PWei 677.88 ns/op 829.81 ns/op 0.82
computeProposers - vc 250000 7.4455 ms/op 9.2172 ms/op 0.81
computeEpochShuffling - vc 250000 97.420 ms/op 109.03 ms/op 0.89
getNextSyncCommittee - vc 250000 126.50 ms/op 150.14 ms/op 0.84
computeSigningRoot for AttestationData 18.879 us/op 25.041 us/op 0.75
hash AttestationData serialized data then Buffer.toString(base64) 1.5769 us/op 1.6868 us/op 0.93
toHexString serialized data 944.96 ns/op 1.0742 us/op 0.88
Buffer.toString(base64) 184.38 ns/op 236.29 ns/op 0.78

by benchmarkbot/action

@wemeetagain
Copy link
Member

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

2 participants