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: sync cached isCompoundingValidatorArr at epoch transition #7247

Merged
merged 2 commits into from
Nov 27, 2024

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Nov 27, 2024

Motivation

Fix this error in mekong devnet-0:

Nov-25 14:55:56.131[chain]           error: Failed to run prepareForNextSlot nextEpoch=4490, isEpochTransition=true, prepareSlot=143680 - Cannot read properties of undefined (reading 'withdrawalCredentials')
TypeError: Cannot read properties of undefined (reading 'withdrawalCredentials')

Description

@twoeths twoeths requested a review from a team as a code owner November 27, 2024 02:37
@@ -106,6 +107,8 @@ function applyPendingDeposit(
// Verify the deposit signature (proof of possession) which is not checked by the deposit contract
if (isValidDepositSignature(state.config, pubkey, withdrawalCredentials, amount, signature)) {
addValidatorToRegistry(ForkSeq.electra, state, pubkey, withdrawalCredentials, amount);
const newValidatorIndex = state.validators.length - 1;
cache.isCompoundingValidatorArr[newValidatorIndex] = hasCompoundingWithdrawalCredential(withdrawalCredentials);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the main fix

Copy link
Contributor

github-actions bot commented Nov 27, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: a898d34 Previous: 18f4218 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8167 ms/op 1.9524 ms/op 0.93
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.440 us/op 42.152 us/op 1.15
BLS verify - blst 764.38 us/op 881.18 us/op 0.87
BLS verifyMultipleSignatures 3 - blst 1.2005 ms/op 1.7449 ms/op 0.69
BLS verifyMultipleSignatures 8 - blst 1.7155 ms/op 2.0996 ms/op 0.82
BLS verifyMultipleSignatures 32 - blst 4.9591 ms/op 4.4837 ms/op 1.11
BLS verifyMultipleSignatures 64 - blst 9.5084 ms/op 9.0045 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst 17.535 ms/op 16.094 ms/op 1.09
BLS deserializing 10000 signatures 707.02 ms/op 631.17 ms/op 1.12
BLS deserializing 100000 signatures 7.1699 s/op 6.3028 s/op 1.14
BLS verifyMultipleSignatures - same message - 3 - blst 994.08 us/op 1.0428 ms/op 0.95
BLS verifyMultipleSignatures - same message - 8 - blst 1.1005 ms/op 1.1274 ms/op 0.98
BLS verifyMultipleSignatures - same message - 32 - blst 1.8541 ms/op 1.6910 ms/op 1.10
BLS verifyMultipleSignatures - same message - 64 - blst 2.9409 ms/op 2.5148 ms/op 1.17
BLS verifyMultipleSignatures - same message - 128 - blst 4.9816 ms/op 4.1142 ms/op 1.21
BLS aggregatePubkeys 32 - blst 21.100 us/op 18.158 us/op 1.16
BLS aggregatePubkeys 128 - blst 73.290 us/op 64.005 us/op 1.15
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 72.098 ms/op 83.374 ms/op 0.86
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 61.812 ms/op 65.261 ms/op 0.95
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 52.603 ms/op 41.730 ms/op 1.26
getSlashingsAndExits - default max 105.44 us/op 74.184 us/op 1.42
getSlashingsAndExits - 2k 324.33 us/op 336.02 us/op 0.97
proposeBlockBody type=full, size=empty 6.8879 ms/op 6.1156 ms/op 1.13
isKnown best case - 1 super set check 454.00 ns/op 599.00 ns/op 0.76
isKnown normal case - 2 super set checks 394.00 ns/op 561.00 ns/op 0.70
isKnown worse case - 16 super set checks 367.00 ns/op 637.00 ns/op 0.58
InMemoryCheckpointStateCache - add get delete 3.6700 us/op 2.7810 us/op 1.32
validate api signedAggregateAndProof - struct 1.5753 ms/op 1.8835 ms/op 0.84
validate gossip signedAggregateAndProof - struct 1.7914 ms/op 1.8017 ms/op 0.99
batch validate gossip attestation - vc 640000 - chunk 32 140.59 us/op 130.01 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 64 125.95 us/op 113.79 us/op 1.11
batch validate gossip attestation - vc 640000 - chunk 128 119.92 us/op 115.57 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 256 133.87 us/op 106.34 us/op 1.26
pickEth1Vote - no votes 1.3623 ms/op 864.90 us/op 1.58
pickEth1Vote - max votes 9.9312 ms/op 5.7705 ms/op 1.72
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.926 ms/op 11.654 ms/op 1.54
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.087 ms/op 18.539 ms/op 1.46
pickEth1Vote - Eth1Data fastSerialize value x2048 626.24 us/op 370.63 us/op 1.69
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.8446 ms/op 3.5914 ms/op 1.07
bytes32 toHexString 693.00 ns/op 632.00 ns/op 1.10
bytes32 Buffer.toString(hex) 290.00 ns/op 468.00 ns/op 0.62
bytes32 Buffer.toString(hex) from Uint8Array 540.00 ns/op 558.00 ns/op 0.97
bytes32 Buffer.toString(hex) + 0x 318.00 ns/op 480.00 ns/op 0.66
Object access 1 prop 0.20300 ns/op 0.33600 ns/op 0.60
Map access 1 prop 0.15200 ns/op 0.32300 ns/op 0.47
Object get x1000 6.5330 ns/op 5.6860 ns/op 1.15
Map get x1000 7.4480 ns/op 6.6140 ns/op 1.13
Object set x1000 51.249 ns/op 29.109 ns/op 1.76
Map set x1000 29.707 ns/op 20.276 ns/op 1.47
Return object 10000 times 0.32560 ns/op 0.31150 ns/op 1.05
Throw Error 10000 times 3.6592 us/op 2.9703 us/op 1.23
toHex 182.34 ns/op 141.10 ns/op 1.29
Buffer.from 172.72 ns/op 120.56 ns/op 1.43
shared Buffer 121.00 ns/op 79.098 ns/op 1.53
fastMsgIdFn sha256 / 200 bytes 2.5730 us/op 2.1850 us/op 1.18
fastMsgIdFn h32 xxhash / 200 bytes 296.00 ns/op 521.00 ns/op 0.57
fastMsgIdFn h64 xxhash / 200 bytes 314.00 ns/op 484.00 ns/op 0.65
fastMsgIdFn sha256 / 1000 bytes 8.8780 us/op 5.9110 us/op 1.50
fastMsgIdFn h32 xxhash / 1000 bytes 454.00 ns/op 651.00 ns/op 0.70
fastMsgIdFn h64 xxhash / 1000 bytes 383.00 ns/op 581.00 ns/op 0.66
fastMsgIdFn sha256 / 10000 bytes 69.315 us/op 50.992 us/op 1.36
fastMsgIdFn h32 xxhash / 10000 bytes 2.0240 us/op 2.1020 us/op 0.96
fastMsgIdFn h64 xxhash / 10000 bytes 1.3450 us/op 1.4220 us/op 0.95
send data - 1000 256B messages 13.846 ms/op 13.138 ms/op 1.05
send data - 1000 512B messages 20.459 ms/op 20.279 ms/op 1.01
send data - 1000 1024B messages 29.635 ms/op 30.035 ms/op 0.99
send data - 1000 1200B messages 23.383 ms/op 30.757 ms/op 0.76
send data - 1000 2048B messages 40.861 ms/op 31.605 ms/op 1.29
send data - 1000 4096B messages 38.107 ms/op 32.852 ms/op 1.16
send data - 1000 16384B messages 86.745 ms/op 71.452 ms/op 1.21
send data - 1000 65536B messages 270.80 ms/op 341.02 ms/op 0.79
enrSubnets - fastDeserialize 64 bits 2.2400 us/op 1.2060 us/op 1.86
enrSubnets - ssz BitVector 64 bits 518.00 ns/op 654.00 ns/op 0.79
enrSubnets - fastDeserialize 4 bits 226.00 ns/op 426.00 ns/op 0.53
enrSubnets - ssz BitVector 4 bits 511.00 ns/op 650.00 ns/op 0.79
prioritizePeers score -10:0 att 32-0.1 sync 2-0 214.67 us/op 183.11 us/op 1.17
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 242.08 us/op 148.52 us/op 1.63
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 471.08 us/op 270.86 us/op 1.74
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 618.25 us/op 424.28 us/op 1.46
prioritizePeers score 0:0 att 64-1 sync 4-1 1.3745 ms/op 721.93 us/op 1.90
array of 16000 items push then shift 2.3059 us/op 1.3118 us/op 1.76
LinkedList of 16000 items push then shift 12.849 ns/op 8.3460 ns/op 1.54
array of 16000 items push then pop 171.48 ns/op 123.44 ns/op 1.39
LinkedList of 16000 items push then pop 13.157 ns/op 6.9130 ns/op 1.90
array of 24000 items push then shift 3.4477 us/op 1.9320 us/op 1.78
LinkedList of 24000 items push then shift 14.046 ns/op 6.6210 ns/op 2.12
array of 24000 items push then pop 237.58 ns/op 118.67 ns/op 2.00
LinkedList of 24000 items push then pop 8.9920 ns/op 6.3020 ns/op 1.43
intersect bitArray bitLen 8 6.8650 ns/op 5.7850 ns/op 1.19
intersect array and set length 8 67.735 ns/op 38.262 ns/op 1.77
intersect bitArray bitLen 128 33.248 ns/op 26.919 ns/op 1.24
intersect array and set length 128 1.0633 us/op 675.21 ns/op 1.57
bitArray.getTrueBitIndexes() bitLen 128 2.6800 us/op 2.3200 us/op 1.16
bitArray.getTrueBitIndexes() bitLen 248 3.3950 us/op 3.5150 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 512 8.5560 us/op 7.1310 us/op 1.20
Buffer.concat 32 items 1.1500 us/op 1.0560 us/op 1.09
Uint8Array.set 32 items 1.9510 us/op 1.4470 us/op 1.35
Buffer.copy 2.4170 us/op 2.3660 us/op 1.02
Uint8Array.set - with subarray 3.7930 us/op 2.8830 us/op 1.32
Uint8Array.set - without subarray 2.0880 us/op 2.2970 us/op 0.91
getUint32 - dataview 306.00 ns/op 460.00 ns/op 0.67
getUint32 - manual 254.00 ns/op 354.00 ns/op 0.72
Set add up to 64 items then delete first 2.7847 us/op 1.7920 us/op 1.55
OrderedSet add up to 64 items then delete first 3.7353 us/op 2.8668 us/op 1.30
Set add up to 64 items then delete last 3.0482 us/op 2.1009 us/op 1.45
OrderedSet add up to 64 items then delete last 4.2582 us/op 3.0898 us/op 1.38
Set add up to 64 items then delete middle 3.3248 us/op 2.0410 us/op 1.63
OrderedSet add up to 64 items then delete middle 6.7883 us/op 4.5580 us/op 1.49
Set add up to 128 items then delete first 7.4237 us/op 4.0353 us/op 1.84
OrderedSet add up to 128 items then delete first 11.338 us/op 6.3447 us/op 1.79
Set add up to 128 items then delete last 6.8332 us/op 3.9750 us/op 1.72
OrderedSet add up to 128 items then delete last 10.171 us/op 5.9651 us/op 1.71
Set add up to 128 items then delete middle 6.7769 us/op 3.8608 us/op 1.76
OrderedSet add up to 128 items then delete middle 17.804 us/op 12.052 us/op 1.48
Set add up to 256 items then delete first 15.035 us/op 7.9101 us/op 1.90
OrderedSet add up to 256 items then delete first 23.351 us/op 12.341 us/op 1.89
Set add up to 256 items then delete last 14.972 us/op 7.6223 us/op 1.96
OrderedSet add up to 256 items then delete last 19.597 us/op 11.674 us/op 1.68
Set add up to 256 items then delete middle 11.474 us/op 7.5639 us/op 1.52
OrderedSet add up to 256 items then delete middle 48.070 us/op 34.724 us/op 1.38
transfer serialized Status (84 B) 1.4460 us/op 1.3930 us/op 1.04
copy serialized Status (84 B) 1.2920 us/op 1.2000 us/op 1.08
transfer serialized SignedVoluntaryExit (112 B) 1.6420 us/op 1.4940 us/op 1.10
copy serialized SignedVoluntaryExit (112 B) 1.4130 us/op 1.2670 us/op 1.12
transfer serialized ProposerSlashing (416 B) 2.5690 us/op 1.6320 us/op 1.57
copy serialized ProposerSlashing (416 B) 2.7510 us/op 1.8190 us/op 1.51
transfer serialized Attestation (485 B) 2.4990 us/op 1.7710 us/op 1.41
copy serialized Attestation (485 B) 2.5630 us/op 1.6600 us/op 1.54
transfer serialized AttesterSlashing (33232 B) 2.4570 us/op 1.6620 us/op 1.48
copy serialized AttesterSlashing (33232 B) 7.2050 us/op 4.4390 us/op 1.62
transfer serialized Small SignedBeaconBlock (128000 B) 2.5890 us/op 2.4300 us/op 1.07
copy serialized Small SignedBeaconBlock (128000 B) 22.193 us/op 11.083 us/op 2.00
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2150 us/op 3.8480 us/op 0.84
copy serialized Avg SignedBeaconBlock (200000 B) 75.550 us/op 33.781 us/op 2.24
transfer serialized BlobsSidecar (524380 B) 3.7610 us/op 5.0600 us/op 0.74
copy serialized BlobsSidecar (524380 B) 121.06 us/op 96.778 us/op 1.25
transfer serialized Big SignedBeaconBlock (1000000 B) 4.4560 us/op 4.2620 us/op 1.05
copy serialized Big SignedBeaconBlock (1000000 B) 204.47 us/op 170.37 us/op 1.20
pass gossip attestations to forkchoice per slot 3.2530 ms/op 2.6393 ms/op 1.23
forkChoice updateHead vc 100000 bc 64 eq 0 512.88 us/op 362.03 us/op 1.42
forkChoice updateHead vc 600000 bc 64 eq 0 3.1183 ms/op 2.3142 ms/op 1.35
forkChoice updateHead vc 1000000 bc 64 eq 0 5.5268 ms/op 3.7612 ms/op 1.47
forkChoice updateHead vc 600000 bc 320 eq 0 3.1869 ms/op 2.2329 ms/op 1.43
forkChoice updateHead vc 600000 bc 1200 eq 0 3.5388 ms/op 2.2768 ms/op 1.55
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4709 ms/op 3.2816 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 1000 10.812 ms/op 9.8071 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 10000 10.670 ms/op 10.598 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 14.869 ms/op 33.287 ms/op 0.45
computeDeltas 500000 validators 300 proto nodes 4.3239 ms/op 3.9676 ms/op 1.09
computeDeltas 500000 validators 1200 proto nodes 4.3157 ms/op 4.4810 ms/op 0.96
computeDeltas 500000 validators 7200 proto nodes 4.2244 ms/op 4.4845 ms/op 0.94
computeDeltas 750000 validators 300 proto nodes 6.1747 ms/op 5.9240 ms/op 1.04
computeDeltas 750000 validators 1200 proto nodes 6.4766 ms/op 5.9333 ms/op 1.09
computeDeltas 750000 validators 7200 proto nodes 6.3446 ms/op 5.6229 ms/op 1.13
computeDeltas 1400000 validators 300 proto nodes 11.799 ms/op 11.291 ms/op 1.05
computeDeltas 1400000 validators 1200 proto nodes 11.478 ms/op 10.959 ms/op 1.05
computeDeltas 1400000 validators 7200 proto nodes 11.977 ms/op 11.094 ms/op 1.08
computeDeltas 2100000 validators 300 proto nodes 18.138 ms/op 15.617 ms/op 1.16
computeDeltas 2100000 validators 1200 proto nodes 17.935 ms/op 14.922 ms/op 1.20
computeDeltas 2100000 validators 7200 proto nodes 17.770 ms/op 14.947 ms/op 1.19
altair processAttestation - 250000 vs - 7PWei normalcase 2.3853 ms/op 1.8098 ms/op 1.32
altair processAttestation - 250000 vs - 7PWei worstcase 3.1207 ms/op 2.7148 ms/op 1.15
altair processAttestation - setStatus - 1/6 committees join 99.124 us/op 69.999 us/op 1.42
altair processAttestation - setStatus - 1/3 committees join 206.52 us/op 138.01 us/op 1.50
altair processAttestation - setStatus - 1/2 committees join 283.41 us/op 223.06 us/op 1.27
altair processAttestation - setStatus - 2/3 committees join 356.08 us/op 298.36 us/op 1.19
altair processAttestation - setStatus - 4/5 committees join 521.02 us/op 432.70 us/op 1.20
altair processAttestation - setStatus - 100% committees join 604.69 us/op 534.07 us/op 1.13
altair processBlock - 250000 vs - 7PWei normalcase 4.7233 ms/op 6.5070 ms/op 0.73
altair processBlock - 250000 vs - 7PWei normalcase hashState 29.705 ms/op 27.734 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 37.491 ms/op 39.817 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 74.609 ms/op 74.339 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 2.6106 ms/op 1.7987 ms/op 1.45
phase0 processBlock - 250000 vs - 7PWei worstcase 25.724 ms/op 24.167 ms/op 1.06
altair processEth1Data - 250000 vs - 7PWei normalcase 620.27 us/op 272.46 us/op 2.28
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.1680 us/op 6.8150 us/op 1.20
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 51.876 us/op 35.235 us/op 1.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.064 us/op 10.994 us/op 1.28
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.143 us/op 7.4530 us/op 1.36
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 174.68 us/op 130.70 us/op 1.34
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2318 ms/op 942.07 us/op 1.31
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8181 ms/op 1.2373 ms/op 1.47
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.0942 ms/op 1.1865 ms/op 1.77
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.0006 ms/op 2.9855 ms/op 1.67
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.9533 ms/op 1.3108 ms/op 1.49
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.4469 ms/op 3.3390 ms/op 1.33
Tree 40 250000 create 355.12 ms/op 205.63 ms/op 1.73
Tree 40 250000 get(125000) 168.25 ns/op 120.17 ns/op 1.40
Tree 40 250000 set(125000) 1.0156 us/op 544.81 ns/op 1.86
Tree 40 250000 toArray() 22.646 ms/op 18.600 ms/op 1.22
Tree 40 250000 iterate all - toArray() + loop 22.358 ms/op 19.371 ms/op 1.15
Tree 40 250000 iterate all - get(i) 69.125 ms/op 56.823 ms/op 1.22
Array 250000 create 4.9328 ms/op 3.5482 ms/op 1.39
Array 250000 clone - spread 3.3505 ms/op 1.4740 ms/op 2.27
Array 250000 get(125000) 0.48000 ns/op 0.67400 ns/op 0.71
Array 250000 set(125000) 0.51800 ns/op 0.66100 ns/op 0.78
Array 250000 iterate all - loop 87.950 us/op 84.189 us/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 55.902 ms/op 46.251 ms/op 1.21
Array.fill - length 1000000 5.4508 ms/op 2.7042 ms/op 2.02
Array push - length 1000000 22.434 ms/op 19.503 ms/op 1.15
Array.get 0.30889 ns/op 0.27241 ns/op 1.13
Uint8Array.get 0.46818 ns/op 0.34837 ns/op 1.34
phase0 beforeProcessEpoch - 250000 vs - 7PWei 19.582 ms/op 14.886 ms/op 1.32
altair processEpoch - mainnet_e81889 399.51 ms/op 239.57 ms/op 1.67
mainnet_e81889 - altair beforeProcessEpoch 26.171 ms/op 18.722 ms/op 1.40
mainnet_e81889 - altair processJustificationAndFinalization 23.809 us/op 16.217 us/op 1.47
mainnet_e81889 - altair processInactivityUpdates 8.5930 ms/op 5.7208 ms/op 1.50
mainnet_e81889 - altair processRewardsAndPenalties 58.068 ms/op 41.907 ms/op 1.39
mainnet_e81889 - altair processRegistryUpdates 5.8820 us/op 2.5940 us/op 2.27
mainnet_e81889 - altair processSlashings 706.00 ns/op 1.2780 us/op 0.55
mainnet_e81889 - altair processEth1DataReset 1.0210 us/op 902.00 ns/op 1.13
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7913 ms/op 1.1205 ms/op 1.60
mainnet_e81889 - altair processSlashingsReset 6.0910 us/op 4.3230 us/op 1.41
mainnet_e81889 - altair processRandaoMixesReset 6.0750 us/op 6.9260 us/op 0.88
mainnet_e81889 - altair processHistoricalRootsUpdate 897.00 ns/op 1.2960 us/op 0.69
mainnet_e81889 - altair processParticipationFlagUpdates 3.1450 us/op 3.9950 us/op 0.79
mainnet_e81889 - altair processSyncCommitteeUpdates 987.00 ns/op 902.00 ns/op 1.09
mainnet_e81889 - altair afterProcessEpoch 55.514 ms/op 44.422 ms/op 1.25
capella processEpoch - mainnet_e217614 1.3193 s/op 1.0892 s/op 1.21
mainnet_e217614 - capella beforeProcessEpoch 87.308 ms/op 71.670 ms/op 1.22
mainnet_e217614 - capella processJustificationAndFinalization 35.268 us/op 14.652 us/op 2.41
mainnet_e217614 - capella processInactivityUpdates 21.771 ms/op 18.642 ms/op 1.17
mainnet_e217614 - capella processRewardsAndPenalties 289.83 ms/op 231.55 ms/op 1.25
mainnet_e217614 - capella processRegistryUpdates 22.995 us/op 15.166 us/op 1.52
mainnet_e217614 - capella processSlashings 830.00 ns/op 755.00 ns/op 1.10
mainnet_e217614 - capella processEth1DataReset 805.00 ns/op 969.00 ns/op 0.83
mainnet_e217614 - capella processEffectiveBalanceUpdates 20.655 ms/op 17.095 ms/op 1.21
mainnet_e217614 - capella processSlashingsReset 4.7560 us/op 4.8910 us/op 0.97
mainnet_e217614 - capella processRandaoMixesReset 5.2160 us/op 3.7280 us/op 1.40
mainnet_e217614 - capella processHistoricalRootsUpdate 662.00 ns/op 812.00 ns/op 0.82
mainnet_e217614 - capella processParticipationFlagUpdates 2.8340 us/op 1.9490 us/op 1.45
mainnet_e217614 - capella afterProcessEpoch 125.94 ms/op 106.48 ms/op 1.18
phase0 processEpoch - mainnet_e58758 341.79 ms/op 288.65 ms/op 1.18
mainnet_e58758 - phase0 beforeProcessEpoch 76.016 ms/op 89.901 ms/op 0.85
mainnet_e58758 - phase0 processJustificationAndFinalization 18.170 us/op 19.786 us/op 0.92
mainnet_e58758 - phase0 processRewardsAndPenalties 37.120 ms/op 34.784 ms/op 1.07
mainnet_e58758 - phase0 processRegistryUpdates 11.086 us/op 9.6730 us/op 1.15
mainnet_e58758 - phase0 processSlashings 562.00 ns/op 869.00 ns/op 0.65
mainnet_e58758 - phase0 processEth1DataReset 290.00 ns/op 747.00 ns/op 0.39
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.0102 ms/op 814.30 us/op 2.47
mainnet_e58758 - phase0 processSlashingsReset 4.0880 us/op 5.2260 us/op 0.78
mainnet_e58758 - phase0 processRandaoMixesReset 4.4560 us/op 3.6550 us/op 1.22
mainnet_e58758 - phase0 processHistoricalRootsUpdate 730.00 ns/op 846.00 ns/op 0.86
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2470 us/op 3.2040 us/op 1.33
mainnet_e58758 - phase0 afterProcessEpoch 45.462 ms/op 36.038 ms/op 1.26
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9204 ms/op 1.0017 ms/op 1.92
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.2929 ms/op 1.8746 ms/op 1.22
altair processInactivityUpdates - 250000 normalcase 17.383 ms/op 17.320 ms/op 1.00
altair processInactivityUpdates - 250000 worstcase 19.692 ms/op 16.996 ms/op 1.16
phase0 processRegistryUpdates - 250000 normalcase 10.177 us/op 9.2270 us/op 1.10
phase0 processRegistryUpdates - 250000 badcase_full_deposits 319.11 us/op 309.50 us/op 1.03
phase0 processRegistryUpdates - 250000 worstcase 0.5 122.30 ms/op 110.84 ms/op 1.10
altair processRewardsAndPenalties - 250000 normalcase 44.698 ms/op 34.267 ms/op 1.30
altair processRewardsAndPenalties - 250000 worstcase 39.040 ms/op 43.353 ms/op 0.90
phase0 getAttestationDeltas - 250000 normalcase 10.065 ms/op 6.3054 ms/op 1.60
phase0 getAttestationDeltas - 250000 worstcase 8.6408 ms/op 6.2771 ms/op 1.38
phase0 processSlashings - 250000 worstcase 146.51 us/op 95.435 us/op 1.54
altair processSyncCommitteeUpdates - 250000 136.97 ms/op 104.39 ms/op 1.31
BeaconState.hashTreeRoot - No change 245.00 ns/op 442.00 ns/op 0.55
BeaconState.hashTreeRoot - 1 full validator 103.62 us/op 144.94 us/op 0.71
BeaconState.hashTreeRoot - 32 full validator 1.3754 ms/op 1.4787 ms/op 0.93
BeaconState.hashTreeRoot - 512 full validator 10.917 ms/op 10.679 ms/op 1.02
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 178.50 us/op 142.06 us/op 1.26
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1493 ms/op 1.8790 ms/op 1.14
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.802 ms/op 22.012 ms/op 0.95
BeaconState.hashTreeRoot - 1 balances 89.882 us/op 106.58 us/op 0.84
BeaconState.hashTreeRoot - 32 balances 805.46 us/op 1.0473 ms/op 0.77
BeaconState.hashTreeRoot - 512 balances 7.6861 ms/op 7.7566 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 170.81 ms/op 129.55 ms/op 1.32
aggregationBits - 2048 els - zipIndexesInBitList 32.767 us/op 50.929 us/op 0.64
byteArrayEquals 32 56.322 ns/op 47.742 ns/op 1.18
Buffer.compare 32 18.200 ns/op 15.808 ns/op 1.15
byteArrayEquals 1024 1.6593 us/op 1.2760 us/op 1.30
Buffer.compare 1024 26.851 ns/op 24.547 ns/op 1.09
byteArrayEquals 16384 26.248 us/op 20.198 us/op 1.30
Buffer.compare 16384 215.30 ns/op 187.46 ns/op 1.15
byteArrayEquals 123687377 195.61 ms/op 146.16 ms/op 1.34
Buffer.compare 123687377 6.7189 ms/op 5.5138 ms/op 1.22
byteArrayEquals 32 - diff last byte 52.948 ns/op 46.076 ns/op 1.15
Buffer.compare 32 - diff last byte 17.444 ns/op 15.199 ns/op 1.15
byteArrayEquals 1024 - diff last byte 1.5908 us/op 1.2391 us/op 1.28
Buffer.compare 1024 - diff last byte 25.267 ns/op 22.217 ns/op 1.14
byteArrayEquals 16384 - diff last byte 25.400 us/op 19.368 us/op 1.31
Buffer.compare 16384 - diff last byte 178.24 ns/op 187.16 ns/op 0.95
byteArrayEquals 123687377 - diff last byte 196.26 ms/op 147.14 ms/op 1.33
Buffer.compare 123687377 - diff last byte 7.3031 ms/op 5.3933 ms/op 1.35
byteArrayEquals 32 - random bytes 5.3990 ns/op 4.7700 ns/op 1.13
Buffer.compare 32 - random bytes 17.733 ns/op 15.169 ns/op 1.17
byteArrayEquals 1024 - random bytes 5.2700 ns/op 4.7960 ns/op 1.10
Buffer.compare 1024 - random bytes 17.572 ns/op 14.900 ns/op 1.18
byteArrayEquals 16384 - random bytes 5.2030 ns/op 4.8320 ns/op 1.08
Buffer.compare 16384 - random bytes 17.448 ns/op 14.986 ns/op 1.16
byteArrayEquals 123687377 - random bytes 6.4600 ns/op 7.5900 ns/op 0.85
Buffer.compare 123687377 - random bytes 18.770 ns/op 17.710 ns/op 1.06
regular array get 100000 times 34.321 us/op 29.810 us/op 1.15
wrappedArray get 100000 times 33.263 us/op 29.748 us/op 1.12
arrayWithProxy get 100000 times 13.742 ms/op 9.6938 ms/op 1.42
ssz.Root.equals 46.287 ns/op 38.378 ns/op 1.21
byteArrayEquals 45.668 ns/op 41.944 ns/op 1.09
Buffer.compare 10.463 ns/op 8.7390 ns/op 1.20
processSlot - 1 slots 12.060 us/op 12.137 us/op 0.99
processSlot - 32 slots 2.7278 ms/op 2.0926 ms/op 1.30
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.940 ms/op 38.011 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 2.1427 ms/op 1.8038 ms/op 1.19
getCommitteeAssignments - req 100 vs - 250000 vc 4.1185 ms/op 3.5153 ms/op 1.17
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4307 ms/op 3.7587 ms/op 1.18
findModifiedValidators - 10000 modified validators 253.24 ms/op 241.54 ms/op 1.05
findModifiedValidators - 1000 modified validators 172.28 ms/op 143.46 ms/op 1.20
findModifiedValidators - 100 modified validators 179.78 ms/op 135.70 ms/op 1.32
findModifiedValidators - 10 modified validators 178.46 ms/op 144.80 ms/op 1.23
findModifiedValidators - 1 modified validators 159.00 ms/op 135.00 ms/op 1.18
findModifiedValidators - no difference 190.00 ms/op 145.99 ms/op 1.30
compare ViewDUs 3.1947 s/op 3.0838 s/op 1.04
compare each validator Uint8Array 1.3763 s/op 1.1173 s/op 1.23
compare ViewDU to Uint8Array 1.0638 s/op 753.23 ms/op 1.41
migrate state 1000000 validators, 24 modified, 0 new 735.45 ms/op 704.54 ms/op 1.04
migrate state 1000000 validators, 1700 modified, 1000 new 993.25 ms/op 886.77 ms/op 1.12
migrate state 1000000 validators, 3400 modified, 2000 new 1.1844 s/op 1.1221 s/op 1.06
migrate state 1500000 validators, 24 modified, 0 new 744.50 ms/op 662.53 ms/op 1.12
migrate state 1500000 validators, 1700 modified, 1000 new 973.33 ms/op 911.90 ms/op 1.07
migrate state 1500000 validators, 3400 modified, 2000 new 1.1644 s/op 1.1103 s/op 1.05
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.1800 ns/op 6.1000 ns/op 0.69
state getBlockRootAtSlot - 250000 vs - 7PWei 784.02 ns/op 376.82 ns/op 2.08
computeProposers - vc 250000 7.1414 ms/op 5.4958 ms/op 1.30
computeEpochShuffling - vc 250000 41.989 ms/op 35.092 ms/op 1.20
getNextSyncCommittee - vc 250000 122.84 ms/op 106.70 ms/op 1.15
computeSigningRoot for AttestationData 22.974 us/op 22.188 us/op 1.04
hash AttestationData serialized data then Buffer.toString(base64) 1.5205 us/op 1.1877 us/op 1.28
toHexString serialized data 860.32 ns/op 811.85 ns/op 1.06
Buffer.toString(base64) 181.54 ns/op 138.27 ns/op 1.31
nodejs block root to RootHex using toHex 155.44 ns/op 126.28 ns/op 1.23
nodejs block root to RootHex using toRootHex 97.762 ns/op 79.003 ns/op 1.24
browser block root to RootHex using the deprecated toHexString 227.19 ns/op 216.69 ns/op 1.05
browser block root to RootHex using toHex 179.74 ns/op 164.95 ns/op 1.09
browser block root to RootHex using toRootHex 161.09 ns/op 146.22 ns/op 1.10

by benchmarkbot/action

Copy link
Contributor

@ensi321 ensi321 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 21.42857% with 11 lines in your changes missing coverage. Please review.

Project coverage is 48.51%. Comparing base (18f4218) to head (6a4da9e).
Report is 2 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7247      +/-   ##
============================================
- Coverage     48.51%   48.51%   -0.01%     
============================================
  Files           600      600              
  Lines         40121    40131      +10     
  Branches       2054     2054              
============================================
+ Hits          19466    19468       +2     
- Misses        20617    20625       +8     
  Partials         38       38              

@twoeths twoeths merged commit 443e3a8 into unstable Nov 27, 2024
20 checks passed
@twoeths twoeths deleted the te/sync_validators_epoch_transition_cache branch November 27, 2024 08:52
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.23.1 🎉

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.

4 participants