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

feat: add ssz support to LC updates by range endpoint #7119

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 1, 2024

Motivation

Description

Adds SSZ support to getLightClientUpdatesByRange endpoint as defined in spec

Closes #6841

}),
fromHeaders: (headers) => {
const versions = headers.getOrDefault(MetaHeader.Version, "");
return {versions: versions === "" ? [] : (versions.split(",") as ForkName[])};
Copy link
Member Author

Choose a reason for hiding this comment

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

Other clients won't be setting the header which means the metadata (res.meta()) will be empty, however this is not a big issue since it's not required to deserialize the response.


const cachedBeaconConfig = (): BeaconConfig => {
if (beaconConfig === undefined) {
const genesisValidatorsRoot = genesisData[config.CONFIG_NAME as NetworkName]?.genesisValidatorsRoot;
Copy link
Member Author

Choose a reason for hiding this comment

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

Caveat with this is that custom networks won't be supported across different clients, however, as long as Lodestar is both the client and server this still works as both use zero hash as genesis validators root.

There is also always the option to use JSON encoding, so I don't think this is a big issue.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also noticed that as of right now, it's not possible to configure the LC for custom networks

if (!(network in networksChainConfig)) {
throw Error(`Invalid network name "${network}". Valid options are: ${Object.keys(networksChainConfig).join()}`);
}

Copy link
Contributor

github-actions bot commented Oct 1, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 754fc4f Previous: ac6edd3 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8176 ms/op 1.9204 ms/op 0.95
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 38.491 us/op 39.560 us/op 0.97
BLS verify - blst 922.14 us/op 898.92 us/op 1.03
BLS verifyMultipleSignatures 3 - blst 1.3608 ms/op 1.3742 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 2.1221 ms/op 2.1552 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst 4.5961 ms/op 4.5677 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 8.4456 ms/op 8.5810 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 16.228 ms/op 16.269 ms/op 1.00
BLS deserializing 10000 signatures 614.88 ms/op 616.99 ms/op 1.00
BLS deserializing 100000 signatures 6.3817 s/op 6.2932 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 954.28 us/op 989.40 us/op 0.96
BLS verifyMultipleSignatures - same message - 8 - blst 1.1113 ms/op 1.0942 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.7298 ms/op 1.7047 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.5028 ms/op 2.6104 ms/op 0.96
BLS verifyMultipleSignatures - same message - 128 - blst 4.2038 ms/op 4.2510 ms/op 0.99
BLS aggregatePubkeys 32 - blst 18.134 us/op 18.701 us/op 0.97
BLS aggregatePubkeys 128 - blst 63.908 us/op 64.932 us/op 0.98
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 70.307 ms/op 66.626 ms/op 1.06
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 47.241 ms/op 47.974 ms/op 0.98
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.974 ms/op 31.813 ms/op 1.01
getSlashingsAndExits - default max 96.813 us/op 82.961 us/op 1.17
getSlashingsAndExits - 2k 308.40 us/op 304.25 us/op 1.01
proposeBlockBody type=full, size=empty 5.1679 ms/op 4.7030 ms/op 1.10
isKnown best case - 1 super set check 523.00 ns/op 548.00 ns/op 0.95
isKnown normal case - 2 super set checks 485.00 ns/op 481.00 ns/op 1.01
isKnown worse case - 16 super set checks 486.00 ns/op 475.00 ns/op 1.02
InMemoryCheckpointStateCache - add get delete 2.8010 us/op 2.9970 us/op 0.93
updateUnfinalizedPubkeys - updating 10 pubkeys 1.1303 ms/op 871.76 us/op 1.30
updateUnfinalizedPubkeys - updating 100 pubkeys 3.9528 ms/op 2.8367 ms/op 1.39
updateUnfinalizedPubkeys - updating 1000 pubkeys 48.021 ms/op 38.542 ms/op 1.25
validate api signedAggregateAndProof - struct 1.5202 ms/op 1.5673 ms/op 0.97
validate gossip signedAggregateAndProof - struct 1.6351 ms/op 1.5267 ms/op 1.07
batch validate gossip attestation - vc 640000 - chunk 32 133.87 us/op 124.93 us/op 1.07
batch validate gossip attestation - vc 640000 - chunk 64 117.61 us/op 114.94 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 111.66 us/op 109.35 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 103.31 us/op 105.38 us/op 0.98
pickEth1Vote - no votes 876.57 us/op 893.66 us/op 0.98
pickEth1Vote - max votes 4.5908 ms/op 4.9052 ms/op 0.94
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.501 ms/op 13.985 ms/op 1.25
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.641 ms/op 22.188 ms/op 1.11
pickEth1Vote - Eth1Data fastSerialize value x2048 448.18 us/op 373.22 us/op 1.20
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.4618 ms/op 3.1453 ms/op 0.78
bytes32 toHexString 591.00 ns/op 896.00 ns/op 0.66
bytes32 Buffer.toString(hex) 448.00 ns/op 510.00 ns/op 0.88
bytes32 Buffer.toString(hex) from Uint8Array 548.00 ns/op 712.00 ns/op 0.77
bytes32 Buffer.toString(hex) + 0x 460.00 ns/op 484.00 ns/op 0.95
Object access 1 prop 0.32800 ns/op 0.38900 ns/op 0.84
Map access 1 prop 0.33500 ns/op 0.34400 ns/op 0.97
Object get x1000 5.2820 ns/op 5.2860 ns/op 1.00
Map get x1000 5.6450 ns/op 6.3410 ns/op 0.89
Object set x1000 25.566 ns/op 25.085 ns/op 1.02
Map set x1000 20.731 ns/op 22.085 ns/op 0.94
Return object 10000 times 0.29280 ns/op 0.31840 ns/op 0.92
Throw Error 10000 times 2.6243 us/op 3.1949 us/op 0.82
toHex 128.69 ns/op 133.55 ns/op 0.96
Buffer.from 112.31 ns/op 112.24 ns/op 1.00
shared Buffer 69.685 ns/op 92.703 ns/op 0.75
fastMsgIdFn sha256 / 200 bytes 1.9810 us/op 2.3970 us/op 0.83
fastMsgIdFn h32 xxhash / 200 bytes 426.00 ns/op 514.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 200 bytes 450.00 ns/op 468.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 5.8910 us/op 6.2330 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 579.00 ns/op 595.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 1000 bytes 522.00 ns/op 581.00 ns/op 0.90
fastMsgIdFn sha256 / 10000 bytes 49.467 us/op 59.864 us/op 0.83
fastMsgIdFn h32 xxhash / 10000 bytes 1.9940 us/op 2.1390 us/op 0.93
fastMsgIdFn h64 xxhash / 10000 bytes 1.3710 us/op 1.4100 us/op 0.97
send data - 1000 256B messages 9.5027 ms/op 10.938 ms/op 0.87
send data - 1000 512B messages 13.635 ms/op 16.919 ms/op 0.81
send data - 1000 1024B messages 20.871 ms/op 26.077 ms/op 0.80
send data - 1000 1200B messages 20.982 ms/op 25.485 ms/op 0.82
send data - 1000 2048B messages 28.785 ms/op 35.649 ms/op 0.81
send data - 1000 4096B messages 28.557 ms/op 31.093 ms/op 0.92
send data - 1000 16384B messages 64.181 ms/op 71.227 ms/op 0.90
send data - 1000 65536B messages 266.43 ms/op 541.30 ms/op 0.49
enrSubnets - fastDeserialize 64 bits 1.2540 us/op 1.7220 us/op 0.73
enrSubnets - ssz BitVector 64 bits 594.00 ns/op 847.00 ns/op 0.70
enrSubnets - fastDeserialize 4 bits 369.00 ns/op 495.00 ns/op 0.75
enrSubnets - ssz BitVector 4 bits 540.00 ns/op 799.00 ns/op 0.68
prioritizePeers score -10:0 att 32-0.1 sync 2-0 125.00 us/op 256.68 us/op 0.49
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 182.90 us/op 305.57 us/op 0.60
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 217.15 us/op 534.34 us/op 0.41
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 389.73 us/op 591.33 us/op 0.66
prioritizePeers score 0:0 att 64-1 sync 4-1 652.31 us/op 1.1677 ms/op 0.56
array of 16000 items push then shift 1.2596 us/op 1.6760 us/op 0.75
LinkedList of 16000 items push then shift 7.6130 ns/op 10.528 ns/op 0.72
array of 16000 items push then pop 85.809 ns/op 187.12 ns/op 0.46
LinkedList of 16000 items push then pop 6.2750 ns/op 8.3810 ns/op 0.75
array of 24000 items push then shift 1.9136 us/op 2.1895 us/op 0.87
LinkedList of 24000 items push then shift 6.3550 ns/op 11.874 ns/op 0.54
array of 24000 items push then pop 115.84 ns/op 217.78 ns/op 0.53
LinkedList of 24000 items push then pop 6.3160 ns/op 11.271 ns/op 0.56
intersect bitArray bitLen 8 5.6650 ns/op 6.3000 ns/op 0.90
intersect array and set length 8 39.336 ns/op 94.322 ns/op 0.42
intersect bitArray bitLen 128 27.751 ns/op 32.119 ns/op 0.86
intersect array and set length 128 579.88 ns/op 1.0127 us/op 0.57
bitArray.getTrueBitIndexes() bitLen 128 2.4700 us/op 3.0460 us/op 0.81
bitArray.getTrueBitIndexes() bitLen 248 4.1550 us/op 3.8340 us/op 1.08
bitArray.getTrueBitIndexes() bitLen 512 8.4530 us/op 9.3330 us/op 0.91
Buffer.concat 32 items 1.0540 us/op 1.2100 us/op 0.87
Uint8Array.set 32 items 1.5970 us/op 1.7760 us/op 0.90
Buffer.copy 1.7800 us/op 2.0720 us/op 0.86
Uint8Array.set - with subarray 1.9330 us/op 2.2560 us/op 0.86
Uint8Array.set - without subarray 1.3060 us/op 1.9770 us/op 0.66
getUint32 - dataview 422.00 ns/op 532.00 ns/op 0.79
getUint32 - manual 343.00 ns/op 522.00 ns/op 0.66
Set add up to 64 items then delete first 1.7431 us/op 2.2781 us/op 0.77
OrderedSet add up to 64 items then delete first 2.7153 us/op 3.0991 us/op 0.88
Set add up to 64 items then delete last 1.9938 us/op 4.4103 us/op 0.45
OrderedSet add up to 64 items then delete last 2.9489 us/op 5.2723 us/op 0.56
Set add up to 64 items then delete middle 1.9373 us/op 3.2397 us/op 0.60
OrderedSet add up to 64 items then delete middle 4.2986 us/op 6.9798 us/op 0.62
Set add up to 128 items then delete first 3.8552 us/op 6.3323 us/op 0.61
OrderedSet add up to 128 items then delete first 6.0984 us/op 7.5891 us/op 0.80
Set add up to 128 items then delete last 3.7580 us/op 6.1522 us/op 0.61
OrderedSet add up to 128 items then delete last 5.7204 us/op 9.2507 us/op 0.62
Set add up to 128 items then delete middle 3.7543 us/op 5.4761 us/op 0.69
OrderedSet add up to 128 items then delete middle 11.448 us/op 15.739 us/op 0.73
Set add up to 256 items then delete first 7.5915 us/op 12.492 us/op 0.61
OrderedSet add up to 256 items then delete first 12.388 us/op 18.626 us/op 0.67
Set add up to 256 items then delete last 7.5208 us/op 10.199 us/op 0.74
OrderedSet add up to 256 items then delete last 11.544 us/op 15.434 us/op 0.75
Set add up to 256 items then delete middle 7.3634 us/op 8.7193 us/op 0.84
OrderedSet add up to 256 items then delete middle 36.171 us/op 40.521 us/op 0.89
transfer serialized Status (84 B) 1.3990 us/op 1.4910 us/op 0.94
copy serialized Status (84 B) 1.3240 us/op 1.3910 us/op 0.95
transfer serialized SignedVoluntaryExit (112 B) 1.4960 us/op 1.5540 us/op 0.96
copy serialized SignedVoluntaryExit (112 B) 1.3680 us/op 1.5800 us/op 0.87
transfer serialized ProposerSlashing (416 B) 1.8620 us/op 2.3130 us/op 0.81
copy serialized ProposerSlashing (416 B) 1.9250 us/op 2.5450 us/op 0.76
transfer serialized Attestation (485 B) 1.8460 us/op 2.0620 us/op 0.90
copy serialized Attestation (485 B) 1.5560 us/op 2.1810 us/op 0.71
transfer serialized AttesterSlashing (33232 B) 1.6930 us/op 2.5530 us/op 0.66
copy serialized AttesterSlashing (33232 B) 5.3600 us/op 4.8200 us/op 1.11
transfer serialized Small SignedBeaconBlock (128000 B) 2.2190 us/op 2.6460 us/op 0.84
copy serialized Small SignedBeaconBlock (128000 B) 15.407 us/op 13.227 us/op 1.16
transfer serialized Avg SignedBeaconBlock (200000 B) 2.4640 us/op 2.8010 us/op 0.88
copy serialized Avg SignedBeaconBlock (200000 B) 22.032 us/op 12.476 us/op 1.77
transfer serialized BlobsSidecar (524380 B) 2.9580 us/op 2.6340 us/op 1.12
copy serialized BlobsSidecar (524380 B) 71.963 us/op 113.04 us/op 0.64
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1360 us/op 3.3680 us/op 0.93
copy serialized Big SignedBeaconBlock (1000000 B) 138.57 us/op 141.36 us/op 0.98
pass gossip attestations to forkchoice per slot 2.3864 ms/op 2.6964 ms/op 0.89
forkChoice updateHead vc 100000 bc 64 eq 0 356.72 us/op 355.03 us/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 2.6290 ms/op 3.8167 ms/op 0.69
forkChoice updateHead vc 1000000 bc 64 eq 0 3.7224 ms/op 4.0543 ms/op 0.92
forkChoice updateHead vc 600000 bc 320 eq 0 2.2673 ms/op 2.4958 ms/op 0.91
forkChoice updateHead vc 600000 bc 1200 eq 0 2.3366 ms/op 2.6482 ms/op 0.88
forkChoice updateHead vc 600000 bc 7200 eq 0 2.5574 ms/op 2.9965 ms/op 0.85
forkChoice updateHead vc 600000 bc 64 eq 1000 9.3595 ms/op 10.668 ms/op 0.88
forkChoice updateHead vc 600000 bc 64 eq 10000 9.3646 ms/op 9.7946 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 11.464 ms/op 12.221 ms/op 0.94
computeDeltas 500000 validators 300 proto nodes 3.3484 ms/op 3.6387 ms/op 0.92
computeDeltas 500000 validators 1200 proto nodes 3.5886 ms/op 3.7342 ms/op 0.96
computeDeltas 500000 validators 7200 proto nodes 3.5230 ms/op 3.4967 ms/op 1.01
computeDeltas 750000 validators 300 proto nodes 5.1288 ms/op 5.1593 ms/op 0.99
computeDeltas 750000 validators 1200 proto nodes 4.9643 ms/op 5.2520 ms/op 0.95
computeDeltas 750000 validators 7200 proto nodes 4.8725 ms/op 5.3245 ms/op 0.92
computeDeltas 1400000 validators 300 proto nodes 9.2868 ms/op 9.8863 ms/op 0.94
computeDeltas 1400000 validators 1200 proto nodes 9.2175 ms/op 9.6558 ms/op 0.95
computeDeltas 1400000 validators 7200 proto nodes 9.0479 ms/op 9.7000 ms/op 0.93
computeDeltas 2100000 validators 300 proto nodes 13.657 ms/op 16.990 ms/op 0.80
computeDeltas 2100000 validators 1200 proto nodes 13.907 ms/op 18.979 ms/op 0.73
computeDeltas 2100000 validators 7200 proto nodes 14.052 ms/op 15.660 ms/op 0.90
altair processAttestation - 250000 vs - 7PWei normalcase 1.3917 ms/op 2.3777 ms/op 0.59
altair processAttestation - 250000 vs - 7PWei worstcase 2.1842 ms/op 3.5025 ms/op 0.62
altair processAttestation - setStatus - 1/6 committees join 64.728 us/op 72.341 us/op 0.89
altair processAttestation - setStatus - 1/3 committees join 139.24 us/op 149.83 us/op 0.93
altair processAttestation - setStatus - 1/2 committees join 192.21 us/op 237.31 us/op 0.81
altair processAttestation - setStatus - 2/3 committees join 251.86 us/op 317.13 us/op 0.79
altair processAttestation - setStatus - 4/5 committees join 384.26 us/op 449.53 us/op 0.85
altair processAttestation - setStatus - 100% committees join 452.55 us/op 545.13 us/op 0.83
altair processBlock - 250000 vs - 7PWei normalcase 3.4657 ms/op 7.9496 ms/op 0.44
altair processBlock - 250000 vs - 7PWei normalcase hashState 22.933 ms/op 27.443 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase 36.624 ms/op 37.072 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase hashState 68.522 ms/op 75.007 ms/op 0.91
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5094 ms/op 2.3181 ms/op 0.65
phase0 processBlock - 250000 vs - 7PWei worstcase 21.682 ms/op 23.530 ms/op 0.92
altair processEth1Data - 250000 vs - 7PWei normalcase 251.90 us/op 249.48 us/op 1.01
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 4.6480 us/op 5.2270 us/op 0.89
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 28.147 us/op 32.433 us/op 0.87
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.1960 us/op 9.8310 us/op 0.83
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.8950 us/op 6.5550 us/op 0.75
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 79.679 us/op 129.12 us/op 0.62
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 843.09 us/op 1.5190 ms/op 0.56
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1170 ms/op 1.2299 ms/op 0.91
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1732 ms/op 1.2067 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7998 ms/op 2.9728 ms/op 0.94
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1763 ms/op 1.3222 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.9227 ms/op 3.4650 ms/op 0.84
Tree 40 250000 create 186.88 ms/op 222.80 ms/op 0.84
Tree 40 250000 get(125000) 114.28 ns/op 124.08 ns/op 0.92
Tree 40 250000 set(125000) 514.81 ns/op 573.02 ns/op 0.90
Tree 40 250000 toArray() 9.5064 ms/op 19.261 ms/op 0.49
Tree 40 250000 iterate all - toArray() + loop 9.5675 ms/op 21.185 ms/op 0.45
Tree 40 250000 iterate all - get(i) 39.874 ms/op 52.360 ms/op 0.76
Array 250000 create 2.3341 ms/op 3.2951 ms/op 0.71
Array 250000 clone - spread 1.2221 ms/op 1.3187 ms/op 0.93
Array 250000 get(125000) 0.58400 ns/op 0.62900 ns/op 0.93
Array 250000 set(125000) 0.59900 ns/op 0.60400 ns/op 0.99
Array 250000 iterate all - loop 75.114 us/op 77.227 us/op 0.97
phase0 afterProcessEpoch - 250000 vs - 7PWei 74.711 ms/op 79.980 ms/op 0.93
Array.fill - length 1000000 2.4448 ms/op 3.7940 ms/op 0.64
Array push - length 1000000 14.675 ms/op 23.446 ms/op 0.63
Array.get 0.26742 ns/op 0.27727 ns/op 0.96
Uint8Array.get 0.34438 ns/op 0.36063 ns/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.308 ms/op 22.445 ms/op 0.82
altair processEpoch - mainnet_e81889 289.00 ms/op 306.13 ms/op 0.94
mainnet_e81889 - altair beforeProcessEpoch 19.933 ms/op 17.391 ms/op 1.15
mainnet_e81889 - altair processJustificationAndFinalization 17.372 us/op 14.043 us/op 1.24
mainnet_e81889 - altair processInactivityUpdates 4.3632 ms/op 4.7967 ms/op 0.91
mainnet_e81889 - altair processRewardsAndPenalties 44.930 ms/op 55.773 ms/op 0.81
mainnet_e81889 - altair processRegistryUpdates 2.1210 us/op 2.3400 us/op 0.91
mainnet_e81889 - altair processSlashings 782.00 ns/op 956.00 ns/op 0.82
mainnet_e81889 - altair processEth1DataReset 822.00 ns/op 791.00 ns/op 1.04
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0889 ms/op 1.0995 ms/op 0.99
mainnet_e81889 - altair processSlashingsReset 4.3200 us/op 2.9970 us/op 1.44
mainnet_e81889 - altair processRandaoMixesReset 4.7440 us/op 3.9390 us/op 1.20
mainnet_e81889 - altair processHistoricalRootsUpdate 934.00 ns/op 789.00 ns/op 1.18
mainnet_e81889 - altair processParticipationFlagUpdates 2.9670 us/op 2.4860 us/op 1.19
mainnet_e81889 - altair processSyncCommitteeUpdates 1.0260 us/op 676.00 ns/op 1.52
mainnet_e81889 - altair afterProcessEpoch 80.314 ms/op 79.409 ms/op 1.01
capella processEpoch - mainnet_e217614 1.3130 s/op 1.1434 s/op 1.15
mainnet_e217614 - capella beforeProcessEpoch 76.020 ms/op 66.945 ms/op 1.14
mainnet_e217614 - capella processJustificationAndFinalization 17.515 us/op 12.042 us/op 1.45
mainnet_e217614 - capella processInactivityUpdates 15.876 ms/op 12.975 ms/op 1.22
mainnet_e217614 - capella processRewardsAndPenalties 237.62 ms/op 246.79 ms/op 0.96
mainnet_e217614 - capella processRegistryUpdates 12.919 us/op 10.753 us/op 1.20
mainnet_e217614 - capella processSlashings 753.00 ns/op 781.00 ns/op 0.96
mainnet_e217614 - capella processEth1DataReset 760.00 ns/op 660.00 ns/op 1.15
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.4938 ms/op 5.7367 ms/op 0.96
mainnet_e217614 - capella processSlashingsReset 8.3810 us/op 2.5470 us/op 3.29
mainnet_e217614 - capella processRandaoMixesReset 5.5890 us/op 3.4900 us/op 1.60
mainnet_e217614 - capella processHistoricalRootsUpdate 1.2090 us/op 718.00 ns/op 1.68
mainnet_e217614 - capella processParticipationFlagUpdates 2.5740 us/op 1.7030 us/op 1.51
mainnet_e217614 - capella afterProcessEpoch 204.91 ms/op 198.29 ms/op 1.03
phase0 processEpoch - mainnet_e58758 392.15 ms/op 337.65 ms/op 1.16
mainnet_e58758 - phase0 beforeProcessEpoch 90.290 ms/op 77.098 ms/op 1.17
mainnet_e58758 - phase0 processJustificationAndFinalization 18.480 us/op 10.025 us/op 1.84
mainnet_e58758 - phase0 processRewardsAndPenalties 39.635 ms/op 34.291 ms/op 1.16
mainnet_e58758 - phase0 processRegistryUpdates 7.8790 us/op 5.8330 us/op 1.35
mainnet_e58758 - phase0 processSlashings 608.00 ns/op 806.00 ns/op 0.75
mainnet_e58758 - phase0 processEth1DataReset 890.00 ns/op 721.00 ns/op 1.23
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 903.11 us/op 1.3683 ms/op 0.66
mainnet_e58758 - phase0 processSlashingsReset 3.3140 us/op 2.0320 us/op 1.63
mainnet_e58758 - phase0 processRandaoMixesReset 6.4070 us/op 3.5750 us/op 1.79
mainnet_e58758 - phase0 processHistoricalRootsUpdate 774.00 ns/op 766.00 ns/op 1.01
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.0600 us/op 3.1920 us/op 0.96
mainnet_e58758 - phase0 afterProcessEpoch 68.455 ms/op 61.709 ms/op 1.11
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0441 ms/op 988.74 us/op 1.06
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6886 ms/op 1.5894 ms/op 1.06
altair processInactivityUpdates - 250000 normalcase 17.778 ms/op 17.099 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 18.061 ms/op 17.587 ms/op 1.03
phase0 processRegistryUpdates - 250000 normalcase 9.6520 us/op 7.1050 us/op 1.36
phase0 processRegistryUpdates - 250000 badcase_full_deposits 295.31 us/op 302.31 us/op 0.98
phase0 processRegistryUpdates - 250000 worstcase 0.5 107.03 ms/op 107.00 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 37.298 ms/op 45.341 ms/op 0.82
altair processRewardsAndPenalties - 250000 worstcase 46.726 ms/op 37.840 ms/op 1.23
phase0 getAttestationDeltas - 250000 normalcase 9.6984 ms/op 5.9599 ms/op 1.63
phase0 getAttestationDeltas - 250000 worstcase 8.2938 ms/op 6.0685 ms/op 1.37
phase0 processSlashings - 250000 worstcase 93.969 us/op 83.104 us/op 1.13
altair processSyncCommitteeUpdates - 250000 120.98 ms/op 97.052 ms/op 1.25
BeaconState.hashTreeRoot - No change 521.00 ns/op 458.00 ns/op 1.14
BeaconState.hashTreeRoot - 1 full validator 124.20 us/op 87.623 us/op 1.42
BeaconState.hashTreeRoot - 32 full validator 1.0542 ms/op 1.0850 ms/op 0.97
BeaconState.hashTreeRoot - 512 full validator 14.689 ms/op 10.523 ms/op 1.40
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 173.72 us/op 125.69 us/op 1.38
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.4060 ms/op 1.5622 ms/op 1.54
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.924 ms/op 27.840 ms/op 1.18
BeaconState.hashTreeRoot - 1 balances 131.53 us/op 82.283 us/op 1.60
BeaconState.hashTreeRoot - 32 balances 1.1314 ms/op 1.0130 ms/op 1.12
BeaconState.hashTreeRoot - 512 balances 11.472 ms/op 10.494 ms/op 1.09
BeaconState.hashTreeRoot - 250000 balances 193.63 ms/op 178.60 ms/op 1.08
aggregationBits - 2048 els - zipIndexesInBitList 37.524 us/op 20.546 us/op 1.83
byteArrayEquals 32 53.038 ns/op 49.003 ns/op 1.08
Buffer.compare 32 18.106 ns/op 16.161 ns/op 1.12
byteArrayEquals 1024 1.3059 us/op 1.2888 us/op 1.01
Buffer.compare 1024 24.636 ns/op 24.238 ns/op 1.02
byteArrayEquals 16384 20.766 us/op 20.385 us/op 1.02
Buffer.compare 16384 191.21 ns/op 185.87 ns/op 1.03
byteArrayEquals 123687377 155.53 ms/op 152.20 ms/op 1.02
Buffer.compare 123687377 5.0278 ms/op 4.2070 ms/op 1.20
byteArrayEquals 32 - diff last byte 48.597 ns/op 48.243 ns/op 1.01
Buffer.compare 32 - diff last byte 15.743 ns/op 16.944 ns/op 0.93
byteArrayEquals 1024 - diff last byte 1.2636 us/op 1.2880 us/op 0.98
Buffer.compare 1024 - diff last byte 24.308 ns/op 23.946 ns/op 1.02
byteArrayEquals 16384 - diff last byte 20.040 us/op 20.477 us/op 0.98
Buffer.compare 16384 - diff last byte 206.09 ns/op 215.31 ns/op 0.96
byteArrayEquals 123687377 - diff last byte 149.84 ms/op 151.04 ms/op 0.99
Buffer.compare 123687377 - diff last byte 5.8965 ms/op 4.9965 ms/op 1.18
byteArrayEquals 32 - random bytes 4.7930 ns/op 5.0290 ns/op 0.95
Buffer.compare 32 - random bytes 14.955 ns/op 16.653 ns/op 0.90
byteArrayEquals 1024 - random bytes 4.7250 ns/op 4.9890 ns/op 0.95
Buffer.compare 1024 - random bytes 14.899 ns/op 16.974 ns/op 0.88
byteArrayEquals 16384 - random bytes 4.6970 ns/op 5.0290 ns/op 0.93
Buffer.compare 16384 - random bytes 14.887 ns/op 16.573 ns/op 0.90
byteArrayEquals 123687377 - random bytes 7.5900 ns/op 8.0200 ns/op 0.95
Buffer.compare 123687377 - random bytes 17.650 ns/op 20.010 ns/op 0.88
regular array get 100000 times 29.897 us/op 31.522 us/op 0.95
wrappedArray get 100000 times 30.412 us/op 31.526 us/op 0.96
arrayWithProxy get 100000 times 9.7514 ms/op 11.120 ms/op 0.88
ssz.Root.equals 39.793 ns/op 44.719 ns/op 0.89
byteArrayEquals 42.100 ns/op 44.238 ns/op 0.95
Buffer.compare 8.6760 ns/op 9.9170 ns/op 0.87
shuffle list - 16384 els 5.4113 ms/op 5.5744 ms/op 0.97
shuffle list - 250000 els 80.315 ms/op 81.378 ms/op 0.99
processSlot - 1 slots 13.709 us/op 15.230 us/op 0.90
processSlot - 32 slots 2.5210 ms/op 3.1004 ms/op 0.81
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 36.831 ms/op 38.122 ms/op 0.97
getCommitteeAssignments - req 1 vs - 250000 vc 1.8306 ms/op 1.7527 ms/op 1.04
getCommitteeAssignments - req 100 vs - 250000 vc 3.5695 ms/op 3.4437 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8286 ms/op 3.6663 ms/op 1.04
findModifiedValidators - 10000 modified validators 226.31 ms/op 238.22 ms/op 0.95
findModifiedValidators - 1000 modified validators 164.89 ms/op 156.00 ms/op 1.06
findModifiedValidators - 100 modified validators 145.13 ms/op 138.06 ms/op 1.05
findModifiedValidators - 10 modified validators 146.19 ms/op 136.05 ms/op 1.07
findModifiedValidators - 1 modified validators 112.70 ms/op 145.25 ms/op 0.78
findModifiedValidators - no difference 151.13 ms/op 148.01 ms/op 1.02
compare ViewDUs 2.9988 s/op 3.3983 s/op 0.88
compare each validator Uint8Array 887.28 ms/op 799.17 ms/op 1.11
compare ViewDU to Uint8Array 800.85 ms/op 705.81 ms/op 1.13
migrate state 1000000 validators, 24 modified, 0 new 801.07 ms/op 797.34 ms/op 1.00
migrate state 1000000 validators, 1700 modified, 1000 new 962.56 ms/op 1.0750 s/op 0.90
migrate state 1000000 validators, 3400 modified, 2000 new 1.0996 s/op 1.1947 s/op 0.92
migrate state 1500000 validators, 24 modified, 0 new 806.05 ms/op 817.64 ms/op 0.99
migrate state 1500000 validators, 1700 modified, 1000 new 989.80 ms/op 1.0937 s/op 0.90
migrate state 1500000 validators, 3400 modified, 2000 new 1.2040 s/op 1.3017 s/op 0.92
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.0800 ns/op 6.5700 ns/op 0.93
state getBlockRootAtSlot - 250000 vs - 7PWei 397.66 ns/op 993.34 ns/op 0.40
computeProposers - vc 250000 5.3444 ms/op 7.4911 ms/op 0.71
computeEpochShuffling - vc 250000 80.618 ms/op 83.022 ms/op 0.97
getNextSyncCommittee - vc 250000 94.349 ms/op 145.01 ms/op 0.65
computeSigningRoot for AttestationData 14.297 us/op 19.660 us/op 0.73
hash AttestationData serialized data then Buffer.toString(base64) 1.1790 us/op 1.2527 us/op 0.94
toHexString serialized data 773.78 ns/op 891.23 ns/op 0.87
Buffer.toString(base64) 129.22 ns/op 166.14 ns/op 0.78
nodejs block root to RootHex using toHex 127.17 ns/op 123.24 ns/op 1.03
nodejs block root to RootHex using toRootHex 76.493 ns/op 78.949 ns/op 0.97
browser block root to RootHex using the deprecated toHexString 202.06 ns/op 224.22 ns/op 0.90
browser block root to RootHex using toHex 162.66 ns/op 184.90 ns/op 0.88
browser block root to RootHex using toRootHex 144.82 ns/op 157.75 ns/op 0.92

by benchmarkbot/action

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

Attention: Patch coverage is 96.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 49.17%. Comparing base (4b7d871) to head (0ed0860).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7119      +/-   ##
============================================
+ Coverage     49.12%   49.17%   +0.05%     
============================================
  Files           597      597              
  Lines         39718    39762      +44     
  Branches       2085     2091       +6     
============================================
+ Hits          19512    19554      +42     
- Misses        20165    20167       +2     
  Partials         41       41              

@nflaig nflaig marked this pull request as ready for review October 1, 2024 10:31
@nflaig nflaig requested a review from a team as a code owner October 1, 2024 10:31
@wemeetagain wemeetagain merged commit 105a388 into unstable Oct 11, 2024
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/lc-ssz-updates branch October 11, 2024 16:19
@wemeetagain
Copy link
Member

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

Add support for ssz response to getLightClientUpdatesByRange
2 participants