Skip to content

Commit

Permalink
chore: use signing slot to determine fork (#7112)
Browse files Browse the repository at this point in the history
  • Loading branch information
nflaig authored Sep 27, 2024
1 parent 77006ea commit 94b6c5b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/validator/src/services/validatorStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ export class ValidatorStore {
data: attestationData,
};

if (this.config.getForkSeq(duty.slot) >= ForkSeq.electra) {
if (this.config.getForkSeq(signingSlot) >= ForkSeq.electra) {
return {
aggregationBits: BitArray.fromSingleBit(duty.committeeLength, duty.validatorCommitteeIndex),
data: attestationData,
Expand Down Expand Up @@ -562,7 +562,7 @@ export class ValidatorStore {

const signingSlot = aggregate.data.slot;
const domain = this.config.getDomain(signingSlot, DOMAIN_AGGREGATE_AND_PROOF);
const isPostElectra = this.config.getForkSeq(duty.slot) >= ForkSeq.electra;
const isPostElectra = this.config.getForkSeq(signingSlot) >= ForkSeq.electra;
const signingRoot = isPostElectra
? computeSigningRoot(ssz.electra.AggregateAndProof, aggregateAndProof, domain)
: computeSigningRoot(ssz.phase0.AggregateAndProof, aggregateAndProof, domain);
Expand Down Expand Up @@ -802,7 +802,7 @@ export class ValidatorStore {
throw Error(`Inconsistent duties during signing: duty.slot ${duty.slot} != att.slot ${data.slot}`);
}

const isPostElectra = this.config.getForkSeq(duty.slot) >= ForkSeq.electra;
const isPostElectra = this.config.getForkSeq(data.slot) >= ForkSeq.electra;
if (!isPostElectra && duty.committeeIndex != data.index) {
throw Error(
`Inconsistent duties during signing: duty.committeeIndex ${duty.committeeIndex} != att.committeeIndex ${data.index}`
Expand Down

1 comment on commit 94b6c5b

@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: 94b6c5b Previous: 77006ea Ratio
getUint32 - manual 502.00 ns/op 165.00 ns/op 3.04
Full benchmark results
Benchmark suite Current: 94b6c5b Previous: 77006ea Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8945 ms/op 1.7664 ms/op 1.07
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.948 us/op 45.587 us/op 0.90
BLS verify - blst 903.22 us/op 810.21 us/op 1.11
BLS verifyMultipleSignatures 3 - blst 1.3190 ms/op 1.1414 ms/op 1.16
BLS verifyMultipleSignatures 8 - blst 2.0535 ms/op 1.5921 ms/op 1.29
BLS verifyMultipleSignatures 32 - blst 4.7931 ms/op 4.6995 ms/op 1.02
BLS verifyMultipleSignatures 64 - blst 8.3255 ms/op 8.6887 ms/op 0.96
BLS verifyMultipleSignatures 128 - blst 15.949 ms/op 16.573 ms/op 0.96
BLS deserializing 10000 signatures 602.19 ms/op 659.00 ms/op 0.91
BLS deserializing 100000 signatures 6.2623 s/op 6.6820 s/op 0.94
BLS verifyMultipleSignatures - same message - 3 - blst 938.48 us/op 843.05 us/op 1.11
BLS verifyMultipleSignatures - same message - 8 - blst 1.0676 ms/op 1.0002 ms/op 1.07
BLS verifyMultipleSignatures - same message - 32 - blst 1.6657 ms/op 1.5985 ms/op 1.04
BLS verifyMultipleSignatures - same message - 64 - blst 2.5452 ms/op 2.4852 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst 4.2227 ms/op 4.1647 ms/op 1.01
BLS aggregatePubkeys 32 - blst 18.706 us/op 19.153 us/op 0.98
BLS aggregatePubkeys 128 - blst 63.495 us/op 67.709 us/op 0.94
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 57.695 ms/op 64.459 ms/op 0.90
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 50.424 ms/op 51.258 ms/op 0.98
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 32.853 ms/op 32.418 ms/op 1.01
getSlashingsAndExits - default max 79.347 us/op 97.985 us/op 0.81
getSlashingsAndExits - 2k 312.59 us/op 269.70 us/op 1.16
proposeBlockBody type=full, size=empty 5.1952 ms/op 5.8009 ms/op 0.90
isKnown best case - 1 super set check 674.00 ns/op 293.00 ns/op 2.30
isKnown normal case - 2 super set checks 572.00 ns/op 287.00 ns/op 1.99
isKnown worse case - 16 super set checks 476.00 ns/op 272.00 ns/op 1.75
InMemoryCheckpointStateCache - add get delete 2.7640 us/op 2.6410 us/op 1.05
updateUnfinalizedPubkeys - updating 10 pubkeys 901.48 us/op 1.3052 ms/op 0.69
updateUnfinalizedPubkeys - updating 100 pubkeys 4.1487 ms/op 3.2881 ms/op 1.26
updateUnfinalizedPubkeys - updating 1000 pubkeys 37.167 ms/op 49.833 ms/op 0.75
validate api signedAggregateAndProof - struct 1.5686 ms/op 1.3578 ms/op 1.16
validate gossip signedAggregateAndProof - struct 1.5321 ms/op 1.4375 ms/op 1.07
validate gossip attestation - vc 640000 1.0263 ms/op 910.94 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 32 123.42 us/op 131.25 us/op 0.94
batch validate gossip attestation - vc 640000 - chunk 64 116.90 us/op 114.65 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 105.64 us/op 107.44 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 256 107.60 us/op 108.89 us/op 0.99
pickEth1Vote - no votes 905.74 us/op 1.1913 ms/op 0.76
pickEth1Vote - max votes 5.2500 ms/op 7.0098 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.938 ms/op 14.775 ms/op 0.74
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.156 ms/op 22.502 ms/op 0.81
pickEth1Vote - Eth1Data fastSerialize value x2048 372.01 us/op 517.46 us/op 0.72
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.0407 ms/op 2.7279 ms/op 0.75
bytes32 toHexString 634.00 ns/op 514.00 ns/op 1.23
bytes32 Buffer.toString(hex) 508.00 ns/op 254.00 ns/op 2.00
bytes32 Buffer.toString(hex) from Uint8Array 687.00 ns/op 479.00 ns/op 1.43
bytes32 Buffer.toString(hex) + 0x 498.00 ns/op 265.00 ns/op 1.88
Object access 1 prop 0.39200 ns/op 0.17200 ns/op 2.28
Map access 1 prop 0.33100 ns/op 0.13300 ns/op 2.49
Object get x1000 5.0940 ns/op 6.1990 ns/op 0.82
Map get x1000 6.1020 ns/op 6.6150 ns/op 0.92
Object set x1000 49.257 ns/op 41.023 ns/op 1.20
Map set x1000 34.442 ns/op 26.882 ns/op 1.28
Return object 10000 times 0.30570 ns/op 0.31020 ns/op 0.99
Throw Error 10000 times 2.7842 us/op 3.4461 us/op 0.81
toHex 132.19 ns/op 164.86 ns/op 0.80
Buffer.from 127.70 ns/op 152.59 ns/op 0.84
shared Buffer 77.642 ns/op 91.919 ns/op 0.84
fastMsgIdFn sha256 / 200 bytes 2.1600 us/op 2.2980 us/op 0.94
fastMsgIdFn h32 xxhash / 200 bytes 491.00 ns/op 290.00 ns/op 1.69
fastMsgIdFn h64 xxhash / 200 bytes 476.00 ns/op 277.00 ns/op 1.72
fastMsgIdFn sha256 / 1000 bytes 6.0950 us/op 7.5430 us/op 0.81
fastMsgIdFn h32 xxhash / 1000 bytes 623.00 ns/op 403.00 ns/op 1.55
fastMsgIdFn h64 xxhash / 1000 bytes 546.00 ns/op 349.00 ns/op 1.56
fastMsgIdFn sha256 / 10000 bytes 51.540 us/op 65.529 us/op 0.79
fastMsgIdFn h32 xxhash / 10000 bytes 2.0690 us/op 1.9490 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.4420 us/op 1.2510 us/op 1.15
send data - 1000 256B messages 10.926 ms/op 13.796 ms/op 0.79
send data - 1000 512B messages 16.819 ms/op 18.592 ms/op 0.90
send data - 1000 1024B messages 25.214 ms/op 27.973 ms/op 0.90
send data - 1000 1200B messages 26.487 ms/op 27.934 ms/op 0.95
send data - 1000 2048B messages 33.005 ms/op 34.302 ms/op 0.96
send data - 1000 4096B messages 30.620 ms/op 31.561 ms/op 0.97
send data - 1000 16384B messages 70.417 ms/op 70.160 ms/op 1.00
send data - 1000 65536B messages 278.97 ms/op 205.56 ms/op 1.36
enrSubnets - fastDeserialize 64 bits 1.2630 us/op 1.0800 us/op 1.17
enrSubnets - ssz BitVector 64 bits 629.00 ns/op 350.00 ns/op 1.80
enrSubnets - fastDeserialize 4 bits 386.00 ns/op 146.00 ns/op 2.64
enrSubnets - ssz BitVector 4 bits 613.00 ns/op 340.00 ns/op 1.80
prioritizePeers score -10:0 att 32-0.1 sync 2-0 168.13 us/op 141.38 us/op 1.19
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 151.28 us/op 154.15 us/op 0.98
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 290.39 us/op 240.45 us/op 1.21
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 455.27 us/op 387.81 us/op 1.17
prioritizePeers score 0:0 att 64-1 sync 4-1 894.33 us/op 577.51 us/op 1.55
array of 16000 items push then shift 1.3194 us/op 1.6607 us/op 0.79
LinkedList of 16000 items push then shift 9.6820 ns/op 7.3710 ns/op 1.31
array of 16000 items push then pop 123.81 ns/op 123.85 ns/op 1.00
LinkedList of 16000 items push then pop 7.7000 ns/op 7.1450 ns/op 1.08
array of 24000 items push then shift 1.9003 us/op 2.4235 us/op 0.78
LinkedList of 24000 items push then shift 8.8230 ns/op 7.4670 ns/op 1.18
array of 24000 items push then pop 164.05 ns/op 143.77 ns/op 1.14
LinkedList of 24000 items push then pop 6.7120 ns/op 7.0170 ns/op 0.96
intersect bitArray bitLen 8 5.7270 ns/op 6.4010 ns/op 0.89
intersect array and set length 8 38.608 ns/op 45.942 ns/op 0.84
intersect bitArray bitLen 128 26.951 ns/op 29.694 ns/op 0.91
intersect array and set length 128 583.72 ns/op 676.36 ns/op 0.86
bitArray.getTrueBitIndexes() bitLen 128 2.0690 us/op 1.8780 us/op 1.10
bitArray.getTrueBitIndexes() bitLen 248 3.5130 us/op 3.3080 us/op 1.06
bitArray.getTrueBitIndexes() bitLen 512 7.6930 us/op 6.3740 us/op 1.21
Buffer.concat 32 items 1.1920 us/op 945.00 ns/op 1.26
Uint8Array.set 32 items 1.7880 us/op 1.8090 us/op 0.99
Buffer.copy 1.9240 us/op 1.7350 us/op 1.11
Uint8Array.set - with subarray 3.6780 us/op 2.3360 us/op 1.57
Uint8Array.set - without subarray 2.4070 us/op 1.2180 us/op 1.98
getUint32 - dataview 487.00 ns/op 240.00 ns/op 2.03
getUint32 - manual 502.00 ns/op 165.00 ns/op 3.04
Set add up to 64 items then delete first 2.8273 us/op 2.2364 us/op 1.26
OrderedSet add up to 64 items then delete first 4.5969 us/op 3.3969 us/op 1.35
Set add up to 64 items then delete last 3.0449 us/op 2.5220 us/op 1.21
OrderedSet add up to 64 items then delete last 4.8491 us/op 3.9748 us/op 1.22
Set add up to 64 items then delete middle 2.3869 us/op 2.5512 us/op 0.94
OrderedSet add up to 64 items then delete middle 5.9288 us/op 5.4612 us/op 1.09
Set add up to 128 items then delete first 4.2197 us/op 5.1060 us/op 0.83
OrderedSet add up to 128 items then delete first 6.2393 us/op 7.6783 us/op 0.81
Set add up to 128 items then delete last 4.3547 us/op 5.6974 us/op 0.76
OrderedSet add up to 128 items then delete last 7.5816 us/op 7.8696 us/op 0.96
Set add up to 128 items then delete middle 4.1139 us/op 4.9461 us/op 0.83
OrderedSet add up to 128 items then delete middle 12.348 us/op 13.746 us/op 0.90
Set add up to 256 items then delete first 8.0766 us/op 11.852 us/op 0.68
OrderedSet add up to 256 items then delete first 12.648 us/op 17.290 us/op 0.73
Set add up to 256 items then delete last 8.0815 us/op 10.227 us/op 0.79
OrderedSet add up to 256 items then delete last 13.029 us/op 15.365 us/op 0.85
Set add up to 256 items then delete middle 8.0880 us/op 9.7523 us/op 0.83
OrderedSet add up to 256 items then delete middle 36.122 us/op 40.420 us/op 0.89
transfer serialized Status (84 B) 1.4120 us/op 1.3440 us/op 1.05
copy serialized Status (84 B) 1.2600 us/op 1.1230 us/op 1.12
transfer serialized SignedVoluntaryExit (112 B) 1.4720 us/op 1.4870 us/op 0.99
copy serialized SignedVoluntaryExit (112 B) 1.2080 us/op 1.1440 us/op 1.06
transfer serialized ProposerSlashing (416 B) 1.6190 us/op 1.5370 us/op 1.05
copy serialized ProposerSlashing (416 B) 1.7520 us/op 1.8110 us/op 0.97
transfer serialized Attestation (485 B) 1.7280 us/op 2.1900 us/op 0.79
copy serialized Attestation (485 B) 1.5830 us/op 1.4310 us/op 1.11
transfer serialized AttesterSlashing (33232 B) 2.0350 us/op 2.5540 us/op 0.80
copy serialized AttesterSlashing (33232 B) 4.8800 us/op 5.5190 us/op 0.88
transfer serialized Small SignedBeaconBlock (128000 B) 2.9650 us/op 3.1090 us/op 0.95
copy serialized Small SignedBeaconBlock (128000 B) 11.176 us/op 15.251 us/op 0.73
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9490 us/op 3.7710 us/op 0.78
copy serialized Avg SignedBeaconBlock (200000 B) 15.998 us/op 22.660 us/op 0.71
transfer serialized BlobsSidecar (524380 B) 3.0510 us/op 2.9160 us/op 1.05
copy serialized BlobsSidecar (524380 B) 74.726 us/op 118.01 us/op 0.63
transfer serialized Big SignedBeaconBlock (1000000 B) 3.0190 us/op 2.8040 us/op 1.08
copy serialized Big SignedBeaconBlock (1000000 B) 141.36 us/op 152.88 us/op 0.92
pass gossip attestations to forkchoice per slot 2.4468 ms/op 2.8033 ms/op 0.87
forkChoice updateHead vc 100000 bc 64 eq 0 426.95 us/op 494.60 us/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 0 2.6766 ms/op 2.9678 ms/op 0.90
forkChoice updateHead vc 1000000 bc 64 eq 0 4.5325 ms/op 5.0850 ms/op 0.89
forkChoice updateHead vc 600000 bc 320 eq 0 2.6055 ms/op 3.5187 ms/op 0.74
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6004 ms/op 3.1164 ms/op 0.83
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9470 ms/op 3.4250 ms/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 1000 9.9156 ms/op 10.662 ms/op 0.93
forkChoice updateHead vc 600000 bc 64 eq 10000 9.9443 ms/op 10.163 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 300000 12.096 ms/op 14.483 ms/op 0.84
computeDeltas 500000 validators 300 proto nodes 3.3650 ms/op 3.6172 ms/op 0.93
computeDeltas 500000 validators 1200 proto nodes 3.2197 ms/op 3.8560 ms/op 0.83
computeDeltas 500000 validators 7200 proto nodes 3.0685 ms/op 3.8390 ms/op 0.80
computeDeltas 750000 validators 300 proto nodes 4.5697 ms/op 5.5696 ms/op 0.82
computeDeltas 750000 validators 1200 proto nodes 4.5954 ms/op 5.6050 ms/op 0.82
computeDeltas 750000 validators 7200 proto nodes 4.5565 ms/op 5.7264 ms/op 0.80
computeDeltas 1400000 validators 300 proto nodes 8.5643 ms/op 10.377 ms/op 0.83
computeDeltas 1400000 validators 1200 proto nodes 9.0582 ms/op 10.722 ms/op 0.84
computeDeltas 1400000 validators 7200 proto nodes 9.1858 ms/op 11.281 ms/op 0.81
computeDeltas 2100000 validators 300 proto nodes 12.836 ms/op 16.546 ms/op 0.78
computeDeltas 2100000 validators 1200 proto nodes 13.043 ms/op 16.559 ms/op 0.79
computeDeltas 2100000 validators 7200 proto nodes 13.369 ms/op 16.938 ms/op 0.79
altair processAttestation - 250000 vs - 7PWei normalcase 1.5903 ms/op 2.7458 ms/op 0.58
altair processAttestation - 250000 vs - 7PWei worstcase 2.4812 ms/op 3.9140 ms/op 0.63
altair processAttestation - setStatus - 1/6 committees join 77.454 us/op 124.92 us/op 0.62
altair processAttestation - setStatus - 1/3 committees join 163.02 us/op 231.18 us/op 0.71
altair processAttestation - setStatus - 1/2 committees join 216.52 us/op 352.65 us/op 0.61
altair processAttestation - setStatus - 2/3 committees join 300.98 us/op 381.57 us/op 0.79
altair processAttestation - setStatus - 4/5 committees join 431.94 us/op 561.53 us/op 0.77
altair processAttestation - setStatus - 100% committees join 502.42 us/op 671.35 us/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase 4.1564 ms/op 5.2160 ms/op 0.80
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.559 ms/op 27.699 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase 35.816 ms/op 40.381 ms/op 0.89
altair processBlock - 250000 vs - 7PWei worstcase hashState 74.368 ms/op 89.771 ms/op 0.83
phase0 processBlock - 250000 vs - 7PWei normalcase 3.0059 ms/op 2.3373 ms/op 1.29
phase0 processBlock - 250000 vs - 7PWei worstcase 25.542 ms/op 28.487 ms/op 0.90
altair processEth1Data - 250000 vs - 7PWei normalcase 272.06 us/op 532.98 us/op 0.51
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.9400 us/op 10.344 us/op 0.77
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 31.130 us/op 60.633 us/op 0.51
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.981 us/op 16.999 us/op 0.65
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 7.0240 us/op 10.299 us/op 0.68
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 132.75 us/op 196.34 us/op 0.68
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 932.15 us/op 1.1862 ms/op 0.79
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4670 ms/op 1.7502 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2389 ms/op 1.5566 ms/op 0.80
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.6857 ms/op 4.5996 ms/op 0.80
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4467 ms/op 1.7863 ms/op 0.81
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.3865 ms/op 4.5142 ms/op 0.75
Tree 40 250000 create 202.32 ms/op 343.63 ms/op 0.59
Tree 40 250000 get(125000) 122.61 ns/op 169.05 ns/op 0.73
Tree 40 250000 set(125000) 555.39 ns/op 833.64 ns/op 0.67
Tree 40 250000 toArray() 13.733 ms/op 22.543 ms/op 0.61
Tree 40 250000 iterate all - toArray() + loop 15.356 ms/op 23.616 ms/op 0.65
Tree 40 250000 iterate all - get(i) 43.288 ms/op 63.442 ms/op 0.68
Array 250000 create 2.5285 ms/op 4.2473 ms/op 0.60
Array 250000 clone - spread 1.1803 ms/op 1.6957 ms/op 0.70
Array 250000 get(125000) 0.57500 ns/op 0.47900 ns/op 1.20
Array 250000 set(125000) 0.58600 ns/op 0.49000 ns/op 1.20
Array 250000 iterate all - loop 73.328 us/op 107.83 us/op 0.68
phase0 afterProcessEpoch - 250000 vs - 7PWei 71.304 ms/op 97.657 ms/op 0.73
Array.fill - length 1000000 2.5688 ms/op 4.5134 ms/op 0.57
Array push - length 1000000 16.038 ms/op 19.928 ms/op 0.80
Array.get 0.26805 ns/op 0.29053 ns/op 0.92
Uint8Array.get 0.33969 ns/op 0.47853 ns/op 0.71
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.674 ms/op 20.247 ms/op 0.87
altair processEpoch - mainnet_e81889 311.81 ms/op 374.56 ms/op 0.83
mainnet_e81889 - altair beforeProcessEpoch 18.306 ms/op 21.759 ms/op 0.84
mainnet_e81889 - altair processJustificationAndFinalization 13.004 us/op 18.687 us/op 0.70
mainnet_e81889 - altair processInactivityUpdates 4.6607 ms/op 7.4995 ms/op 0.62
mainnet_e81889 - altair processRewardsAndPenalties 53.231 ms/op 46.638 ms/op 1.14
mainnet_e81889 - altair processRegistryUpdates 2.7470 us/op 3.6920 us/op 0.74
mainnet_e81889 - altair processSlashings 989.00 ns/op 815.00 ns/op 1.21
mainnet_e81889 - altair processEth1DataReset 651.00 ns/op 1.5480 us/op 0.42
mainnet_e81889 - altair processEffectiveBalanceUpdates 996.63 us/op 2.2555 ms/op 0.44
mainnet_e81889 - altair processSlashingsReset 4.4130 us/op 10.005 us/op 0.44
mainnet_e81889 - altair processRandaoMixesReset 5.6690 us/op 7.1730 us/op 0.79
mainnet_e81889 - altair processHistoricalRootsUpdate 848.00 ns/op 986.00 ns/op 0.86
mainnet_e81889 - altair processParticipationFlagUpdates 3.1800 us/op 7.1230 us/op 0.45
mainnet_e81889 - altair processSyncCommitteeUpdates 943.00 ns/op 1.2720 us/op 0.74
mainnet_e81889 - altair afterProcessEpoch 76.175 ms/op 108.59 ms/op 0.70
capella processEpoch - mainnet_e217614 1.1751 s/op 1.4754 s/op 0.80
mainnet_e217614 - capella beforeProcessEpoch 79.729 ms/op 88.580 ms/op 0.90
mainnet_e217614 - capella processJustificationAndFinalization 21.799 us/op 26.067 us/op 0.84
mainnet_e217614 - capella processInactivityUpdates 17.520 ms/op 20.857 ms/op 0.84
mainnet_e217614 - capella processRewardsAndPenalties 250.93 ms/op 253.95 ms/op 0.99
mainnet_e217614 - capella processRegistryUpdates 13.487 us/op 12.954 us/op 1.04
mainnet_e217614 - capella processSlashings 806.00 ns/op 299.00 ns/op 2.70
mainnet_e217614 - capella processEth1DataReset 704.00 ns/op 483.00 ns/op 1.46
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.415 ms/op 14.871 ms/op 1.10
mainnet_e217614 - capella processSlashingsReset 2.8520 us/op 6.2720 us/op 0.45
mainnet_e217614 - capella processRandaoMixesReset 3.1070 us/op 5.2520 us/op 0.59
mainnet_e217614 - capella processHistoricalRootsUpdate 756.00 ns/op 1.2270 us/op 0.62
mainnet_e217614 - capella processParticipationFlagUpdates 1.4580 us/op 2.3840 us/op 0.61
mainnet_e217614 - capella afterProcessEpoch 199.54 ms/op 247.40 ms/op 0.81
phase0 processEpoch - mainnet_e58758 402.58 ms/op 464.52 ms/op 0.87
mainnet_e58758 - phase0 beforeProcessEpoch 77.940 ms/op 110.08 ms/op 0.71
mainnet_e58758 - phase0 processJustificationAndFinalization 15.279 us/op 15.293 us/op 1.00
mainnet_e58758 - phase0 processRewardsAndPenalties 31.952 ms/op 33.584 ms/op 0.95
mainnet_e58758 - phase0 processRegistryUpdates 5.6890 us/op 7.8900 us/op 0.72
mainnet_e58758 - phase0 processSlashings 732.00 ns/op 334.00 ns/op 2.19
mainnet_e58758 - phase0 processEth1DataReset 758.00 ns/op 325.00 ns/op 2.33
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5377 ms/op 1.1632 ms/op 1.32
mainnet_e58758 - phase0 processSlashingsReset 2.5810 us/op 2.9860 us/op 0.86
mainnet_e58758 - phase0 processRandaoMixesReset 3.8430 us/op 4.2250 us/op 0.91
mainnet_e58758 - phase0 processHistoricalRootsUpdate 814.00 ns/op 699.00 ns/op 1.16
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.0670 us/op 3.3110 us/op 0.93
mainnet_e58758 - phase0 afterProcessEpoch 65.131 ms/op 82.009 ms/op 0.79
phase0 processEffectiveBalanceUpdates - 250000 normalcase 983.40 us/op 1.8536 ms/op 0.53
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.8803 ms/op 2.5359 ms/op 0.74
altair processInactivityUpdates - 250000 normalcase 16.059 ms/op 16.332 ms/op 0.98
altair processInactivityUpdates - 250000 worstcase 15.663 ms/op 17.771 ms/op 0.88
phase0 processRegistryUpdates - 250000 normalcase 6.2620 us/op 6.4080 us/op 0.98
phase0 processRegistryUpdates - 250000 badcase_full_deposits 313.13 us/op 291.27 us/op 1.08
phase0 processRegistryUpdates - 250000 worstcase 0.5 108.01 ms/op 122.79 ms/op 0.88
altair processRewardsAndPenalties - 250000 normalcase 34.617 ms/op 40.824 ms/op 0.85
altair processRewardsAndPenalties - 250000 worstcase 34.207 ms/op 43.251 ms/op 0.79
phase0 getAttestationDeltas - 250000 normalcase 6.6043 ms/op 8.8196 ms/op 0.75
phase0 getAttestationDeltas - 250000 worstcase 6.1151 ms/op 7.7521 ms/op 0.79
phase0 processSlashings - 250000 worstcase 90.767 us/op 96.501 us/op 0.94
altair processSyncCommitteeUpdates - 250000 94.703 ms/op 124.89 ms/op 0.76
BeaconState.hashTreeRoot - No change 442.00 ns/op 253.00 ns/op 1.75
BeaconState.hashTreeRoot - 1 full validator 96.400 us/op 103.54 us/op 0.93
BeaconState.hashTreeRoot - 32 full validator 985.67 us/op 935.33 us/op 1.05
BeaconState.hashTreeRoot - 512 full validator 10.258 ms/op 10.655 ms/op 0.96
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 175.09 us/op 117.14 us/op 1.49
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0054 ms/op 1.5863 ms/op 1.26
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.504 ms/op 19.666 ms/op 1.20
BeaconState.hashTreeRoot - 1 balances 105.12 us/op 103.77 us/op 1.01
BeaconState.hashTreeRoot - 32 balances 982.98 us/op 788.97 us/op 1.25
BeaconState.hashTreeRoot - 512 balances 10.109 ms/op 7.7002 ms/op 1.31
BeaconState.hashTreeRoot - 250000 balances 143.86 ms/op 140.22 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 23.425 us/op 25.749 us/op 0.91
byteArrayEquals 32 47.307 ns/op 56.671 ns/op 0.83
Buffer.compare 32 14.701 ns/op 16.769 ns/op 0.88
byteArrayEquals 1024 1.2162 us/op 1.5667 us/op 0.78
Buffer.compare 1024 23.005 ns/op 24.858 ns/op 0.93
byteArrayEquals 16384 19.367 us/op 24.895 us/op 0.78
Buffer.compare 16384 172.54 ns/op 201.45 ns/op 0.86
byteArrayEquals 123687377 149.44 ms/op 189.53 ms/op 0.79
Buffer.compare 123687377 6.6514 ms/op 7.5462 ms/op 0.88
byteArrayEquals 32 - diff last byte 48.702 ns/op 52.023 ns/op 0.94
Buffer.compare 32 - diff last byte 15.317 ns/op 16.787 ns/op 0.91
byteArrayEquals 1024 - diff last byte 1.2227 us/op 1.5746 us/op 0.78
Buffer.compare 1024 - diff last byte 23.562 ns/op 25.252 ns/op 0.93
byteArrayEquals 16384 - diff last byte 19.699 us/op 25.054 us/op 0.79
Buffer.compare 16384 - diff last byte 178.25 ns/op 199.11 ns/op 0.90
byteArrayEquals 123687377 - diff last byte 153.17 ms/op 188.94 ms/op 0.81
Buffer.compare 123687377 - diff last byte 4.8435 ms/op 7.6602 ms/op 0.63
byteArrayEquals 32 - random bytes 4.9070 ns/op 5.1700 ns/op 0.95
Buffer.compare 32 - random bytes 16.182 ns/op 17.043 ns/op 0.95
byteArrayEquals 1024 - random bytes 4.9250 ns/op 5.2340 ns/op 0.94
Buffer.compare 1024 - random bytes 16.399 ns/op 17.171 ns/op 0.96
byteArrayEquals 16384 - random bytes 4.8840 ns/op 5.2030 ns/op 0.94
Buffer.compare 16384 - random bytes 16.444 ns/op 17.691 ns/op 0.93
byteArrayEquals 123687377 - random bytes 7.7800 ns/op 6.7400 ns/op 1.15
Buffer.compare 123687377 - random bytes 19.710 ns/op 19.680 ns/op 1.00
regular array get 100000 times 30.971 us/op 41.077 us/op 0.75
wrappedArray get 100000 times 30.933 us/op 33.447 us/op 0.92
arrayWithProxy get 100000 times 10.875 ms/op 14.144 ms/op 0.77
ssz.Root.equals 44.053 ns/op 46.300 ns/op 0.95
byteArrayEquals 43.885 ns/op 45.831 ns/op 0.96
Buffer.compare 9.6510 ns/op 10.682 ns/op 0.90
shuffle list - 16384 els 5.3207 ms/op 6.2665 ms/op 0.85
shuffle list - 250000 els 79.210 ms/op 93.423 ms/op 0.85
processSlot - 1 slots 14.032 us/op 13.415 us/op 1.05
processSlot - 32 slots 3.3243 ms/op 3.2387 ms/op 1.03
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 33.643 ms/op 35.511 ms/op 0.95
getCommitteeAssignments - req 1 vs - 250000 vc 1.8563 ms/op 2.1018 ms/op 0.88
getCommitteeAssignments - req 100 vs - 250000 vc 3.8100 ms/op 4.0816 ms/op 0.93
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8360 ms/op 4.4360 ms/op 0.86
findModifiedValidators - 10000 modified validators 255.42 ms/op 240.61 ms/op 1.06
findModifiedValidators - 1000 modified validators 158.72 ms/op 154.86 ms/op 1.02
findModifiedValidators - 100 modified validators 159.66 ms/op 141.02 ms/op 1.13
findModifiedValidators - 10 modified validators 178.88 ms/op 138.34 ms/op 1.29
findModifiedValidators - 1 modified validators 170.95 ms/op 157.80 ms/op 1.08
findModifiedValidators - no difference 163.75 ms/op 141.95 ms/op 1.15
compare ViewDUs 3.5176 s/op 3.3910 s/op 1.04
compare each validator Uint8Array 1.2827 s/op 1.3887 s/op 0.92
compare ViewDU to Uint8Array 1.0381 s/op 1.0282 s/op 1.01
migrate state 1000000 validators, 24 modified, 0 new 856.19 ms/op 825.89 ms/op 1.04
migrate state 1000000 validators, 1700 modified, 1000 new 953.99 ms/op 1.0503 s/op 0.91
migrate state 1000000 validators, 3400 modified, 2000 new 1.0596 s/op 1.2945 s/op 0.82
migrate state 1500000 validators, 24 modified, 0 new 805.40 ms/op 867.25 ms/op 0.93
migrate state 1500000 validators, 1700 modified, 1000 new 981.88 ms/op 1.0596 s/op 0.93
migrate state 1500000 validators, 3400 modified, 2000 new 1.1538 s/op 1.2369 s/op 0.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.8800 ns/op 4.4100 ns/op 1.33
state getBlockRootAtSlot - 250000 vs - 7PWei 380.77 ns/op 741.99 ns/op 0.51
computeProposers - vc 250000 5.2216 ms/op 7.0756 ms/op 0.74
computeEpochShuffling - vc 250000 76.910 ms/op 88.995 ms/op 0.86
getNextSyncCommittee - vc 250000 104.24 ms/op 112.79 ms/op 0.92
computeSigningRoot for AttestationData 22.129 us/op 24.471 us/op 0.90
hash AttestationData serialized data then Buffer.toString(base64) 1.1167 us/op 1.5181 us/op 0.74
toHexString serialized data 796.53 ns/op 852.79 ns/op 0.93
Buffer.toString(base64) 138.98 ns/op 183.89 ns/op 0.76
nodejs block root to RootHex using toHex 116.88 ns/op 140.29 ns/op 0.83
nodejs block root to RootHex using toRootHex 75.908 ns/op 86.734 ns/op 0.88
browser block root to RootHex using the deprecated toHexString 205.24 ns/op 221.43 ns/op 0.93
browser block root to RootHex using toHex 160.86 ns/op 176.97 ns/op 0.91
browser block root to RootHex using toRootHex 140.85 ns/op 157.09 ns/op 0.90

Please sign in to comment.