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: ensure generated historical state slot matches requested slot #7135

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 8, 2024

Motivation

getHistoricalState might not be able to transition to the request state of slot if nearest state from state archive in combination with archived blocks from db are insufficient. There might be a gap in archive blocks db depending on how long the node was running and if it was stopped a few times, this would likely be resolved by backfill sync but we don't support it yet.

Currently this results in returning a state for a different slot which can lead to unexpected results.

Description

Ensure generated historical state slot matches requested slot, throw error if state slot does not match requested slot

@nflaig nflaig requested a review from a team as a code owner October 8, 2024 13:53
Copy link
Contributor

github-actions bot commented Oct 8, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: b5ff6cb Previous: 1fa3f37 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1985 ms/op 2.0172 ms/op 1.09
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 62.622 us/op 58.150 us/op 1.08
BLS verify - blst 904.80 us/op 826.20 us/op 1.10
BLS verifyMultipleSignatures 3 - blst 1.3407 ms/op 1.3240 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst 1.8755 ms/op 1.7245 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst 5.0274 ms/op 5.1644 ms/op 0.97
BLS verifyMultipleSignatures 64 - blst 10.016 ms/op 9.3538 ms/op 1.07
BLS verifyMultipleSignatures 128 - blst 18.073 ms/op 17.259 ms/op 1.05
BLS deserializing 10000 signatures 704.23 ms/op 689.31 ms/op 1.02
BLS deserializing 100000 signatures 7.2002 s/op 6.8879 s/op 1.05
BLS verifyMultipleSignatures - same message - 3 - blst 849.14 us/op 1.0142 ms/op 0.84
BLS verifyMultipleSignatures - same message - 8 - blst 1.0501 ms/op 1.0981 ms/op 0.96
BLS verifyMultipleSignatures - same message - 32 - blst 1.7743 ms/op 1.8210 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.7398 ms/op 2.6986 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.5522 ms/op 4.4333 ms/op 1.03
BLS aggregatePubkeys 32 - blst 21.715 us/op 19.834 us/op 1.09
BLS aggregatePubkeys 128 - blst 79.069 us/op 70.185 us/op 1.13
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 70.520 ms/op 57.937 ms/op 1.22
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 62.586 ms/op 47.134 ms/op 1.33
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 36.222 ms/op 31.711 ms/op 1.14
getSlashingsAndExits - default max 92.134 us/op 86.446 us/op 1.07
getSlashingsAndExits - 2k 458.18 us/op 246.82 us/op 1.86
proposeBlockBody type=full, size=empty 7.5779 ms/op 5.6835 ms/op 1.33
isKnown best case - 1 super set check 788.00 ns/op 263.00 ns/op 3.00
isKnown normal case - 2 super set checks 690.00 ns/op 260.00 ns/op 2.65
isKnown worse case - 16 super set checks 675.00 ns/op 261.00 ns/op 2.59
InMemoryCheckpointStateCache - add get delete 3.9890 us/op 2.6570 us/op 1.50
updateUnfinalizedPubkeys - updating 10 pubkeys 2.1585 ms/op 730.36 us/op 2.96
updateUnfinalizedPubkeys - updating 100 pubkeys 6.2525 ms/op 3.2337 ms/op 1.93
updateUnfinalizedPubkeys - updating 1000 pubkeys 84.957 ms/op 49.970 ms/op 1.70
validate api signedAggregateAndProof - struct 2.0950 ms/op 1.3633 ms/op 1.54
validate gossip signedAggregateAndProof - struct 2.1913 ms/op 1.3258 ms/op 1.65
batch validate gossip attestation - vc 640000 - chunk 32 196.75 us/op 121.74 us/op 1.62
batch validate gossip attestation - vc 640000 - chunk 64 186.81 us/op 110.23 us/op 1.69
batch validate gossip attestation - vc 640000 - chunk 128 160.94 us/op 102.37 us/op 1.57
batch validate gossip attestation - vc 640000 - chunk 256 148.26 us/op 101.11 us/op 1.47
pickEth1Vote - no votes 1.6387 ms/op 1.0565 ms/op 1.55
pickEth1Vote - max votes 14.373 ms/op 5.2073 ms/op 2.76
pickEth1Vote - Eth1Data hashTreeRoot value x2048 19.795 ms/op 11.423 ms/op 1.73
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 38.059 ms/op 14.885 ms/op 2.56
pickEth1Vote - Eth1Data fastSerialize value x2048 741.91 us/op 461.27 us/op 1.61
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.4173 ms/op 3.6871 ms/op 1.47
bytes32 toHexString 919.00 ns/op 412.00 ns/op 2.23
bytes32 Buffer.toString(hex) 334.00 ns/op 251.00 ns/op 1.33
bytes32 Buffer.toString(hex) from Uint8Array 575.00 ns/op 381.00 ns/op 1.51
bytes32 Buffer.toString(hex) + 0x 303.00 ns/op 252.00 ns/op 1.20
Object access 1 prop 0.21200 ns/op 0.14100 ns/op 1.50
Map access 1 prop 0.15400 ns/op 0.14100 ns/op 1.09
Object get x1000 6.6700 ns/op 5.7810 ns/op 1.15
Map get x1000 6.9230 ns/op 6.5040 ns/op 1.06
Object set x1000 54.750 ns/op 32.685 ns/op 1.68
Map set x1000 36.923 ns/op 21.589 ns/op 1.71
Return object 10000 times 0.33980 ns/op 0.28730 ns/op 1.18
Throw Error 10000 times 3.7139 us/op 3.3067 us/op 1.12
toHex 185.06 ns/op 151.73 ns/op 1.22
Buffer.from 167.98 ns/op 133.31 ns/op 1.26
shared Buffer 97.515 ns/op 91.784 ns/op 1.06
fastMsgIdFn sha256 / 200 bytes 2.4360 us/op 2.2070 us/op 1.10
fastMsgIdFn h32 xxhash / 200 bytes 309.00 ns/op 234.00 ns/op 1.32
fastMsgIdFn h64 xxhash / 200 bytes 287.00 ns/op 270.00 ns/op 1.06
fastMsgIdFn sha256 / 1000 bytes 7.6850 us/op 7.2030 us/op 1.07
fastMsgIdFn h32 xxhash / 1000 bytes 420.00 ns/op 364.00 ns/op 1.15
fastMsgIdFn h64 xxhash / 1000 bytes 354.00 ns/op 339.00 ns/op 1.04
fastMsgIdFn sha256 / 10000 bytes 67.358 us/op 63.185 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.0070 us/op 1.8310 us/op 1.10
fastMsgIdFn h64 xxhash / 10000 bytes 1.3010 us/op 1.1790 us/op 1.10
send data - 1000 256B messages 16.000 ms/op 11.900 ms/op 1.34
send data - 1000 512B messages 19.532 ms/op 16.250 ms/op 1.20
send data - 1000 1024B messages 29.496 ms/op 25.370 ms/op 1.16
send data - 1000 1200B messages 22.794 ms/op 25.966 ms/op 0.88
send data - 1000 2048B messages 35.378 ms/op 31.003 ms/op 1.14
send data - 1000 4096B messages 34.734 ms/op 32.252 ms/op 1.08
send data - 1000 16384B messages 132.53 ms/op 68.866 ms/op 1.92
send data - 1000 65536B messages 232.05 ms/op 218.41 ms/op 1.06
enrSubnets - fastDeserialize 64 bits 1.4790 us/op 1.1470 us/op 1.29
enrSubnets - ssz BitVector 64 bits 458.00 ns/op 379.00 ns/op 1.21
enrSubnets - fastDeserialize 4 bits 213.00 ns/op 169.00 ns/op 1.26
enrSubnets - ssz BitVector 4 bits 469.00 ns/op 371.00 ns/op 1.26
prioritizePeers score -10:0 att 32-0.1 sync 2-0 190.99 us/op 149.59 us/op 1.28
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 194.75 us/op 152.74 us/op 1.28
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 300.88 us/op 290.23 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 418.14 us/op 400.12 us/op 1.05
prioritizePeers score 0:0 att 64-1 sync 4-1 772.10 us/op 655.26 us/op 1.18
array of 16000 items push then shift 1.6739 us/op 1.6114 us/op 1.04
LinkedList of 16000 items push then shift 7.9830 ns/op 6.8890 ns/op 1.16
array of 16000 items push then pop 122.50 ns/op 119.44 ns/op 1.03
LinkedList of 16000 items push then pop 7.4430 ns/op 6.8170 ns/op 1.09
array of 24000 items push then shift 2.4751 us/op 2.3942 us/op 1.03
LinkedList of 24000 items push then shift 7.7320 ns/op 7.2700 ns/op 1.06
array of 24000 items push then pop 160.70 ns/op 152.84 ns/op 1.05
LinkedList of 24000 items push then pop 7.3390 ns/op 6.9130 ns/op 1.06
intersect bitArray bitLen 8 6.4310 ns/op 6.3780 ns/op 1.01
intersect array and set length 8 47.853 ns/op 49.151 ns/op 0.97
intersect bitArray bitLen 128 30.095 ns/op 29.589 ns/op 1.02
intersect array and set length 128 676.19 ns/op 695.74 ns/op 0.97
bitArray.getTrueBitIndexes() bitLen 128 2.0020 us/op 1.6460 us/op 1.22
bitArray.getTrueBitIndexes() bitLen 248 3.6060 us/op 3.3130 us/op 1.09
bitArray.getTrueBitIndexes() bitLen 512 7.8910 us/op 7.4000 us/op 1.07
Buffer.concat 32 items 1.0050 us/op 917.00 ns/op 1.10
Uint8Array.set 32 items 1.4770 us/op 1.6620 us/op 0.89
Buffer.copy 1.5900 us/op 1.8020 us/op 0.88
Uint8Array.set - with subarray 2.3870 us/op 2.9470 us/op 0.81
Uint8Array.set - without subarray 1.3160 us/op 1.6640 us/op 0.79
getUint32 - dataview 263.00 ns/op 255.00 ns/op 1.03
getUint32 - manual 221.00 ns/op 177.00 ns/op 1.25
Set add up to 64 items then delete first 2.8126 us/op 2.3034 us/op 1.22
OrderedSet add up to 64 items then delete first 4.4444 us/op 3.3536 us/op 1.33
Set add up to 64 items then delete last 3.2296 us/op 2.4722 us/op 1.31
OrderedSet add up to 64 items then delete last 4.7759 us/op 4.0447 us/op 1.18
Set add up to 64 items then delete middle 3.2640 us/op 2.7233 us/op 1.20
OrderedSet add up to 64 items then delete middle 6.5735 us/op 5.6456 us/op 1.16
Set add up to 128 items then delete first 6.4351 us/op 5.3742 us/op 1.20
OrderedSet add up to 128 items then delete first 9.7580 us/op 8.5667 us/op 1.14
Set add up to 128 items then delete last 5.7481 us/op 5.1059 us/op 1.13
OrderedSet add up to 128 items then delete last 8.5957 us/op 7.4032 us/op 1.16
Set add up to 128 items then delete middle 5.6452 us/op 5.1625 us/op 1.09
OrderedSet add up to 128 items then delete middle 15.748 us/op 15.680 us/op 1.00
Set add up to 256 items then delete first 12.777 us/op 12.066 us/op 1.06
OrderedSet add up to 256 items then delete first 17.550 us/op 17.365 us/op 1.01
Set add up to 256 items then delete last 10.275 us/op 10.185 us/op 1.01
OrderedSet add up to 256 items then delete last 15.957 us/op 16.063 us/op 0.99
Set add up to 256 items then delete middle 10.274 us/op 9.7160 us/op 1.06
OrderedSet add up to 256 items then delete middle 43.759 us/op 43.832 us/op 1.00
transfer serialized Status (84 B) 1.5380 us/op 1.3450 us/op 1.14
copy serialized Status (84 B) 1.3010 us/op 1.1650 us/op 1.12
transfer serialized SignedVoluntaryExit (112 B) 1.7260 us/op 1.4340 us/op 1.20
copy serialized SignedVoluntaryExit (112 B) 1.2120 us/op 1.1910 us/op 1.02
transfer serialized ProposerSlashing (416 B) 1.6490 us/op 1.5900 us/op 1.04
copy serialized ProposerSlashing (416 B) 1.6180 us/op 1.8550 us/op 0.87
transfer serialized Attestation (485 B) 1.9860 us/op 2.0470 us/op 0.97
copy serialized Attestation (485 B) 1.9130 us/op 1.8070 us/op 1.06
transfer serialized AttesterSlashing (33232 B) 2.2730 us/op 2.7270 us/op 0.83
copy serialized AttesterSlashing (33232 B) 4.8880 us/op 6.2860 us/op 0.78
transfer serialized Small SignedBeaconBlock (128000 B) 2.7750 us/op 2.8190 us/op 0.98
copy serialized Small SignedBeaconBlock (128000 B) 14.912 us/op 16.020 us/op 0.93
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2220 us/op 3.4820 us/op 0.93
copy serialized Avg SignedBeaconBlock (200000 B) 21.053 us/op 22.600 us/op 0.93
transfer serialized BlobsSidecar (524380 B) 2.6970 us/op 3.2910 us/op 0.82
copy serialized BlobsSidecar (524380 B) 77.092 us/op 82.110 us/op 0.94
transfer serialized Big SignedBeaconBlock (1000000 B) 2.5350 us/op 3.1300 us/op 0.81
copy serialized Big SignedBeaconBlock (1000000 B) 155.12 us/op 150.36 us/op 1.03
pass gossip attestations to forkchoice per slot 2.7919 ms/op 2.7438 ms/op 1.02
forkChoice updateHead vc 100000 bc 64 eq 0 541.16 us/op 476.15 us/op 1.14
forkChoice updateHead vc 600000 bc 64 eq 0 3.2684 ms/op 3.6242 ms/op 0.90
forkChoice updateHead vc 1000000 bc 64 eq 0 5.2745 ms/op 5.2970 ms/op 1.00
forkChoice updateHead vc 600000 bc 320 eq 0 3.2933 ms/op 3.2402 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 3.4987 ms/op 3.2064 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 5.1800 ms/op 3.9092 ms/op 1.33
forkChoice updateHead vc 600000 bc 64 eq 1000 11.283 ms/op 10.543 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 10000 11.674 ms/op 10.557 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 300000 15.977 ms/op 14.776 ms/op 1.08
computeDeltas 500000 validators 300 proto nodes 4.1241 ms/op 3.5239 ms/op 1.17
computeDeltas 500000 validators 1200 proto nodes 4.3705 ms/op 3.7181 ms/op 1.18
computeDeltas 500000 validators 7200 proto nodes 4.3579 ms/op 3.7360 ms/op 1.17
computeDeltas 750000 validators 300 proto nodes 6.1532 ms/op 5.2222 ms/op 1.18
computeDeltas 750000 validators 1200 proto nodes 6.0242 ms/op 5.4100 ms/op 1.11
computeDeltas 750000 validators 7200 proto nodes 6.7368 ms/op 5.2883 ms/op 1.27
computeDeltas 1400000 validators 300 proto nodes 11.711 ms/op 10.343 ms/op 1.13
computeDeltas 1400000 validators 1200 proto nodes 13.255 ms/op 10.700 ms/op 1.24
computeDeltas 1400000 validators 7200 proto nodes 14.138 ms/op 12.212 ms/op 1.16
computeDeltas 2100000 validators 300 proto nodes 20.786 ms/op 19.939 ms/op 1.04
computeDeltas 2100000 validators 1200 proto nodes 16.510 ms/op 21.536 ms/op 0.77
computeDeltas 2100000 validators 7200 proto nodes 15.514 ms/op 24.362 ms/op 0.64
altair processAttestation - 250000 vs - 7PWei normalcase 1.7521 ms/op 3.1713 ms/op 0.55
altair processAttestation - 250000 vs - 7PWei worstcase 2.8167 ms/op 5.4530 ms/op 0.52
altair processAttestation - setStatus - 1/6 committees join 87.444 us/op 112.78 us/op 0.78
altair processAttestation - setStatus - 1/3 committees join 178.65 us/op 226.03 us/op 0.79
altair processAttestation - setStatus - 1/2 committees join 243.22 us/op 311.20 us/op 0.78
altair processAttestation - setStatus - 2/3 committees join 320.06 us/op 430.95 us/op 0.74
altair processAttestation - setStatus - 4/5 committees join 469.66 us/op 674.76 us/op 0.70
altair processAttestation - setStatus - 100% committees join 587.79 us/op 795.99 us/op 0.74
altair processBlock - 250000 vs - 7PWei normalcase 3.9763 ms/op 7.9027 ms/op 0.50
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.588 ms/op 33.531 ms/op 0.76
altair processBlock - 250000 vs - 7PWei worstcase 34.387 ms/op 50.909 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase hashState 69.894 ms/op 92.487 ms/op 0.76
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0141 ms/op 3.6781 ms/op 0.55
phase0 processBlock - 250000 vs - 7PWei worstcase 20.326 ms/op 30.284 ms/op 0.67
altair processEth1Data - 250000 vs - 7PWei normalcase 333.04 us/op 631.17 us/op 0.53
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.6720 us/op 10.560 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 35.138 us/op 55.943 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.317 us/op 19.020 us/op 0.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.2820 us/op 10.529 us/op 0.60
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 158.16 us/op 191.39 us/op 0.83
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1618 ms/op 1.3299 ms/op 0.87
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.5969 ms/op 1.7020 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5278 ms/op 1.6355 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8066 ms/op 4.7193 ms/op 0.81
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6398 ms/op 2.3928 ms/op 0.69
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9716 ms/op 4.9005 ms/op 0.81
Tree 40 250000 create 245.35 ms/op 289.58 ms/op 0.85
Tree 40 250000 get(125000) 143.77 ns/op 159.12 ns/op 0.90
Tree 40 250000 set(125000) 691.68 ns/op 751.76 ns/op 0.92
Tree 40 250000 toArray() 16.081 ms/op 20.190 ms/op 0.80
Tree 40 250000 iterate all - toArray() + loop 18.332 ms/op 19.603 ms/op 0.94
Tree 40 250000 iterate all - get(i) 54.675 ms/op 60.703 ms/op 0.90
Array 250000 create 3.0258 ms/op 3.8430 ms/op 0.79
Array 250000 clone - spread 1.3293 ms/op 1.5148 ms/op 0.88
Array 250000 get(125000) 0.42300 ns/op 0.43300 ns/op 0.98
Array 250000 set(125000) 0.44400 ns/op 0.47000 ns/op 0.94
Array 250000 iterate all - loop 107.72 us/op 102.21 us/op 1.05
phase0 afterProcessEpoch - 250000 vs - 7PWei 93.840 ms/op 92.600 ms/op 1.01
Array.fill - length 1000000 3.5767 ms/op 4.5891 ms/op 0.78
Array push - length 1000000 16.900 ms/op 29.449 ms/op 0.57
Array.get 0.29262 ns/op 0.28780 ns/op 1.02
Uint8Array.get 0.44425 ns/op 0.46010 ns/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 20.022 ms/op 22.916 ms/op 0.87
altair processEpoch - mainnet_e81889 321.64 ms/op 311.32 ms/op 1.03
mainnet_e81889 - altair beforeProcessEpoch 20.720 ms/op 20.962 ms/op 0.99
mainnet_e81889 - altair processJustificationAndFinalization 12.780 us/op 18.624 us/op 0.69
mainnet_e81889 - altair processInactivityUpdates 5.9331 ms/op 7.5044 ms/op 0.79
mainnet_e81889 - altair processRewardsAndPenalties 39.847 ms/op 40.596 ms/op 0.98
mainnet_e81889 - altair processRegistryUpdates 2.0940 us/op 2.8480 us/op 0.74
mainnet_e81889 - altair processSlashings 377.00 ns/op 460.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 349.00 ns/op 391.00 ns/op 0.89
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9406 ms/op 1.9389 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 4.8760 us/op 5.5260 us/op 0.88
mainnet_e81889 - altair processRandaoMixesReset 4.6930 us/op 4.6590 us/op 1.01
mainnet_e81889 - altair processHistoricalRootsUpdate 445.00 ns/op 672.00 ns/op 0.66
mainnet_e81889 - altair processParticipationFlagUpdates 1.8710 us/op 5.1480 us/op 0.36
mainnet_e81889 - altair processSyncCommitteeUpdates 409.00 ns/op 751.00 ns/op 0.54
mainnet_e81889 - altair afterProcessEpoch 97.949 ms/op 99.151 ms/op 0.99
capella processEpoch - mainnet_e217614 1.1046 s/op 1.2481 s/op 0.88
mainnet_e217614 - capella beforeProcessEpoch 72.786 ms/op 67.855 ms/op 1.07
mainnet_e217614 - capella processJustificationAndFinalization 16.004 us/op 16.994 us/op 0.94
mainnet_e217614 - capella processInactivityUpdates 19.400 ms/op 18.001 ms/op 1.08
mainnet_e217614 - capella processRewardsAndPenalties 202.06 ms/op 225.46 ms/op 0.90
mainnet_e217614 - capella processRegistryUpdates 12.467 us/op 13.989 us/op 0.89
mainnet_e217614 - capella processSlashings 414.00 ns/op 363.00 ns/op 1.14
mainnet_e217614 - capella processEth1DataReset 364.00 ns/op 417.00 ns/op 0.87
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.396 ms/op 13.398 ms/op 1.15
mainnet_e217614 - capella processSlashingsReset 3.4160 us/op 3.1200 us/op 1.09
mainnet_e217614 - capella processRandaoMixesReset 6.5120 us/op 4.2600 us/op 1.53
mainnet_e217614 - capella processHistoricalRootsUpdate 420.00 ns/op 501.00 ns/op 0.84
mainnet_e217614 - capella processParticipationFlagUpdates 3.8720 us/op 1.9870 us/op 1.95
mainnet_e217614 - capella afterProcessEpoch 252.99 ms/op 234.53 ms/op 1.08
phase0 processEpoch - mainnet_e58758 360.40 ms/op 357.30 ms/op 1.01
mainnet_e58758 - phase0 beforeProcessEpoch 89.326 ms/op 71.168 ms/op 1.26
mainnet_e58758 - phase0 processJustificationAndFinalization 20.286 us/op 15.084 us/op 1.34
mainnet_e58758 - phase0 processRewardsAndPenalties 36.715 ms/op 32.845 ms/op 1.12
mainnet_e58758 - phase0 processRegistryUpdates 8.3160 us/op 7.5760 us/op 1.10
mainnet_e58758 - phase0 processSlashings 373.00 ns/op 404.00 ns/op 0.92
mainnet_e58758 - phase0 processEth1DataReset 357.00 ns/op 322.00 ns/op 1.11
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2669 ms/op 1.2266 ms/op 1.03
mainnet_e58758 - phase0 processSlashingsReset 2.6940 us/op 3.5640 us/op 0.76
mainnet_e58758 - phase0 processRandaoMixesReset 5.2470 us/op 4.6440 us/op 1.13
mainnet_e58758 - phase0 processHistoricalRootsUpdate 386.00 ns/op 399.00 ns/op 0.97
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.8990 us/op 5.1290 us/op 0.76
mainnet_e58758 - phase0 afterProcessEpoch 83.005 ms/op 77.208 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9336 ms/op 1.5624 ms/op 1.24
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5655 ms/op 2.4424 ms/op 1.05
altair processInactivityUpdates - 250000 normalcase 17.483 ms/op 15.429 ms/op 1.13
altair processInactivityUpdates - 250000 worstcase 21.017 ms/op 16.751 ms/op 1.25
phase0 processRegistryUpdates - 250000 normalcase 10.761 us/op 7.3380 us/op 1.47
phase0 processRegistryUpdates - 250000 badcase_full_deposits 317.94 us/op 296.72 us/op 1.07
phase0 processRegistryUpdates - 250000 worstcase 0.5 112.45 ms/op 120.78 ms/op 0.93
altair processRewardsAndPenalties - 250000 normalcase 41.782 ms/op 42.651 ms/op 0.98
altair processRewardsAndPenalties - 250000 worstcase 42.724 ms/op 39.636 ms/op 1.08
phase0 getAttestationDeltas - 250000 normalcase 9.0169 ms/op 8.7105 ms/op 1.04
phase0 getAttestationDeltas - 250000 worstcase 8.2331 ms/op 8.2911 ms/op 0.99
phase0 processSlashings - 250000 worstcase 106.82 us/op 104.22 us/op 1.02
altair processSyncCommitteeUpdates - 250000 139.78 ms/op 132.98 ms/op 1.05
BeaconState.hashTreeRoot - No change 252.00 ns/op 259.00 ns/op 0.97
BeaconState.hashTreeRoot - 1 full validator 93.703 us/op 112.35 us/op 0.83
BeaconState.hashTreeRoot - 32 full validator 1.0370 ms/op 913.95 us/op 1.13
BeaconState.hashTreeRoot - 512 full validator 10.641 ms/op 11.074 ms/op 0.96
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 119.56 us/op 116.58 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8251 ms/op 1.9509 ms/op 0.94
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 21.796 ms/op 31.574 ms/op 0.69
BeaconState.hashTreeRoot - 1 balances 98.974 us/op 128.68 us/op 0.77
BeaconState.hashTreeRoot - 32 balances 1.1688 ms/op 869.41 us/op 1.34
BeaconState.hashTreeRoot - 512 balances 10.173 ms/op 7.2797 ms/op 1.40
BeaconState.hashTreeRoot - 250000 balances 185.96 ms/op 198.74 ms/op 0.94
aggregationBits - 2048 els - zipIndexesInBitList 33.518 us/op 29.931 us/op 1.12
byteArrayEquals 32 56.296 ns/op 57.910 ns/op 0.97
Buffer.compare 32 17.898 ns/op 19.150 ns/op 0.93
byteArrayEquals 1024 1.6458 us/op 1.6482 us/op 1.00
Buffer.compare 1024 25.682 ns/op 26.395 ns/op 0.97
byteArrayEquals 16384 26.676 us/op 27.746 us/op 0.96
Buffer.compare 16384 218.27 ns/op 190.34 ns/op 1.15
byteArrayEquals 123687377 201.64 ms/op 198.21 ms/op 1.02
Buffer.compare 123687377 8.1879 ms/op 8.3986 ms/op 0.97
byteArrayEquals 32 - diff last byte 55.729 ns/op 52.646 ns/op 1.06
Buffer.compare 32 - diff last byte 18.655 ns/op 17.036 ns/op 1.10
byteArrayEquals 1024 - diff last byte 1.6881 us/op 1.5902 us/op 1.06
Buffer.compare 1024 - diff last byte 26.816 ns/op 26.412 ns/op 1.02
byteArrayEquals 16384 - diff last byte 26.778 us/op 25.582 us/op 1.05
Buffer.compare 16384 - diff last byte 196.06 ns/op 205.99 ns/op 0.95
byteArrayEquals 123687377 - diff last byte 201.56 ms/op 193.83 ms/op 1.04
Buffer.compare 123687377 - diff last byte 8.4184 ms/op 10.112 ms/op 0.83
byteArrayEquals 32 - random bytes 5.5070 ns/op 5.4920 ns/op 1.00
Buffer.compare 32 - random bytes 18.461 ns/op 17.594 ns/op 1.05
byteArrayEquals 1024 - random bytes 5.5440 ns/op 5.2390 ns/op 1.06
Buffer.compare 1024 - random bytes 18.349 ns/op 16.963 ns/op 1.08
byteArrayEquals 16384 - random bytes 5.4830 ns/op 5.2040 ns/op 1.05
Buffer.compare 16384 - random bytes 18.179 ns/op 17.249 ns/op 1.05
byteArrayEquals 123687377 - random bytes 6.8600 ns/op 6.5400 ns/op 1.05
Buffer.compare 123687377 - random bytes 20.080 ns/op 19.540 ns/op 1.03
regular array get 100000 times 44.863 us/op 43.041 us/op 1.04
wrappedArray get 100000 times 34.997 us/op 33.120 us/op 1.06
arrayWithProxy get 100000 times 13.993 ms/op 13.227 ms/op 1.06
ssz.Root.equals 47.914 ns/op 46.352 ns/op 1.03
byteArrayEquals 47.339 ns/op 45.626 ns/op 1.04
Buffer.compare 11.055 ns/op 10.537 ns/op 1.05
shuffle list - 16384 els 6.7955 ms/op 7.1106 ms/op 0.96
shuffle list - 250000 els 100.41 ms/op 95.573 ms/op 1.05
processSlot - 1 slots 13.505 us/op 14.749 us/op 0.92
processSlot - 32 slots 2.6654 ms/op 3.3153 ms/op 0.80
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.284 ms/op 42.351 ms/op 0.83
getCommitteeAssignments - req 1 vs - 250000 vc 2.0687 ms/op 2.1625 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.1533 ms/op 4.2040 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4169 ms/op 4.4082 ms/op 1.00
findModifiedValidators - 10000 modified validators 244.21 ms/op 277.39 ms/op 0.88
findModifiedValidators - 1000 modified validators 149.68 ms/op 170.70 ms/op 0.88
findModifiedValidators - 100 modified validators 150.53 ms/op 158.15 ms/op 0.95
findModifiedValidators - 10 modified validators 142.15 ms/op 147.52 ms/op 0.96
findModifiedValidators - 1 modified validators 148.91 ms/op 142.68 ms/op 1.04
findModifiedValidators - no difference 161.06 ms/op 165.41 ms/op 0.97
compare ViewDUs 3.1611 s/op 3.3283 s/op 0.95
compare each validator Uint8Array 1.1823 s/op 1.3650 s/op 0.87
compare ViewDU to Uint8Array 1.0760 s/op 1.0911 s/op 0.99
migrate state 1000000 validators, 24 modified, 0 new 893.61 ms/op 887.26 ms/op 1.01
migrate state 1000000 validators, 1700 modified, 1000 new 1.0866 s/op 1.1518 s/op 0.94
migrate state 1000000 validators, 3400 modified, 2000 new 1.2498 s/op 1.3457 s/op 0.93
migrate state 1500000 validators, 24 modified, 0 new 981.87 ms/op 957.34 ms/op 1.03
migrate state 1500000 validators, 1700 modified, 1000 new 1.4103 s/op 1.2070 s/op 1.17
migrate state 1500000 validators, 3400 modified, 2000 new 1.4694 s/op 1.4176 s/op 1.04
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0900 ns/op 4.6700 ns/op 1.09
state getBlockRootAtSlot - 250000 vs - 7PWei 598.49 ns/op 521.28 ns/op 1.15
computeProposers - vc 250000 7.6349 ms/op 7.2309 ms/op 1.06
computeEpochShuffling - vc 250000 98.558 ms/op 92.561 ms/op 1.06
getNextSyncCommittee - vc 250000 135.37 ms/op 124.28 ms/op 1.09
computeSigningRoot for AttestationData 26.251 us/op 17.886 us/op 1.47
hash AttestationData serialized data then Buffer.toString(base64) 1.7197 us/op 1.5967 us/op 1.08
toHexString serialized data 1.1122 us/op 985.77 ns/op 1.13
Buffer.toString(base64) 211.96 ns/op 196.17 ns/op 1.08
nodejs block root to RootHex using toHex 193.73 ns/op 165.46 ns/op 1.17
nodejs block root to RootHex using toRootHex 111.59 ns/op 101.87 ns/op 1.10
browser block root to RootHex using the deprecated toHexString 261.22 ns/op 245.24 ns/op 1.07
browser block root to RootHex using toHex 205.87 ns/op 197.83 ns/op 1.04
browser block root to RootHex using toRootHex 178.37 ns/op 169.20 ns/op 1.05

by benchmarkbot/action

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.16%. Comparing base (0d1fd9c) to head (e354e33).
Report is 4 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7135      +/-   ##
============================================
+ Coverage     49.04%   49.16%   +0.11%     
============================================
  Files           596      596              
  Lines         39743    39701      -42     
  Branches       2065     2063       -2     
============================================
+ Hits          19493    19518      +25     
+ Misses        20209    20142      -67     
  Partials         41       41              

@nflaig nflaig merged commit c04157c into unstable Oct 8, 2024
22 checks passed
@nflaig nflaig deleted the nflaig/check-state-slot branch October 8, 2024 15:01
@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