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: remove duties when deleting remote key via keymanager #6141

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Nov 29, 2023

Motivation

Duties should be removed if key was deleted from in-memory store.

This prevents errors such as in case doppelganger protection is enabled

error: Error signing attestation slot=7063462, index=25, head=0x45243768b4c135c1cc6d426b06ce9aaf5f93e606f828d4f1a90a30ffeb462fc3, validatorIndex=453228 - Doppelganger state for key 0xa5920d02398e0e9ade09a9e10b741dd47ffcccd1d468147978560dab20181562d84dc120126fe38aafd4a19456c6e51b is not safe
Error: Doppelganger state for key 0xa5920d02398e0e9ade09a9e10b741dd47ffcccd1d468147978560dab20181562d84dc120126fe38aafd4a19456c6e51b is not safe
    at ValidatorStore.assertDoppelgangerSafe (file:///usr/app/packages/validator/src/services/validatorStore.ts:737:13)
    at ValidatorStore.signAttestation (file:///usr/app/packages/validator/src/services/validatorStore.ts:446:10)
    at file:///usr/app/packages/validator/src/services/attestation.ts:195:61
    at Array.map (<anonymous>)
    at AttestationService.signAndPublishAttestations (file:///usr/app/packages/validator/src/services/attestation.ts:189:14)
    at AttestationService.runAttestationTasksGrouped (file:///usr/app/packages/validator/src/services/attestation.ts:141:16)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at AttestationService.runAttestationTasks (file:///usr/app/packages/validator/src/services/attestation.ts:103:9)
    at Clock.runAtMostEvery (file:///usr/app/packages/validator/src/util/clock.ts:96:7)

or if doppelganger protection is not enabled, it would throw an error during getSignature call

error: Error signing aggregateAndProofs slot=7063462, index=25, validatorIndex=453228 - Validator pubkey 0xa5920d02398e0e9ade09a9e10b741dd47ffcccd1d468147978560dab20181562d84dc120126fe38aafd4a19456c6e51b not known
Error: Validator pubkey 0xa5920d02398e0e9ade09a9e10b741dd47ffcccd1d468147978560dab20181562d84dc120126fe38aafd4a19456c6e51b not known
    at ValidatorStore.getSignature (file:///usr/app/packages/validator/src/services/validatorStore.ts:679:13)
    at ValidatorStore.signAggregateAndProof (file:///usr/app/packages/validator/src/services/validatorStore.ts:500:29)
    at file:///usr/app/packages/validator/src/services/attestation.ts:275:41
    at Array.map (<anonymous>)
    at AttestationService.produceAndPublishAggregates (file:///usr/app/packages/validator/src/services/attestation.ts:269:14)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at AttestationService.runAttestationTasksGrouped (file:///usr/app/packages/validator/src/services/attestation.ts:152:5)
    at AttestationService.runAttestationTasks (file:///usr/app/packages/validator/src/services/attestation.ts:103:9)
    at Clock.runAtMostEvery (file:///usr/app/packages/validator/src/util/clock.ts:96:7)
Nov-29 14:52:36.000[]                debug: HttpClient request routeId=getProposerDuties

Description

Remove duties when deleting remote key via keymanager

@nflaig nflaig requested a review from a team as a code owner November 29, 2023 17:47
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 4a1e008 Previous: 248b64c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 472.63 us/op 721.34 us/op 0.66
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 98.253 us/op 58.808 us/op 1.67
BLS verify - blst-native 1.4189 ms/op 1.0515 ms/op 1.35
BLS verifyMultipleSignatures 3 - blst-native 2.8492 ms/op 2.2681 ms/op 1.26
BLS verifyMultipleSignatures 8 - blst-native 6.4926 ms/op 4.9597 ms/op 1.31
BLS verifyMultipleSignatures 32 - blst-native 22.515 ms/op 18.263 ms/op 1.23
BLS verifyMultipleSignatures 64 - blst-native 43.820 ms/op 36.052 ms/op 1.22
BLS verifyMultipleSignatures 128 - blst-native 86.997 ms/op 72.656 ms/op 1.20
BLS deserializing 10000 signatures 919.48 ms/op 782.41 ms/op 1.18
BLS deserializing 100000 signatures 9.2929 s/op 7.8599 s/op 1.18
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3442 ms/op 1.0825 ms/op 1.24
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.6769 ms/op 1.2389 ms/op 1.35
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.8024 ms/op 1.9340 ms/op 1.45
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.4704 ms/op 3.5968 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst-native 7.2330 ms/op 4.7065 ms/op 1.54
BLS aggregatePubkeys 32 - blst-native 27.795 us/op 21.629 us/op 1.29
BLS aggregatePubkeys 128 - blst-native 101.64 us/op 84.790 us/op 1.20
getAttestationsForBlock 55.649 ms/op 38.722 ms/op 1.44
isKnown best case - 1 super set check 668.00 ns/op 402.00 ns/op 1.66
isKnown normal case - 2 super set checks 680.00 ns/op 372.00 ns/op 1.83
isKnown worse case - 16 super set checks 645.00 ns/op 346.00 ns/op 1.86
CheckpointStateCache - add get delete 7.2270 us/op 4.1430 us/op 1.74
validate api signedAggregateAndProof - struct 2.8554 ms/op 2.3151 ms/op 1.23
validate gossip signedAggregateAndProof - struct 2.8496 ms/op 2.3302 ms/op 1.22
validate gossip attestation - vc 640000 1.4096 ms/op 1.1339 ms/op 1.24
batch validate gossip attestation - vc 640000 - chunk 32 167.48 us/op 139.84 us/op 1.20
batch validate gossip attestation - vc 640000 - chunk 64 141.64 us/op 127.15 us/op 1.11
batch validate gossip attestation - vc 640000 - chunk 128 130.67 us/op 119.58 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 256 130.63 us/op 112.93 us/op 1.16
pickEth1Vote - no votes 1.3224 ms/op 883.95 us/op 1.50
pickEth1Vote - max votes 8.8556 ms/op 5.8068 ms/op 1.53
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.616 ms/op 11.492 ms/op 1.53
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.867 ms/op 18.392 ms/op 1.24
pickEth1Vote - Eth1Data fastSerialize value x2048 592.16 us/op 418.07 us/op 1.42
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.3943 ms/op 4.5388 ms/op 0.97
bytes32 toHexString 563.00 ns/op 453.00 ns/op 1.24
bytes32 Buffer.toString(hex) 284.00 ns/op 343.00 ns/op 0.83
bytes32 Buffer.toString(hex) from Uint8Array 512.00 ns/op 429.00 ns/op 1.19
bytes32 Buffer.toString(hex) + 0x 287.00 ns/op 315.00 ns/op 0.91
Object access 1 prop 0.17300 ns/op 0.19900 ns/op 0.87
Map access 1 prop 0.14700 ns/op 0.18400 ns/op 0.80
Object get x1000 8.1780 ns/op 5.6730 ns/op 1.44
Map get x1000 0.85500 ns/op 0.75100 ns/op 1.14
Object set x1000 57.590 ns/op 25.555 ns/op 2.25
Map set x1000 41.038 ns/op 17.117 ns/op 2.40
Return object 10000 times 0.24700 ns/op 0.22740 ns/op 1.09
Throw Error 10000 times 3.9728 us/op 2.8388 us/op 1.40
fastMsgIdFn sha256 / 200 bytes 3.4320 us/op 1.9610 us/op 1.75
fastMsgIdFn h32 xxhash / 200 bytes 316.00 ns/op 301.00 ns/op 1.05
fastMsgIdFn h64 xxhash / 200 bytes 370.00 ns/op 346.00 ns/op 1.07
fastMsgIdFn sha256 / 1000 bytes 11.570 us/op 6.1810 us/op 1.87
fastMsgIdFn h32 xxhash / 1000 bytes 470.00 ns/op 426.00 ns/op 1.10
fastMsgIdFn h64 xxhash / 1000 bytes 436.00 ns/op 414.00 ns/op 1.05
fastMsgIdFn sha256 / 10000 bytes 103.70 us/op 53.542 us/op 1.94
fastMsgIdFn h32 xxhash / 10000 bytes 1.9970 us/op 1.8330 us/op 1.09
fastMsgIdFn h64 xxhash / 10000 bytes 1.3860 us/op 1.2470 us/op 1.11
send data - 1000 256B messages 21.007 ms/op 11.414 ms/op 1.84
send data - 1000 512B messages 29.427 ms/op 15.324 ms/op 1.92
send data - 1000 1024B messages 43.576 ms/op 22.410 ms/op 1.94
send data - 1000 1200B messages 36.856 ms/op 26.448 ms/op 1.39
send data - 1000 2048B messages 40.470 ms/op 33.577 ms/op 1.21
send data - 1000 4096B messages 41.852 ms/op 30.003 ms/op 1.39
send data - 1000 16384B messages 110.70 ms/op 82.027 ms/op 1.35
send data - 1000 65536B messages 427.62 ms/op 445.16 ms/op 0.96
enrSubnets - fastDeserialize 64 bits 1.4740 us/op 1.0110 us/op 1.46
enrSubnets - ssz BitVector 64 bits 545.00 ns/op 410.00 ns/op 1.33
enrSubnets - fastDeserialize 4 bits 212.00 ns/op 203.00 ns/op 1.04
enrSubnets - ssz BitVector 4 bits 490.00 ns/op 410.00 ns/op 1.20
prioritizePeers score -10:0 att 32-0.1 sync 2-0 112.85 us/op 65.784 us/op 1.72
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 139.46 us/op 77.930 us/op 1.79
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 183.60 us/op 110.21 us/op 1.67
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 336.65 us/op 191.78 us/op 1.76
prioritizePeers score 0:0 att 64-1 sync 4-1 372.89 us/op 206.89 us/op 1.80
array of 16000 items push then shift 1.6651 us/op 1.3376 us/op 1.24
LinkedList of 16000 items push then shift 9.2440 ns/op 6.1020 ns/op 1.51
array of 16000 items push then pop 99.939 ns/op 70.466 ns/op 1.42
LinkedList of 16000 items push then pop 8.8350 ns/op 5.7750 ns/op 1.53
array of 24000 items push then shift 2.4294 us/op 1.9458 us/op 1.25
LinkedList of 24000 items push then shift 8.9990 ns/op 6.5830 ns/op 1.37
array of 24000 items push then pop 144.56 ns/op 86.333 ns/op 1.67
LinkedList of 24000 items push then pop 8.7640 ns/op 6.0010 ns/op 1.46
intersect bitArray bitLen 8 6.4890 ns/op 5.3650 ns/op 1.21
intersect array and set length 8 67.778 ns/op 49.134 ns/op 1.38
intersect bitArray bitLen 128 33.852 ns/op 28.040 ns/op 1.21
intersect array and set length 128 994.39 ns/op 690.90 ns/op 1.44
bitArray.getTrueBitIndexes() bitLen 128 1.7290 us/op 1.2030 us/op 1.44
bitArray.getTrueBitIndexes() bitLen 248 2.8940 us/op 1.9010 us/op 1.52
bitArray.getTrueBitIndexes() bitLen 512 5.9490 us/op 3.7810 us/op 1.57
Buffer.concat 32 items 930.00 ns/op 943.00 ns/op 0.99
Uint8Array.set 32 items 1.8000 us/op 1.8880 us/op 0.95
Set add up to 64 items then delete first 5.0528 us/op 1.7847 us/op 2.83
OrderedSet add up to 64 items then delete first 6.3861 us/op 2.6867 us/op 2.38
Set add up to 64 items then delete last 5.3003 us/op 1.9878 us/op 2.67
OrderedSet add up to 64 items then delete last 6.3664 us/op 2.9900 us/op 2.13
Set add up to 64 items then delete middle 5.3580 us/op 2.0418 us/op 2.62
OrderedSet add up to 64 items then delete middle 7.6896 us/op 4.1934 us/op 1.83
Set add up to 128 items then delete first 10.533 us/op 3.9054 us/op 2.70
OrderedSet add up to 128 items then delete first 13.912 us/op 6.1387 us/op 2.27
Set add up to 128 items then delete last 10.248 us/op 4.1001 us/op 2.50
OrderedSet add up to 128 items then delete last 13.062 us/op 5.7025 us/op 2.29
Set add up to 128 items then delete middle 10.204 us/op 3.8006 us/op 2.68
OrderedSet add up to 128 items then delete middle 18.628 us/op 10.663 us/op 1.75
Set add up to 256 items then delete first 20.686 us/op 7.6962 us/op 2.69
OrderedSet add up to 256 items then delete first 28.515 us/op 12.213 us/op 2.33
Set add up to 256 items then delete last 21.426 us/op 7.5426 us/op 2.84
OrderedSet add up to 256 items then delete last 26.320 us/op 11.402 us/op 2.31
Set add up to 256 items then delete middle 20.378 us/op 7.4030 us/op 2.75
OrderedSet add up to 256 items then delete middle 49.965 us/op 31.129 us/op 1.61
transfer serialized Status (84 B) 1.8150 us/op 1.4330 us/op 1.27
copy serialized Status (84 B) 1.5870 us/op 1.2470 us/op 1.27
transfer serialized SignedVoluntaryExit (112 B) 1.8610 us/op 1.4550 us/op 1.28
copy serialized SignedVoluntaryExit (112 B) 1.5980 us/op 1.3060 us/op 1.22
transfer serialized ProposerSlashing (416 B) 2.1150 us/op 2.6570 us/op 0.80
copy serialized ProposerSlashing (416 B) 2.1960 us/op 2.1320 us/op 1.03
transfer serialized Attestation (485 B) 2.2540 us/op 2.0110 us/op 1.12
copy serialized Attestation (485 B) 2.1590 us/op 2.1710 us/op 0.99
transfer serialized AttesterSlashing (33232 B) 2.2580 us/op 2.3660 us/op 0.95
copy serialized AttesterSlashing (33232 B) 6.5860 us/op 5.6280 us/op 1.17
transfer serialized Small SignedBeaconBlock (128000 B) 2.6690 us/op 2.9380 us/op 0.91
copy serialized Small SignedBeaconBlock (128000 B) 16.859 us/op 10.130 us/op 1.66
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8680 us/op 2.9440 us/op 0.97
copy serialized Avg SignedBeaconBlock (200000 B) 23.104 us/op 13.529 us/op 1.71
transfer serialized BlobsSidecar (524380 B) 2.9950 us/op 2.6140 us/op 1.15
copy serialized BlobsSidecar (524380 B) 86.782 us/op 83.466 us/op 1.04
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1660 us/op 2.8590 us/op 1.11
copy serialized Big SignedBeaconBlock (1000000 B) 197.32 us/op 230.34 us/op 0.86
pass gossip attestations to forkchoice per slot 3.8659 ms/op 2.7913 ms/op 1.38
forkChoice updateHead vc 100000 bc 64 eq 0 682.54 us/op 464.07 us/op 1.47
forkChoice updateHead vc 600000 bc 64 eq 0 4.1523 ms/op 2.9140 ms/op 1.42
forkChoice updateHead vc 1000000 bc 64 eq 0 7.4099 ms/op 4.3870 ms/op 1.69
forkChoice updateHead vc 600000 bc 320 eq 0 4.2104 ms/op 2.5996 ms/op 1.62
forkChoice updateHead vc 600000 bc 1200 eq 0 4.2701 ms/op 2.7985 ms/op 1.53
forkChoice updateHead vc 600000 bc 7200 eq 0 5.8357 ms/op 3.4079 ms/op 1.71
forkChoice updateHead vc 600000 bc 64 eq 1000 11.332 ms/op 9.9445 ms/op 1.14
forkChoice updateHead vc 600000 bc 64 eq 10000 11.823 ms/op 9.6908 ms/op 1.22
forkChoice updateHead vc 600000 bc 64 eq 300000 16.152 ms/op 12.088 ms/op 1.34
computeDeltas 500000 validators 300 proto nodes 6.6712 ms/op 3.2696 ms/op 2.04
computeDeltas 500000 validators 1200 proto nodes 6.5098 ms/op 3.1771 ms/op 2.05
computeDeltas 500000 validators 7200 proto nodes 6.3636 ms/op 3.0388 ms/op 2.09
computeDeltas 750000 validators 300 proto nodes 9.6380 ms/op 4.6756 ms/op 2.06
computeDeltas 750000 validators 1200 proto nodes 9.7155 ms/op 4.7163 ms/op 2.06
computeDeltas 750000 validators 7200 proto nodes 9.9815 ms/op 4.5701 ms/op 2.18
computeDeltas 1400000 validators 300 proto nodes 19.941 ms/op 8.8973 ms/op 2.24
computeDeltas 1400000 validators 1200 proto nodes 22.111 ms/op 9.6214 ms/op 2.30
computeDeltas 1400000 validators 7200 proto nodes 21.846 ms/op 9.7586 ms/op 2.24
computeDeltas 2100000 validators 300 proto nodes 31.720 ms/op 14.877 ms/op 2.13
computeDeltas 2100000 validators 1200 proto nodes 32.201 ms/op 14.355 ms/op 2.24
computeDeltas 2100000 validators 7200 proto nodes 30.197 ms/op 15.613 ms/op 1.93
computeProposerBoostScoreFromBalances 500000 validators 3.9372 ms/op 3.5260 ms/op 1.12
computeProposerBoostScoreFromBalances 750000 validators 4.0601 ms/op 3.5423 ms/op 1.15
computeProposerBoostScoreFromBalances 1400000 validators 4.0186 ms/op 3.6051 ms/op 1.11
computeProposerBoostScoreFromBalances 2100000 validators 3.9739 ms/op 3.4655 ms/op 1.15
altair processAttestation - 250000 vs - 7PWei normalcase 3.6205 ms/op 1.9945 ms/op 1.82
altair processAttestation - 250000 vs - 7PWei worstcase 4.5938 ms/op 2.5389 ms/op 1.81
altair processAttestation - setStatus - 1/6 committees join 207.93 us/op 112.30 us/op 1.85
altair processAttestation - setStatus - 1/3 committees join 404.73 us/op 200.05 us/op 2.02
altair processAttestation - setStatus - 1/2 committees join 557.40 us/op 292.82 us/op 1.90
altair processAttestation - setStatus - 2/3 committees join 659.87 us/op 385.31 us/op 1.71
altair processAttestation - setStatus - 4/5 committees join 962.99 us/op 520.95 us/op 1.85
altair processAttestation - setStatus - 100% committees join 1.1072 ms/op 602.82 us/op 1.84
altair processBlock - 250000 vs - 7PWei normalcase 13.139 ms/op 8.4755 ms/op 1.55
altair processBlock - 250000 vs - 7PWei normalcase hashState 48.036 ms/op 33.145 ms/op 1.45
altair processBlock - 250000 vs - 7PWei worstcase 46.862 ms/op 36.089 ms/op 1.30
altair processBlock - 250000 vs - 7PWei worstcase hashState 112.10 ms/op 79.849 ms/op 1.40
phase0 processBlock - 250000 vs - 7PWei normalcase 3.7667 ms/op 2.5830 ms/op 1.46
phase0 processBlock - 250000 vs - 7PWei worstcase 35.635 ms/op 27.429 ms/op 1.30
altair processEth1Data - 250000 vs - 7PWei normalcase 766.51 us/op 380.20 us/op 2.02
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 19.874 us/op 10.784 us/op 1.84
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 77.574 us/op 46.181 us/op 1.68
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 36.546 us/op 17.702 us/op 2.06
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 22.956 us/op 13.092 us/op 1.75
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 236.39 us/op 173.32 us/op 1.36
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4678 ms/op 939.51 us/op 1.56
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.3468 ms/op 1.5439 ms/op 1.52
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.1611 ms/op 1.4320 ms/op 1.51
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.4891 ms/op 2.5264 ms/op 1.78
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.8257 ms/op 2.1984 ms/op 1.29
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.7250 ms/op 3.5885 ms/op 1.87
Tree 40 250000 create 753.62 ms/op 293.89 ms/op 2.56
Tree 40 250000 get(125000) 265.76 ns/op 112.83 ns/op 2.36
Tree 40 250000 set(125000) 2.5659 us/op 777.66 ns/op 3.30
Tree 40 250000 toArray() 30.931 ms/op 20.763 ms/op 1.49
Tree 40 250000 iterate all - toArray() + loop 26.120 ms/op 11.185 ms/op 2.34
Tree 40 250000 iterate all - get(i) 77.863 ms/op 48.869 ms/op 1.59
MutableVector 250000 create 17.547 ms/op 8.4395 ms/op 2.08
MutableVector 250000 get(125000) 7.6770 ns/op 6.0770 ns/op 1.26
MutableVector 250000 set(125000) 510.58 ns/op 272.31 ns/op 1.87
MutableVector 250000 toArray() 4.5628 ms/op 3.1450 ms/op 1.45
MutableVector 250000 iterate all - toArray() + loop 4.9432 ms/op 2.3390 ms/op 2.11
MutableVector 250000 iterate all - get(i) 1.6871 ms/op 1.3331 ms/op 1.27
Array 250000 create 4.3352 ms/op 2.5315 ms/op 1.71
Array 250000 clone - spread 1.5138 ms/op 1.1630 ms/op 1.30
Array 250000 get(125000) 1.3990 ns/op 1.0360 ns/op 1.35
Array 250000 set(125000) 5.6720 ns/op 1.2550 ns/op 4.52
Array 250000 iterate all - loop 181.68 us/op 158.29 us/op 1.15
effectiveBalanceIncrements clone Uint8Array 300000 65.111 us/op 14.548 us/op 4.48
effectiveBalanceIncrements clone MutableVector 300000 499.00 ns/op 403.00 ns/op 1.24
effectiveBalanceIncrements rw all Uint8Array 300000 232.30 us/op 187.15 us/op 1.24
effectiveBalanceIncrements rw all MutableVector 300000 156.78 ms/op 62.846 ms/op 2.49
phase0 afterProcessEpoch - 250000 vs - 7PWei 139.45 ms/op 77.246 ms/op 1.81
phase0 beforeProcessEpoch - 250000 vs - 7PWei 62.318 ms/op 33.808 ms/op 1.84
altair processEpoch - mainnet_e81889 530.99 ms/op 434.93 ms/op 1.22
mainnet_e81889 - altair beforeProcessEpoch 92.139 ms/op 73.883 ms/op 1.25
mainnet_e81889 - altair processJustificationAndFinalization 21.290 us/op 19.055 us/op 1.12
mainnet_e81889 - altair processInactivityUpdates 7.6649 ms/op 4.2335 ms/op 1.81
mainnet_e81889 - altair processRewardsAndPenalties 96.104 ms/op 57.498 ms/op 1.67
mainnet_e81889 - altair processRegistryUpdates 6.1020 us/op 3.2570 us/op 1.87
mainnet_e81889 - altair processSlashings 1.1680 us/op 1.0360 us/op 1.13
mainnet_e81889 - altair processEth1DataReset 1.2510 us/op 985.00 ns/op 1.27
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6744 ms/op 1.0035 ms/op 1.67
mainnet_e81889 - altair processSlashingsReset 7.6950 us/op 4.4710 us/op 1.72
mainnet_e81889 - altair processRandaoMixesReset 9.5010 us/op 5.8480 us/op 1.62
mainnet_e81889 - altair processHistoricalRootsUpdate 2.0620 us/op 1.0290 us/op 2.00
mainnet_e81889 - altair processParticipationFlagUpdates 4.9790 us/op 2.8930 us/op 1.72
mainnet_e81889 - altair processSyncCommitteeUpdates 1.2940 us/op 1.0170 us/op 1.27
mainnet_e81889 - altair afterProcessEpoch 168.54 ms/op 84.825 ms/op 1.99
capella processEpoch - mainnet_e217614 3.1183 s/op 1.7560 s/op 1.78
mainnet_e217614 - capella beforeProcessEpoch 494.03 ms/op 387.88 ms/op 1.27
mainnet_e217614 - capella processJustificationAndFinalization 19.105 us/op 7.0120 us/op 2.72
mainnet_e217614 - capella processInactivityUpdates 19.480 ms/op 16.742 ms/op 1.16
mainnet_e217614 - capella processRewardsAndPenalties 563.12 ms/op 461.03 ms/op 1.22
mainnet_e217614 - capella processRegistryUpdates 21.012 us/op 20.778 us/op 1.01
mainnet_e217614 - capella processSlashings 647.00 ns/op 679.00 ns/op 0.95
mainnet_e217614 - capella processEth1DataReset 923.00 ns/op 611.00 ns/op 1.51
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.0097 ms/op 3.4500 ms/op 1.45
mainnet_e217614 - capella processSlashingsReset 2.8490 us/op 1.9930 us/op 1.43
mainnet_e217614 - capella processRandaoMixesReset 6.1080 us/op 3.5150 us/op 1.74
mainnet_e217614 - capella processHistoricalRootsUpdate 548.00 ns/op 572.00 ns/op 0.96
mainnet_e217614 - capella processParticipationFlagUpdates 1.7990 us/op 1.6460 us/op 1.09
mainnet_e217614 - capella afterProcessEpoch 306.20 ms/op 213.00 ms/op 1.44
phase0 processEpoch - mainnet_e58758 445.75 ms/op 361.74 ms/op 1.23
mainnet_e58758 - phase0 beforeProcessEpoch 176.84 ms/op 124.49 ms/op 1.42
mainnet_e58758 - phase0 processJustificationAndFinalization 24.687 us/op 11.938 us/op 2.07
mainnet_e58758 - phase0 processRewardsAndPenalties 57.156 ms/op 51.115 ms/op 1.12
mainnet_e58758 - phase0 processRegistryUpdates 20.491 us/op 6.4010 us/op 3.20
mainnet_e58758 - phase0 processSlashings 1.1540 us/op 617.00 ns/op 1.87
mainnet_e58758 - phase0 processEth1DataReset 848.00 ns/op 547.00 ns/op 1.55
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8989 ms/op 880.36 us/op 2.16
mainnet_e58758 - phase0 processSlashingsReset 5.4560 us/op 2.4690 us/op 2.21
mainnet_e58758 - phase0 processRandaoMixesReset 10.223 us/op 2.9070 us/op 3.52
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.1960 us/op 519.00 ns/op 2.30
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.6160 us/op 3.3650 us/op 1.07
mainnet_e58758 - phase0 afterProcessEpoch 102.48 ms/op 65.205 ms/op 1.57
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.4246 ms/op 991.60 us/op 1.44
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5029 ms/op 1.1226 ms/op 1.34
altair processInactivityUpdates - 250000 normalcase 21.057 ms/op 16.574 ms/op 1.27
altair processInactivityUpdates - 250000 worstcase 24.172 ms/op 18.375 ms/op 1.32
phase0 processRegistryUpdates - 250000 normalcase 13.204 us/op 5.4020 us/op 2.44
phase0 processRegistryUpdates - 250000 badcase_full_deposits 432.42 us/op 348.06 us/op 1.24
phase0 processRegistryUpdates - 250000 worstcase 0.5 121.01 ms/op 105.99 ms/op 1.14
altair processRewardsAndPenalties - 250000 normalcase 65.096 ms/op 67.200 ms/op 0.97
altair processRewardsAndPenalties - 250000 worstcase 69.239 ms/op 64.456 ms/op 1.07
phase0 getAttestationDeltas - 250000 normalcase 13.874 ms/op 5.5742 ms/op 2.49
phase0 getAttestationDeltas - 250000 worstcase 13.331 ms/op 5.1119 ms/op 2.61
phase0 processSlashings - 250000 worstcase 2.5502 ms/op 1.5516 ms/op 1.64
altair processSyncCommitteeUpdates - 250000 173.34 ms/op 112.51 ms/op 1.54
BeaconState.hashTreeRoot - No change 271.00 ns/op 313.00 ns/op 0.87
BeaconState.hashTreeRoot - 1 full validator 153.71 us/op 138.40 us/op 1.11
BeaconState.hashTreeRoot - 32 full validator 1.5781 ms/op 1.1668 ms/op 1.35
BeaconState.hashTreeRoot - 512 full validator 17.224 ms/op 16.894 ms/op 1.02
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 181.71 us/op 106.30 us/op 1.71
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2680 ms/op 1.4698 ms/op 1.54
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 28.431 ms/op 19.708 ms/op 1.44
BeaconState.hashTreeRoot - 1 balances 132.29 us/op 91.520 us/op 1.45
BeaconState.hashTreeRoot - 32 balances 1.2429 ms/op 859.43 us/op 1.45
BeaconState.hashTreeRoot - 512 balances 13.516 ms/op 9.9996 ms/op 1.35
BeaconState.hashTreeRoot - 250000 balances 200.21 ms/op 193.97 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 19.944 us/op 16.946 us/op 1.18
byteArrayEquals 32 76.429 ns/op 62.998 ns/op 1.21
Buffer.compare 32 56.316 ns/op 38.567 ns/op 1.46
byteArrayEquals 1024 2.0620 us/op 1.6782 us/op 1.23
Buffer.compare 1024 73.140 ns/op 45.343 ns/op 1.61
byteArrayEquals 16384 32.744 us/op 26.329 us/op 1.24
Buffer.compare 16384 280.23 ns/op 216.89 ns/op 1.29
byteArrayEquals 123687377 246.75 ms/op 214.82 ms/op 1.15
Buffer.compare 123687377 7.2999 ms/op 7.5090 ms/op 0.97
byteArrayEquals 32 - diff last byte 75.863 ns/op 68.630 ns/op 1.11
Buffer.compare 32 - diff last byte 58.566 ns/op 45.048 ns/op 1.30
byteArrayEquals 1024 - diff last byte 2.0193 us/op 1.7132 us/op 1.18
Buffer.compare 1024 - diff last byte 76.997 ns/op 45.591 ns/op 1.69
byteArrayEquals 16384 - diff last byte 32.387 us/op 27.095 us/op 1.20
Buffer.compare 16384 - diff last byte 275.77 ns/op 225.05 ns/op 1.23
byteArrayEquals 123687377 - diff last byte 249.05 ms/op 219.52 ms/op 1.13
Buffer.compare 123687377 - diff last byte 7.0536 ms/op 7.3654 ms/op 0.96
byteArrayEquals 32 - random bytes 5.2830 ns/op 5.5610 ns/op 0.95
Buffer.compare 32 - random bytes 60.119 ns/op 39.037 ns/op 1.54
byteArrayEquals 1024 - random bytes 5.1660 ns/op 5.8130 ns/op 0.89
Buffer.compare 1024 - random bytes 60.492 ns/op 38.284 ns/op 1.58
byteArrayEquals 16384 - random bytes 5.2540 ns/op 5.8640 ns/op 0.90
Buffer.compare 16384 - random bytes 59.559 ns/op 37.548 ns/op 1.59
byteArrayEquals 123687377 - random bytes 8.2100 ns/op 19.090 ns/op 0.43
Buffer.compare 123687377 - random bytes 62.750 ns/op 49.110 ns/op 1.28
regular array get 100000 times 44.459 us/op 43.738 us/op 1.02
wrappedArray get 100000 times 44.719 us/op 41.745 us/op 1.07
arrayWithProxy get 100000 times 14.971 ms/op 10.900 ms/op 1.37
ssz.Root.equals 53.775 ns/op 55.577 ns/op 0.97
byteArrayEquals 53.040 ns/op 54.777 ns/op 0.97
Buffer.compare 11.731 ns/op 10.403 ns/op 1.13
shuffle list - 16384 els 7.1417 ms/op 4.8334 ms/op 1.48
shuffle list - 250000 els 103.86 ms/op 71.351 ms/op 1.46
processSlot - 1 slots 16.402 us/op 15.697 us/op 1.04
processSlot - 32 slots 3.0473 ms/op 2.8431 ms/op 1.07
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 55.837 ms/op 49.134 ms/op 1.14
getCommitteeAssignments - req 1 vs - 250000 vc 2.5414 ms/op 2.1878 ms/op 1.16
getCommitteeAssignments - req 100 vs - 250000 vc 3.7140 ms/op 3.6931 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.1072 ms/op 3.7812 ms/op 1.09
findModifiedValidators - 10000 modified validators 666.73 ms/op 492.69 ms/op 1.35
findModifiedValidators - 1000 modified validators 414.13 ms/op 350.93 ms/op 1.18
findModifiedValidators - 100 modified validators 402.35 ms/op 351.96 ms/op 1.14
findModifiedValidators - 10 modified validators 377.53 ms/op 320.67 ms/op 1.18
findModifiedValidators - 1 modified validators 373.81 ms/op 321.48 ms/op 1.16
findModifiedValidators - no difference 414.07 ms/op 308.34 ms/op 1.34
compare ViewDUs 4.7864 s/op 4.1643 s/op 1.15
compare each validator Uint8Array 1.9160 s/op 1.4691 s/op 1.30
compare ViewDU to Uint8Array 1.5613 s/op 1.0421 s/op 1.50
migrate state 1000000 validators, 24 modified, 0 new 1.0267 s/op 754.71 ms/op 1.36
migrate state 1000000 validators, 1700 modified, 1000 new 1.2916 s/op 994.20 ms/op 1.30
migrate state 1000000 validators, 3400 modified, 2000 new 1.4213 s/op 1.2467 s/op 1.14
migrate state 1500000 validators, 24 modified, 0 new 906.00 ms/op 663.06 ms/op 1.37
migrate state 1500000 validators, 1700 modified, 1000 new 1.2749 s/op 949.23 ms/op 1.34
migrate state 1500000 validators, 3400 modified, 2000 new 1.4521 s/op 1.0932 s/op 1.33
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7400 ns/op 4.0100 ns/op 1.18
state getBlockRootAtSlot - 250000 vs - 7PWei 608.97 ns/op 935.17 ns/op 0.65
computeProposers - vc 250000 9.5915 ms/op 6.8803 ms/op 1.39
computeEpochShuffling - vc 250000 107.03 ms/op 69.861 ms/op 1.53
getNextSyncCommittee - vc 250000 163.04 ms/op 114.48 ms/op 1.42
computeSigningRoot for AttestationData 24.372 us/op 30.474 us/op 0.80
hash AttestationData serialized data then Buffer.toString(base64) 2.3412 us/op 1.2555 us/op 1.86
toHexString serialized data 1.1374 us/op 867.84 ns/op 1.31
Buffer.toString(base64) 209.67 ns/op 157.25 ns/op 1.33

by benchmarkbot/action

@nflaig nflaig merged commit 816693a into unstable Dec 1, 2023
16 checks passed
@nflaig nflaig deleted the nflaig/remove-remote-key-duties branch December 1, 2023 07:47
@wemeetagain
Copy link
Member

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