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

refactor: move validator status type and util to @lodestar/types #7140

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 8, 2024

Motivation

This change allows other devs to reuse getValidatorStatus as it is currently not exported from beacon-node package and most users don't want this heavy package as part of their dependency tree.

There is also ongoing work to have a ssz api to return validators ethereum/beacon-APIs#449 but this means it won't include the status directly in the response and it needs to be reconstructed on the client side. Moving this function now makes later implementation of new api simpler.

Description

Move validator status type and util to @lodestar/types

@nflaig nflaig requested a review from a team as a code owner October 8, 2024 20:50
| "exited_slashed"
| "withdrawal_possible"
| "withdrawal_done";
export type {ValidatorStatus};
Copy link
Member Author

@nflaig nflaig Oct 8, 2024

Choose a reason for hiding this comment

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

re-export for backward compatibility

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.19%. Comparing base (c04157c) to head (a3d097e).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7140      +/-   ##
============================================
+ Coverage     49.16%   49.19%   +0.03%     
============================================
  Files           596      597       +1     
  Lines         39701    39725      +24     
  Branches       2069     2073       +4     
============================================
+ Hits          19518    19542      +24     
- Misses        20141    20142       +1     
+ Partials         42       41       -1     

Copy link
Contributor

github-actions bot commented Oct 8, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 9d2c3ac Previous: 955f456 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9906 ms/op 2.6992 ms/op 0.74
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.850 us/op 83.623 us/op 0.57
BLS verify - blst 878.50 us/op 1.2138 ms/op 0.72
BLS verifyMultipleSignatures 3 - blst 1.2405 ms/op 1.6246 ms/op 0.76
BLS verifyMultipleSignatures 8 - blst 2.1685 ms/op 2.6909 ms/op 0.81
BLS verifyMultipleSignatures 32 - blst 6.7996 ms/op 7.3591 ms/op 0.92
BLS verifyMultipleSignatures 64 - blst 9.4155 ms/op 12.645 ms/op 0.74
BLS verifyMultipleSignatures 128 - blst 17.515 ms/op 21.444 ms/op 0.82
BLS deserializing 10000 signatures 707.30 ms/op 780.55 ms/op 0.91
BLS deserializing 100000 signatures 7.1826 s/op 7.5982 s/op 0.95
BLS verifyMultipleSignatures - same message - 3 - blst 1.1270 ms/op 982.25 us/op 1.15
BLS verifyMultipleSignatures - same message - 8 - blst 1.1409 ms/op 1.0561 ms/op 1.08
BLS verifyMultipleSignatures - same message - 32 - blst 1.9653 ms/op 1.8045 ms/op 1.09
BLS verifyMultipleSignatures - same message - 64 - blst 2.8997 ms/op 2.7555 ms/op 1.05
BLS verifyMultipleSignatures - same message - 128 - blst 4.4079 ms/op 5.0303 ms/op 0.88
BLS aggregatePubkeys 32 - blst 20.424 us/op 22.495 us/op 0.91
BLS aggregatePubkeys 128 - blst 73.912 us/op 78.506 us/op 0.94
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 77.743 ms/op 72.670 ms/op 1.07
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 59.452 ms/op 71.417 ms/op 0.83
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 38.834 ms/op 38.668 ms/op 1.00
getSlashingsAndExits - default max 90.165 us/op 136.74 us/op 0.66
getSlashingsAndExits - 2k 302.10 us/op 569.73 us/op 0.53
proposeBlockBody type=full, size=empty 5.8617 ms/op 6.9997 ms/op 0.84
isKnown best case - 1 super set check 298.00 ns/op 599.00 ns/op 0.50
isKnown normal case - 2 super set checks 289.00 ns/op 659.00 ns/op 0.44
isKnown worse case - 16 super set checks 284.00 ns/op 657.00 ns/op 0.43
InMemoryCheckpointStateCache - add get delete 2.6420 us/op 3.7290 us/op 0.71
updateUnfinalizedPubkeys - updating 10 pubkeys 1.0973 ms/op 1.5876 ms/op 0.69
updateUnfinalizedPubkeys - updating 100 pubkeys 4.6053 ms/op 5.5220 ms/op 0.83
updateUnfinalizedPubkeys - updating 1000 pubkeys 58.272 ms/op 71.001 ms/op 0.82
validate api signedAggregateAndProof - struct 1.5890 ms/op 1.7179 ms/op 0.92
validate gossip signedAggregateAndProof - struct 1.4884 ms/op 1.8043 ms/op 0.82
batch validate gossip attestation - vc 640000 - chunk 32 138.89 us/op 149.80 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 64 119.78 us/op 132.88 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 128 116.19 us/op 124.15 us/op 0.94
batch validate gossip attestation - vc 640000 - chunk 256 111.89 us/op 120.17 us/op 0.93
pickEth1Vote - no votes 1.3018 ms/op 1.2757 ms/op 1.02
pickEth1Vote - max votes 12.010 ms/op 8.0565 ms/op 1.49
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.880 ms/op 18.072 ms/op 1.21
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 29.503 ms/op 21.410 ms/op 1.38
pickEth1Vote - Eth1Data fastSerialize value x2048 575.00 us/op 590.20 us/op 0.97
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.4903 ms/op 4.0914 ms/op 1.10
bytes32 toHexString 545.00 ns/op 580.00 ns/op 0.94
bytes32 Buffer.toString(hex) 271.00 ns/op 269.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 469.00 ns/op 466.00 ns/op 1.01
bytes32 Buffer.toString(hex) + 0x 279.00 ns/op 269.00 ns/op 1.04
Object access 1 prop 0.18000 ns/op 0.19800 ns/op 0.91
Map access 1 prop 0.14600 ns/op 0.14300 ns/op 1.02
Object get x1000 5.9890 ns/op 6.2200 ns/op 0.96
Map get x1000 6.9200 ns/op 6.7160 ns/op 1.03
Object set x1000 35.668 ns/op 46.023 ns/op 0.78
Map set x1000 26.891 ns/op 31.104 ns/op 0.86
Return object 10000 times 0.31320 ns/op 0.31420 ns/op 1.00
Throw Error 10000 times 3.5165 us/op 3.5402 us/op 0.99
toHex 176.25 ns/op 192.93 ns/op 0.91
Buffer.from 173.77 ns/op 174.08 ns/op 1.00
shared Buffer 92.885 ns/op 101.89 ns/op 0.91
fastMsgIdFn sha256 / 200 bytes 2.3830 us/op 2.4260 us/op 0.98
fastMsgIdFn h32 xxhash / 200 bytes 257.00 ns/op 294.00 ns/op 0.87
fastMsgIdFn h64 xxhash / 200 bytes 270.00 ns/op 274.00 ns/op 0.99
fastMsgIdFn sha256 / 1000 bytes 7.4410 us/op 7.6810 us/op 0.97
fastMsgIdFn h32 xxhash / 1000 bytes 420.00 ns/op 432.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 351.00 ns/op 364.00 ns/op 0.96
fastMsgIdFn sha256 / 10000 bytes 64.096 us/op 66.101 us/op 0.97
fastMsgIdFn h32 xxhash / 10000 bytes 1.8650 us/op 1.9100 us/op 0.98
fastMsgIdFn h64 xxhash / 10000 bytes 1.2190 us/op 1.2340 us/op 0.99
send data - 1000 256B messages 15.742 ms/op 14.963 ms/op 1.05
send data - 1000 512B messages 17.564 ms/op 19.967 ms/op 0.88
send data - 1000 1024B messages 28.709 ms/op 33.145 ms/op 0.87
send data - 1000 1200B messages 27.941 ms/op 32.082 ms/op 0.87
send data - 1000 2048B messages 33.363 ms/op 36.532 ms/op 0.91
send data - 1000 4096B messages 31.645 ms/op 39.694 ms/op 0.80
send data - 1000 16384B messages 72.782 ms/op 82.822 ms/op 0.88
send data - 1000 65536B messages 234.60 ms/op 241.41 ms/op 0.97
enrSubnets - fastDeserialize 64 bits 1.6440 us/op 1.5430 us/op 1.07
enrSubnets - ssz BitVector 64 bits 484.00 ns/op 477.00 ns/op 1.01
enrSubnets - fastDeserialize 4 bits 215.00 ns/op 212.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 482.00 ns/op 481.00 ns/op 1.00
prioritizePeers score -10:0 att 32-0.1 sync 2-0 205.08 us/op 206.39 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 240.07 us/op 232.66 us/op 1.03
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 354.02 us/op 312.48 us/op 1.13
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 505.44 us/op 516.73 us/op 0.98
prioritizePeers score 0:0 att 64-1 sync 4-1 925.22 us/op 931.36 us/op 0.99
array of 16000 items push then shift 1.6618 us/op 1.7495 us/op 0.95
LinkedList of 16000 items push then shift 8.5270 ns/op 8.3800 ns/op 1.02
array of 16000 items push then pop 84.300 ns/op 140.97 ns/op 0.60
LinkedList of 16000 items push then pop 8.1750 ns/op 7.6830 ns/op 1.06
array of 24000 items push then shift 2.5525 us/op 2.5900 us/op 0.99
LinkedList of 24000 items push then shift 9.4440 ns/op 8.4230 ns/op 1.12
array of 24000 items push then pop 170.73 ns/op 196.82 ns/op 0.87
LinkedList of 24000 items push then pop 11.722 ns/op 8.5480 ns/op 1.37
intersect bitArray bitLen 8 8.6860 ns/op 6.7910 ns/op 1.28
intersect array and set length 8 105.95 ns/op 68.412 ns/op 1.55
intersect bitArray bitLen 128 41.832 ns/op 31.175 ns/op 1.34
intersect array and set length 128 1.0842 us/op 978.64 ns/op 1.11
bitArray.getTrueBitIndexes() bitLen 128 2.9000 us/op 2.3820 us/op 1.22
bitArray.getTrueBitIndexes() bitLen 248 4.8290 us/op 4.5330 us/op 1.07
bitArray.getTrueBitIndexes() bitLen 512 10.977 us/op 10.675 us/op 1.03
Buffer.concat 32 items 1.2090 us/op 1.1300 us/op 1.07
Uint8Array.set 32 items 1.8410 us/op 1.7500 us/op 1.05
Buffer.copy 2.1860 us/op 1.9550 us/op 1.12
Uint8Array.set - with subarray 3.4860 us/op 3.0170 us/op 1.16
Uint8Array.set - without subarray 1.8460 us/op 1.5520 us/op 1.19
getUint32 - dataview 306.00 ns/op 301.00 ns/op 1.02
getUint32 - manual 252.00 ns/op 216.00 ns/op 1.17
Set add up to 64 items then delete first 3.0839 us/op 2.7978 us/op 1.10
OrderedSet add up to 64 items then delete first 5.4626 us/op 4.2687 us/op 1.28
Set add up to 64 items then delete last 3.6505 us/op 3.2033 us/op 1.14
OrderedSet add up to 64 items then delete last 5.6267 us/op 4.6594 us/op 1.21
Set add up to 64 items then delete middle 3.4931 us/op 3.2741 us/op 1.07
OrderedSet add up to 64 items then delete middle 7.1571 us/op 6.5774 us/op 1.09
Set add up to 128 items then delete first 6.4281 us/op 6.5325 us/op 0.98
OrderedSet add up to 128 items then delete first 10.583 us/op 10.231 us/op 1.03
Set add up to 128 items then delete last 6.5237 us/op 6.4133 us/op 1.02
OrderedSet add up to 128 items then delete last 9.2206 us/op 9.7123 us/op 0.95
Set add up to 128 items then delete middle 5.6152 us/op 6.1692 us/op 0.91
OrderedSet add up to 128 items then delete middle 16.770 us/op 16.703 us/op 1.00
Set add up to 256 items then delete first 12.375 us/op 13.521 us/op 0.92
OrderedSet add up to 256 items then delete first 20.745 us/op 21.222 us/op 0.98
Set add up to 256 items then delete last 12.068 us/op 12.403 us/op 0.97
OrderedSet add up to 256 items then delete last 19.566 us/op 16.901 us/op 1.16
Set add up to 256 items then delete middle 11.849 us/op 11.884 us/op 1.00
OrderedSet add up to 256 items then delete middle 46.657 us/op 47.955 us/op 0.97
transfer serialized Status (84 B) 1.4220 us/op 1.5470 us/op 0.92
copy serialized Status (84 B) 1.2420 us/op 1.3170 us/op 0.94
transfer serialized SignedVoluntaryExit (112 B) 1.6070 us/op 1.6140 us/op 1.00
copy serialized SignedVoluntaryExit (112 B) 1.2580 us/op 1.3850 us/op 0.91
transfer serialized ProposerSlashing (416 B) 1.9140 us/op 2.1460 us/op 0.89
copy serialized ProposerSlashing (416 B) 1.8700 us/op 1.8480 us/op 1.01
transfer serialized Attestation (485 B) 2.0880 us/op 2.1090 us/op 0.99
copy serialized Attestation (485 B) 2.3330 us/op 1.9650 us/op 1.19
transfer serialized AttesterSlashing (33232 B) 2.8450 us/op 2.0930 us/op 1.36
copy serialized AttesterSlashing (33232 B) 7.7240 us/op 10.179 us/op 0.76
transfer serialized Small SignedBeaconBlock (128000 B) 3.2310 us/op 3.9160 us/op 0.83
copy serialized Small SignedBeaconBlock (128000 B) 22.768 us/op 26.182 us/op 0.87
transfer serialized Avg SignedBeaconBlock (200000 B) 5.4040 us/op 3.9210 us/op 1.38
copy serialized Avg SignedBeaconBlock (200000 B) 36.197 us/op 30.642 us/op 1.18
transfer serialized BlobsSidecar (524380 B) 4.3210 us/op 5.5580 us/op 0.78
copy serialized BlobsSidecar (524380 B) 91.083 us/op 228.31 us/op 0.40
transfer serialized Big SignedBeaconBlock (1000000 B) 4.7680 us/op 5.5020 us/op 0.87
copy serialized Big SignedBeaconBlock (1000000 B) 337.27 us/op 201.94 us/op 1.67
pass gossip attestations to forkchoice per slot 3.7494 ms/op 3.1845 ms/op 1.18
forkChoice updateHead vc 100000 bc 64 eq 0 500.02 us/op 541.70 us/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 0 4.4350 ms/op 5.2734 ms/op 0.84
forkChoice updateHead vc 1000000 bc 64 eq 0 5.6698 ms/op 6.2213 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 3.2717 ms/op 3.4941 ms/op 0.94
forkChoice updateHead vc 600000 bc 1200 eq 0 3.3508 ms/op 3.8238 ms/op 0.88
forkChoice updateHead vc 600000 bc 7200 eq 0 3.9448 ms/op 4.1405 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 1000 11.017 ms/op 11.632 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 10000 11.062 ms/op 11.876 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 300000 16.693 ms/op 21.898 ms/op 0.76
computeDeltas 500000 validators 300 proto nodes 3.9209 ms/op 3.9925 ms/op 0.98
computeDeltas 500000 validators 1200 proto nodes 3.8140 ms/op 3.8194 ms/op 1.00
computeDeltas 500000 validators 7200 proto nodes 3.5680 ms/op 3.8255 ms/op 0.93
computeDeltas 750000 validators 300 proto nodes 5.3193 ms/op 5.6028 ms/op 0.95
computeDeltas 750000 validators 1200 proto nodes 5.3270 ms/op 5.2703 ms/op 1.01
computeDeltas 750000 validators 7200 proto nodes 5.5792 ms/op 5.4725 ms/op 1.02
computeDeltas 1400000 validators 300 proto nodes 10.354 ms/op 11.326 ms/op 0.91
computeDeltas 1400000 validators 1200 proto nodes 10.140 ms/op 11.345 ms/op 0.89
computeDeltas 1400000 validators 7200 proto nodes 10.280 ms/op 10.578 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 15.884 ms/op 18.161 ms/op 0.87
computeDeltas 2100000 validators 1200 proto nodes 15.282 ms/op 20.763 ms/op 0.74
computeDeltas 2100000 validators 7200 proto nodes 15.229 ms/op 19.405 ms/op 0.78
altair processAttestation - 250000 vs - 7PWei normalcase 2.7331 ms/op 2.0769 ms/op 1.32
altair processAttestation - 250000 vs - 7PWei worstcase 2.8012 ms/op 2.9500 ms/op 0.95
altair processAttestation - setStatus - 1/6 committees join 87.562 us/op 89.186 us/op 0.98
altair processAttestation - setStatus - 1/3 committees join 382.71 us/op 197.81 us/op 1.93
altair processAttestation - setStatus - 1/2 committees join 249.77 us/op 273.77 us/op 0.91
altair processAttestation - setStatus - 2/3 committees join 578.41 us/op 372.59 us/op 1.55
altair processAttestation - setStatus - 4/5 committees join 489.04 us/op 503.82 us/op 0.97
altair processAttestation - setStatus - 100% committees join 552.62 us/op 606.59 us/op 0.91
altair processBlock - 250000 vs - 7PWei normalcase 6.2659 ms/op 4.6375 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.047 ms/op 28.975 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase 41.090 ms/op 44.338 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.596 ms/op 73.275 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5264 ms/op 1.9194 ms/op 1.32
phase0 processBlock - 250000 vs - 7PWei worstcase 23.786 ms/op 23.576 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 359.15 us/op 321.73 us/op 1.12
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.0500 us/op 4.2930 us/op 1.41
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 40.464 us/op 45.727 us/op 0.88
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.660 us/op 10.883 us/op 1.35
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.8140 us/op 5.3800 us/op 1.27
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 165.05 us/op 194.82 us/op 0.85
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3068 ms/op 2.1534 ms/op 0.61
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8493 ms/op 2.1520 ms/op 0.86
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5706 ms/op 2.3633 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6714 ms/op 3.6653 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9687 ms/op 2.3727 ms/op 0.83
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7408 ms/op 4.0687 ms/op 0.92
Tree 40 250000 create 244.92 ms/op 255.35 ms/op 0.96
Tree 40 250000 get(125000) 151.88 ns/op 147.71 ns/op 1.03
Tree 40 250000 set(125000) 722.91 ns/op 725.67 ns/op 1.00
Tree 40 250000 toArray() 20.363 ms/op 20.899 ms/op 0.97
Tree 40 250000 iterate all - toArray() + loop 18.642 ms/op 20.446 ms/op 0.91
Tree 40 250000 iterate all - get(i) 54.788 ms/op 63.814 ms/op 0.86
Array 250000 create 3.0481 ms/op 3.4939 ms/op 0.87
Array 250000 clone - spread 1.3839 ms/op 1.6056 ms/op 0.86
Array 250000 get(125000) 0.43000 ns/op 0.44100 ns/op 0.98
Array 250000 set(125000) 0.44700 ns/op 0.44900 ns/op 1.00
Array 250000 iterate all - loop 93.489 us/op 107.96 us/op 0.87
phase0 afterProcessEpoch - 250000 vs - 7PWei 93.833 ms/op 103.03 ms/op 0.91
Array.fill - length 1000000 3.3861 ms/op 3.9829 ms/op 0.85
Array push - length 1000000 17.540 ms/op 19.235 ms/op 0.91
Array.get 0.27545 ns/op 0.30119 ns/op 0.91
Uint8Array.get 0.43713 ns/op 0.46587 ns/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.486 ms/op 21.443 ms/op 0.77
altair processEpoch - mainnet_e81889 329.74 ms/op 383.45 ms/op 0.86
mainnet_e81889 - altair beforeProcessEpoch 18.957 ms/op 21.916 ms/op 0.86
mainnet_e81889 - altair processJustificationAndFinalization 19.909 us/op 17.536 us/op 1.14
mainnet_e81889 - altair processInactivityUpdates 5.0623 ms/op 6.3149 ms/op 0.80
mainnet_e81889 - altair processRewardsAndPenalties 53.576 ms/op 46.394 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 2.4320 us/op 2.0400 us/op 1.19
mainnet_e81889 - altair processSlashings 673.00 ns/op 496.00 ns/op 1.36
mainnet_e81889 - altair processEth1DataReset 597.00 ns/op 366.00 ns/op 1.63
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.3316 ms/op 1.9469 ms/op 1.20
mainnet_e81889 - altair processSlashingsReset 5.4270 us/op 5.6070 us/op 0.97
mainnet_e81889 - altair processRandaoMixesReset 7.2740 us/op 6.7980 us/op 1.07
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0140 us/op 786.00 ns/op 1.29
mainnet_e81889 - altair processParticipationFlagUpdates 3.2150 us/op 2.4910 us/op 1.29
mainnet_e81889 - altair processSyncCommitteeUpdates 984.00 ns/op 692.00 ns/op 1.42
mainnet_e81889 - altair afterProcessEpoch 92.690 ms/op 100.12 ms/op 0.93
capella processEpoch - mainnet_e217614 1.1790 s/op 1.3787 s/op 0.86
mainnet_e217614 - capella beforeProcessEpoch 71.186 ms/op 89.419 ms/op 0.80
mainnet_e217614 - capella processJustificationAndFinalization 25.663 us/op 36.957 us/op 0.69
mainnet_e217614 - capella processInactivityUpdates 16.416 ms/op 22.899 ms/op 0.72
mainnet_e217614 - capella processRewardsAndPenalties 237.27 ms/op 260.52 ms/op 0.91
mainnet_e217614 - capella processRegistryUpdates 19.567 us/op 21.824 us/op 0.90
mainnet_e217614 - capella processSlashings 645.00 ns/op 847.00 ns/op 0.76
mainnet_e217614 - capella processEth1DataReset 1.2140 us/op 781.00 ns/op 1.55
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.655 ms/op 19.327 ms/op 0.81
mainnet_e217614 - capella processSlashingsReset 5.2040 us/op 13.662 us/op 0.38
mainnet_e217614 - capella processRandaoMixesReset 4.5630 us/op 11.736 us/op 0.39
mainnet_e217614 - capella processHistoricalRootsUpdate 936.00 ns/op 1.2010 us/op 0.78
mainnet_e217614 - capella processParticipationFlagUpdates 3.2100 us/op 5.2070 us/op 0.62
mainnet_e217614 - capella afterProcessEpoch 233.15 ms/op 299.55 ms/op 0.78
phase0 processEpoch - mainnet_e58758 431.84 ms/op 619.57 ms/op 0.70
mainnet_e58758 - phase0 beforeProcessEpoch 105.62 ms/op 149.90 ms/op 0.70
mainnet_e58758 - phase0 processJustificationAndFinalization 18.839 us/op 35.665 us/op 0.53
mainnet_e58758 - phase0 processRewardsAndPenalties 41.676 ms/op 53.966 ms/op 0.77
mainnet_e58758 - phase0 processRegistryUpdates 10.210 us/op 21.931 us/op 0.47
mainnet_e58758 - phase0 processSlashings 495.00 ns/op 1.1580 us/op 0.43
mainnet_e58758 - phase0 processEth1DataReset 325.00 ns/op 891.00 ns/op 0.36
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.6008 ms/op 2.0086 ms/op 0.80
mainnet_e58758 - phase0 processSlashingsReset 4.4470 us/op 7.8480 us/op 0.57
mainnet_e58758 - phase0 processRandaoMixesReset 9.7270 us/op 18.442 us/op 0.53
mainnet_e58758 - phase0 processHistoricalRootsUpdate 836.00 ns/op 1.3150 us/op 0.64
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.1210 us/op 11.698 us/op 0.44
mainnet_e58758 - phase0 afterProcessEpoch 82.226 ms/op 108.20 ms/op 0.76
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9203 ms/op 2.9970 ms/op 0.64
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.2355 ms/op 4.3195 ms/op 0.75
altair processInactivityUpdates - 250000 normalcase 19.567 ms/op 27.712 ms/op 0.71
altair processInactivityUpdates - 250000 worstcase 21.548 ms/op 30.270 ms/op 0.71
phase0 processRegistryUpdates - 250000 normalcase 12.759 us/op 17.334 us/op 0.74
phase0 processRegistryUpdates - 250000 badcase_full_deposits 364.73 us/op 482.31 us/op 0.76
phase0 processRegistryUpdates - 250000 worstcase 0.5 162.02 ms/op 281.47 ms/op 0.58
altair processRewardsAndPenalties - 250000 normalcase 55.194 ms/op 55.808 ms/op 0.99
altair processRewardsAndPenalties - 250000 worstcase 43.814 ms/op 49.132 ms/op 0.89
phase0 getAttestationDeltas - 250000 normalcase 8.4934 ms/op 10.406 ms/op 0.82
phase0 getAttestationDeltas - 250000 worstcase 7.7054 ms/op 9.6373 ms/op 0.80
phase0 processSlashings - 250000 worstcase 120.13 us/op 118.56 us/op 1.01
altair processSyncCommitteeUpdates - 250000 132.22 ms/op 157.93 ms/op 0.84
BeaconState.hashTreeRoot - No change 249.00 ns/op 271.00 ns/op 0.92
BeaconState.hashTreeRoot - 1 full validator 106.97 us/op 146.61 us/op 0.73
BeaconState.hashTreeRoot - 32 full validator 1.1054 ms/op 1.3878 ms/op 0.80
BeaconState.hashTreeRoot - 512 full validator 17.329 ms/op 14.720 ms/op 1.18
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 175.81 us/op 175.66 us/op 1.00
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0737 ms/op 2.5143 ms/op 0.82
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 33.159 ms/op 37.911 ms/op 0.87
BeaconState.hashTreeRoot - 1 balances 122.94 us/op 166.37 us/op 0.74
BeaconState.hashTreeRoot - 32 balances 1.3552 ms/op 1.2470 ms/op 1.09
BeaconState.hashTreeRoot - 512 balances 11.832 ms/op 13.686 ms/op 0.86
BeaconState.hashTreeRoot - 250000 balances 240.59 ms/op 259.81 ms/op 0.93
aggregationBits - 2048 els - zipIndexesInBitList 53.521 us/op 42.815 us/op 1.25
byteArrayEquals 32 58.932 ns/op 61.558 ns/op 0.96
Buffer.compare 32 18.634 ns/op 20.071 ns/op 0.93
byteArrayEquals 1024 1.6873 us/op 1.7422 us/op 0.97
Buffer.compare 1024 29.799 ns/op 31.362 ns/op 0.95
byteArrayEquals 16384 29.303 us/op 29.834 us/op 0.98
Buffer.compare 16384 217.11 ns/op 249.29 ns/op 0.87
byteArrayEquals 123687377 199.59 ms/op 232.09 ms/op 0.86
Buffer.compare 123687377 10.039 ms/op 12.033 ms/op 0.83
byteArrayEquals 32 - diff last byte 57.240 ns/op 58.707 ns/op 0.98
Buffer.compare 32 - diff last byte 18.482 ns/op 19.520 ns/op 0.95
byteArrayEquals 1024 - diff last byte 1.6786 us/op 1.8377 us/op 0.91
Buffer.compare 1024 - diff last byte 26.387 ns/op 32.649 ns/op 0.81
byteArrayEquals 16384 - diff last byte 25.725 us/op 29.322 us/op 0.88
Buffer.compare 16384 - diff last byte 203.46 ns/op 232.58 ns/op 0.87
byteArrayEquals 123687377 - diff last byte 190.21 ms/op 206.71 ms/op 0.92
Buffer.compare 123687377 - diff last byte 6.1210 ms/op 8.6365 ms/op 0.71
byteArrayEquals 32 - random bytes 4.9160 ns/op 5.6910 ns/op 0.86
Buffer.compare 32 - random bytes 16.404 ns/op 19.325 ns/op 0.85
byteArrayEquals 1024 - random bytes 4.9190 ns/op 5.5020 ns/op 0.89
Buffer.compare 1024 - random bytes 16.407 ns/op 18.968 ns/op 0.86
byteArrayEquals 16384 - random bytes 4.9390 ns/op 5.4570 ns/op 0.91
Buffer.compare 16384 - random bytes 16.445 ns/op 18.556 ns/op 0.89
byteArrayEquals 123687377 - random bytes 6.2000 ns/op 6.8000 ns/op 0.91
Buffer.compare 123687377 - random bytes 17.620 ns/op 20.330 ns/op 0.87
regular array get 100000 times 34.649 us/op 34.977 us/op 0.99
wrappedArray get 100000 times 32.586 us/op 34.533 us/op 0.94
arrayWithProxy get 100000 times 13.400 ms/op 14.612 ms/op 0.92
ssz.Root.equals 45.788 ns/op 50.925 ns/op 0.90
byteArrayEquals 45.282 ns/op 50.450 ns/op 0.90
Buffer.compare 10.444 ns/op 11.439 ns/op 0.91
shuffle list - 16384 els 6.3955 ms/op 6.8278 ms/op 0.94
shuffle list - 250000 els 94.492 ms/op 101.76 ms/op 0.93
processSlot - 1 slots 17.138 us/op 14.441 us/op 1.19
processSlot - 32 slots 2.8014 ms/op 3.6121 ms/op 0.78
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.667 ms/op 37.794 ms/op 1.08
getCommitteeAssignments - req 1 vs - 250000 vc 2.1920 ms/op 2.2400 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 4.2530 ms/op 4.3516 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5649 ms/op 4.6781 ms/op 0.98
findModifiedValidators - 10000 modified validators 250.10 ms/op 260.21 ms/op 0.96
findModifiedValidators - 1000 modified validators 174.94 ms/op 193.68 ms/op 0.90
findModifiedValidators - 100 modified validators 146.84 ms/op 222.48 ms/op 0.66
findModifiedValidators - 10 modified validators 210.96 ms/op 203.71 ms/op 1.04
findModifiedValidators - 1 modified validators 166.61 ms/op 181.92 ms/op 0.92
findModifiedValidators - no difference 175.05 ms/op 161.48 ms/op 1.08
compare ViewDUs 3.6899 s/op 3.1113 s/op 1.19
compare each validator Uint8Array 1.5285 s/op 1.3995 s/op 1.09
compare ViewDU to Uint8Array 1.3224 s/op 1.0815 s/op 1.22
migrate state 1000000 validators, 24 modified, 0 new 989.15 ms/op 896.31 ms/op 1.10
migrate state 1000000 validators, 1700 modified, 1000 new 1.2276 s/op 1.0928 s/op 1.12
migrate state 1000000 validators, 3400 modified, 2000 new 1.4607 s/op 1.3073 s/op 1.12
migrate state 1500000 validators, 24 modified, 0 new 960.59 ms/op 953.91 ms/op 1.01
migrate state 1500000 validators, 1700 modified, 1000 new 1.1249 s/op 1.1992 s/op 0.94
migrate state 1500000 validators, 3400 modified, 2000 new 1.3805 s/op 1.4831 s/op 0.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3000 ns/op 5.1000 ns/op 0.84
state getBlockRootAtSlot - 250000 vs - 7PWei 642.85 ns/op 693.59 ns/op 0.93
computeProposers - vc 250000 6.9341 ms/op 8.4409 ms/op 0.82
computeEpochShuffling - vc 250000 92.653 ms/op 105.68 ms/op 0.88
getNextSyncCommittee - vc 250000 120.78 ms/op 146.38 ms/op 0.83
computeSigningRoot for AttestationData 25.553 us/op 26.228 us/op 0.97
hash AttestationData serialized data then Buffer.toString(base64) 1.6133 us/op 1.7090 us/op 0.94
toHexString serialized data 919.67 ns/op 1.1483 us/op 0.80
Buffer.toString(base64) 175.00 ns/op 247.35 ns/op 0.71
nodejs block root to RootHex using toHex 157.12 ns/op 194.47 ns/op 0.81
nodejs block root to RootHex using toRootHex 93.074 ns/op 117.65 ns/op 0.79
browser block root to RootHex using the deprecated toHexString 227.07 ns/op 299.25 ns/op 0.76
browser block root to RootHex using toHex 181.86 ns/op 271.23 ns/op 0.67
browser block root to RootHex using toRootHex 160.84 ns/op 187.71 ns/op 0.86

by benchmarkbot/action

@nflaig nflaig merged commit 068fbae into unstable Oct 9, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/move-validator-status branch October 9, 2024 08:43
@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.

2 participants