Skip to content

Commit

Permalink
fix: ensure generated historical state slot matches requested slot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Oct 8, 2024
1 parent 1fa3f37 commit c04157c
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ export async function getHistoricalState(
metrics?.stateTransitionBlocks.observe(blockCount);
transitionTimer?.();

if (state.slot !== slot) {
throw Error(`Failed to generate historical state for slot ${slot}`);
}

const serializeTimer = metrics?.stateSerializationTime.startTimer();
const stateBytes = state.serialize();
serializeTimer?.();
Expand Down

1 comment on commit c04157c

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: c04157c Previous: 1fa3f37 Ratio
getUint32 - manual 577.00 ns/op 177.00 ns/op 3.26

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: c04157c Previous: 1fa3f37 Ratio
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 4.6910 us/op 19.020 us/op 0.25
Full benchmark results
Benchmark suite Current: c04157c Previous: 1fa3f37 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.9575 ms/op 2.0172 ms/op 0.97
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.109 us/op 58.150 us/op 0.67
BLS verify - blst 921.96 us/op 826.20 us/op 1.12
BLS verifyMultipleSignatures 3 - blst 1.3744 ms/op 1.3240 ms/op 1.04
BLS verifyMultipleSignatures 8 - blst 2.1530 ms/op 1.7245 ms/op 1.25
BLS verifyMultipleSignatures 32 - blst 4.6534 ms/op 5.1644 ms/op 0.90
BLS verifyMultipleSignatures 64 - blst 8.6123 ms/op 9.3538 ms/op 0.92
BLS verifyMultipleSignatures 128 - blst 16.407 ms/op 17.259 ms/op 0.95
BLS deserializing 10000 signatures 646.34 ms/op 689.31 ms/op 0.94
BLS deserializing 100000 signatures 6.4051 s/op 6.8879 s/op 0.93
BLS verifyMultipleSignatures - same message - 3 - blst 956.76 us/op 1.0142 ms/op 0.94
BLS verifyMultipleSignatures - same message - 8 - blst 1.0982 ms/op 1.0981 ms/op 1.00
BLS verifyMultipleSignatures - same message - 32 - blst 1.7675 ms/op 1.8210 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.6394 ms/op 2.6986 ms/op 0.98
BLS verifyMultipleSignatures - same message - 128 - blst 4.3150 ms/op 4.4333 ms/op 0.97
BLS aggregatePubkeys 32 - blst 18.661 us/op 19.834 us/op 0.94
BLS aggregatePubkeys 128 - blst 64.840 us/op 70.185 us/op 0.92
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 64.914 ms/op 57.937 ms/op 1.12
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 51.665 ms/op 47.134 ms/op 1.10
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 30.466 ms/op 31.711 ms/op 0.96
getSlashingsAndExits - default max 70.833 us/op 86.446 us/op 0.82
getSlashingsAndExits - 2k 284.05 us/op 246.82 us/op 1.15
proposeBlockBody type=full, size=empty 5.2008 ms/op 5.6835 ms/op 0.92
isKnown best case - 1 super set check 546.00 ns/op 263.00 ns/op 2.08
isKnown normal case - 2 super set checks 695.00 ns/op 260.00 ns/op 2.67
isKnown worse case - 16 super set checks 676.00 ns/op 261.00 ns/op 2.59
InMemoryCheckpointStateCache - add get delete 2.7930 us/op 2.6570 us/op 1.05
updateUnfinalizedPubkeys - updating 10 pubkeys 1.1052 ms/op 730.36 us/op 1.51
updateUnfinalizedPubkeys - updating 100 pubkeys 2.8190 ms/op 3.2337 ms/op 0.87
updateUnfinalizedPubkeys - updating 1000 pubkeys 42.061 ms/op 49.970 ms/op 0.84
validate api signedAggregateAndProof - struct 1.8957 ms/op 1.3633 ms/op 1.39
validate gossip signedAggregateAndProof - struct 1.6961 ms/op 1.3258 ms/op 1.28
batch validate gossip attestation - vc 640000 - chunk 32 128.51 us/op 121.74 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 120.75 us/op 110.23 us/op 1.10
batch validate gossip attestation - vc 640000 - chunk 128 119.93 us/op 102.37 us/op 1.17
batch validate gossip attestation - vc 640000 - chunk 256 103.99 us/op 101.11 us/op 1.03
pickEth1Vote - no votes 884.85 us/op 1.0565 ms/op 0.84
pickEth1Vote - max votes 5.6093 ms/op 5.2073 ms/op 1.08
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.896 ms/op 11.423 ms/op 0.95
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 14.941 ms/op 14.885 ms/op 1.00
pickEth1Vote - Eth1Data fastSerialize value x2048 413.04 us/op 461.27 us/op 0.90
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.1062 ms/op 3.6871 ms/op 0.57
bytes32 toHexString 669.00 ns/op 412.00 ns/op 1.62
bytes32 Buffer.toString(hex) 457.00 ns/op 251.00 ns/op 1.82
bytes32 Buffer.toString(hex) from Uint8Array 688.00 ns/op 381.00 ns/op 1.81
bytes32 Buffer.toString(hex) + 0x 521.00 ns/op 252.00 ns/op 2.07
Object access 1 prop 0.39900 ns/op 0.14100 ns/op 2.83
Map access 1 prop 0.33700 ns/op 0.14100 ns/op 2.39
Object get x1000 5.8420 ns/op 5.7810 ns/op 1.01
Map get x1000 6.8240 ns/op 6.5040 ns/op 1.05
Object set x1000 25.834 ns/op 32.685 ns/op 0.79
Map set x1000 23.487 ns/op 21.589 ns/op 1.09
Return object 10000 times 0.33140 ns/op 0.28730 ns/op 1.15
Throw Error 10000 times 3.0077 us/op 3.3067 us/op 0.91
toHex 120.20 ns/op 151.73 ns/op 0.79
Buffer.from 108.48 ns/op 133.31 ns/op 0.81
shared Buffer 79.492 ns/op 91.784 ns/op 0.87
fastMsgIdFn sha256 / 200 bytes 2.1920 us/op 2.2070 us/op 0.99
fastMsgIdFn h32 xxhash / 200 bytes 576.00 ns/op 234.00 ns/op 2.46
fastMsgIdFn h64 xxhash / 200 bytes 560.00 ns/op 270.00 ns/op 2.07
fastMsgIdFn sha256 / 1000 bytes 6.6920 us/op 7.2030 us/op 0.93
fastMsgIdFn h32 xxhash / 1000 bytes 703.00 ns/op 364.00 ns/op 1.93
fastMsgIdFn h64 xxhash / 1000 bytes 674.00 ns/op 339.00 ns/op 1.99
fastMsgIdFn sha256 / 10000 bytes 54.252 us/op 63.185 us/op 0.86
fastMsgIdFn h32 xxhash / 10000 bytes 2.2620 us/op 1.8310 us/op 1.24
fastMsgIdFn h64 xxhash / 10000 bytes 1.5810 us/op 1.1790 us/op 1.34
send data - 1000 256B messages 13.472 ms/op 11.900 ms/op 1.13
send data - 1000 512B messages 17.750 ms/op 16.250 ms/op 1.09
send data - 1000 1024B messages 29.862 ms/op 25.370 ms/op 1.18
send data - 1000 1200B messages 23.745 ms/op 25.966 ms/op 0.91
send data - 1000 2048B messages 35.790 ms/op 31.003 ms/op 1.15
send data - 1000 4096B messages 29.403 ms/op 32.252 ms/op 0.91
send data - 1000 16384B messages 73.185 ms/op 68.866 ms/op 1.06
send data - 1000 65536B messages 365.58 ms/op 218.41 ms/op 1.67
enrSubnets - fastDeserialize 64 bits 1.8070 us/op 1.1470 us/op 1.58
enrSubnets - ssz BitVector 64 bits 746.00 ns/op 379.00 ns/op 1.97
enrSubnets - fastDeserialize 4 bits 448.00 ns/op 169.00 ns/op 2.65
enrSubnets - ssz BitVector 4 bits 764.00 ns/op 371.00 ns/op 2.06
prioritizePeers score -10:0 att 32-0.1 sync 2-0 255.83 us/op 149.59 us/op 1.71
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 227.69 us/op 152.74 us/op 1.49
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 526.39 us/op 290.23 us/op 1.81
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 598.79 us/op 400.12 us/op 1.50
prioritizePeers score 0:0 att 64-1 sync 4-1 947.34 us/op 655.26 us/op 1.45
array of 16000 items push then shift 1.3095 us/op 1.6114 us/op 0.81
LinkedList of 16000 items push then shift 9.1690 ns/op 6.8890 ns/op 1.33
array of 16000 items push then pop 155.94 ns/op 119.44 ns/op 1.31
LinkedList of 16000 items push then pop 7.2860 ns/op 6.8170 ns/op 1.07
array of 24000 items push then shift 1.8853 us/op 2.3942 us/op 0.79
LinkedList of 24000 items push then shift 8.4540 ns/op 7.2700 ns/op 1.16
array of 24000 items push then pop 211.21 ns/op 152.84 ns/op 1.38
LinkedList of 24000 items push then pop 7.7170 ns/op 6.9130 ns/op 1.12
intersect bitArray bitLen 8 5.8070 ns/op 6.3780 ns/op 0.91
intersect array and set length 8 42.356 ns/op 49.151 ns/op 0.86
intersect bitArray bitLen 128 27.289 ns/op 29.589 ns/op 0.92
intersect array and set length 128 790.92 ns/op 695.74 ns/op 1.14
bitArray.getTrueBitIndexes() bitLen 128 2.8730 us/op 1.6460 us/op 1.75
bitArray.getTrueBitIndexes() bitLen 248 3.5670 us/op 3.3130 us/op 1.08
bitArray.getTrueBitIndexes() bitLen 512 8.8310 us/op 7.4000 us/op 1.19
Buffer.concat 32 items 1.3520 us/op 917.00 ns/op 1.47
Uint8Array.set 32 items 3.0460 us/op 1.6620 us/op 1.83
Buffer.copy 3.3440 us/op 1.8020 us/op 1.86
Uint8Array.set - with subarray 5.7620 us/op 2.9470 us/op 1.96
Uint8Array.set - without subarray 3.2560 us/op 1.6640 us/op 1.96
getUint32 - dataview 606.00 ns/op 255.00 ns/op 2.38
getUint32 - manual 577.00 ns/op 177.00 ns/op 3.26
Set add up to 64 items then delete first 2.5340 us/op 2.3034 us/op 1.10
OrderedSet add up to 64 items then delete first 4.8718 us/op 3.3536 us/op 1.45
Set add up to 64 items then delete last 3.4572 us/op 2.4722 us/op 1.40
OrderedSet add up to 64 items then delete last 5.5918 us/op 4.0447 us/op 1.38
Set add up to 64 items then delete middle 3.6843 us/op 2.7233 us/op 1.35
OrderedSet add up to 64 items then delete middle 7.4435 us/op 5.6456 us/op 1.32
Set add up to 128 items then delete first 7.1534 us/op 5.3742 us/op 1.33
OrderedSet add up to 128 items then delete first 11.477 us/op 8.5667 us/op 1.34
Set add up to 128 items then delete last 6.7149 us/op 5.1059 us/op 1.32
OrderedSet add up to 128 items then delete last 7.0310 us/op 7.4032 us/op 0.95
Set add up to 128 items then delete middle 5.8627 us/op 5.1625 us/op 1.14
OrderedSet add up to 128 items then delete middle 16.567 us/op 15.680 us/op 1.06
Set add up to 256 items then delete first 12.822 us/op 12.066 us/op 1.06
OrderedSet add up to 256 items then delete first 19.479 us/op 17.365 us/op 1.12
Set add up to 256 items then delete last 11.754 us/op 10.185 us/op 1.15
OrderedSet add up to 256 items then delete last 19.117 us/op 16.063 us/op 1.19
Set add up to 256 items then delete middle 12.162 us/op 9.7160 us/op 1.25
OrderedSet add up to 256 items then delete middle 42.429 us/op 43.832 us/op 0.97
transfer serialized Status (84 B) 1.6800 us/op 1.3450 us/op 1.25
copy serialized Status (84 B) 1.4010 us/op 1.1650 us/op 1.20
transfer serialized SignedVoluntaryExit (112 B) 1.5970 us/op 1.4340 us/op 1.11
copy serialized SignedVoluntaryExit (112 B) 1.4100 us/op 1.1910 us/op 1.18
transfer serialized ProposerSlashing (416 B) 1.6680 us/op 1.5900 us/op 1.05
copy serialized ProposerSlashing (416 B) 1.4580 us/op 1.8550 us/op 0.79
transfer serialized Attestation (485 B) 1.6970 us/op 2.0470 us/op 0.83
copy serialized Attestation (485 B) 1.4500 us/op 1.8070 us/op 0.80
transfer serialized AttesterSlashing (33232 B) 1.8380 us/op 2.7270 us/op 0.67
copy serialized AttesterSlashing (33232 B) 3.9400 us/op 6.2860 us/op 0.63
transfer serialized Small SignedBeaconBlock (128000 B) 2.2270 us/op 2.8190 us/op 0.79
copy serialized Small SignedBeaconBlock (128000 B) 10.696 us/op 16.020 us/op 0.67
transfer serialized Avg SignedBeaconBlock (200000 B) 3.0920 us/op 3.4820 us/op 0.89
copy serialized Avg SignedBeaconBlock (200000 B) 13.841 us/op 22.600 us/op 0.61
transfer serialized BlobsSidecar (524380 B) 3.4670 us/op 3.2910 us/op 1.05
copy serialized BlobsSidecar (524380 B) 77.275 us/op 82.110 us/op 0.94
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6360 us/op 3.1300 us/op 1.16
copy serialized Big SignedBeaconBlock (1000000 B) 195.55 us/op 150.36 us/op 1.30
pass gossip attestations to forkchoice per slot 2.5356 ms/op 2.7438 ms/op 0.92
forkChoice updateHead vc 100000 bc 64 eq 0 418.71 us/op 476.15 us/op 0.88
forkChoice updateHead vc 600000 bc 64 eq 0 2.7780 ms/op 3.6242 ms/op 0.77
forkChoice updateHead vc 1000000 bc 64 eq 0 4.6149 ms/op 5.2970 ms/op 0.87
forkChoice updateHead vc 600000 bc 320 eq 0 2.7145 ms/op 3.2402 ms/op 0.84
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0087 ms/op 3.2064 ms/op 0.94
forkChoice updateHead vc 600000 bc 7200 eq 0 5.8793 ms/op 3.9092 ms/op 1.50
forkChoice updateHead vc 600000 bc 64 eq 1000 10.011 ms/op 10.543 ms/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 10000 9.7390 ms/op 10.557 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 12.078 ms/op 14.776 ms/op 0.82
computeDeltas 500000 validators 300 proto nodes 3.1321 ms/op 3.5239 ms/op 0.89
computeDeltas 500000 validators 1200 proto nodes 3.1269 ms/op 3.7181 ms/op 0.84
computeDeltas 500000 validators 7200 proto nodes 3.1439 ms/op 3.7360 ms/op 0.84
computeDeltas 750000 validators 300 proto nodes 4.8110 ms/op 5.2222 ms/op 0.92
computeDeltas 750000 validators 1200 proto nodes 4.7244 ms/op 5.4100 ms/op 0.87
computeDeltas 750000 validators 7200 proto nodes 4.6035 ms/op 5.2883 ms/op 0.87
computeDeltas 1400000 validators 300 proto nodes 8.5751 ms/op 10.343 ms/op 0.83
computeDeltas 1400000 validators 1200 proto nodes 8.5369 ms/op 10.700 ms/op 0.80
computeDeltas 1400000 validators 7200 proto nodes 8.3236 ms/op 12.212 ms/op 0.68
computeDeltas 2100000 validators 300 proto nodes 13.160 ms/op 19.939 ms/op 0.66
computeDeltas 2100000 validators 1200 proto nodes 14.040 ms/op 21.536 ms/op 0.65
computeDeltas 2100000 validators 7200 proto nodes 13.587 ms/op 24.362 ms/op 0.56
altair processAttestation - 250000 vs - 7PWei normalcase 1.5564 ms/op 3.1713 ms/op 0.49
altair processAttestation - 250000 vs - 7PWei worstcase 2.3668 ms/op 5.4530 ms/op 0.43
altair processAttestation - setStatus - 1/6 committees join 82.157 us/op 112.78 us/op 0.73
altair processAttestation - setStatus - 1/3 committees join 160.76 us/op 226.03 us/op 0.71
altair processAttestation - setStatus - 1/2 committees join 204.77 us/op 311.20 us/op 0.66
altair processAttestation - setStatus - 2/3 committees join 262.80 us/op 430.95 us/op 0.61
altair processAttestation - setStatus - 4/5 committees join 419.51 us/op 674.76 us/op 0.62
altair processAttestation - setStatus - 100% committees join 493.95 us/op 795.99 us/op 0.62
altair processBlock - 250000 vs - 7PWei normalcase 5.0596 ms/op 7.9027 ms/op 0.64
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.008 ms/op 33.531 ms/op 0.72
altair processBlock - 250000 vs - 7PWei worstcase 33.427 ms/op 50.909 ms/op 0.66
altair processBlock - 250000 vs - 7PWei worstcase hashState 71.166 ms/op 92.487 ms/op 0.77
phase0 processBlock - 250000 vs - 7PWei normalcase 1.9541 ms/op 3.6781 ms/op 0.53
phase0 processBlock - 250000 vs - 7PWei worstcase 24.389 ms/op 30.284 ms/op 0.81
altair processEth1Data - 250000 vs - 7PWei normalcase 333.89 us/op 631.17 us/op 0.53
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.9720 us/op 10.560 us/op 0.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.502 us/op 55.943 us/op 0.51
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 4.6910 us/op 19.020 us/op 0.25
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.9960 us/op 10.529 us/op 0.47
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 129.88 us/op 191.39 us/op 0.68
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 830.73 us/op 1.3299 ms/op 0.62
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1286 ms/op 1.7020 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2162 ms/op 1.6355 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.8208 ms/op 4.7193 ms/op 0.60
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.2533 ms/op 2.3928 ms/op 0.52
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9230 ms/op 4.9005 ms/op 0.60
Tree 40 250000 create 209.02 ms/op 289.58 ms/op 0.72
Tree 40 250000 get(125000) 115.86 ns/op 159.12 ns/op 0.73
Tree 40 250000 set(125000) 533.55 ns/op 751.76 ns/op 0.71
Tree 40 250000 toArray() 17.286 ms/op 20.190 ms/op 0.86
Tree 40 250000 iterate all - toArray() + loop 16.899 ms/op 19.603 ms/op 0.86
Tree 40 250000 iterate all - get(i) 43.383 ms/op 60.703 ms/op 0.71
Array 250000 create 2.6657 ms/op 3.8430 ms/op 0.69
Array 250000 clone - spread 1.1362 ms/op 1.5148 ms/op 0.75
Array 250000 get(125000) 0.56300 ns/op 0.43300 ns/op 1.30
Array 250000 set(125000) 0.56300 ns/op 0.47000 ns/op 1.20
Array 250000 iterate all - loop 73.174 us/op 102.21 us/op 0.72
phase0 afterProcessEpoch - 250000 vs - 7PWei 72.254 ms/op 92.600 ms/op 0.78
Array.fill - length 1000000 2.3772 ms/op 4.5891 ms/op 0.52
Array push - length 1000000 15.539 ms/op 29.449 ms/op 0.53
Array.get 0.26552 ns/op 0.28780 ns/op 0.92
Uint8Array.get 0.34768 ns/op 0.46010 ns/op 0.76
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.142 ms/op 22.916 ms/op 0.57
altair processEpoch - mainnet_e81889 281.95 ms/op 311.32 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 17.227 ms/op 20.962 ms/op 0.82
mainnet_e81889 - altair processJustificationAndFinalization 10.199 us/op 18.624 us/op 0.55
mainnet_e81889 - altair processInactivityUpdates 4.0647 ms/op 7.5044 ms/op 0.54
mainnet_e81889 - altair processRewardsAndPenalties 40.188 ms/op 40.596 ms/op 0.99
mainnet_e81889 - altair processRegistryUpdates 1.0310 us/op 2.8480 us/op 0.36
mainnet_e81889 - altair processSlashings 757.00 ns/op 460.00 ns/op 1.65
mainnet_e81889 - altair processEth1DataReset 646.00 ns/op 391.00 ns/op 1.65
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5075 ms/op 1.9389 ms/op 0.78
mainnet_e81889 - altair processSlashingsReset 2.2960 us/op 5.5260 us/op 0.42
mainnet_e81889 - altair processRandaoMixesReset 2.5910 us/op 4.6590 us/op 0.56
mainnet_e81889 - altair processHistoricalRootsUpdate 661.00 ns/op 672.00 ns/op 0.98
mainnet_e81889 - altair processParticipationFlagUpdates 1.4550 us/op 5.1480 us/op 0.28
mainnet_e81889 - altair processSyncCommitteeUpdates 914.00 ns/op 751.00 ns/op 1.22
mainnet_e81889 - altair afterProcessEpoch 76.474 ms/op 99.151 ms/op 0.77
capella processEpoch - mainnet_e217614 1.0655 s/op 1.2481 s/op 0.85
mainnet_e217614 - capella beforeProcessEpoch 67.151 ms/op 67.855 ms/op 0.99
mainnet_e217614 - capella processJustificationAndFinalization 15.540 us/op 16.994 us/op 0.91
mainnet_e217614 - capella processInactivityUpdates 13.764 ms/op 18.001 ms/op 0.76
mainnet_e217614 - capella processRewardsAndPenalties 242.58 ms/op 225.46 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 11.495 us/op 13.989 us/op 0.82
mainnet_e217614 - capella processSlashings 545.00 ns/op 363.00 ns/op 1.50
mainnet_e217614 - capella processEth1DataReset 655.00 ns/op 417.00 ns/op 1.57
mainnet_e217614 - capella processEffectiveBalanceUpdates 14.351 ms/op 13.398 ms/op 1.07
mainnet_e217614 - capella processSlashingsReset 3.3980 us/op 3.1200 us/op 1.09
mainnet_e217614 - capella processRandaoMixesReset 5.2000 us/op 4.2600 us/op 1.22
mainnet_e217614 - capella processHistoricalRootsUpdate 696.00 ns/op 501.00 ns/op 1.39
mainnet_e217614 - capella processParticipationFlagUpdates 3.0110 us/op 1.9870 us/op 1.52
mainnet_e217614 - capella afterProcessEpoch 198.15 ms/op 234.53 ms/op 0.84
phase0 processEpoch - mainnet_e58758 347.93 ms/op 357.30 ms/op 0.97
mainnet_e58758 - phase0 beforeProcessEpoch 71.270 ms/op 71.168 ms/op 1.00
mainnet_e58758 - phase0 processJustificationAndFinalization 15.229 us/op 15.084 us/op 1.01
mainnet_e58758 - phase0 processRewardsAndPenalties 27.643 ms/op 32.845 ms/op 0.84
mainnet_e58758 - phase0 processRegistryUpdates 12.656 us/op 7.5760 us/op 1.67
mainnet_e58758 - phase0 processSlashings 830.00 ns/op 404.00 ns/op 2.05
mainnet_e58758 - phase0 processEth1DataReset 967.00 ns/op 322.00 ns/op 3.00
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 836.50 us/op 1.2266 ms/op 0.68
mainnet_e58758 - phase0 processSlashingsReset 3.3200 us/op 3.5640 us/op 0.93
mainnet_e58758 - phase0 processRandaoMixesReset 5.7550 us/op 4.6440 us/op 1.24
mainnet_e58758 - phase0 processHistoricalRootsUpdate 813.00 ns/op 399.00 ns/op 2.04
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.8090 us/op 5.1290 us/op 1.13
mainnet_e58758 - phase0 afterProcessEpoch 66.025 ms/op 77.208 ms/op 0.86
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0908 ms/op 1.5624 ms/op 0.70
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8365 ms/op 2.4424 ms/op 0.75
altair processInactivityUpdates - 250000 normalcase 15.314 ms/op 15.429 ms/op 0.99
altair processInactivityUpdates - 250000 worstcase 15.374 ms/op 16.751 ms/op 0.92
phase0 processRegistryUpdates - 250000 normalcase 7.0000 us/op 7.3380 us/op 0.95
phase0 processRegistryUpdates - 250000 badcase_full_deposits 304.06 us/op 296.72 us/op 1.02
phase0 processRegistryUpdates - 250000 worstcase 0.5 121.14 ms/op 120.78 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 41.845 ms/op 42.651 ms/op 0.98
altair processRewardsAndPenalties - 250000 worstcase 44.832 ms/op 39.636 ms/op 1.13
phase0 getAttestationDeltas - 250000 normalcase 7.4405 ms/op 8.7105 ms/op 0.85
phase0 getAttestationDeltas - 250000 worstcase 6.0592 ms/op 8.2911 ms/op 0.73
phase0 processSlashings - 250000 worstcase 93.980 us/op 104.22 us/op 0.90
altair processSyncCommitteeUpdates - 250000 115.14 ms/op 132.98 ms/op 0.87
BeaconState.hashTreeRoot - No change 447.00 ns/op 259.00 ns/op 1.73
BeaconState.hashTreeRoot - 1 full validator 116.82 us/op 112.35 us/op 1.04
BeaconState.hashTreeRoot - 32 full validator 1.1538 ms/op 913.95 us/op 1.26
BeaconState.hashTreeRoot - 512 full validator 11.829 ms/op 11.074 ms/op 1.07
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 143.58 us/op 116.58 us/op 1.23
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9408 ms/op 1.9509 ms/op 0.99
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.351 ms/op 31.574 ms/op 0.74
BeaconState.hashTreeRoot - 1 balances 87.626 us/op 128.68 us/op 0.68
BeaconState.hashTreeRoot - 32 balances 1.3592 ms/op 869.41 us/op 1.56
BeaconState.hashTreeRoot - 512 balances 9.2545 ms/op 7.2797 ms/op 1.27
BeaconState.hashTreeRoot - 250000 balances 165.50 ms/op 198.74 ms/op 0.83
aggregationBits - 2048 els - zipIndexesInBitList 21.526 us/op 29.931 us/op 0.72
byteArrayEquals 32 49.707 ns/op 57.910 ns/op 0.86
Buffer.compare 32 15.754 ns/op 19.150 ns/op 0.82
byteArrayEquals 1024 1.2831 us/op 1.6482 us/op 0.78
Buffer.compare 1024 24.443 ns/op 26.395 ns/op 0.93
byteArrayEquals 16384 20.369 us/op 27.746 us/op 0.73
Buffer.compare 16384 206.35 ns/op 190.34 ns/op 1.08
byteArrayEquals 123687377 152.44 ms/op 198.21 ms/op 0.77
Buffer.compare 123687377 4.8284 ms/op 8.3986 ms/op 0.57
byteArrayEquals 32 - diff last byte 48.438 ns/op 52.646 ns/op 0.92
Buffer.compare 32 - diff last byte 15.998 ns/op 17.036 ns/op 0.94
byteArrayEquals 1024 - diff last byte 1.2924 us/op 1.5902 us/op 0.81
Buffer.compare 1024 - diff last byte 23.816 ns/op 26.412 ns/op 0.90
byteArrayEquals 16384 - diff last byte 20.509 us/op 25.582 us/op 0.80
Buffer.compare 16384 - diff last byte 168.90 ns/op 205.99 ns/op 0.82
byteArrayEquals 123687377 - diff last byte 152.11 ms/op 193.83 ms/op 0.78
Buffer.compare 123687377 - diff last byte 4.1956 ms/op 10.112 ms/op 0.41
byteArrayEquals 32 - random bytes 4.9740 ns/op 5.4920 ns/op 0.91
Buffer.compare 32 - random bytes 15.896 ns/op 17.594 ns/op 0.90
byteArrayEquals 1024 - random bytes 4.9980 ns/op 5.2390 ns/op 0.95
Buffer.compare 1024 - random bytes 15.737 ns/op 16.963 ns/op 0.93
byteArrayEquals 16384 - random bytes 5.8960 ns/op 5.2040 ns/op 1.13
Buffer.compare 16384 - random bytes 15.923 ns/op 17.249 ns/op 0.92
byteArrayEquals 123687377 - random bytes 7.8900 ns/op 6.5400 ns/op 1.21
Buffer.compare 123687377 - random bytes 18.950 ns/op 19.540 ns/op 0.97
regular array get 100000 times 31.306 us/op 43.041 us/op 0.73
wrappedArray get 100000 times 31.310 us/op 33.120 us/op 0.95
arrayWithProxy get 100000 times 9.9153 ms/op 13.227 ms/op 0.75
ssz.Root.equals 45.091 ns/op 46.352 ns/op 0.97
byteArrayEquals 42.926 ns/op 45.626 ns/op 0.94
Buffer.compare 9.2030 ns/op 10.537 ns/op 0.87
shuffle list - 16384 els 5.4484 ms/op 7.1106 ms/op 0.77
shuffle list - 250000 els 81.114 ms/op 95.573 ms/op 0.85
processSlot - 1 slots 12.768 us/op 14.749 us/op 0.87
processSlot - 32 slots 2.6475 ms/op 3.3153 ms/op 0.80
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.560 ms/op 42.351 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 1.7937 ms/op 2.1625 ms/op 0.83
getCommitteeAssignments - req 100 vs - 250000 vc 3.5049 ms/op 4.2040 ms/op 0.83
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7696 ms/op 4.4082 ms/op 0.86
findModifiedValidators - 10000 modified validators 223.27 ms/op 277.39 ms/op 0.80
findModifiedValidators - 1000 modified validators 139.80 ms/op 170.70 ms/op 0.82
findModifiedValidators - 100 modified validators 134.94 ms/op 158.15 ms/op 0.85
findModifiedValidators - 10 modified validators 132.44 ms/op 147.52 ms/op 0.90
findModifiedValidators - 1 modified validators 124.73 ms/op 142.68 ms/op 0.87
findModifiedValidators - no difference 144.83 ms/op 165.41 ms/op 0.88
compare ViewDUs 2.8668 s/op 3.3283 s/op 0.86
compare each validator Uint8Array 1.1989 s/op 1.3650 s/op 0.88
compare ViewDU to Uint8Array 654.60 ms/op 1.0911 s/op 0.60
migrate state 1000000 validators, 24 modified, 0 new 796.69 ms/op 887.26 ms/op 0.90
migrate state 1000000 validators, 1700 modified, 1000 new 996.87 ms/op 1.1518 s/op 0.87
migrate state 1000000 validators, 3400 modified, 2000 new 1.1933 s/op 1.3457 s/op 0.89
migrate state 1500000 validators, 24 modified, 0 new 855.18 ms/op 957.34 ms/op 0.89
migrate state 1500000 validators, 1700 modified, 1000 new 979.90 ms/op 1.2070 s/op 0.81
migrate state 1500000 validators, 3400 modified, 2000 new 1.1725 s/op 1.4176 s/op 0.83
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.6100 ns/op 4.6700 ns/op 1.20
state getBlockRootAtSlot - 250000 vs - 7PWei 605.80 ns/op 521.28 ns/op 1.16
computeProposers - vc 250000 5.2283 ms/op 7.2309 ms/op 0.72
computeEpochShuffling - vc 250000 76.607 ms/op 92.561 ms/op 0.83
getNextSyncCommittee - vc 250000 88.714 ms/op 124.28 ms/op 0.71
computeSigningRoot for AttestationData 19.217 us/op 17.886 us/op 1.07
hash AttestationData serialized data then Buffer.toString(base64) 1.1536 us/op 1.5967 us/op 0.72
toHexString serialized data 717.92 ns/op 985.77 ns/op 0.73
Buffer.toString(base64) 131.53 ns/op 196.17 ns/op 0.67
nodejs block root to RootHex using toHex 102.27 ns/op 165.46 ns/op 0.62
nodejs block root to RootHex using toRootHex 65.675 ns/op 101.87 ns/op 0.64
browser block root to RootHex using the deprecated toHexString 183.88 ns/op 245.24 ns/op 0.75
browser block root to RootHex using toHex 150.87 ns/op 197.83 ns/op 0.76
browser block root to RootHex using toRootHex 132.48 ns/op 169.20 ns/op 0.78

Please sign in to comment.