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

refactor: remove blockBytes/blobBytes #7391

Open
wants to merge 8 commits into
base: unstable
Choose a base branch
from

Conversation

wemeetagain
Copy link
Member

@wemeetagain wemeetagain commented Jan 22, 2025

Motivation

  • Part of an effort to begin simplifying our block import process
  • Investigating the code, it appears we are storing serialized data alongside the deserialized data.
  • We do this so that we don't pay for reserialization
  • This cached serialized data is currently only used for blocks, to avoid reserializatoin when storing to disk
  • Passing optional serialized data everywhere is cumbersome and introduces cognitive burden
  • It can be accomplished via a WeakMap instead

Description

  • Use WeakMap to store block serialized bytes
    • add to cache after gossip validation
  • blobBytes were not used anywhere before, this PR doesn't reintroduce them

Copy link
Contributor

github-actions bot commented Jan 23, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 3a4991d Previous: a0cc24a Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.6448 ms/op 1.6860 ms/op 0.98
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 37.144 us/op 43.834 us/op 0.85
BLS verify - blst 845.48 us/op 823.97 us/op 1.03
BLS verifyMultipleSignatures 3 - blst 1.1729 ms/op 1.2800 ms/op 0.92
BLS verifyMultipleSignatures 8 - blst 1.6886 ms/op 1.7167 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst 5.0434 ms/op 5.0972 ms/op 0.99
BLS verifyMultipleSignatures 64 - blst 8.9630 ms/op 9.5827 ms/op 0.94
BLS verifyMultipleSignatures 128 - blst 17.143 ms/op 17.975 ms/op 0.95
BLS deserializing 10000 signatures 691.28 ms/op 699.09 ms/op 0.99
BLS deserializing 100000 signatures 6.8033 s/op 7.1428 s/op 0.95
BLS verifyMultipleSignatures - same message - 3 - blst 874.62 us/op 939.00 us/op 0.93
BLS verifyMultipleSignatures - same message - 8 - blst 1.0215 ms/op 1.0477 ms/op 0.97
BLS verifyMultipleSignatures - same message - 32 - blst 1.7078 ms/op 1.7610 ms/op 0.97
BLS verifyMultipleSignatures - same message - 64 - blst 2.5869 ms/op 2.6535 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 4.4048 ms/op 4.5149 ms/op 0.98
BLS aggregatePubkeys 32 - blst 19.528 us/op 20.330 us/op 0.96
BLS aggregatePubkeys 128 - blst 69.783 us/op 72.322 us/op 0.96
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 48.305 ms/op 47.902 ms/op 1.01
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.207 ms/op 43.877 ms/op 0.96
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 34.717 ms/op 43.724 ms/op 0.79
getSlashingsAndExits - default max 73.049 us/op 75.684 us/op 0.97
getSlashingsAndExits - 2k 301.31 us/op 307.50 us/op 0.98
proposeBlockBody type=full, size=empty 5.2843 ms/op 5.3707 ms/op 0.98
isKnown best case - 1 super set check 300.00 ns/op 306.00 ns/op 0.98
isKnown normal case - 2 super set checks 263.00 ns/op 290.00 ns/op 0.91
isKnown worse case - 16 super set checks 269.00 ns/op 301.00 ns/op 0.89
InMemoryCheckpointStateCache - add get delete 2.7820 us/op 3.1460 us/op 0.88
validate api signedAggregateAndProof - struct 1.3390 ms/op 1.3964 ms/op 0.96
validate gossip signedAggregateAndProof - struct 1.3921 ms/op 1.4296 ms/op 0.97
batch validate gossip attestation - vc 640000 - chunk 32 123.66 us/op 126.99 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 64 108.07 us/op 110.04 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 107.21 us/op 103.22 us/op 1.04
batch validate gossip attestation - vc 640000 - chunk 256 102.77 us/op 101.41 us/op 1.01
pickEth1Vote - no votes 1.1461 ms/op 985.89 us/op 1.16
pickEth1Vote - max votes 5.6486 ms/op 5.6964 ms/op 0.99
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.559 ms/op 16.885 ms/op 0.86
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.864 ms/op 20.024 ms/op 1.04
pickEth1Vote - Eth1Data fastSerialize value x2048 472.92 us/op 467.48 us/op 1.01
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.3772 ms/op 3.4189 ms/op 0.99
bytes32 toHexString 442.00 ns/op 408.00 ns/op 1.08
bytes32 Buffer.toString(hex) 233.00 ns/op 236.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 342.00 ns/op 363.00 ns/op 0.94
bytes32 Buffer.toString(hex) + 0x 244.00 ns/op 238.00 ns/op 1.03
Object access 1 prop 0.15000 ns/op 0.13600 ns/op 1.10
Map access 1 prop 0.13000 ns/op 0.12500 ns/op 1.04
Object get x1000 5.8800 ns/op 5.9050 ns/op 1.00
Map get x1000 6.4950 ns/op 6.2780 ns/op 1.03
Object set x1000 32.649 ns/op 32.208 ns/op 1.01
Map set x1000 22.066 ns/op 21.105 ns/op 1.05
Return object 10000 times 0.29380 ns/op 0.28810 ns/op 1.02
Throw Error 10000 times 3.2967 us/op 3.3334 us/op 0.99
toHex 142.01 ns/op 143.41 ns/op 0.99
Buffer.from 127.62 ns/op 124.50 ns/op 1.03
shared Buffer 85.928 ns/op 82.413 ns/op 1.04
fastMsgIdFn sha256 / 200 bytes 2.1980 us/op 2.1590 us/op 1.02
fastMsgIdFn h32 xxhash / 200 bytes 240.00 ns/op 238.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 200 bytes 266.00 ns/op 264.00 ns/op 1.01
fastMsgIdFn sha256 / 1000 bytes 7.6970 us/op 7.6190 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 365.00 ns/op 370.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 1000 bytes 332.00 ns/op 341.00 ns/op 0.97
fastMsgIdFn sha256 / 10000 bytes 64.225 us/op 64.022 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 1.8510 us/op 1.8450 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.1820 us/op 1.2280 us/op 0.96
send data - 1000 256B messages 12.513 ms/op 11.422 ms/op 1.10
send data - 1000 512B messages 18.106 ms/op 16.455 ms/op 1.10
send data - 1000 1024B messages 23.722 ms/op 25.360 ms/op 0.94
send data - 1000 1200B messages 17.091 ms/op 26.233 ms/op 0.65
send data - 1000 2048B messages 31.355 ms/op 31.262 ms/op 1.00
send data - 1000 4096B messages 30.227 ms/op 30.651 ms/op 0.99
send data - 1000 16384B messages 74.884 ms/op 69.195 ms/op 1.08
send data - 1000 65536B messages 212.68 ms/op 226.63 ms/op 0.94
enrSubnets - fastDeserialize 64 bits 1.1320 us/op 1.0860 us/op 1.04
enrSubnets - ssz BitVector 64 bits 384.00 ns/op 367.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 174.00 ns/op 145.00 ns/op 1.20
enrSubnets - ssz BitVector 4 bits 375.00 ns/op 336.00 ns/op 1.12
prioritizePeers score -10:0 att 32-0.1 sync 2-0 146.97 us/op 138.88 us/op 1.06
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 170.64 us/op 159.08 us/op 1.07
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 241.82 us/op 225.76 us/op 1.07
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 430.23 us/op 406.17 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 562.60 us/op 504.62 us/op 1.11
array of 16000 items push then shift 1.7147 us/op 1.6795 us/op 1.02
LinkedList of 16000 items push then shift 7.7320 ns/op 7.2600 ns/op 1.07
array of 16000 items push then pop 129.47 ns/op 106.78 ns/op 1.21
LinkedList of 16000 items push then pop 7.4650 ns/op 6.9800 ns/op 1.07
array of 24000 items push then shift 2.4695 us/op 2.4394 us/op 1.01
LinkedList of 24000 items push then shift 7.9810 ns/op 7.0220 ns/op 1.14
array of 24000 items push then pop 174.35 ns/op 129.82 ns/op 1.34
LinkedList of 24000 items push then pop 7.5940 ns/op 6.8840 ns/op 1.10
intersect bitArray bitLen 8 6.5550 ns/op 6.4430 ns/op 1.02
intersect array and set length 8 46.499 ns/op 47.444 ns/op 0.98
intersect bitArray bitLen 128 30.415 ns/op 30.093 ns/op 1.01
intersect array and set length 128 740.24 ns/op 683.03 ns/op 1.08
bitArray.getTrueBitIndexes() bitLen 128 1.3850 us/op 1.3470 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 248 2.4140 us/op 2.2220 us/op 1.09
bitArray.getTrueBitIndexes() bitLen 512 5.2240 us/op 4.4580 us/op 1.17
Buffer.concat 32 items 809.00 ns/op 749.00 ns/op 1.08
Uint8Array.set 32 items 1.5940 us/op 1.5690 us/op 1.02
Buffer.copy 2.5140 us/op 2.5430 us/op 0.99
Uint8Array.set - with subarray 2.1770 us/op 2.1580 us/op 1.01
Uint8Array.set - without subarray 1.5020 us/op 1.4670 us/op 1.02
getUint32 - dataview 254.00 ns/op 225.00 ns/op 1.13
getUint32 - manual 192.00 ns/op 148.00 ns/op 1.30
Set add up to 64 items then delete first 2.4272 us/op 2.1837 us/op 1.11
OrderedSet add up to 64 items then delete first 3.8591 us/op 3.2442 us/op 1.19
Set add up to 64 items then delete last 2.6844 us/op 2.5064 us/op 1.07
OrderedSet add up to 64 items then delete last 3.7622 us/op 3.6456 us/op 1.03
Set add up to 64 items then delete middle 2.6459 us/op 2.5062 us/op 1.06
OrderedSet add up to 64 items then delete middle 5.6097 us/op 5.2609 us/op 1.07
Set add up to 128 items then delete first 5.5284 us/op 5.1389 us/op 1.08
OrderedSet add up to 128 items then delete first 8.4272 us/op 7.6616 us/op 1.10
Set add up to 128 items then delete last 6.1990 us/op 4.9300 us/op 1.26
OrderedSet add up to 128 items then delete last 8.3117 us/op 7.2795 us/op 1.14
Set add up to 128 items then delete middle 5.4000 us/op 4.9064 us/op 1.10
OrderedSet add up to 128 items then delete middle 16.286 us/op 14.298 us/op 1.14
Set add up to 256 items then delete first 11.677 us/op 10.706 us/op 1.09
OrderedSet add up to 256 items then delete first 17.106 us/op 16.105 us/op 1.06
Set add up to 256 items then delete last 11.163 us/op 10.137 us/op 1.10
OrderedSet add up to 256 items then delete last 15.712 us/op 15.059 us/op 1.04
Set add up to 256 items then delete middle 11.955 us/op 9.7425 us/op 1.23
OrderedSet add up to 256 items then delete middle 46.003 us/op 41.694 us/op 1.10
transfer serialized Status (84 B) 2.7280 us/op 2.4810 us/op 1.10
copy serialized Status (84 B) 1.4650 us/op 1.2850 us/op 1.14
transfer serialized SignedVoluntaryExit (112 B) 3.1000 us/op 2.5440 us/op 1.22
copy serialized SignedVoluntaryExit (112 B) 1.7510 us/op 1.3510 us/op 1.30
transfer serialized ProposerSlashing (416 B) 3.9720 us/op 2.8910 us/op 1.37
copy serialized ProposerSlashing (416 B) 2.4100 us/op 1.7190 us/op 1.40
transfer serialized Attestation (485 B) 4.1080 us/op 3.0010 us/op 1.37
copy serialized Attestation (485 B) 2.1220 us/op 1.9000 us/op 1.12
transfer serialized AttesterSlashing (33232 B) 3.1820 us/op 3.4070 us/op 0.93
copy serialized AttesterSlashing (33232 B) 6.2090 us/op 5.4300 us/op 1.14
transfer serialized Small SignedBeaconBlock (128000 B) 4.0500 us/op 4.2120 us/op 0.96
copy serialized Small SignedBeaconBlock (128000 B) 16.967 us/op 14.570 us/op 1.16
transfer serialized Avg SignedBeaconBlock (200000 B) 4.5710 us/op 4.5340 us/op 1.01
copy serialized Avg SignedBeaconBlock (200000 B) 26.135 us/op 19.119 us/op 1.37
transfer serialized BlobsSidecar (524380 B) 4.4120 us/op 4.4960 us/op 0.98
copy serialized BlobsSidecar (524380 B) 113.71 us/op 180.85 us/op 0.63
transfer serialized Big SignedBeaconBlock (1000000 B) 4.9840 us/op 4.7700 us/op 1.04
copy serialized Big SignedBeaconBlock (1000000 B) 146.70 us/op 212.33 us/op 0.69
pass gossip attestations to forkchoice per slot 2.7296 ms/op 2.7285 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 462.07 us/op 456.67 us/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 3.5499 ms/op 3.0874 ms/op 1.15
forkChoice updateHead vc 1000000 bc 64 eq 0 5.0896 ms/op 4.8919 ms/op 1.04
forkChoice updateHead vc 600000 bc 320 eq 0 2.9579 ms/op 2.7112 ms/op 1.09
forkChoice updateHead vc 600000 bc 1200 eq 0 2.9830 ms/op 2.7943 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.6623 ms/op 3.7263 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 1000 10.616 ms/op 10.386 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 10000 10.515 ms/op 10.102 ms/op 1.04
forkChoice updateHead vc 600000 bc 64 eq 300000 14.933 ms/op 13.343 ms/op 1.12
computeDeltas 500000 validators 300 proto nodes 4.2453 ms/op 3.9827 ms/op 1.07
computeDeltas 500000 validators 1200 proto nodes 4.2859 ms/op 4.2433 ms/op 1.01
computeDeltas 500000 validators 7200 proto nodes 4.3893 ms/op 4.3380 ms/op 1.01
computeDeltas 750000 validators 300 proto nodes 6.2519 ms/op 6.5557 ms/op 0.95
computeDeltas 750000 validators 1200 proto nodes 6.2008 ms/op 7.3036 ms/op 0.85
computeDeltas 750000 validators 7200 proto nodes 6.1984 ms/op 9.0894 ms/op 0.68
computeDeltas 1400000 validators 300 proto nodes 11.779 ms/op 16.878 ms/op 0.70
computeDeltas 1400000 validators 1200 proto nodes 11.207 ms/op 16.751 ms/op 0.67
computeDeltas 1400000 validators 7200 proto nodes 11.293 ms/op 14.175 ms/op 0.80
computeDeltas 2100000 validators 300 proto nodes 16.921 ms/op 19.754 ms/op 0.86
computeDeltas 2100000 validators 1200 proto nodes 16.620 ms/op 20.016 ms/op 0.83
computeDeltas 2100000 validators 7200 proto nodes 16.740 ms/op 18.044 ms/op 0.93
altair processAttestation - 250000 vs - 7PWei normalcase 2.0474 ms/op 2.1132 ms/op 0.97
altair processAttestation - 250000 vs - 7PWei worstcase 3.0045 ms/op 3.4644 ms/op 0.87
altair processAttestation - setStatus - 1/6 committees join 128.86 us/op 127.43 us/op 1.01
altair processAttestation - setStatus - 1/3 committees join 235.98 us/op 261.76 us/op 0.90
altair processAttestation - setStatus - 1/2 committees join 342.49 us/op 354.87 us/op 0.97
altair processAttestation - setStatus - 2/3 committees join 434.65 us/op 436.76 us/op 1.00
altair processAttestation - setStatus - 4/5 committees join 604.87 us/op 638.73 us/op 0.95
altair processAttestation - setStatus - 100% committees join 710.30 us/op 756.63 us/op 0.94
altair processBlock - 250000 vs - 7PWei normalcase 4.1354 ms/op 4.7412 ms/op 0.87
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.885 ms/op 27.806 ms/op 1.04
altair processBlock - 250000 vs - 7PWei worstcase 31.049 ms/op 35.761 ms/op 0.87
altair processBlock - 250000 vs - 7PWei worstcase hashState 72.071 ms/op 73.075 ms/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 2.1326 ms/op 2.3590 ms/op 0.90
phase0 processBlock - 250000 vs - 7PWei worstcase 21.746 ms/op 22.165 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 389.11 us/op 449.32 us/op 0.87
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.0230 us/op 5.5130 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 23.824 us/op 37.518 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.3260 us/op 9.6140 us/op 0.76
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.6690 us/op 5.7750 us/op 0.81
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 120.54 us/op 133.01 us/op 0.91
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 962.87 us/op 1.1622 ms/op 0.83
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.4704 ms/op 1.4564 ms/op 1.01
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.4055 ms/op 1.4830 ms/op 0.95
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0274 ms/op 3.9393 ms/op 0.77
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4614 ms/op 1.5198 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.1226 ms/op 3.7880 ms/op 0.82
Tree 40 250000 create 416.67 ms/op 418.25 ms/op 1.00
Tree 40 250000 get(125000) 139.78 ns/op 142.02 ns/op 0.98
Tree 40 250000 set(125000) 1.3917 us/op 1.4465 us/op 0.96
Tree 40 250000 toArray() 14.757 ms/op 14.834 ms/op 0.99
Tree 40 250000 iterate all - toArray() + loop 14.877 ms/op 14.875 ms/op 1.00
Tree 40 250000 iterate all - get(i) 49.273 ms/op 50.650 ms/op 0.97
Array 250000 create 2.7907 ms/op 2.8179 ms/op 0.99
Array 250000 clone - spread 1.3908 ms/op 1.4814 ms/op 0.94
Array 250000 get(125000) 0.40000 ns/op 0.40700 ns/op 0.98
Array 250000 set(125000) 0.42300 ns/op 0.43100 ns/op 0.98
Array 250000 iterate all - loop 81.674 us/op 82.109 us/op 0.99
phase0 afterProcessEpoch - 250000 vs - 7PWei 48.615 ms/op 49.196 ms/op 0.99
Array.fill - length 1000000 3.4373 ms/op 3.6026 ms/op 0.95
Array push - length 1000000 16.068 ms/op 12.509 ms/op 1.28
Array.get 0.27606 ns/op 0.27267 ns/op 1.01
Uint8Array.get 0.43265 ns/op 0.45726 ns/op 0.95
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.701 ms/op 16.540 ms/op 0.95
altair processEpoch - mainnet_e81889 293.66 ms/op 276.65 ms/op 1.06
mainnet_e81889 - altair beforeProcessEpoch 18.420 ms/op 17.857 ms/op 1.03
mainnet_e81889 - altair processJustificationAndFinalization 14.706 us/op 15.623 us/op 0.94
mainnet_e81889 - altair processInactivityUpdates 4.8906 ms/op 5.3060 ms/op 0.92
mainnet_e81889 - altair processRewardsAndPenalties 47.391 ms/op 48.559 ms/op 0.98
mainnet_e81889 - altair processRegistryUpdates 2.8820 us/op 2.5400 us/op 1.13
mainnet_e81889 - altair processSlashings 483.00 ns/op 410.00 ns/op 1.18
mainnet_e81889 - altair processEth1DataReset 526.00 ns/op 449.00 ns/op 1.17
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.4180 ms/op 1.4131 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 3.5320 us/op 3.5780 us/op 0.99
mainnet_e81889 - altair processRandaoMixesReset 4.6140 us/op 4.3240 us/op 1.07
mainnet_e81889 - altair processHistoricalRootsUpdate 743.00 ns/op 548.00 ns/op 1.36
mainnet_e81889 - altair processParticipationFlagUpdates 2.5210 us/op 2.1990 us/op 1.15
mainnet_e81889 - altair processSyncCommitteeUpdates 731.00 ns/op 755.00 ns/op 0.97
mainnet_e81889 - altair afterProcessEpoch 52.819 ms/op 52.090 ms/op 1.01
capella processEpoch - mainnet_e217614 1.1267 s/op 1.1077 s/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 69.325 ms/op 82.636 ms/op 0.84
mainnet_e217614 - capella processJustificationAndFinalization 17.547 us/op 14.795 us/op 1.19
mainnet_e217614 - capella processInactivityUpdates 17.302 ms/op 16.615 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 217.23 ms/op 224.64 ms/op 0.97
mainnet_e217614 - capella processRegistryUpdates 15.546 us/op 12.837 us/op 1.21
mainnet_e217614 - capella processSlashings 605.00 ns/op 631.00 ns/op 0.96
mainnet_e217614 - capella processEth1DataReset 710.00 ns/op 501.00 ns/op 1.42
mainnet_e217614 - capella processEffectiveBalanceUpdates 13.603 ms/op 12.759 ms/op 1.07
mainnet_e217614 - capella processSlashingsReset 3.7920 us/op 5.2160 us/op 0.73
mainnet_e217614 - capella processRandaoMixesReset 4.6880 us/op 4.7510 us/op 0.99
mainnet_e217614 - capella processHistoricalRootsUpdate 636.00 ns/op 722.00 ns/op 0.88
mainnet_e217614 - capella processParticipationFlagUpdates 2.3140 us/op 2.4890 us/op 0.93
mainnet_e217614 - capella afterProcessEpoch 127.17 ms/op 127.62 ms/op 1.00
phase0 processEpoch - mainnet_e58758 334.50 ms/op 337.07 ms/op 0.99
mainnet_e58758 - phase0 beforeProcessEpoch 72.992 ms/op 72.705 ms/op 1.00
mainnet_e58758 - phase0 processJustificationAndFinalization 13.711 us/op 13.619 us/op 1.01
mainnet_e58758 - phase0 processRewardsAndPenalties 24.578 ms/op 26.135 ms/op 0.94
mainnet_e58758 - phase0 processRegistryUpdates 7.4560 us/op 6.7760 us/op 1.10
mainnet_e58758 - phase0 processSlashings 528.00 ns/op 502.00 ns/op 1.05
mainnet_e58758 - phase0 processEth1DataReset 436.00 ns/op 406.00 ns/op 1.07
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1852 ms/op 1.1692 ms/op 1.01
mainnet_e58758 - phase0 processSlashingsReset 2.6060 us/op 3.0530 us/op 0.85
mainnet_e58758 - phase0 processRandaoMixesReset 4.4290 us/op 4.5820 us/op 0.97
mainnet_e58758 - phase0 processHistoricalRootsUpdate 420.00 ns/op 403.00 ns/op 1.04
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.3380 us/op 3.5190 us/op 1.23
mainnet_e58758 - phase0 afterProcessEpoch 43.752 ms/op 43.098 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.3195 ms/op 1.3363 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5784 ms/op 1.8509 ms/op 1.39
altair processInactivityUpdates - 250000 normalcase 15.433 ms/op 16.087 ms/op 0.96
altair processInactivityUpdates - 250000 worstcase 16.279 ms/op 15.597 ms/op 1.04
phase0 processRegistryUpdates - 250000 normalcase 7.0120 us/op 5.1820 us/op 1.35
phase0 processRegistryUpdates - 250000 badcase_full_deposits 281.92 us/op 238.15 us/op 1.18
phase0 processRegistryUpdates - 250000 worstcase 0.5 102.11 ms/op 110.06 ms/op 0.93
altair processRewardsAndPenalties - 250000 normalcase 40.636 ms/op 40.757 ms/op 1.00
altair processRewardsAndPenalties - 250000 worstcase 41.121 ms/op 30.788 ms/op 1.34
phase0 getAttestationDeltas - 250000 normalcase 7.8615 ms/op 7.3630 ms/op 1.07
phase0 getAttestationDeltas - 250000 worstcase 7.3113 ms/op 6.6556 ms/op 1.10
phase0 processSlashings - 250000 worstcase 102.75 us/op 95.512 us/op 1.08
altair processSyncCommitteeUpdates - 250000 120.63 ms/op 123.80 ms/op 0.97
BeaconState.hashTreeRoot - No change 270.00 ns/op 276.00 ns/op 0.98
BeaconState.hashTreeRoot - 1 full validator 114.93 us/op 100.78 us/op 1.14
BeaconState.hashTreeRoot - 32 full validator 1.0844 ms/op 1.0766 ms/op 1.01
BeaconState.hashTreeRoot - 512 full validator 9.6784 ms/op 9.4415 ms/op 1.03
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 127.78 us/op 120.51 us/op 1.06
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.7399 ms/op 1.5445 ms/op 1.13
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.462 ms/op 20.171 ms/op 1.01
BeaconState.hashTreeRoot - 1 balances 121.48 us/op 103.61 us/op 1.17
BeaconState.hashTreeRoot - 32 balances 1.1951 ms/op 1.0212 ms/op 1.17
BeaconState.hashTreeRoot - 512 balances 9.3357 ms/op 8.9124 ms/op 1.05
BeaconState.hashTreeRoot - 250000 balances 166.83 ms/op 183.62 ms/op 0.91
aggregationBits - 2048 els - zipIndexesInBitList 23.068 us/op 23.518 us/op 0.98
byteArrayEquals 32 53.787 ns/op 55.447 ns/op 0.97
Buffer.compare 32 17.175 ns/op 17.911 ns/op 0.96
byteArrayEquals 1024 1.5903 us/op 1.6403 us/op 0.97
Buffer.compare 1024 24.517 ns/op 26.945 ns/op 0.91
byteArrayEquals 16384 25.256 us/op 26.191 us/op 0.96
Buffer.compare 16384 204.75 ns/op 188.24 ns/op 1.09
byteArrayEquals 123687377 188.06 ms/op 199.33 ms/op 0.94
Buffer.compare 123687377 6.6808 ms/op 6.7927 ms/op 0.98
byteArrayEquals 32 - diff last byte 51.841 ns/op 55.014 ns/op 0.94
Buffer.compare 32 - diff last byte 17.065 ns/op 17.975 ns/op 0.95
byteArrayEquals 1024 - diff last byte 1.5997 us/op 1.6575 us/op 0.97
Buffer.compare 1024 - diff last byte 25.802 ns/op 27.278 ns/op 0.95
byteArrayEquals 16384 - diff last byte 24.957 us/op 26.308 us/op 0.95
Buffer.compare 16384 - diff last byte 180.85 ns/op 198.33 ns/op 0.91
byteArrayEquals 123687377 - diff last byte 188.86 ms/op 195.88 ms/op 0.96
Buffer.compare 123687377 - diff last byte 6.3685 ms/op 6.7543 ms/op 0.94
byteArrayEquals 32 - random bytes 4.9860 ns/op 5.1760 ns/op 0.96
Buffer.compare 32 - random bytes 16.920 ns/op 17.277 ns/op 0.98
byteArrayEquals 1024 - random bytes 5.0450 ns/op 5.1870 ns/op 0.97
Buffer.compare 1024 - random bytes 17.027 ns/op 17.222 ns/op 0.99
byteArrayEquals 16384 - random bytes 5.0520 ns/op 5.1440 ns/op 0.98
Buffer.compare 16384 - random bytes 16.805 ns/op 17.278 ns/op 0.97
byteArrayEquals 123687377 - random bytes 6.3500 ns/op 6.4400 ns/op 0.99
Buffer.compare 123687377 - random bytes 18.080 ns/op 18.480 ns/op 0.98
regular array get 100000 times 37.863 us/op 41.919 us/op 0.90
wrappedArray get 100000 times 32.293 us/op 43.802 us/op 0.74
arrayWithProxy get 100000 times 13.499 ms/op 13.576 ms/op 0.99
ssz.Root.equals 45.183 ns/op 46.543 ns/op 0.97
byteArrayEquals 44.443 ns/op 45.961 ns/op 0.97
Buffer.compare 10.215 ns/op 10.714 ns/op 0.95
processSlot - 1 slots 13.495 us/op 14.334 us/op 0.94
processSlot - 32 slots 3.1230 ms/op 2.9083 ms/op 1.07
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 34.721 ms/op 35.123 ms/op 0.99
getCommitteeAssignments - req 1 vs - 250000 vc 2.1491 ms/op 2.1223 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 4.1772 ms/op 4.1179 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4156 ms/op 4.4239 ms/op 1.00
findModifiedValidators - 10000 modified validators 230.45 ms/op 242.62 ms/op 0.95
findModifiedValidators - 1000 modified validators 158.18 ms/op 156.11 ms/op 1.01
findModifiedValidators - 100 modified validators 169.31 ms/op 153.59 ms/op 1.10
findModifiedValidators - 10 modified validators 170.77 ms/op 168.99 ms/op 1.01
findModifiedValidators - 1 modified validators 140.49 ms/op 131.62 ms/op 1.07
findModifiedValidators - no difference 162.26 ms/op 156.43 ms/op 1.04
compare ViewDUs 3.0698 s/op 2.9559 s/op 1.04
compare each validator Uint8Array 1.2299 s/op 1.6759 s/op 0.73
compare ViewDU to Uint8Array 1.0396 s/op 913.89 ms/op 1.14
migrate state 1000000 validators, 24 modified, 0 new 642.71 ms/op 730.59 ms/op 0.88
migrate state 1000000 validators, 1700 modified, 1000 new 944.61 ms/op 980.24 ms/op 0.96
migrate state 1000000 validators, 3400 modified, 2000 new 1.1879 s/op 1.1888 s/op 1.00
migrate state 1500000 validators, 24 modified, 0 new 774.14 ms/op 736.91 ms/op 1.05
migrate state 1500000 validators, 1700 modified, 1000 new 980.08 ms/op 943.45 ms/op 1.04
migrate state 1500000 validators, 3400 modified, 2000 new 1.1569 s/op 1.2250 s/op 0.94
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7100 ns/op 4.6500 ns/op 1.01
state getBlockRootAtSlot - 250000 vs - 7PWei 844.01 ns/op 706.42 ns/op 1.19
computeProposers - vc 250000 8.4593 ms/op 8.0605 ms/op 1.05
computeEpochShuffling - vc 250000 41.948 ms/op 42.696 ms/op 0.98
getNextSyncCommittee - vc 250000 146.54 ms/op 129.50 ms/op 1.13
computeSigningRoot for AttestationData 22.602 us/op 25.024 us/op 0.90
hash AttestationData serialized data then Buffer.toString(base64) 1.5613 us/op 1.6547 us/op 0.94
toHexString serialized data 909.96 ns/op 934.17 ns/op 0.97
Buffer.toString(base64) 192.45 ns/op 208.88 ns/op 0.92
nodejs block root to RootHex using toHex 151.93 ns/op 170.60 ns/op 0.89
nodejs block root to RootHex using toRootHex 95.654 ns/op 100.03 ns/op 0.96
browser block root to RootHex using the deprecated toHexString 232.32 ns/op 259.82 ns/op 0.89
browser block root to RootHex using toHex 184.52 ns/op 209.41 ns/op 0.88
browser block root to RootHex using toRootHex 162.30 ns/op 180.92 ns/op 0.90

by benchmarkbot/action

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 12.00000% with 22 lines in your changes missing coverage. Please review.

Project coverage is 48.67%. Comparing base (d584aed) to head (b50db75).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7391      +/-   ##
============================================
+ Coverage     48.62%   48.67%   +0.04%     
============================================
  Files           603      603              
  Lines         40510    40466      -44     
  Branches       2071     2070       -1     
============================================
- Hits          19700    19697       -3     
+ Misses        20772    20731      -41     
  Partials         38       38              

@wemeetagain wemeetagain marked this pull request as ready for review January 23, 2025 19:52
@wemeetagain wemeetagain requested a review from a team as a code owner January 23, 2025 19:52
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