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: parse --blindedLocal flag value as boolean #6403

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Feb 7, 2024

Motivation

The CLI flag is parsed as a string value but our schema validation expects a boolean causing the http request to fail

consensus  | 2024-02-07T12:08:12.040208185Z Feb-07 12:08:12.039[rest]            error: Req req-jxb7 produceBlockV3 error - querystring/blinded_local must be boolean
consensus  | 2024-02-07T12:08:12.040238425Z Error: querystring/blinded_local must be boolean
consensus  | 2024-02-07T12:08:12.040243355Z     at defaultSchemaErrorFormatter (/usr/app/node_modules/fastify/lib/context.js:108:10)
consensus  | 2024-02-07T12:08:12.040247645Z     at wrapValidationError (/usr/app/node_modules/fastify/lib/validation.js:228:17)
consensus  | 2024-02-07T12:08:12.040251665Z     at validate (/usr/app/node_modules/fastify/lib/validation.js:157:16)
consensus  | 2024-02-07T12:08:12.040255685Z     at preValidationCallback (/usr/app/node_modules/fastify/lib/handleRequest.js:92:25)
consensus  | 2024-02-07T12:08:12.040259555Z     at handler (/usr/app/node_modules/fastify/lib/handleRequest.js:76:7)
consensus  | 2024-02-07T12:08:12.040263405Z     at handleRequest (/usr/app/node_modules/fastify/lib/handleRequest.js:24:5)
consensus  | 2024-02-07T12:08:12.040267315Z     at runPreParsing (/usr/app/node_modules/fastify/lib/route.js:569:5)
consensus  | 2024-02-07T12:08:12.040271175Z     at next (/usr/app/node_modules/fastify/lib/hooks.js:179:7)
consensus  | 2024-02-07T12:08:12.040274945Z     at handleResolve (/usr/app/node_modules/fastify/lib/hooks.js:196:5)
consensus  | 2024-02-07T12:08:12.040279395Z     at processTicksAndRejections (node:internal/process/task_queues:95:5)

Description

Parse --blindedLocal flag value as boolean

Verified this solution works by running a local dev node but we should think about how we can have more type guarantees of CLI args to make sure if we use type boolean that it is actually parsed as a boolean by yargs.

./lodestar dev \
  --genesisValidators 8 \
  --startValidators 0..7 \
  --genesisTime $(date +%s) \
  --enr.ip 127.0.0.1 \
  --dataDir .lodestar/node1 \
  --reset \
  --rest \
  --rest.namespace '*' \
  --metrics \
  --logLevel info \
  --eth1 false \
  --network.rateLimitMultiplier 0 \
  --useProduceBlockV3 \
  --blindedLocal

@nflaig nflaig requested a review from a team as a code owner February 7, 2024 12:54
@nflaig
Copy link
Member Author

nflaig commented Feb 7, 2024

Follow up issue to improve type safety of CLI args #6404

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Merging #6403 (c3c2750) into unstable (b6890ad) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6403   +/-   ##
=========================================
  Coverage     60.14%   60.14%           
=========================================
  Files           407      407           
  Lines         46512    46512           
  Branches       1551     1551           
=========================================
  Hits          27975    27975           
  Misses        18505    18505           
  Partials         32       32           

Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

lgtm

@nflaig nflaig merged commit 924a6cd into unstable Feb 7, 2024
12 of 15 checks passed
@nflaig nflaig deleted the nflaig/fix-blinded-local branch February 7, 2024 13:18
@philknows philknows mentioned this pull request Feb 7, 2024
philknows added a commit that referenced this pull request Feb 7, 2024
* v1.15.1

* fix: ignore stale keystore lockfiles (#6363)

* fix: ignore stale keystore lockfiles

* Update error message if lockfile is already acquired

* Update keymanager lockfile e2e tests

* fix: ignore forkchoice invalidations if latestValidHash not found (#6361)

* fix: ignore forkchoice invalidations if latestValidHash not found

* rename for better understanding

* update the lvh search start index

* apply feedback

* fix: parse --blindedLocal flag value as boolean (#6403)

---------

Co-authored-by: Nico Flaig <[email protected]>
Co-authored-by: g11tech <[email protected]>
Copy link
Contributor

github-actions bot commented Feb 7, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 7b12816 Previous: b6890ad Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 814.27 us/op 770.58 us/op 1.06
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 130.72 us/op 102.36 us/op 1.28
BLS verify - blst-native 1.5755 ms/op 1.3128 ms/op 1.20
BLS verifyMultipleSignatures 3 - blst-native 3.2974 ms/op 2.7598 ms/op 1.19
BLS verifyMultipleSignatures 8 - blst-native 7.4100 ms/op 6.0384 ms/op 1.23
BLS verifyMultipleSignatures 32 - blst-native 26.586 ms/op 22.145 ms/op 1.20
BLS verifyMultipleSignatures 64 - blst-native 52.987 ms/op 43.759 ms/op 1.21
BLS verifyMultipleSignatures 128 - blst-native 106.87 ms/op 86.305 ms/op 1.24
BLS deserializing 10000 signatures 1.1446 s/op 952.94 ms/op 1.20
BLS deserializing 100000 signatures 10.552 s/op 9.6796 s/op 1.09
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.6117 ms/op 1.3665 ms/op 1.18
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.7414 ms/op 1.5474 ms/op 1.13
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.5553 ms/op 2.4132 ms/op 1.06
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.0781 ms/op 4.9912 ms/op 0.82
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.7226 ms/op 5.6105 ms/op 1.20
BLS aggregatePubkeys 32 - blst-native 30.582 us/op 26.117 us/op 1.17
BLS aggregatePubkeys 128 - blst-native 116.33 us/op 103.22 us/op 1.13
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 76.651 ms/op 54.171 ms/op 1.41
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 69.479 ms/op 54.363 ms/op 1.28
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 60.386 ms/op 40.156 ms/op 1.50
getSlashingsAndExits - default max 425.02 us/op 336.38 us/op 1.26
getSlashingsAndExits - 2k 600.85 us/op 664.54 us/op 0.90
proposeBlockBody type=full, size=empty 7.3678 ms/op 6.3766 ms/op 1.16
isKnown best case - 1 super set check 788.00 ns/op 647.00 ns/op 1.22
isKnown normal case - 2 super set checks 602.00 ns/op 688.00 ns/op 0.88
isKnown worse case - 16 super set checks 609.00 ns/op 712.00 ns/op 0.86
CheckpointStateCache - add get delete 7.3760 us/op 7.5550 us/op 0.98
validate api signedAggregateAndProof - struct 3.3201 ms/op 3.3603 ms/op 0.99
validate gossip signedAggregateAndProof - struct 3.5119 ms/op 3.3004 ms/op 1.06
validate gossip attestation - vc 640000 1.7793 ms/op 1.5764 ms/op 1.13
batch validate gossip attestation - vc 640000 - chunk 32 212.98 us/op 199.05 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 64 192.12 us/op 170.27 us/op 1.13
batch validate gossip attestation - vc 640000 - chunk 128 184.04 us/op 177.51 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 256 164.86 us/op 160.20 us/op 1.03
pickEth1Vote - no votes 1.3653 ms/op 1.5357 ms/op 0.89
pickEth1Vote - max votes 11.397 ms/op 15.236 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot value x2048 20.130 ms/op 26.550 ms/op 0.76
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 33.704 ms/op 35.988 ms/op 0.94
pickEth1Vote - Eth1Data fastSerialize value x2048 846.70 us/op 825.90 us/op 1.03
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.1594 ms/op 6.7304 ms/op 1.06
bytes32 toHexString 576.00 ns/op 870.00 ns/op 0.66
bytes32 Buffer.toString(hex) 325.00 ns/op 325.00 ns/op 1.00
bytes32 Buffer.toString(hex) from Uint8Array 475.00 ns/op 521.00 ns/op 0.91
bytes32 Buffer.toString(hex) + 0x 327.00 ns/op 326.00 ns/op 1.00
Object access 1 prop 0.20200 ns/op 0.21500 ns/op 0.94
Map access 1 prop 0.17100 ns/op 0.16700 ns/op 1.02
Object get x1000 8.7230 ns/op 7.9380 ns/op 1.10
Map get x1000 0.89800 ns/op 0.90400 ns/op 0.99
Object set x1000 62.800 ns/op 65.760 ns/op 0.95
Map set x1000 48.350 ns/op 49.070 ns/op 0.99
Return object 10000 times 0.27310 ns/op 0.25280 ns/op 1.08
Throw Error 10000 times 4.3051 us/op 3.9884 us/op 1.08
fastMsgIdFn sha256 / 200 bytes 3.6380 us/op 3.5730 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 360.00 ns/op 331.00 ns/op 1.09
fastMsgIdFn h64 xxhash / 200 bytes 406.00 ns/op 420.00 ns/op 0.97
fastMsgIdFn sha256 / 1000 bytes 12.235 us/op 12.626 us/op 0.97
fastMsgIdFn h32 xxhash / 1000 bytes 473.00 ns/op 507.00 ns/op 0.93
fastMsgIdFn h64 xxhash / 1000 bytes 485.00 ns/op 495.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 117.37 us/op 110.19 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 2.2130 us/op 2.4200 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 1.5600 us/op 1.7820 us/op 0.88
send data - 1000 256B messages 23.081 ms/op 30.797 ms/op 0.75
send data - 1000 512B messages 27.544 ms/op 33.120 ms/op 0.83
send data - 1000 1024B messages 46.324 ms/op 43.128 ms/op 1.07
send data - 1000 1200B messages 39.169 ms/op 52.770 ms/op 0.74
send data - 1000 2048B messages 52.893 ms/op 59.069 ms/op 0.90
send data - 1000 4096B messages 44.952 ms/op 53.200 ms/op 0.84
send data - 1000 16384B messages 134.61 ms/op 130.39 ms/op 1.03
send data - 1000 65536B messages 501.32 ms/op 560.63 ms/op 0.89
enrSubnets - fastDeserialize 64 bits 2.0610 us/op 1.8580 us/op 1.11
enrSubnets - ssz BitVector 64 bits 575.00 ns/op 572.00 ns/op 1.01
enrSubnets - fastDeserialize 4 bits 258.00 ns/op 243.00 ns/op 1.06
enrSubnets - ssz BitVector 4 bits 615.00 ns/op 570.00 ns/op 1.08
prioritizePeers score -10:0 att 32-0.1 sync 2-0 124.36 us/op 127.63 us/op 0.97
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 180.60 us/op 163.84 us/op 1.10
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 227.71 us/op 236.05 us/op 0.96
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 378.44 us/op 393.66 us/op 0.96
prioritizePeers score 0:0 att 64-1 sync 4-1 397.87 us/op 461.12 us/op 0.86
array of 16000 items push then shift 1.9195 us/op 2.1634 us/op 0.89
LinkedList of 16000 items push then shift 10.605 ns/op 13.252 ns/op 0.80
array of 16000 items push then pop 118.71 ns/op 149.29 ns/op 0.80
LinkedList of 16000 items push then pop 10.503 ns/op 11.492 ns/op 0.91
array of 24000 items push then shift 2.7814 us/op 2.8626 us/op 0.97
LinkedList of 24000 items push then shift 10.547 ns/op 14.007 ns/op 0.75
array of 24000 items push then pop 164.80 ns/op 217.43 ns/op 0.76
LinkedList of 24000 items push then pop 10.035 ns/op 11.408 ns/op 0.88
intersect bitArray bitLen 8 6.8380 ns/op 6.8720 ns/op 1.00
intersect array and set length 8 85.136 ns/op 122.13 ns/op 0.70
intersect bitArray bitLen 128 41.447 ns/op 44.015 ns/op 0.94
intersect array and set length 128 1.2113 us/op 1.4272 us/op 0.85
bitArray.getTrueBitIndexes() bitLen 128 2.0980 us/op 2.0110 us/op 1.04
bitArray.getTrueBitIndexes() bitLen 248 3.4470 us/op 3.9200 us/op 0.88
bitArray.getTrueBitIndexes() bitLen 512 6.8810 us/op 8.0430 us/op 0.86
Buffer.concat 32 items 1.1920 us/op 1.4010 us/op 0.85
Uint8Array.set 32 items 2.1330 us/op 3.0830 us/op 0.69
Set add up to 64 items then delete first 5.7575 us/op 5.6939 us/op 1.01
OrderedSet add up to 64 items then delete first 7.6189 us/op 7.3171 us/op 1.04
Set add up to 64 items then delete last 6.4342 us/op 6.2319 us/op 1.03
OrderedSet add up to 64 items then delete last 8.0591 us/op 8.3215 us/op 0.97
Set add up to 64 items then delete middle 6.0801 us/op 6.1144 us/op 0.99
OrderedSet add up to 64 items then delete middle 9.0237 us/op 9.9432 us/op 0.91
Set add up to 128 items then delete first 12.152 us/op 12.171 us/op 1.00
OrderedSet add up to 128 items then delete first 15.093 us/op 16.284 us/op 0.93
Set add up to 128 items then delete last 11.474 us/op 11.703 us/op 0.98
OrderedSet add up to 128 items then delete last 15.360 us/op 15.269 us/op 1.01
Set add up to 128 items then delete middle 11.934 us/op 11.976 us/op 1.00
OrderedSet add up to 128 items then delete middle 22.505 us/op 22.868 us/op 0.98
Set add up to 256 items then delete first 28.622 us/op 25.187 us/op 1.14
OrderedSet add up to 256 items then delete first 35.471 us/op 37.906 us/op 0.94
Set add up to 256 items then delete last 24.419 us/op 25.843 us/op 0.94
OrderedSet add up to 256 items then delete last 32.514 us/op 35.370 us/op 0.92
Set add up to 256 items then delete middle 24.034 us/op 26.372 us/op 0.91
OrderedSet add up to 256 items then delete middle 60.498 us/op 63.891 us/op 0.95
transfer serialized Status (84 B) 2.3490 us/op 2.6730 us/op 0.88
copy serialized Status (84 B) 1.7420 us/op 1.9300 us/op 0.90
transfer serialized SignedVoluntaryExit (112 B) 2.5260 us/op 2.6770 us/op 0.94
copy serialized SignedVoluntaryExit (112 B) 1.9540 us/op 1.7590 us/op 1.11
transfer serialized ProposerSlashing (416 B) 3.5690 us/op 3.5760 us/op 1.00
copy serialized ProposerSlashing (416 B) 3.4030 us/op 3.1670 us/op 1.07
transfer serialized Attestation (485 B) 3.4290 us/op 3.8830 us/op 0.88
copy serialized Attestation (485 B) 2.5390 us/op 2.6720 us/op 0.95
transfer serialized AttesterSlashing (33232 B) 2.5660 us/op 2.6530 us/op 0.97
copy serialized AttesterSlashing (33232 B) 8.8560 us/op 10.785 us/op 0.82
transfer serialized Small SignedBeaconBlock (128000 B) 3.8830 us/op 3.5410 us/op 1.10
copy serialized Small SignedBeaconBlock (128000 B) 18.664 us/op 31.223 us/op 0.60
transfer serialized Avg SignedBeaconBlock (200000 B) 3.6480 us/op 4.9460 us/op 0.74
copy serialized Avg SignedBeaconBlock (200000 B) 25.613 us/op 42.885 us/op 0.60
transfer serialized BlobsSidecar (524380 B) 3.2420 us/op 5.9440 us/op 0.55
copy serialized BlobsSidecar (524380 B) 95.658 us/op 205.59 us/op 0.47
transfer serialized Big SignedBeaconBlock (1000000 B) 3.4220 us/op 5.1040 us/op 0.67
copy serialized Big SignedBeaconBlock (1000000 B) 175.75 us/op 313.73 us/op 0.56
pass gossip attestations to forkchoice per slot 4.6994 ms/op 4.6511 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 856.57 us/op 818.83 us/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 0 4.5239 ms/op 5.9583 ms/op 0.76
forkChoice updateHead vc 1000000 bc 64 eq 0 7.7151 ms/op 9.8277 ms/op 0.79
forkChoice updateHead vc 600000 bc 320 eq 0 4.8050 ms/op 6.0536 ms/op 0.79
forkChoice updateHead vc 600000 bc 1200 eq 0 4.8098 ms/op 6.9147 ms/op 0.70
forkChoice updateHead vc 600000 bc 7200 eq 0 5.8988 ms/op 8.1221 ms/op 0.73
forkChoice updateHead vc 600000 bc 64 eq 1000 12.688 ms/op 14.556 ms/op 0.87
forkChoice updateHead vc 600000 bc 64 eq 10000 13.316 ms/op 14.838 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 300000 19.842 ms/op 51.162 ms/op 0.39
computeDeltas 500000 validators 300 proto nodes 7.5128 ms/op 8.4208 ms/op 0.89
computeDeltas 500000 validators 1200 proto nodes 7.4437 ms/op 8.0849 ms/op 0.92
computeDeltas 500000 validators 7200 proto nodes 7.3736 ms/op 7.7036 ms/op 0.96
computeDeltas 750000 validators 300 proto nodes 11.116 ms/op 11.059 ms/op 1.01
computeDeltas 750000 validators 1200 proto nodes 11.518 ms/op 11.325 ms/op 1.02
computeDeltas 750000 validators 7200 proto nodes 12.360 ms/op 10.961 ms/op 1.13
computeDeltas 1400000 validators 300 proto nodes 22.950 ms/op 20.776 ms/op 1.10
computeDeltas 1400000 validators 1200 proto nodes 23.775 ms/op 20.617 ms/op 1.15
computeDeltas 1400000 validators 7200 proto nodes 23.711 ms/op 20.214 ms/op 1.17
computeDeltas 2100000 validators 300 proto nodes 37.540 ms/op 31.065 ms/op 1.21
computeDeltas 2100000 validators 1200 proto nodes 35.546 ms/op 31.689 ms/op 1.12
computeDeltas 2100000 validators 7200 proto nodes 36.564 ms/op 31.492 ms/op 1.16
altair processAttestation - 250000 vs - 7PWei normalcase 3.5924 ms/op 3.4817 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei worstcase 5.2924 ms/op 4.8470 ms/op 1.09
altair processAttestation - setStatus - 1/6 committees join 234.68 us/op 215.76 us/op 1.09
altair processAttestation - setStatus - 1/3 committees join 366.88 us/op 402.29 us/op 0.91
altair processAttestation - setStatus - 1/2 committees join 483.73 us/op 542.15 us/op 0.89
altair processAttestation - setStatus - 2/3 committees join 622.32 us/op 634.25 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 978.41 us/op 852.94 us/op 1.15
altair processAttestation - setStatus - 100% committees join 1.4232 ms/op 1.0503 ms/op 1.35
altair processBlock - 250000 vs - 7PWei normalcase 14.126 ms/op 11.148 ms/op 1.27
altair processBlock - 250000 vs - 7PWei normalcase hashState 48.317 ms/op 38.965 ms/op 1.24
altair processBlock - 250000 vs - 7PWei worstcase 67.335 ms/op 48.899 ms/op 1.38
altair processBlock - 250000 vs - 7PWei worstcase hashState 134.69 ms/op 107.58 ms/op 1.25
phase0 processBlock - 250000 vs - 7PWei normalcase 4.8899 ms/op 3.4773 ms/op 1.41
phase0 processBlock - 250000 vs - 7PWei worstcase 48.033 ms/op 36.126 ms/op 1.33
altair processEth1Data - 250000 vs - 7PWei normalcase 1.1176 ms/op 590.43 us/op 1.89
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 18.282 us/op 13.202 us/op 1.38
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 56.706 us/op 65.825 us/op 0.86
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 25.717 us/op 16.394 us/op 1.57
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 22.073 us/op 11.801 us/op 1.87
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 241.90 us/op 133.94 us/op 1.81
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.7879 ms/op 1.4250 ms/op 1.25
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.1544 ms/op 1.9239 ms/op 1.12
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.1535 ms/op 1.5257 ms/op 1.41
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.3404 ms/op 3.8016 ms/op 1.40
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.7938 ms/op 2.4366 ms/op 1.56
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 8.9682 ms/op 5.4242 ms/op 1.65
Tree 40 250000 create 875.45 ms/op 382.80 ms/op 2.29
Tree 40 250000 get(125000) 245.60 ns/op 220.26 ns/op 1.12
Tree 40 250000 set(125000) 3.0127 us/op 1.0869 us/op 2.77
Tree 40 250000 toArray() 31.138 ms/op 19.315 ms/op 1.61
Tree 40 250000 iterate all - toArray() + loop 30.573 ms/op 22.104 ms/op 1.38
Tree 40 250000 iterate all - get(i) 100.36 ms/op 76.811 ms/op 1.31
MutableVector 250000 create 25.062 ms/op 12.616 ms/op 1.99
MutableVector 250000 get(125000) 9.5460 ns/op 7.3210 ns/op 1.30
MutableVector 250000 set(125000) 869.43 ns/op 256.68 ns/op 3.39
MutableVector 250000 toArray() 5.9341 ms/op 3.4950 ms/op 1.70
MutableVector 250000 iterate all - toArray() + loop 6.5096 ms/op 3.5708 ms/op 1.82
MutableVector 250000 iterate all - get(i) 2.5456 ms/op 1.5165 ms/op 1.68
Array 250000 create 5.9647 ms/op 3.1043 ms/op 1.92
Array 250000 clone - spread 6.9528 ms/op 1.2795 ms/op 5.43
Array 250000 get(125000) 3.7150 ns/op 1.0250 ns/op 3.62
Array 250000 set(125000) 7.3750 ns/op 4.1090 ns/op 1.79
Array 250000 iterate all - loop 229.41 us/op 164.19 us/op 1.40
effectiveBalanceIncrements clone Uint8Array 300000 108.78 us/op 26.402 us/op 4.12
effectiveBalanceIncrements clone MutableVector 300000 2.0570 us/op 349.00 ns/op 5.89
effectiveBalanceIncrements rw all Uint8Array 300000 359.47 us/op 200.73 us/op 1.79
effectiveBalanceIncrements rw all MutableVector 300000 283.10 ms/op 84.234 ms/op 3.36
phase0 afterProcessEpoch - 250000 vs - 7PWei 168.91 ms/op 114.08 ms/op 1.48
phase0 beforeProcessEpoch - 250000 vs - 7PWei 86.479 ms/op 51.547 ms/op 1.68
altair processEpoch - mainnet_e81889 761.34 ms/op 521.55 ms/op 1.46
mainnet_e81889 - altair beforeProcessEpoch 142.81 ms/op 84.386 ms/op 1.69
mainnet_e81889 - altair processJustificationAndFinalization 37.784 us/op 14.747 us/op 2.56
mainnet_e81889 - altair processInactivityUpdates 11.280 ms/op 6.5667 ms/op 1.72
mainnet_e81889 - altair processRewardsAndPenalties 101.03 ms/op 62.505 ms/op 1.62
mainnet_e81889 - altair processRegistryUpdates 9.2740 us/op 2.8990 us/op 3.20
mainnet_e81889 - altair processSlashings 2.5610 us/op 420.00 ns/op 6.10
mainnet_e81889 - altair processEth1DataReset 1.3660 us/op 659.00 ns/op 2.07
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.1753 ms/op 1.6549 ms/op 1.31
mainnet_e81889 - altair processSlashingsReset 7.8650 us/op 4.1860 us/op 1.88
mainnet_e81889 - altair processRandaoMixesReset 10.897 us/op 4.5570 us/op 2.39
mainnet_e81889 - altair processHistoricalRootsUpdate 1.9790 us/op 600.00 ns/op 3.30
mainnet_e81889 - altair processParticipationFlagUpdates 7.6850 us/op 1.8780 us/op 4.09
mainnet_e81889 - altair processSyncCommitteeUpdates 2.2130 us/op 578.00 ns/op 3.83
mainnet_e81889 - altair afterProcessEpoch 194.90 ms/op 121.27 ms/op 1.61
capella processEpoch - mainnet_e217614 3.4389 s/op 2.1924 s/op 1.57
mainnet_e217614 - capella beforeProcessEpoch 626.83 ms/op 485.88 ms/op 1.29
mainnet_e217614 - capella processJustificationAndFinalization 34.942 us/op 20.261 us/op 1.72
mainnet_e217614 - capella processInactivityUpdates 36.621 ms/op 22.436 ms/op 1.63
mainnet_e217614 - capella processRewardsAndPenalties 485.83 ms/op 418.50 ms/op 1.16
mainnet_e217614 - capella processRegistryUpdates 26.327 us/op 22.221 us/op 1.18
mainnet_e217614 - capella processSlashings 1.0490 us/op 415.00 ns/op 2.53
mainnet_e217614 - capella processEth1DataReset 772.00 ns/op 377.00 ns/op 2.05
mainnet_e217614 - capella processEffectiveBalanceUpdates 6.4282 ms/op 4.5960 ms/op 1.40
mainnet_e217614 - capella processSlashingsReset 4.4850 us/op 3.1130 us/op 1.44
mainnet_e217614 - capella processRandaoMixesReset 5.9260 us/op 4.3590 us/op 1.36
mainnet_e217614 - capella processHistoricalRootsUpdate 914.00 ns/op 600.00 ns/op 1.52
mainnet_e217614 - capella processParticipationFlagUpdates 2.1980 us/op 1.7690 us/op 1.24
mainnet_e217614 - capella afterProcessEpoch 391.54 ms/op 336.97 ms/op 1.16
phase0 processEpoch - mainnet_e58758 504.69 ms/op 454.36 ms/op 1.11
mainnet_e58758 - phase0 beforeProcessEpoch 164.59 ms/op 116.12 ms/op 1.42
mainnet_e58758 - phase0 processJustificationAndFinalization 21.121 us/op 15.147 us/op 1.39
mainnet_e58758 - phase0 processRewardsAndPenalties 57.771 ms/op 54.623 ms/op 1.06
mainnet_e58758 - phase0 processRegistryUpdates 18.662 us/op 11.222 us/op 1.66
mainnet_e58758 - phase0 processSlashings 1.0380 us/op 489.00 ns/op 2.12
mainnet_e58758 - phase0 processEth1DataReset 568.00 ns/op 363.00 ns/op 1.56
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3247 ms/op 1.1854 ms/op 1.12
mainnet_e58758 - phase0 processSlashingsReset 5.1770 us/op 3.2350 us/op 1.60
mainnet_e58758 - phase0 processRandaoMixesReset 7.6530 us/op 4.0470 us/op 1.89
mainnet_e58758 - phase0 processHistoricalRootsUpdate 588.00 ns/op 383.00 ns/op 1.54
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0070 us/op 4.4930 us/op 0.89
mainnet_e58758 - phase0 afterProcessEpoch 109.63 ms/op 100.69 ms/op 1.09
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.7402 ms/op 1.4532 ms/op 1.20
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9188 ms/op 1.5816 ms/op 1.21
altair processInactivityUpdates - 250000 normalcase 26.103 ms/op 23.235 ms/op 1.12
altair processInactivityUpdates - 250000 worstcase 26.419 ms/op 26.506 ms/op 1.00
phase0 processRegistryUpdates - 250000 normalcase 14.962 us/op 10.587 us/op 1.41
phase0 processRegistryUpdates - 250000 badcase_full_deposits 514.06 us/op 387.20 us/op 1.33
phase0 processRegistryUpdates - 250000 worstcase 0.5 182.13 ms/op 172.43 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 59.197 ms/op 62.844 ms/op 0.94
altair processRewardsAndPenalties - 250000 worstcase 58.933 ms/op 62.828 ms/op 0.94
phase0 getAttestationDeltas - 250000 normalcase 10.968 ms/op 9.4214 ms/op 1.16
phase0 getAttestationDeltas - 250000 worstcase 13.388 ms/op 10.597 ms/op 1.26
phase0 processSlashings - 250000 worstcase 107.23 us/op 98.560 us/op 1.09
altair processSyncCommitteeUpdates - 250000 196.93 ms/op 168.30 ms/op 1.17
BeaconState.hashTreeRoot - No change 737.00 ns/op 468.00 ns/op 1.57
BeaconState.hashTreeRoot - 1 full validator 175.44 us/op 172.28 us/op 1.02
BeaconState.hashTreeRoot - 32 full validator 1.7184 ms/op 1.4236 ms/op 1.21
BeaconState.hashTreeRoot - 512 full validator 18.693 ms/op 16.716 ms/op 1.12
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 239.28 us/op 171.75 us/op 1.39
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.4770 ms/op 2.2465 ms/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 30.559 ms/op 33.007 ms/op 0.93
BeaconState.hashTreeRoot - 1 balances 153.29 us/op 156.80 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 1.2820 ms/op 1.5645 ms/op 0.82
BeaconState.hashTreeRoot - 512 balances 12.906 ms/op 11.197 ms/op 1.15
BeaconState.hashTreeRoot - 250000 balances 251.45 ms/op 208.70 ms/op 1.20
aggregationBits - 2048 els - zipIndexesInBitList 37.711 us/op 21.395 us/op 1.76
byteArrayEquals 32 92.686 ns/op 78.260 ns/op 1.18
Buffer.compare 32 65.985 ns/op 57.895 ns/op 1.14
byteArrayEquals 1024 2.4729 us/op 2.1556 us/op 1.15
Buffer.compare 1024 86.052 ns/op 73.095 ns/op 1.18
byteArrayEquals 16384 45.040 us/op 36.741 us/op 1.23
Buffer.compare 16384 319.40 ns/op 282.49 ns/op 1.13
byteArrayEquals 123687377 311.15 ms/op 273.01 ms/op 1.14
Buffer.compare 123687377 9.4272 ms/op 7.3568 ms/op 1.28
byteArrayEquals 32 - diff last byte 102.70 ns/op 89.450 ns/op 1.15
Buffer.compare 32 - diff last byte 74.503 ns/op 60.164 ns/op 1.24
byteArrayEquals 1024 - diff last byte 2.5315 us/op 2.2075 us/op 1.15
Buffer.compare 1024 - diff last byte 93.768 ns/op 78.477 ns/op 1.19
byteArrayEquals 16384 - diff last byte 41.131 us/op 33.628 us/op 1.22
Buffer.compare 16384 - diff last byte 328.80 ns/op 258.14 ns/op 1.27
byteArrayEquals 123687377 - diff last byte 317.87 ms/op 269.13 ms/op 1.18
Buffer.compare 123687377 - diff last byte 9.8015 ms/op 7.8055 ms/op 1.26
byteArrayEquals 32 - random bytes 7.9130 ns/op 5.8280 ns/op 1.36
Buffer.compare 32 - random bytes 82.128 ns/op 65.411 ns/op 1.26
byteArrayEquals 1024 - random bytes 7.7560 ns/op 6.0630 ns/op 1.28
Buffer.compare 1024 - random bytes 78.970 ns/op 66.250 ns/op 1.19
byteArrayEquals 16384 - random bytes 7.6450 ns/op 5.6200 ns/op 1.36
Buffer.compare 16384 - random bytes 74.241 ns/op 63.661 ns/op 1.17
byteArrayEquals 123687377 - random bytes 18.870 ns/op 8.9900 ns/op 2.10
Buffer.compare 123687377 - random bytes 90.520 ns/op 66.910 ns/op 1.35
regular array get 100000 times 59.825 us/op 49.723 us/op 1.20
wrappedArray get 100000 times 54.019 us/op 47.839 us/op 1.13
arrayWithProxy get 100000 times 20.740 ms/op 16.743 ms/op 1.24
ssz.Root.equals 73.395 ns/op 58.387 ns/op 1.26
byteArrayEquals 72.268 ns/op 56.982 ns/op 1.27
Buffer.compare 16.903 ns/op 11.967 ns/op 1.41
shuffle list - 16384 els 9.5531 ms/op 7.4122 ms/op 1.29
shuffle list - 250000 els 132.75 ms/op 111.44 ms/op 1.19
processSlot - 1 slots 24.561 us/op 17.353 us/op 1.42
processSlot - 32 slots 4.5636 ms/op 3.0777 ms/op 1.48
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 74.323 ms/op 59.417 ms/op 1.25
getCommitteeAssignments - req 1 vs - 250000 vc 3.4730 ms/op 2.6297 ms/op 1.32
getCommitteeAssignments - req 100 vs - 250000 vc 4.8452 ms/op 3.9095 ms/op 1.24
getCommitteeAssignments - req 1000 vs - 250000 vc 5.0161 ms/op 4.2615 ms/op 1.18
findModifiedValidators - 10000 modified validators 687.56 ms/op 559.89 ms/op 1.23
findModifiedValidators - 1000 modified validators 597.50 ms/op 451.21 ms/op 1.32
findModifiedValidators - 100 modified validators 545.62 ms/op 444.55 ms/op 1.23
findModifiedValidators - 10 modified validators 553.47 ms/op 423.59 ms/op 1.31
findModifiedValidators - 1 modified validators 592.70 ms/op 453.15 ms/op 1.31
findModifiedValidators - no difference 541.16 ms/op 464.54 ms/op 1.16
compare ViewDUs 5.5173 s/op 4.6077 s/op 1.20
compare each validator Uint8Array 1.8542 s/op 1.5306 s/op 1.21
compare ViewDU to Uint8Array 1.5214 s/op 1.3745 s/op 1.11
migrate state 1000000 validators, 24 modified, 0 new 876.04 ms/op 784.18 ms/op 1.12
migrate state 1000000 validators, 1700 modified, 1000 new 1.1880 s/op 1.0164 s/op 1.17
migrate state 1000000 validators, 3400 modified, 2000 new 1.4522 s/op 1.3489 s/op 1.08
migrate state 1500000 validators, 24 modified, 0 new 793.24 ms/op 803.10 ms/op 0.99
migrate state 1500000 validators, 1700 modified, 1000 new 1.3312 s/op 1.1398 s/op 1.17
migrate state 1500000 validators, 3400 modified, 2000 new 1.3613 s/op 1.4370 s/op 0.95
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.3700 ns/op 4.8400 ns/op 1.11
state getBlockRootAtSlot - 250000 vs - 7PWei 629.28 ns/op 631.56 ns/op 1.00
computeProposers - vc 250000 9.7853 ms/op 9.7571 ms/op 1.00
computeEpochShuffling - vc 250000 107.59 ms/op 110.16 ms/op 0.98
getNextSyncCommittee - vc 250000 162.29 ms/op 160.98 ms/op 1.01
computeSigningRoot for AttestationData 29.540 us/op 27.617 us/op 1.07
hash AttestationData serialized data then Buffer.toString(base64) 2.5524 us/op 2.3827 us/op 1.07
toHexString serialized data 1.2802 us/op 1.1190 us/op 1.14
Buffer.toString(base64) 259.42 ns/op 222.25 ns/op 1.17

by benchmarkbot/action

@wemeetagain
Copy link
Member

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

4 participants