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: allow to disable peer discovery / discv5 #7144

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 9, 2024

Motivation

It's not possible right now to disable peer discovery by passing --discv5 false as it results in an uncaught expection when initializing the worker which crashes the process.

Oct-09 19:31:58.305[network]         error: uncaughtException: Cannot read properties of undefined (reading 'ip4')
TypeError: Cannot read properties of undefined (reading 'ip4')
    at file:///home/nico/projects/ethereum/lodestar/packages/beacon-node/lib/network/discv5/worker.js:47:36 - Cannot read properties of undefined (reading 'ip4')
TypeError: Cannot read properties of undefined (reading 'ip4')
    at file:///home/nico/projects/ethereum/lodestar/packages/beacon-node/lib/network/discv5/worker.js:47:36
 ✖ TypeError: Cannot read properties of undefined (reading 'ip4')
    at file:///home/nico/projects/ethereum/lodestar/packages/beacon-node/lib/network/discv5/worker.js:47:36

Description

We disable peer discovery if opts.discv5 is null

// opts.discv5 === null, discovery is disabled
const discovery = opts.discv5
? await PeerDiscovery.init(modules, {

the issue is though that we set discv5 optiosn in beacon handler, which means we have partial discv5 options and still initialize the worker with those resulting in the error.

@nflaig nflaig requested a review from a team as a code owner October 9, 2024 21:12
Copy link
Contributor

github-actions bot commented Oct 9, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: c02c913 Previous: 068fbae Ratio
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.6274 ms/op 8.4853 ms/op 0.31
Array.fill - length 1000000 2.4242 ms/op 8.9296 ms/op 0.27
Array push - length 1000000 15.605 ms/op 63.623 ms/op 0.25
Full benchmark results
Benchmark suite Current: c02c913 Previous: 068fbae Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7551 ms/op 2.1370 ms/op 0.82
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 41.702 us/op 49.291 us/op 0.85
BLS verify - blst 858.42 us/op 1.4424 ms/op 0.60
BLS verifyMultipleSignatures 3 - blst 1.3353 ms/op 1.2566 ms/op 1.06
BLS verifyMultipleSignatures 8 - blst 2.0749 ms/op 2.5203 ms/op 0.82
BLS verifyMultipleSignatures 32 - blst 4.4740 ms/op 6.9366 ms/op 0.64
BLS verifyMultipleSignatures 64 - blst 8.4434 ms/op 11.122 ms/op 0.76
BLS verifyMultipleSignatures 128 - blst 15.988 ms/op 17.933 ms/op 0.89
BLS deserializing 10000 signatures 631.27 ms/op 697.34 ms/op 0.91
BLS deserializing 100000 signatures 6.2719 s/op 7.2298 s/op 0.87
BLS verifyMultipleSignatures - same message - 3 - blst 988.10 us/op 1.1015 ms/op 0.90
BLS verifyMultipleSignatures - same message - 8 - blst 1.0886 ms/op 1.1840 ms/op 0.92
BLS verifyMultipleSignatures - same message - 32 - blst 1.7077 ms/op 1.8230 ms/op 0.94
BLS verifyMultipleSignatures - same message - 64 - blst 2.6146 ms/op 2.8011 ms/op 0.93
BLS verifyMultipleSignatures - same message - 128 - blst 4.2418 ms/op 4.8989 ms/op 0.87
BLS aggregatePubkeys 32 - blst 18.606 us/op 22.005 us/op 0.85
BLS aggregatePubkeys 128 - blst 64.775 us/op 76.488 us/op 0.85
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 62.909 ms/op 77.844 ms/op 0.81
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 47.210 ms/op 58.941 ms/op 0.80
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 33.269 ms/op 40.060 ms/op 0.83
getSlashingsAndExits - default max 64.566 us/op 143.51 us/op 0.45
getSlashingsAndExits - 2k 298.25 us/op 386.24 us/op 0.77
proposeBlockBody type=full, size=empty 5.0685 ms/op 7.7443 ms/op 0.65
isKnown best case - 1 super set check 496.00 ns/op 629.00 ns/op 0.79
isKnown normal case - 2 super set checks 487.00 ns/op 763.00 ns/op 0.64
isKnown worse case - 16 super set checks 460.00 ns/op 815.00 ns/op 0.56
InMemoryCheckpointStateCache - add get delete 3.4200 us/op 4.1970 us/op 0.81
updateUnfinalizedPubkeys - updating 10 pubkeys 1.1768 ms/op 1.5945 ms/op 0.74
updateUnfinalizedPubkeys - updating 100 pubkeys 4.0695 ms/op 5.4536 ms/op 0.75
updateUnfinalizedPubkeys - updating 1000 pubkeys 41.342 ms/op 65.419 ms/op 0.63
validate api signedAggregateAndProof - struct 1.9371 ms/op 1.9236 ms/op 1.01
validate gossip signedAggregateAndProof - struct 1.4753 ms/op 1.7809 ms/op 0.83
batch validate gossip attestation - vc 640000 - chunk 32 122.75 us/op 172.99 us/op 0.71
batch validate gossip attestation - vc 640000 - chunk 64 115.03 us/op 143.38 us/op 0.80
batch validate gossip attestation - vc 640000 - chunk 128 104.49 us/op 130.23 us/op 0.80
batch validate gossip attestation - vc 640000 - chunk 256 100.80 us/op 124.52 us/op 0.81
pickEth1Vote - no votes 965.70 us/op 1.2952 ms/op 0.75
pickEth1Vote - max votes 5.8174 ms/op 9.0634 ms/op 0.64
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.456 ms/op 17.786 ms/op 0.87
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 19.147 ms/op 27.007 ms/op 0.71
pickEth1Vote - Eth1Data fastSerialize value x2048 344.84 us/op 610.27 us/op 0.57
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.6827 ms/op 4.3980 ms/op 0.84
bytes32 toHexString 599.00 ns/op 685.00 ns/op 0.87
bytes32 Buffer.toString(hex) 470.00 ns/op 302.00 ns/op 1.56
bytes32 Buffer.toString(hex) from Uint8Array 525.00 ns/op 523.00 ns/op 1.00
bytes32 Buffer.toString(hex) + 0x 419.00 ns/op 310.00 ns/op 1.35
Object access 1 prop 0.32400 ns/op 0.20800 ns/op 1.56
Map access 1 prop 0.32600 ns/op 0.15700 ns/op 2.08
Object get x1000 5.4170 ns/op 7.1070 ns/op 0.76
Map get x1000 6.0680 ns/op 7.6480 ns/op 0.79
Object set x1000 27.116 ns/op 48.064 ns/op 0.56
Map set x1000 18.758 ns/op 28.569 ns/op 0.66
Return object 10000 times 0.29810 ns/op 0.32130 ns/op 0.93
Throw Error 10000 times 2.6987 us/op 3.9245 us/op 0.69
toHex 113.91 ns/op 191.07 ns/op 0.60
Buffer.from 105.41 ns/op 171.29 ns/op 0.62
shared Buffer 72.322 ns/op 111.91 ns/op 0.65
fastMsgIdFn sha256 / 200 bytes 1.9720 us/op 2.5890 us/op 0.76
fastMsgIdFn h32 xxhash / 200 bytes 411.00 ns/op 311.00 ns/op 1.32
fastMsgIdFn h64 xxhash / 200 bytes 448.00 ns/op 303.00 ns/op 1.48
fastMsgIdFn sha256 / 1000 bytes 5.9120 us/op 8.3090 us/op 0.71
fastMsgIdFn h32 xxhash / 1000 bytes 533.00 ns/op 446.00 ns/op 1.20
fastMsgIdFn h64 xxhash / 1000 bytes 513.00 ns/op 387.00 ns/op 1.33
fastMsgIdFn sha256 / 10000 bytes 49.884 us/op 73.349 us/op 0.68
fastMsgIdFn h32 xxhash / 10000 bytes 1.9060 us/op 2.0520 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 1.3300 us/op 1.3330 us/op 1.00
send data - 1000 256B messages 9.5866 ms/op 15.425 ms/op 0.62
send data - 1000 512B messages 13.433 ms/op 20.121 ms/op 0.67
send data - 1000 1024B messages 25.134 ms/op 29.612 ms/op 0.85
send data - 1000 1200B messages 23.756 ms/op 27.503 ms/op 0.86
send data - 1000 2048B messages 30.231 ms/op 34.642 ms/op 0.87
send data - 1000 4096B messages 25.265 ms/op 32.127 ms/op 0.79
send data - 1000 16384B messages 60.543 ms/op 79.678 ms/op 0.76
send data - 1000 65536B messages 250.10 ms/op 236.58 ms/op 1.06
enrSubnets - fastDeserialize 64 bits 1.2180 us/op 1.3160 us/op 0.93
enrSubnets - ssz BitVector 64 bits 520.00 ns/op 452.00 ns/op 1.15
enrSubnets - fastDeserialize 4 bits 335.00 ns/op 186.00 ns/op 1.80
enrSubnets - ssz BitVector 4 bits 585.00 ns/op 464.00 ns/op 1.26
prioritizePeers score -10:0 att 32-0.1 sync 2-0 124.74 us/op 177.71 us/op 0.70
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 173.77 us/op 232.98 us/op 0.75
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 255.52 us/op 351.90 us/op 0.73
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 474.46 us/op 524.77 us/op 0.90
prioritizePeers score 0:0 att 64-1 sync 4-1 582.79 us/op 934.84 us/op 0.62
array of 16000 items push then shift 1.2950 us/op 1.7718 us/op 0.73
LinkedList of 16000 items push then shift 6.8700 ns/op 8.4690 ns/op 0.81
array of 16000 items push then pop 88.731 ns/op 143.39 ns/op 0.62
LinkedList of 16000 items push then pop 6.6460 ns/op 8.0260 ns/op 0.83
array of 24000 items push then shift 1.9292 us/op 2.6293 us/op 0.73
LinkedList of 24000 items push then shift 7.4380 ns/op 8.0790 ns/op 0.92
array of 24000 items push then pop 125.57 ns/op 186.62 ns/op 0.67
LinkedList of 24000 items push then pop 6.2840 ns/op 7.8020 ns/op 0.81
intersect bitArray bitLen 8 5.3740 ns/op 6.7130 ns/op 0.80
intersect array and set length 8 40.255 ns/op 56.580 ns/op 0.71
intersect bitArray bitLen 128 25.689 ns/op 31.262 ns/op 0.82
intersect array and set length 128 639.08 ns/op 891.02 ns/op 0.72
bitArray.getTrueBitIndexes() bitLen 128 2.1960 us/op 2.2070 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 248 3.6660 us/op 4.2670 us/op 0.86
bitArray.getTrueBitIndexes() bitLen 512 6.8620 us/op 10.341 us/op 0.66
Buffer.concat 32 items 1.1430 us/op 1.0630 us/op 1.08
Uint8Array.set 32 items 1.9120 us/op 1.7670 us/op 1.08
Buffer.copy 2.1150 us/op 2.1580 us/op 0.98
Uint8Array.set - with subarray 2.1420 us/op 3.6500 us/op 0.59
Uint8Array.set - without subarray 1.4870 us/op 1.8400 us/op 0.81
getUint32 - dataview 409.00 ns/op 322.00 ns/op 1.27
getUint32 - manual 358.00 ns/op 279.00 ns/op 1.28
Set add up to 64 items then delete first 1.8214 us/op 3.0391 us/op 0.60
OrderedSet add up to 64 items then delete first 2.8424 us/op 4.6066 us/op 0.62
Set add up to 64 items then delete last 2.0685 us/op 3.2731 us/op 0.63
OrderedSet add up to 64 items then delete last 3.3674 us/op 5.2249 us/op 0.64
Set add up to 64 items then delete middle 2.2771 us/op 3.3645 us/op 0.68
OrderedSet add up to 64 items then delete middle 5.7616 us/op 7.0069 us/op 0.82
Set add up to 128 items then delete first 4.1897 us/op 7.2213 us/op 0.58
OrderedSet add up to 128 items then delete first 6.2850 us/op 12.323 us/op 0.51
Set add up to 128 items then delete last 4.8217 us/op 7.2096 us/op 0.67
OrderedSet add up to 128 items then delete last 6.2851 us/op 10.607 us/op 0.59
Set add up to 128 items then delete middle 4.4181 us/op 6.5897 us/op 0.67
OrderedSet add up to 128 items then delete middle 14.259 us/op 17.277 us/op 0.83
Set add up to 256 items then delete first 8.0145 us/op 12.972 us/op 0.62
OrderedSet add up to 256 items then delete first 19.259 us/op 19.595 us/op 0.98
Set add up to 256 items then delete last 10.251 us/op 11.484 us/op 0.89
OrderedSet add up to 256 items then delete last 13.674 us/op 17.774 us/op 0.77
Set add up to 256 items then delete middle 7.8832 us/op 12.202 us/op 0.65
OrderedSet add up to 256 items then delete middle 35.708 us/op 50.190 us/op 0.71
transfer serialized Status (84 B) 1.5450 us/op 1.4280 us/op 1.08
copy serialized Status (84 B) 1.3170 us/op 1.2920 us/op 1.02
transfer serialized SignedVoluntaryExit (112 B) 1.7560 us/op 1.5410 us/op 1.14
copy serialized SignedVoluntaryExit (112 B) 1.6120 us/op 1.3460 us/op 1.20
transfer serialized ProposerSlashing (416 B) 2.3130 us/op 1.7710 us/op 1.31
copy serialized ProposerSlashing (416 B) 1.9980 us/op 1.8660 us/op 1.07
transfer serialized Attestation (485 B) 2.6290 us/op 1.8200 us/op 1.44
copy serialized Attestation (485 B) 2.3450 us/op 1.8430 us/op 1.27
transfer serialized AttesterSlashing (33232 B) 2.1220 us/op 1.8310 us/op 1.16
copy serialized AttesterSlashing (33232 B) 5.6420 us/op 6.3230 us/op 0.89
transfer serialized Small SignedBeaconBlock (128000 B) 2.8990 us/op 2.5660 us/op 1.13
copy serialized Small SignedBeaconBlock (128000 B) 13.300 us/op 20.631 us/op 0.64
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8660 us/op 2.9840 us/op 0.96
copy serialized Avg SignedBeaconBlock (200000 B) 16.270 us/op 33.559 us/op 0.48
transfer serialized BlobsSidecar (524380 B) 3.0260 us/op 3.3430 us/op 0.91
copy serialized BlobsSidecar (524380 B) 143.80 us/op 90.240 us/op 1.59
transfer serialized Big SignedBeaconBlock (1000000 B) 3.6050 us/op 3.3380 us/op 1.08
copy serialized Big SignedBeaconBlock (1000000 B) 149.92 us/op 174.70 us/op 0.86
pass gossip attestations to forkchoice per slot 2.5482 ms/op 3.0905 ms/op 0.82
forkChoice updateHead vc 100000 bc 64 eq 0 414.83 us/op 618.07 us/op 0.67
forkChoice updateHead vc 600000 bc 64 eq 0 2.9888 ms/op 3.8137 ms/op 0.78
forkChoice updateHead vc 1000000 bc 64 eq 0 4.3562 ms/op 5.8579 ms/op 0.74
forkChoice updateHead vc 600000 bc 320 eq 0 2.7267 ms/op 3.6566 ms/op 0.75
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7671 ms/op 3.6498 ms/op 0.76
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1959 ms/op 5.3050 ms/op 0.60
forkChoice updateHead vc 600000 bc 64 eq 1000 9.8384 ms/op 12.482 ms/op 0.79
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8491 ms/op 12.271 ms/op 0.80
forkChoice updateHead vc 600000 bc 64 eq 300000 12.029 ms/op 23.995 ms/op 0.50
computeDeltas 500000 validators 300 proto nodes 3.2925 ms/op 4.2318 ms/op 0.78
computeDeltas 500000 validators 1200 proto nodes 3.3467 ms/op 4.4475 ms/op 0.75
computeDeltas 500000 validators 7200 proto nodes 3.1817 ms/op 4.6504 ms/op 0.68
computeDeltas 750000 validators 300 proto nodes 4.6767 ms/op 7.7081 ms/op 0.61
computeDeltas 750000 validators 1200 proto nodes 4.7376 ms/op 7.3604 ms/op 0.64
computeDeltas 750000 validators 7200 proto nodes 4.6798 ms/op 7.4995 ms/op 0.62
computeDeltas 1400000 validators 300 proto nodes 8.5923 ms/op 12.589 ms/op 0.68
computeDeltas 1400000 validators 1200 proto nodes 8.6941 ms/op 12.562 ms/op 0.69
computeDeltas 1400000 validators 7200 proto nodes 9.1410 ms/op 12.818 ms/op 0.71
computeDeltas 2100000 validators 300 proto nodes 13.103 ms/op 19.283 ms/op 0.68
computeDeltas 2100000 validators 1200 proto nodes 13.080 ms/op 18.749 ms/op 0.70
computeDeltas 2100000 validators 7200 proto nodes 13.012 ms/op 17.583 ms/op 0.74
altair processAttestation - 250000 vs - 7PWei normalcase 2.0817 ms/op 1.8844 ms/op 1.10
altair processAttestation - 250000 vs - 7PWei worstcase 2.2311 ms/op 3.0727 ms/op 0.73
altair processAttestation - setStatus - 1/6 committees join 73.027 us/op 101.70 us/op 0.72
altair processAttestation - setStatus - 1/3 committees join 138.16 us/op 235.00 us/op 0.59
altair processAttestation - setStatus - 1/2 committees join 184.95 us/op 352.44 us/op 0.52
altair processAttestation - setStatus - 2/3 committees join 250.03 us/op 450.49 us/op 0.56
altair processAttestation - setStatus - 4/5 committees join 420.57 us/op 656.32 us/op 0.64
altair processAttestation - setStatus - 100% committees join 501.88 us/op 854.94 us/op 0.59
altair processBlock - 250000 vs - 7PWei normalcase 4.0573 ms/op 6.6742 ms/op 0.61
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.367 ms/op 35.947 ms/op 0.68
altair processBlock - 250000 vs - 7PWei worstcase 39.948 ms/op 47.348 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase hashState 69.257 ms/op 108.19 ms/op 0.64
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6342 ms/op 3.4151 ms/op 0.48
phase0 processBlock - 250000 vs - 7PWei worstcase 20.852 ms/op 36.032 ms/op 0.58
altair processEth1Data - 250000 vs - 7PWei normalcase 252.23 us/op 678.75 us/op 0.37
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.8830 us/op 10.451 us/op 0.47
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 27.810 us/op 50.228 us/op 0.55
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.0180 us/op 17.566 us/op 0.46
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.5660 us/op 11.774 us/op 0.47
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 68.632 us/op 183.43 us/op 0.37
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 789.48 us/op 1.7031 ms/op 0.46
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.2324 ms/op 2.6780 ms/op 0.46
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2086 ms/op 2.6434 ms/op 0.46
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.6274 ms/op 8.4853 ms/op 0.31
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1678 ms/op 2.3037 ms/op 0.51
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9530 ms/op 6.1309 ms/op 0.48
Tree 40 250000 create 187.49 ms/op 544.34 ms/op 0.34
Tree 40 250000 get(125000) 110.56 ns/op 249.06 ns/op 0.44
Tree 40 250000 set(125000) 509.18 ns/op 1.4101 us/op 0.36
Tree 40 250000 toArray() 17.467 ms/op 26.994 ms/op 0.65
Tree 40 250000 iterate all - toArray() + loop 18.769 ms/op 26.904 ms/op 0.70
Tree 40 250000 iterate all - get(i) 48.858 ms/op 79.074 ms/op 0.62
Array 250000 create 2.3152 ms/op 4.7643 ms/op 0.49
Array 250000 clone - spread 1.2032 ms/op 4.1554 ms/op 0.29
Array 250000 get(125000) 0.59000 ns/op 0.55000 ns/op 1.07
Array 250000 set(125000) 0.60400 ns/op 0.62900 ns/op 0.96
Array 250000 iterate all - loop 78.854 us/op 167.14 us/op 0.47
phase0 afterProcessEpoch - 250000 vs - 7PWei 76.189 ms/op 133.02 ms/op 0.57
Array.fill - length 1000000 2.4242 ms/op 8.9296 ms/op 0.27
Array push - length 1000000 15.605 ms/op 63.623 ms/op 0.25
Array.get 0.25889 ns/op 0.39023 ns/op 0.66
Uint8Array.get 0.34821 ns/op 0.63510 ns/op 0.55
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.196 ms/op 34.205 ms/op 0.39
altair processEpoch - mainnet_e81889 365.34 ms/op 536.93 ms/op 0.68
mainnet_e81889 - altair beforeProcessEpoch 20.570 ms/op 38.521 ms/op 0.53
mainnet_e81889 - altair processJustificationAndFinalization 14.177 us/op 33.230 us/op 0.43
mainnet_e81889 - altair processInactivityUpdates 5.7424 ms/op 11.125 ms/op 0.52
mainnet_e81889 - altair processRewardsAndPenalties 50.189 ms/op 62.127 ms/op 0.81
mainnet_e81889 - altair processRegistryUpdates 1.9720 us/op 5.0650 us/op 0.39
mainnet_e81889 - altair processSlashings 729.00 ns/op 1.1460 us/op 0.64
mainnet_e81889 - altair processEth1DataReset 738.00 ns/op 931.00 ns/op 0.79
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4962 ms/op 3.0305 ms/op 0.49
mainnet_e81889 - altair processSlashingsReset 1.4190 us/op 8.6610 us/op 0.16
mainnet_e81889 - altair processRandaoMixesReset 4.1540 us/op 11.607 us/op 0.36
mainnet_e81889 - altair processHistoricalRootsUpdate 1.1270 us/op 1.7460 us/op 0.65
mainnet_e81889 - altair processParticipationFlagUpdates 4.8780 us/op 7.5050 us/op 0.65
mainnet_e81889 - altair processSyncCommitteeUpdates 1.1770 us/op 1.5010 us/op 0.78
mainnet_e81889 - altair afterProcessEpoch 80.578 ms/op 155.45 ms/op 0.52
capella processEpoch - mainnet_e217614 1.0943 s/op 2.2566 s/op 0.48
mainnet_e217614 - capella beforeProcessEpoch 65.625 ms/op 103.24 ms/op 0.64
mainnet_e217614 - capella processJustificationAndFinalization 14.742 us/op 39.977 us/op 0.37
mainnet_e217614 - capella processInactivityUpdates 13.895 ms/op 28.251 ms/op 0.49
mainnet_e217614 - capella processRewardsAndPenalties 243.53 ms/op 319.79 ms/op 0.76
mainnet_e217614 - capella processRegistryUpdates 12.990 us/op 20.583 us/op 0.63
mainnet_e217614 - capella processSlashings 930.00 ns/op 1.5940 us/op 0.58
mainnet_e217614 - capella processEth1DataReset 827.00 ns/op 1.0800 us/op 0.77
mainnet_e217614 - capella processEffectiveBalanceUpdates 16.785 ms/op 20.929 ms/op 0.80
mainnet_e217614 - capella processSlashingsReset 3.5950 us/op 7.6460 us/op 0.47
mainnet_e217614 - capella processRandaoMixesReset 4.9290 us/op 14.611 us/op 0.34
mainnet_e217614 - capella processHistoricalRootsUpdate 760.00 ns/op 2.7440 us/op 0.28
mainnet_e217614 - capella processParticipationFlagUpdates 4.5410 us/op 7.8320 us/op 0.58
mainnet_e217614 - capella afterProcessEpoch 196.57 ms/op 356.34 ms/op 0.55
phase0 processEpoch - mainnet_e58758 318.18 ms/op 535.50 ms/op 0.59
mainnet_e58758 - phase0 beforeProcessEpoch 77.093 ms/op 121.37 ms/op 0.64
mainnet_e58758 - phase0 processJustificationAndFinalization 13.625 us/op 36.523 us/op 0.37
mainnet_e58758 - phase0 processRewardsAndPenalties 27.010 ms/op 42.942 ms/op 0.63
mainnet_e58758 - phase0 processRegistryUpdates 8.0010 us/op 15.604 us/op 0.51
mainnet_e58758 - phase0 processSlashings 907.00 ns/op 925.00 ns/op 0.98
mainnet_e58758 - phase0 processEth1DataReset 741.00 ns/op 1.0690 us/op 0.69
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 827.67 us/op 2.0448 ms/op 0.40
mainnet_e58758 - phase0 processSlashingsReset 3.4980 us/op 13.080 us/op 0.27
mainnet_e58758 - phase0 processRandaoMixesReset 2.4130 us/op 17.792 us/op 0.14
mainnet_e58758 - phase0 processHistoricalRootsUpdate 705.00 ns/op 1.5560 us/op 0.45
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.0320 us/op 8.0000 us/op 0.50
mainnet_e58758 - phase0 afterProcessEpoch 65.232 ms/op 122.09 ms/op 0.53
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0052 ms/op 2.3308 ms/op 0.43
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7782 ms/op 3.5034 ms/op 0.51
altair processInactivityUpdates - 250000 normalcase 18.025 ms/op 28.109 ms/op 0.64
altair processInactivityUpdates - 250000 worstcase 17.450 ms/op 26.714 ms/op 0.65
phase0 processRegistryUpdates - 250000 normalcase 8.1420 us/op 18.825 us/op 0.43
phase0 processRegistryUpdates - 250000 badcase_full_deposits 232.34 us/op 431.15 us/op 0.54
phase0 processRegistryUpdates - 250000 worstcase 0.5 107.85 ms/op 186.56 ms/op 0.58
altair processRewardsAndPenalties - 250000 normalcase 39.583 ms/op 56.661 ms/op 0.70
altair processRewardsAndPenalties - 250000 worstcase 40.406 ms/op 57.215 ms/op 0.71
phase0 getAttestationDeltas - 250000 normalcase 9.2227 ms/op 12.956 ms/op 0.71
phase0 getAttestationDeltas - 250000 worstcase 6.6700 ms/op 9.6158 ms/op 0.69
phase0 processSlashings - 250000 worstcase 99.078 us/op 127.36 us/op 0.78
altair processSyncCommitteeUpdates - 250000 112.71 ms/op 185.89 ms/op 0.61
BeaconState.hashTreeRoot - No change 453.00 ns/op 423.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 123.91 us/op 140.12 us/op 0.88
BeaconState.hashTreeRoot - 32 full validator 1.2855 ms/op 1.5895 ms/op 0.81
BeaconState.hashTreeRoot - 512 full validator 9.5798 ms/op 18.574 ms/op 0.52
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 93.680 us/op 287.75 us/op 0.33
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3405 ms/op 3.1773 ms/op 0.42
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.506 ms/op 37.254 ms/op 0.55
BeaconState.hashTreeRoot - 1 balances 105.87 us/op 155.09 us/op 0.68
BeaconState.hashTreeRoot - 32 balances 1.3168 ms/op 1.5585 ms/op 0.84
BeaconState.hashTreeRoot - 512 balances 9.8920 ms/op 13.291 ms/op 0.74
BeaconState.hashTreeRoot - 250000 balances 174.86 ms/op 331.16 ms/op 0.53
aggregationBits - 2048 els - zipIndexesInBitList 19.925 us/op 47.475 us/op 0.42
byteArrayEquals 32 48.865 ns/op 75.946 ns/op 0.64
Buffer.compare 32 16.628 ns/op 24.263 ns/op 0.69
byteArrayEquals 1024 1.2808 us/op 2.4135 us/op 0.53
Buffer.compare 1024 27.529 ns/op 31.331 ns/op 0.88
byteArrayEquals 16384 20.292 us/op 35.043 us/op 0.58
Buffer.compare 16384 206.68 ns/op 262.56 ns/op 0.79
byteArrayEquals 123687377 150.51 ms/op 260.59 ms/op 0.58
Buffer.compare 123687377 5.3434 ms/op 14.292 ms/op 0.37
byteArrayEquals 32 - diff last byte 48.330 ns/op 78.835 ns/op 0.61
Buffer.compare 32 - diff last byte 16.061 ns/op 29.238 ns/op 0.55
byteArrayEquals 1024 - diff last byte 1.2728 us/op 2.3001 us/op 0.55
Buffer.compare 1024 - diff last byte 24.486 ns/op 42.527 ns/op 0.58
byteArrayEquals 16384 - diff last byte 20.270 us/op 33.951 us/op 0.60
Buffer.compare 16384 - diff last byte 160.03 ns/op 332.30 ns/op 0.48
byteArrayEquals 123687377 - diff last byte 154.61 ms/op 261.19 ms/op 0.59
Buffer.compare 123687377 - diff last byte 4.8758 ms/op 10.329 ms/op 0.47
byteArrayEquals 32 - random bytes 5.0170 ns/op 7.6630 ns/op 0.65
Buffer.compare 32 - random bytes 16.082 ns/op 22.203 ns/op 0.72
byteArrayEquals 1024 - random bytes 5.0780 ns/op 6.1140 ns/op 0.83
Buffer.compare 1024 - random bytes 15.810 ns/op 21.113 ns/op 0.75
byteArrayEquals 16384 - random bytes 5.0000 ns/op 7.0970 ns/op 0.70
Buffer.compare 16384 - random bytes 15.824 ns/op 21.497 ns/op 0.74
byteArrayEquals 123687377 - random bytes 8.1500 ns/op 8.4000 ns/op 0.97
Buffer.compare 123687377 - random bytes 18.960 ns/op 24.180 ns/op 0.78
regular array get 100000 times 31.133 us/op 59.113 us/op 0.53
wrappedArray get 100000 times 31.023 us/op 44.780 us/op 0.69
arrayWithProxy get 100000 times 10.276 ms/op 15.978 ms/op 0.64
ssz.Root.equals 46.635 ns/op 54.089 ns/op 0.86
byteArrayEquals 45.573 ns/op 54.947 ns/op 0.83
Buffer.compare 10.013 ns/op 12.978 ns/op 0.77
shuffle list - 16384 els 5.7910 ms/op 8.0369 ms/op 0.72
shuffle list - 250000 els 85.145 ms/op 121.33 ms/op 0.70
processSlot - 1 slots 16.084 us/op 17.062 us/op 0.94
processSlot - 32 slots 2.9747 ms/op 3.5118 ms/op 0.85
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 38.787 ms/op 43.407 ms/op 0.89
getCommitteeAssignments - req 1 vs - 250000 vc 1.8835 ms/op 2.6905 ms/op 0.70
getCommitteeAssignments - req 100 vs - 250000 vc 3.6042 ms/op 5.3951 ms/op 0.67
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8760 ms/op 5.6410 ms/op 0.69
findModifiedValidators - 10000 modified validators 287.84 ms/op 417.68 ms/op 0.69
findModifiedValidators - 1000 modified validators 205.53 ms/op 277.09 ms/op 0.74
findModifiedValidators - 100 modified validators 202.12 ms/op 306.05 ms/op 0.66
findModifiedValidators - 10 modified validators 168.39 ms/op 243.98 ms/op 0.69
findModifiedValidators - 1 modified validators 184.21 ms/op 249.30 ms/op 0.74
findModifiedValidators - no difference 194.54 ms/op 232.73 ms/op 0.84
compare ViewDUs 3.5740 s/op 4.2862 s/op 0.83
compare each validator Uint8Array 1.8415 s/op 1.6307 s/op 1.13
compare ViewDU to Uint8Array 1.0573 s/op 1.6861 s/op 0.63
migrate state 1000000 validators, 24 modified, 0 new 874.36 ms/op 1.2479 s/op 0.70
migrate state 1000000 validators, 1700 modified, 1000 new 1.2156 s/op 1.7961 s/op 0.68
migrate state 1000000 validators, 3400 modified, 2000 new 1.3357 s/op 1.7993 s/op 0.74
migrate state 1500000 validators, 24 modified, 0 new 946.77 ms/op 1.1705 s/op 0.81
migrate state 1500000 validators, 1700 modified, 1000 new 1.0826 s/op 1.4496 s/op 0.75
migrate state 1500000 validators, 3400 modified, 2000 new 1.3063 s/op 1.6513 s/op 0.79
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.6500 ns/op 5.9200 ns/op 1.12
state getBlockRootAtSlot - 250000 vs - 7PWei 386.04 ns/op 676.79 ns/op 0.57
computeProposers - vc 250000 5.5949 ms/op 9.1278 ms/op 0.61
computeEpochShuffling - vc 250000 81.795 ms/op 117.77 ms/op 0.69
getNextSyncCommittee - vc 250000 105.85 ms/op 153.29 ms/op 0.69
computeSigningRoot for AttestationData 14.478 us/op 25.422 us/op 0.57
hash AttestationData serialized data then Buffer.toString(base64) 1.2205 us/op 1.9145 us/op 0.64
toHexString serialized data 779.18 ns/op 1.1226 us/op 0.69
Buffer.toString(base64) 138.48 ns/op 236.84 ns/op 0.58
nodejs block root to RootHex using toHex 120.49 ns/op 206.29 ns/op 0.58
nodejs block root to RootHex using toRootHex 79.590 ns/op 115.95 ns/op 0.69
browser block root to RootHex using the deprecated toHexString 209.58 ns/op 306.16 ns/op 0.68
browser block root to RootHex using toHex 165.91 ns/op 238.16 ns/op 0.70
browser block root to RootHex using toRootHex 153.72 ns/op 189.35 ns/op 0.81

by benchmarkbot/action

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 1 line in your changes missing coverage. Please review.

Project coverage is 49.19%. Comparing base (068fbae) to head (cc0a23a).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7144   +/-   ##
=========================================
  Coverage     49.19%   49.19%           
=========================================
  Files           597      597           
  Lines         39725    39727    +2     
  Branches       2073     2079    +6     
=========================================
+ Hits          19542    19545    +3     
+ Misses        20142    20141    -1     
  Partials         41       41           

@wemeetagain wemeetagain merged commit 489accb into unstable Oct 10, 2024
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/fix-disable-discv5 branch October 10, 2024 16:28
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