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

chore: log sync aggregate participants when producing beacon block body #7300

Merged
merged 3 commits into from
Dec 15, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Dec 13, 2024

Motivation

To better investigate #7299

Description

Log sync aggregate participants when producing beacon block body

@nflaig nflaig requested a review from a team as a code owner December 13, 2024 18:39
Copy link
Contributor

github-actions bot commented Dec 13, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 85f9e67 Previous: 99794d3 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.1187 ms/op 2.1367 ms/op 0.99
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 58.143 us/op 52.834 us/op 1.10
BLS verify - blst 830.61 us/op 1.0209 ms/op 0.81
BLS verifyMultipleSignatures 3 - blst 1.4255 ms/op 1.5870 ms/op 0.90
BLS verifyMultipleSignatures 8 - blst 1.7550 ms/op 2.0045 ms/op 0.88
BLS verifyMultipleSignatures 32 - blst 5.3468 ms/op 6.0829 ms/op 0.88
BLS verifyMultipleSignatures 64 - blst 9.6047 ms/op 11.431 ms/op 0.84
BLS verifyMultipleSignatures 128 - blst 18.263 ms/op 17.863 ms/op 1.02
BLS deserializing 10000 signatures 710.88 ms/op 707.37 ms/op 1.00
BLS deserializing 100000 signatures 6.9746 s/op 7.0437 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst 920.19 us/op 1.0103 ms/op 0.91
BLS verifyMultipleSignatures - same message - 8 - blst 1.0265 ms/op 1.0538 ms/op 0.97
BLS verifyMultipleSignatures - same message - 32 - blst 1.7180 ms/op 1.8970 ms/op 0.91
BLS verifyMultipleSignatures - same message - 64 - blst 2.6875 ms/op 2.7941 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.5845 ms/op 4.3489 ms/op 1.05
BLS aggregatePubkeys 32 - blst 21.401 us/op 20.752 us/op 1.03
BLS aggregatePubkeys 128 - blst 72.852 us/op 71.782 us/op 1.01
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 61.147 ms/op 69.835 ms/op 0.88
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 101.07 ms/op 75.671 ms/op 1.34
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 63.061 ms/op 61.302 ms/op 1.03
getSlashingsAndExits - default max 275.42 us/op 105.56 us/op 2.61
getSlashingsAndExits - 2k 397.29 us/op 327.04 us/op 1.21
proposeBlockBody type=full, size=empty 7.0198 ms/op 6.4051 ms/op 1.10
isKnown best case - 1 super set check 672.00 ns/op 313.00 ns/op 2.15
isKnown normal case - 2 super set checks 587.00 ns/op 305.00 ns/op 1.92
isKnown worse case - 16 super set checks 616.00 ns/op 343.00 ns/op 1.80
InMemoryCheckpointStateCache - add get delete 6.0280 us/op 2.9530 us/op 2.04
validate api signedAggregateAndProof - struct 2.3767 ms/op 1.5933 ms/op 1.49
validate gossip signedAggregateAndProof - struct 2.2142 ms/op 2.5475 ms/op 0.87
batch validate gossip attestation - vc 640000 - chunk 32 208.95 us/op 140.06 us/op 1.49
batch validate gossip attestation - vc 640000 - chunk 64 176.49 us/op 120.14 us/op 1.47
batch validate gossip attestation - vc 640000 - chunk 128 178.73 us/op 128.59 us/op 1.39
batch validate gossip attestation - vc 640000 - chunk 256 171.23 us/op 116.50 us/op 1.47
pickEth1Vote - no votes 1.3955 ms/op 1.0723 ms/op 1.30
pickEth1Vote - max votes 7.1482 ms/op 6.1472 ms/op 1.16
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.662 ms/op 12.793 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 16.552 ms/op 20.314 ms/op 0.81
pickEth1Vote - Eth1Data fastSerialize value x2048 601.62 us/op 552.41 us/op 1.09
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.6858 ms/op 3.1602 ms/op 1.17
bytes32 toHexString 607.00 ns/op 524.00 ns/op 1.16
bytes32 Buffer.toString(hex) 308.00 ns/op 272.00 ns/op 1.13
bytes32 Buffer.toString(hex) from Uint8Array 584.00 ns/op 452.00 ns/op 1.29
bytes32 Buffer.toString(hex) + 0x 307.00 ns/op 272.00 ns/op 1.13
Object access 1 prop 0.22500 ns/op 0.15400 ns/op 1.46
Map access 1 prop 0.17600 ns/op 0.13900 ns/op 1.27
Object get x1000 8.1770 ns/op 6.1020 ns/op 1.34
Map get x1000 7.1900 ns/op 6.4950 ns/op 1.11
Object set x1000 60.409 ns/op 40.753 ns/op 1.48
Map set x1000 42.320 ns/op 23.581 ns/op 1.79
Return object 10000 times 0.35200 ns/op 0.30170 ns/op 1.17
Throw Error 10000 times 6.2510 us/op 3.4509 us/op 1.81
toHex 348.40 ns/op 165.37 ns/op 2.11
Buffer.from 316.42 ns/op 150.31 ns/op 2.11
shared Buffer 197.65 ns/op 88.094 ns/op 2.24
fastMsgIdFn sha256 / 200 bytes 3.1820 us/op 2.2040 us/op 1.44
fastMsgIdFn h32 xxhash / 200 bytes 376.00 ns/op 249.00 ns/op 1.51
fastMsgIdFn h64 xxhash / 200 bytes 292.00 ns/op 272.00 ns/op 1.07
fastMsgIdFn sha256 / 1000 bytes 9.1160 us/op 7.6630 us/op 1.19
fastMsgIdFn h32 xxhash / 1000 bytes 518.00 ns/op 359.00 ns/op 1.44
fastMsgIdFn h64 xxhash / 1000 bytes 412.00 ns/op 338.00 ns/op 1.22
fastMsgIdFn sha256 / 10000 bytes 75.066 us/op 62.467 us/op 1.20
fastMsgIdFn h32 xxhash / 10000 bytes 2.3650 us/op 1.7910 us/op 1.32
fastMsgIdFn h64 xxhash / 10000 bytes 1.4080 us/op 1.1750 us/op 1.20
send data - 1000 256B messages 18.878 ms/op 13.365 ms/op 1.41
send data - 1000 512B messages 24.631 ms/op 16.083 ms/op 1.53
send data - 1000 1024B messages 34.165 ms/op 25.447 ms/op 1.34
send data - 1000 1200B messages 38.714 ms/op 26.663 ms/op 1.45
send data - 1000 2048B messages 47.346 ms/op 33.173 ms/op 1.43
send data - 1000 4096B messages 49.750 ms/op 32.352 ms/op 1.54
send data - 1000 16384B messages 87.307 ms/op 75.458 ms/op 1.16
send data - 1000 65536B messages 234.47 ms/op 198.69 ms/op 1.18
enrSubnets - fastDeserialize 64 bits 1.1380 us/op 1.0580 us/op 1.08
enrSubnets - ssz BitVector 64 bits 363.00 ns/op 362.00 ns/op 1.00
enrSubnets - fastDeserialize 4 bits 155.00 ns/op 153.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 372.00 ns/op 355.00 ns/op 1.05
prioritizePeers score -10:0 att 32-0.1 sync 2-0 164.66 us/op 150.20 us/op 1.10
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 159.13 us/op 193.84 us/op 0.82
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 250.10 us/op 292.00 us/op 0.86
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 393.33 us/op 562.01 us/op 0.70
prioritizePeers score 0:0 att 64-1 sync 4-1 668.25 us/op 813.44 us/op 0.82
array of 16000 items push then shift 1.6772 us/op 1.6706 us/op 1.00
LinkedList of 16000 items push then shift 7.4130 ns/op 7.3140 ns/op 1.01
array of 16000 items push then pop 128.13 ns/op 126.66 ns/op 1.01
LinkedList of 16000 items push then pop 7.3460 ns/op 7.0540 ns/op 1.04
array of 24000 items push then shift 2.4826 us/op 2.4939 us/op 1.00
LinkedList of 24000 items push then shift 7.3270 ns/op 7.6070 ns/op 0.96
array of 24000 items push then pop 160.01 ns/op 153.39 ns/op 1.04
LinkedList of 24000 items push then pop 7.2190 ns/op 7.5100 ns/op 0.96
intersect bitArray bitLen 8 6.5400 ns/op 6.5340 ns/op 1.00
intersect array and set length 8 47.433 ns/op 60.650 ns/op 0.78
intersect bitArray bitLen 128 29.880 ns/op 29.489 ns/op 1.01
intersect array and set length 128 647.39 ns/op 734.54 ns/op 0.88
bitArray.getTrueBitIndexes() bitLen 128 1.7050 us/op 2.3350 us/op 0.73
bitArray.getTrueBitIndexes() bitLen 248 3.1200 us/op 4.2000 us/op 0.74
bitArray.getTrueBitIndexes() bitLen 512 6.0210 us/op 8.2570 us/op 0.73
Buffer.concat 32 items 958.00 ns/op 1.0120 us/op 0.95
Uint8Array.set 32 items 1.5950 us/op 2.1700 us/op 0.74
Buffer.copy 1.8250 us/op 2.0970 us/op 0.87
Uint8Array.set - with subarray 2.7380 us/op 3.2420 us/op 0.84
Uint8Array.set - without subarray 1.4450 us/op 2.0460 us/op 0.71
getUint32 - dataview 238.00 ns/op 285.00 ns/op 0.84
getUint32 - manual 161.00 ns/op 204.00 ns/op 0.79
Set add up to 64 items then delete first 2.2287 us/op 2.4318 us/op 0.92
OrderedSet add up to 64 items then delete first 3.3880 us/op 3.8953 us/op 0.87
Set add up to 64 items then delete last 2.5885 us/op 3.2553 us/op 0.80
OrderedSet add up to 64 items then delete last 3.8006 us/op 5.1187 us/op 0.74
Set add up to 64 items then delete middle 2.5937 us/op 3.1542 us/op 0.82
OrderedSet add up to 64 items then delete middle 5.3847 us/op 6.5177 us/op 0.83
Set add up to 128 items then delete first 5.3976 us/op 5.2697 us/op 1.02
OrderedSet add up to 128 items then delete first 8.2850 us/op 7.4923 us/op 1.11
Set add up to 128 items then delete last 5.1128 us/op 5.3564 us/op 0.95
OrderedSet add up to 128 items then delete last 7.4515 us/op 8.0202 us/op 0.93
Set add up to 128 items then delete middle 5.0481 us/op 5.0520 us/op 1.00
OrderedSet add up to 128 items then delete middle 13.993 us/op 13.766 us/op 1.02
Set add up to 256 items then delete first 10.586 us/op 10.716 us/op 0.99
OrderedSet add up to 256 items then delete first 16.897 us/op 16.761 us/op 1.01
Set add up to 256 items then delete last 10.482 us/op 11.774 us/op 0.89
OrderedSet add up to 256 items then delete last 15.833 us/op 17.543 us/op 0.90
Set add up to 256 items then delete middle 12.592 us/op 10.361 us/op 1.22
OrderedSet add up to 256 items then delete middle 42.993 us/op 41.821 us/op 1.03
transfer serialized Status (84 B) 1.5130 us/op 1.3980 us/op 1.08
copy serialized Status (84 B) 1.3350 us/op 1.1010 us/op 1.21
transfer serialized SignedVoluntaryExit (112 B) 1.6320 us/op 1.4300 us/op 1.14
copy serialized SignedVoluntaryExit (112 B) 1.2790 us/op 1.2500 us/op 1.02
transfer serialized ProposerSlashing (416 B) 1.9590 us/op 1.6020 us/op 1.22
copy serialized ProposerSlashing (416 B) 1.8890 us/op 1.6230 us/op 1.16
transfer serialized Attestation (485 B) 2.3210 us/op 1.7070 us/op 1.36
copy serialized Attestation (485 B) 1.7660 us/op 1.5160 us/op 1.16
transfer serialized AttesterSlashing (33232 B) 1.6390 us/op 2.7440 us/op 0.60
copy serialized AttesterSlashing (33232 B) 6.5840 us/op 6.9820 us/op 0.94
transfer serialized Small SignedBeaconBlock (128000 B) 3.4170 us/op 3.3140 us/op 1.03
copy serialized Small SignedBeaconBlock (128000 B) 16.178 us/op 17.504 us/op 0.92
transfer serialized Avg SignedBeaconBlock (200000 B) 3.7490 us/op 3.5390 us/op 1.06
copy serialized Avg SignedBeaconBlock (200000 B) 22.752 us/op 26.331 us/op 0.86
transfer serialized BlobsSidecar (524380 B) 3.0010 us/op 3.0430 us/op 0.99
copy serialized BlobsSidecar (524380 B) 78.690 us/op 75.157 us/op 1.05
transfer serialized Big SignedBeaconBlock (1000000 B) 2.7760 us/op 3.1640 us/op 0.88
copy serialized Big SignedBeaconBlock (1000000 B) 161.31 us/op 178.79 us/op 0.90
pass gossip attestations to forkchoice per slot 2.8669 ms/op 2.8442 ms/op 1.01
forkChoice updateHead vc 100000 bc 64 eq 0 456.53 us/op 454.07 us/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 2.8139 ms/op 3.1727 ms/op 0.89
forkChoice updateHead vc 1000000 bc 64 eq 0 4.9220 ms/op 5.3831 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 2.8749 ms/op 2.9000 ms/op 0.99
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0777 ms/op 3.0096 ms/op 1.02
forkChoice updateHead vc 600000 bc 7200 eq 0 4.1731 ms/op 4.1364 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 1000 11.096 ms/op 10.642 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 10000 10.659 ms/op 10.593 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 13.969 ms/op 15.158 ms/op 0.92
computeDeltas 500000 validators 300 proto nodes 4.0978 ms/op 4.1799 ms/op 0.98
computeDeltas 500000 validators 1200 proto nodes 4.0720 ms/op 4.2880 ms/op 0.95
computeDeltas 500000 validators 7200 proto nodes 4.0815 ms/op 4.2920 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 6.2031 ms/op 6.1591 ms/op 1.01
computeDeltas 750000 validators 1200 proto nodes 6.2267 ms/op 6.1044 ms/op 1.02
computeDeltas 750000 validators 7200 proto nodes 6.0529 ms/op 6.2919 ms/op 0.96
computeDeltas 1400000 validators 300 proto nodes 11.573 ms/op 11.831 ms/op 0.98
computeDeltas 1400000 validators 1200 proto nodes 11.380 ms/op 12.157 ms/op 0.94
computeDeltas 1400000 validators 7200 proto nodes 12.046 ms/op 12.457 ms/op 0.97
computeDeltas 2100000 validators 300 proto nodes 18.437 ms/op 18.545 ms/op 0.99
computeDeltas 2100000 validators 1200 proto nodes 18.708 ms/op 18.077 ms/op 1.03
computeDeltas 2100000 validators 7200 proto nodes 18.996 ms/op 17.864 ms/op 1.06
altair processAttestation - 250000 vs - 7PWei normalcase 2.1570 ms/op 2.1741 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei worstcase 2.9258 ms/op 2.8406 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 94.054 us/op 88.547 us/op 1.06
altair processAttestation - setStatus - 1/3 committees join 193.82 us/op 178.63 us/op 1.09
altair processAttestation - setStatus - 1/2 committees join 252.38 us/op 253.33 us/op 1.00
altair processAttestation - setStatus - 2/3 committees join 342.14 us/op 318.35 us/op 1.07
altair processAttestation - setStatus - 4/5 committees join 482.23 us/op 466.05 us/op 1.03
altair processAttestation - setStatus - 100% committees join 596.06 us/op 556.11 us/op 1.07
altair processBlock - 250000 vs - 7PWei normalcase 6.9571 ms/op 4.4770 ms/op 1.55
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.763 ms/op 28.018 ms/op 0.88
altair processBlock - 250000 vs - 7PWei worstcase 40.027 ms/op 39.620 ms/op 1.01
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.086 ms/op 81.854 ms/op 0.89
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0291 ms/op 2.3298 ms/op 0.87
phase0 processBlock - 250000 vs - 7PWei worstcase 22.453 ms/op 25.928 ms/op 0.87
altair processEth1Data - 250000 vs - 7PWei normalcase 446.50 us/op 336.67 us/op 1.33
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.5670 us/op 6.9170 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 39.071 us/op 38.155 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.036 us/op 13.695 us/op 0.73
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.3010 us/op 6.7000 us/op 0.94
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 157.56 us/op 170.64 us/op 0.92
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.1583 ms/op 1.3964 ms/op 0.83
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.6533 ms/op 1.9376 ms/op 0.85
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.6720 ms/op 2.2502 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8059 ms/op 3.7648 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.6491 ms/op 1.7747 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9974 ms/op 3.8894 ms/op 1.03
Tree 40 250000 create 245.78 ms/op 242.42 ms/op 1.01
Tree 40 250000 get(125000) 163.76 ns/op 160.95 ns/op 1.02
Tree 40 250000 set(125000) 748.82 ns/op 706.80 ns/op 1.06
Tree 40 250000 toArray() 20.344 ms/op 17.146 ms/op 1.19
Tree 40 250000 iterate all - toArray() + loop 21.747 ms/op 18.148 ms/op 1.20
Tree 40 250000 iterate all - get(i) 59.888 ms/op 56.910 ms/op 1.05
Array 250000 create 4.2183 ms/op 3.2207 ms/op 1.31
Array 250000 clone - spread 1.7816 ms/op 1.3667 ms/op 1.30
Array 250000 get(125000) 0.45000 ns/op 0.44100 ns/op 1.02
Array 250000 set(125000) 0.48200 ns/op 0.45200 ns/op 1.07
Array 250000 iterate all - loop 89.046 us/op 96.023 us/op 0.93
phase0 afterProcessEpoch - 250000 vs - 7PWei 55.464 ms/op 51.613 ms/op 1.07
Array.fill - length 1000000 5.8268 ms/op 3.4402 ms/op 1.69
Array push - length 1000000 17.938 ms/op 18.810 ms/op 0.95
Array.get 0.29565 ns/op 0.29403 ns/op 1.01
Uint8Array.get 0.45958 ns/op 0.44582 ns/op 1.03
phase0 beforeProcessEpoch - 250000 vs - 7PWei 21.906 ms/op 19.139 ms/op 1.14
altair processEpoch - mainnet_e81889 332.38 ms/op 283.28 ms/op 1.17
mainnet_e81889 - altair beforeProcessEpoch 24.358 ms/op 19.319 ms/op 1.26
mainnet_e81889 - altair processJustificationAndFinalization 22.902 us/op 13.034 us/op 1.76
mainnet_e81889 - altair processInactivityUpdates 7.2575 ms/op 5.9560 ms/op 1.22
mainnet_e81889 - altair processRewardsAndPenalties 54.362 ms/op 44.413 ms/op 1.22
mainnet_e81889 - altair processRegistryUpdates 2.4590 us/op 1.8560 us/op 1.32
mainnet_e81889 - altair processSlashings 466.00 ns/op 331.00 ns/op 1.41
mainnet_e81889 - altair processEth1DataReset 388.00 ns/op 328.00 ns/op 1.18
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4412 ms/op 1.7128 ms/op 0.84
mainnet_e81889 - altair processSlashingsReset 6.5650 us/op 2.7870 us/op 2.36
mainnet_e81889 - altair processRandaoMixesReset 6.7990 us/op 3.3520 us/op 2.03
mainnet_e81889 - altair processHistoricalRootsUpdate 809.00 ns/op 717.00 ns/op 1.13
mainnet_e81889 - altair processParticipationFlagUpdates 3.8910 us/op 2.1710 us/op 1.79
mainnet_e81889 - altair processSyncCommitteeUpdates 669.00 ns/op 443.00 ns/op 1.51
mainnet_e81889 - altair afterProcessEpoch 54.533 ms/op 52.039 ms/op 1.05
capella processEpoch - mainnet_e217614 1.3640 s/op 1.0638 s/op 1.28
mainnet_e217614 - capella beforeProcessEpoch 86.316 ms/op 69.553 ms/op 1.24
mainnet_e217614 - capella processJustificationAndFinalization 19.837 us/op 16.496 us/op 1.20
mainnet_e217614 - capella processInactivityUpdates 21.123 ms/op 17.825 ms/op 1.18
mainnet_e217614 - capella processRewardsAndPenalties 241.11 ms/op 251.80 ms/op 0.96
mainnet_e217614 - capella processRegistryUpdates 19.358 us/op 14.574 us/op 1.33
mainnet_e217614 - capella processSlashings 878.00 ns/op 524.00 ns/op 1.68
mainnet_e217614 - capella processEth1DataReset 572.00 ns/op 464.00 ns/op 1.23
mainnet_e217614 - capella processEffectiveBalanceUpdates 20.306 ms/op 14.816 ms/op 1.37
mainnet_e217614 - capella processSlashingsReset 8.2650 us/op 4.4640 us/op 1.85
mainnet_e217614 - capella processRandaoMixesReset 5.8270 us/op 4.5080 us/op 1.29
mainnet_e217614 - capella processHistoricalRootsUpdate 1.0480 us/op 505.00 ns/op 2.08
mainnet_e217614 - capella processParticipationFlagUpdates 3.9850 us/op 1.6630 us/op 2.40
mainnet_e217614 - capella afterProcessEpoch 134.78 ms/op 128.04 ms/op 1.05
phase0 processEpoch - mainnet_e58758 367.44 ms/op 357.70 ms/op 1.03
mainnet_e58758 - phase0 beforeProcessEpoch 84.943 ms/op 79.499 ms/op 1.07
mainnet_e58758 - phase0 processJustificationAndFinalization 17.528 us/op 14.853 us/op 1.18
mainnet_e58758 - phase0 processRewardsAndPenalties 34.419 ms/op 31.090 ms/op 1.11
mainnet_e58758 - phase0 processRegistryUpdates 10.291 us/op 9.7970 us/op 1.05
mainnet_e58758 - phase0 processSlashings 463.00 ns/op 356.00 ns/op 1.30
mainnet_e58758 - phase0 processEth1DataReset 431.00 ns/op 354.00 ns/op 1.22
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2947 ms/op 1.9338 ms/op 0.67
mainnet_e58758 - phase0 processSlashingsReset 7.2320 us/op 2.8360 us/op 2.55
mainnet_e58758 - phase0 processRandaoMixesReset 5.2610 us/op 3.9930 us/op 1.32
mainnet_e58758 - phase0 processHistoricalRootsUpdate 587.00 ns/op 336.00 ns/op 1.75
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.9420 us/op 3.1070 us/op 0.95
mainnet_e58758 - phase0 afterProcessEpoch 43.708 ms/op 45.467 ms/op 0.96
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.9355 ms/op 2.2656 ms/op 0.85
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.3901 ms/op 2.5771 ms/op 0.93
altair processInactivityUpdates - 250000 normalcase 18.357 ms/op 18.419 ms/op 1.00
altair processInactivityUpdates - 250000 worstcase 17.199 ms/op 19.396 ms/op 0.89
phase0 processRegistryUpdates - 250000 normalcase 7.9530 us/op 6.9160 us/op 1.15
phase0 processRegistryUpdates - 250000 badcase_full_deposits 281.74 us/op 331.20 us/op 0.85
phase0 processRegistryUpdates - 250000 worstcase 0.5 113.97 ms/op 123.77 ms/op 0.92
altair processRewardsAndPenalties - 250000 normalcase 43.055 ms/op 40.005 ms/op 1.08
altair processRewardsAndPenalties - 250000 worstcase 43.961 ms/op 40.810 ms/op 1.08
phase0 getAttestationDeltas - 250000 normalcase 8.7639 ms/op 8.7210 ms/op 1.00
phase0 getAttestationDeltas - 250000 worstcase 8.1008 ms/op 8.0521 ms/op 1.01
phase0 processSlashings - 250000 worstcase 85.041 us/op 117.56 us/op 0.72
altair processSyncCommitteeUpdates - 250000 120.03 ms/op 133.51 ms/op 0.90
BeaconState.hashTreeRoot - No change 226.00 ns/op 229.00 ns/op 0.99
BeaconState.hashTreeRoot - 1 full validator 84.693 us/op 93.802 us/op 0.90
BeaconState.hashTreeRoot - 32 full validator 857.71 us/op 1.1633 ms/op 0.74
BeaconState.hashTreeRoot - 512 full validator 8.9160 ms/op 10.562 ms/op 0.84
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 113.12 us/op 109.43 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1185 ms/op 2.0024 ms/op 1.06
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.783 ms/op 26.430 ms/op 0.75
BeaconState.hashTreeRoot - 1 balances 114.42 us/op 129.65 us/op 0.88
BeaconState.hashTreeRoot - 32 balances 961.24 us/op 954.03 us/op 1.01
BeaconState.hashTreeRoot - 512 balances 6.9148 ms/op 8.2070 ms/op 0.84
BeaconState.hashTreeRoot - 250000 balances 153.81 ms/op 166.60 ms/op 0.92
aggregationBits - 2048 els - zipIndexesInBitList 27.925 us/op 28.768 us/op 0.97
byteArrayEquals 32 55.231 ns/op 54.937 ns/op 1.01
Buffer.compare 32 17.519 ns/op 17.388 ns/op 1.01
byteArrayEquals 1024 1.5855 us/op 1.6102 us/op 0.98
Buffer.compare 1024 25.864 ns/op 25.833 ns/op 1.00
byteArrayEquals 16384 25.015 us/op 25.942 us/op 0.96
Buffer.compare 16384 193.75 ns/op 205.39 ns/op 0.94
byteArrayEquals 123687377 196.30 ms/op 196.42 ms/op 1.00
Buffer.compare 123687377 8.4899 ms/op 8.2932 ms/op 1.02
byteArrayEquals 32 - diff last byte 55.015 ns/op 53.574 ns/op 1.03
Buffer.compare 32 - diff last byte 17.971 ns/op 17.865 ns/op 1.01
byteArrayEquals 1024 - diff last byte 1.6469 us/op 1.6240 us/op 1.01
Buffer.compare 1024 - diff last byte 27.202 ns/op 27.028 ns/op 1.01
byteArrayEquals 16384 - diff last byte 26.228 us/op 25.782 us/op 1.02
Buffer.compare 16384 - diff last byte 210.41 ns/op 206.21 ns/op 1.02
byteArrayEquals 123687377 - diff last byte 198.20 ms/op 196.59 ms/op 1.01
Buffer.compare 123687377 - diff last byte 8.2930 ms/op 8.4444 ms/op 0.98
byteArrayEquals 32 - random bytes 5.4030 ns/op 5.3290 ns/op 1.01
Buffer.compare 32 - random bytes 18.036 ns/op 17.646 ns/op 1.02
byteArrayEquals 1024 - random bytes 5.6420 ns/op 5.3700 ns/op 1.05
Buffer.compare 1024 - random bytes 18.005 ns/op 17.701 ns/op 1.02
byteArrayEquals 16384 - random bytes 5.4020 ns/op 5.3930 ns/op 1.00
Buffer.compare 16384 - random bytes 17.999 ns/op 17.686 ns/op 1.02
byteArrayEquals 123687377 - random bytes 6.6800 ns/op 6.7400 ns/op 0.99
Buffer.compare 123687377 - random bytes 19.440 ns/op 20.050 ns/op 0.97
regular array get 100000 times 44.945 us/op 34.767 us/op 1.29
wrappedArray get 100000 times 34.575 us/op 34.191 us/op 1.01
arrayWithProxy get 100000 times 14.521 ms/op 15.376 ms/op 0.94
ssz.Root.equals 47.759 ns/op 49.467 ns/op 0.97
byteArrayEquals 47.012 ns/op 46.607 ns/op 1.01
Buffer.compare 10.881 ns/op 10.881 ns/op 1.00
processSlot - 1 slots 14.547 us/op 16.540 us/op 0.88
processSlot - 32 slots 2.5246 ms/op 2.9831 ms/op 0.85
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.703 ms/op 35.797 ms/op 1.00
getCommitteeAssignments - req 1 vs - 250000 vc 2.1836 ms/op 2.2300 ms/op 0.98
getCommitteeAssignments - req 100 vs - 250000 vc 4.1935 ms/op 4.2968 ms/op 0.98
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4208 ms/op 4.5424 ms/op 0.97
findModifiedValidators - 10000 modified validators 234.61 ms/op 271.85 ms/op 0.86
findModifiedValidators - 1000 modified validators 181.30 ms/op 190.10 ms/op 0.95
findModifiedValidators - 100 modified validators 168.70 ms/op 176.88 ms/op 0.95
findModifiedValidators - 10 modified validators 160.86 ms/op 151.63 ms/op 1.06
findModifiedValidators - 1 modified validators 147.16 ms/op 160.80 ms/op 0.92
findModifiedValidators - no difference 158.26 ms/op 193.05 ms/op 0.82
compare ViewDUs 3.5593 s/op 3.2735 s/op 1.09
compare each validator Uint8Array 1.6101 s/op 1.8314 s/op 0.88
compare ViewDU to Uint8Array 1.4355 s/op 1.0876 s/op 1.32
migrate state 1000000 validators, 24 modified, 0 new 889.55 ms/op 769.12 ms/op 1.16
migrate state 1000000 validators, 1700 modified, 1000 new 1.2578 s/op 1.0739 s/op 1.17
migrate state 1000000 validators, 3400 modified, 2000 new 1.3081 s/op 1.4071 s/op 0.93
migrate state 1500000 validators, 24 modified, 0 new 760.29 ms/op 864.70 ms/op 0.88
migrate state 1500000 validators, 1700 modified, 1000 new 1.0291 s/op 1.0941 s/op 0.94
migrate state 1500000 validators, 3400 modified, 2000 new 1.1513 s/op 1.2798 s/op 0.90
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.0700 ns/op 5.0700 ns/op 1.00
state getBlockRootAtSlot - 250000 vs - 7PWei 611.29 ns/op 672.29 ns/op 0.91
computeProposers - vc 250000 8.9065 ms/op 7.9593 ms/op 1.12
computeEpochShuffling - vc 250000 43.786 ms/op 44.043 ms/op 0.99
getNextSyncCommittee - vc 250000 144.11 ms/op 136.04 ms/op 1.06
computeSigningRoot for AttestationData 23.060 us/op 22.891 us/op 1.01
hash AttestationData serialized data then Buffer.toString(base64) 1.6601 us/op 1.6829 us/op 0.99
toHexString serialized data 931.96 ns/op 1.0694 us/op 0.87
Buffer.toString(base64) 188.86 ns/op 190.55 ns/op 0.99
nodejs block root to RootHex using toHex 156.25 ns/op 162.95 ns/op 0.96
nodejs block root to RootHex using toRootHex 101.26 ns/op 98.356 ns/op 1.03
browser block root to RootHex using the deprecated toHexString 238.44 ns/op 239.21 ns/op 1.00
browser block root to RootHex using toHex 186.68 ns/op 193.20 ns/op 0.97
browser block root to RootHex using toRootHex 165.70 ns/op 177.52 ns/op 0.93

by benchmarkbot/action

@@ -154,6 +161,12 @@ export async function produceBlockBody<T extends BlockType>(
proposerSlashings: proposerSlashings.length,
});

if (ForkSeq[fork] >= ForkSeq.altair) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to use isForkLightClient(fork) so it's aligned with isForkExecution(fork) at L171?

Copy link
Member Author

Choose a reason for hiding this comment

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

sure we can but if you look further down we use the ForkSeq

if (ForkSeq[fork] >= ForkSeq.deneb) {

but since those are close together can use isForkLightClient here, doesn't matter much but wanna avoid too much refactoring in this PR

@@ -653,7 +664,7 @@ export async function produceCommonBlockBody<T extends BlockType>(
}

const endSyncAggregate = stepsMetrics?.startTimer();
if (blockEpoch >= this.config.ALTAIR_FORK_EPOCH) {
if (ForkSeq[fork] >= ForkSeq.altair) {
Copy link
Member Author

@nflaig nflaig Dec 13, 2024

Choose a reason for hiding this comment

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

Required so we properly call this post altair, also using the epoch is not something we do a lot, the change shouldn't make a difference and we save a bit not having to calculate block epoch

Copy link

codecov bot commented Dec 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.91%. Comparing base (99794d3) to head (b064b55).
Report is 4 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #7300   +/-   ##
=========================================
  Coverage     48.91%   48.91%           
=========================================
  Files           601      601           
  Lines         40188    40188           
  Branches       2061     2061           
=========================================
  Hits          19658    19658           
  Misses        20492    20492           
  Partials         38       38           

@nflaig nflaig merged commit ba1d41b into unstable Dec 15, 2024
19 of 20 checks passed
@nflaig nflaig deleted the nflaig/sync-aggregate-participants branch December 15, 2024 11:34
wemeetagain added a commit that referenced this pull request Dec 20, 2024
* feat: add keymanager endpoint to retrieve proposer config (#7210)

* feat: add keymanager endpoint to retrieve proposer config

* Do not return empty builder config

* Check all builder proposer config values

* Fix settings builder config if undefined

* Fix builder config parsing

* Use ssz type to handle json serialization

Default parsing can't handle BigInt

* Revert "Use ssz type to handle json serialization"

This reverts commit 01fcea7.

* Fix boost factor json serialization

* Remove unused import

* Update test data

* Update proposer config test

* feat: add mekong network option (#7212)

* chore: fix import order with biome syntax (#7211)

Fix import order

* fix: consistently validate pubkey and throw 404 if not found (#7214)

* Throw error if pubkey is unknown when getting graffiti

* Consistently validate pubkey and throw 404 if not found

* fix: only return local keys from /eth/v1/keystores (#7215)

* fix: only return local keys from /eth/v1/keystores

* Fix fetching remote keys in node assertion

* feat: add and use getBlobsV1 to expedite gossip import (#7134)

* hookup the getblobs api to get bob and proof data from el

remove unused

fix import

metrics overhault, test, debugging testing, some feeback

fix

add nethermind bug dicussion link

fix

resolve conflicts

* deblobs timeout

* fix metric

* chore: revert async aggregate with randomness (#7218)

Revert "feat: asyncAggregateWithRandomness (#7204)"

This reverts commit e31d535.

* fix: update config for relaunched mekong network (#7220)

* fix: light client generating `LightClientUpdate` with wrong length of branches (#7187)

* initial commit

* Rewrite SyncCommitteeWitnessRepository

* Fix finality branch

* Update unit test

* fix e2e

* Review PR

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* fix: archive finalized state when shutting down beacon node (#7221)

* Fix typo

* feat: remove unfinalized pubkey cache (#7230)

* Remove unfinalized pubkey cache

* lint

* Fix unit test

* chore: skip web3_provider unit tests (#7252)

* fix: prune checkpoint states at syncing time (#7241)

* fix: prune checkpoint states at syncing time

* fix: lint

* fix: check-types in test

* fix: sync cached isCompoundingValidatorArr at epoch transition (#7247)

* fix: handle outOfRangeData when range sync Deneb (#7249)

* fix: handle outOfRangeData for beaconBlocksMaybeBlobsByRange()

* fix: lint

* fix: archiveBlocks - handle deneb outOfRangeData block

* fix: sync cached balance when adding new validator to registry (#7255)

* fix: sync cached balance when adding new validator to registry

* chore: add more comments

* fix: remove persisted checkpoint states from the previous run at startup

* fix: do not throw error when trying to prune missing directory (#7257)

* docs: update documentation Oct 2024 (#7178)

* docs update oct 2024 init

* Reconfig quickstart nav and minor fixes

* fix lint

* spelling fixes

* minor fixes and add to wordlist

* prettier fix

* add to wordlist

* sort wordlist

* modify dominance to include lighthouse

* fix typescript casing and add recommendation

* add selection and boost_factor with keymanager notice

* update wordlist

* remove builder enabled and add keymanager api

* spelling

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore(deps): bump cross-spawn from 7.0.3 to 7.0.6 in /docs (#7268)

Bumps [cross-spawn](https://github.com/moxystudio/node-cross-spawn) from 7.0.3 to 7.0.6.
- [Changelog](https://github.com/moxystudio/node-cross-spawn/blob/master/CHANGELOG.md)
- [Commits](moxystudio/node-cross-spawn@v7.0.3...v7.0.6)

---
updated-dependencies:
- dependency-name: cross-spawn
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* feat: add error log to notifier if execution client auth failed (#7239)

* feat: add error log to notifier if execution client auth failed

* Update packages/beacon-node/src/node/notifier.ts

---------

Co-authored-by: NC <17676176+ensi321@users.noreply.github.com>

* docs: display rcConfig flag on CLI reference page (#7270)

* docs: display rcConfig flag on CLI reference page

* Update word list

* chore: remove prettier as default formatter for all file types (#7275)

* chore: unhide flags relevant for devnets / testing (#7271)

* feat: debug too many shuffling promises (#7251)

* feat: add asyncShufflingCalculation to StateTransitionOpts

* feat: add asyncShufflingCalculation to all regen / processSlots consumers

* fix: default to false for async shuffling and remove unnecessary props

* fix: remove unnecessary flags from stateTransition

* feat: implement conditional build of shuffling for prepareNextSlot

* fix: spec test bug where shufflingCache is present from BeaconChain constructor

* feat: sync build next shuffling if not queued async

* fix: use getSync to pull next shuffling correctly

* docs: add comment to prepareNextSlot

* refactor: rename StateCloneOpts to StateRegenerationOpts

* feat: pass asyncShufflingCalculation through to afterProcessEpoch and refactor conditional to run purely sync

* docs: add issue number to comment

* chore: lint

* chore: unpin nodejs version from 22.4 (#6982)

* Revert "chore: pin nodejs version to 22.4 (#6964)"

This reverts commit f20484b.

* Don't revert formatting changes

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Co-authored-by: Cayman <caymannava@gmail.com>

* chore: update bootnodes file url for holesky and sepolia (#7276)

* feat: add `debug_getHistoricalSummaries` endpoint (#7245)

* feat: add new getHistoricalSummaries endpoint to debug namespace

* Add JSON response

* Restructure to use stateId and add proof to response

* add test scaffolding

* Address feedback

* Move getHistoricalSummaries to lodestar namespace

* add lodestar namespace unit test

* update route name to lodestar namespace

* cast state object as Capella state

* Lint

* json properties need to be lower case

* Make it v1 since it's now part of lodestar namespace

* Group with other /lodestar endpoints

* Simplify beacon node impl

* Rename return type

* Update test description

* Fix variable name

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: log sync committee signature errors as `error` (#7283)

* fix: update engine_getClientVersionV1 commit encoding (#7282)

* fix: check pubkey or validator index known to a state (#7284)

* fix: check pubkey or validator index known to a state

* chore: add more comments

* feat: lodestar script setup (#7254)

* feat: lodestar_setup

* feat: script_updates + docs

* feat: script_addition_in_docs + command_update

* Remove duplicate script from docs folder

* Minor script updates

* Update script to prepare docs and ignore copied file

* Update installation page

* Wording

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* feat: add terminal-sized Electra giraffe banner (#7286)

* Create giraffeBanners.ts

* Wire in banner

* Fix file name

* lint

* Address @nflaig's comment

---------

Co-authored-by: NC <17676176+ensi321@users.noreply.github.com>

* chore: pin nodejs version to 22.4 (#7291)

Revert "chore: unpin nodejs version from 22.4 (#6982)"

This reverts commit 69ae688.

* feat: expose `DOMAIN_APPLICATION_MASK` in config/spec api (#7296)

* feat: expose DOMAIN_APPLICATION_MASK in config/spec api

* Lint

* feat: make `MAX_REQUEST_BLOB_SIDECARS` and `MAX_BLOBS_PER_BLOCK` configurable (#7294)

* Init commit

* Fix check-types

* Add comment on how MAX_REQUEST_BLOB_SIDECARS is calculated

* Ensure proper config object is passed

* Address comment

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* feat: use `BLOB_SIDECAR_SUBNET_COUNT` to configure blob subnets (#7297)

feat: use BLOB_SIDECAR_SUBNET_COUNT to configure blob subnets

* chore: log sync aggregate participants when producing beacon block body (#7300)

* chore: log sync aggregate participants when producing beacon block body

* Use isForkLightClient instead of ForkSeq

* Fix produce block unit tests

* chore: print graffiti when producing beacon block body (#7303)

* fix: warn if engine / builder failed to produce block within cutoff time (#7305)

* feat: add kzg commitment length check when validating gossip blocks (#7302)

* feat: add blob sidecar index check (#7313)

Validate blobSidecar index

* fix: fix blob sidecar index check (#7315)

Fix index check

* chore: fix format of printed graffiti from hex to utf-8 (#7306)

* chore: fix format of printed graffiti from hex to utf-8

* Use Buffer.from no copy with offset

* docs: batch commit typos and update contributor readme (#7312)

* batch commit typos and update contributor readme

* update donation text

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* correct spelling

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>

* chore: remove trailing null bytes from printed graffiti (#7320)

* chore: remove trailing null bytes from printed graffiti

* Use replaceAll instead of regex

* chore: unpin nodejs version from 22.4 (#7324)

Revert "chore: pin nodejs version to 22.4 (#7291)"

This reverts commit 99794d3.

* chore: bump package versions to 1.24.0

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
Co-authored-by: g11tech <develop@g11tech.io>
Co-authored-by: Matthew Keil <me@matthewkeil.com>
Co-authored-by: NC <17676176+ensi321@users.noreply.github.com>
Co-authored-by: twoeths <tuyen@chainsafe.io>
Co-authored-by: Phil Ngo <58080811+philknows@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: acolytec3 <17355484+acolytec3@users.noreply.github.com>
Co-authored-by: Varun Guleria <152203177+varunguleriaCodes@users.noreply.github.com>
Co-authored-by: ClockworkYuzu <yvetteheh@gmail.com>
@wemeetagain
Copy link
Member

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

3 participants