Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix the publish blinded block api parsing for optional header verison #6966

Merged
merged 2 commits into from
Jul 19, 2024

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jul 19, 2024

lighthouse default still uses produceblinded/publishblinded with json api with option version.

because of this a user failed a block publish.

this pr fixes the scenario and should be released as a patch

@g11tech g11tech requested a review from a team as a code owner July 19, 2024 08:44
@g11tech g11tech enabled auto-merge (squash) July 19, 2024 08:48
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

I missed that because didn't run Lighthouse VC with builder enabled, but I am surprised they are using JSON and v1 api, a bit strange.

Need to run the Lodestar interop config I used for testing the ssz branch with builder enabled, last time this didn't work as builders didn't produce blocks so it always fallback to local, but will give it another try.

packages/api/src/beacon/routes/beacon/block.ts Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 19, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 62.49%. Comparing base (fed08fe) to head (7bc62e5).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6966      +/-   ##
============================================
- Coverage     62.49%   62.49%   -0.01%     
============================================
  Files           576      576              
  Lines         61171    61189      +18     
  Branches       2133     2132       -1     
============================================
+ Hits          38230    38239       +9     
- Misses        22902    22911       +9     
  Partials         39       39              

fork = toForkName(versionHeader);
} else {
// Determine fork from slot in JSON payload
fork = config.getForkName((body as SignedBlindedBeaconBlock).message.slot);
Copy link
Member

Choose a reason for hiding this comment

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

this is why I mean it's a hack btw, we kinda just yolo it here and try to access body.message.slot but this will result in "Cannot access property x of undefined" if data is not formatted correctyl, while if you get version from header we can properly apply validation before we try to access any property of body.

@g11tech g11tech merged commit 3fb0f5c into unstable Jul 19, 2024
18 of 20 checks passed
@g11tech g11tech deleted the fix-publishblindedjson branch July 19, 2024 09:24
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 5e549b3 Previous: fed08fe Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 603.32 us/op 1.0119 ms/op 0.60
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 67.540 us/op 62.661 us/op 1.08
BLS verify - blst-native 1.5179 ms/op 1.2616 ms/op 1.20
BLS verifyMultipleSignatures 3 - blst-native 3.1955 ms/op 2.6822 ms/op 1.19
BLS verifyMultipleSignatures 8 - blst-native 6.8978 ms/op 5.8996 ms/op 1.17
BLS verifyMultipleSignatures 32 - blst-native 26.270 ms/op 21.912 ms/op 1.20
BLS verifyMultipleSignatures 64 - blst-native 49.731 ms/op 43.213 ms/op 1.15
BLS verifyMultipleSignatures 128 - blst-native 117.57 ms/op 85.326 ms/op 1.38
BLS deserializing 10000 signatures 1.1259 s/op 892.31 ms/op 1.26
BLS deserializing 100000 signatures 10.100 s/op 9.2136 s/op 1.10
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.3978 ms/op 1.3102 ms/op 1.07
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.6051 ms/op 1.5044 ms/op 1.07
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.8711 ms/op 2.4017 ms/op 1.20
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.2886 ms/op 4.0836 ms/op 1.05
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.1535 ms/op 5.6853 ms/op 1.08
BLS aggregatePubkeys 32 - blst-native 29.388 us/op 26.218 us/op 1.12
BLS aggregatePubkeys 128 - blst-native 118.95 us/op 101.94 us/op 1.17
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 90.608 ms/op 82.155 ms/op 1.10
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 65.156 ms/op 61.421 ms/op 1.06
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 40.960 ms/op 39.556 ms/op 1.04
getSlashingsAndExits - default max 152.73 us/op 161.13 us/op 0.95
getSlashingsAndExits - 2k 350.09 us/op 353.79 us/op 0.99
proposeBlockBody type=full, size=empty 6.9276 ms/op 5.8821 ms/op 1.18
isKnown best case - 1 super set check 495.00 ns/op 443.00 ns/op 1.12
isKnown normal case - 2 super set checks 460.00 ns/op 343.00 ns/op 1.34
isKnown worse case - 16 super set checks 520.00 ns/op 313.00 ns/op 1.66
InMemoryCheckpointStateCache - add get delete 6.4750 us/op 6.1480 us/op 1.05
validate api signedAggregateAndProof - struct 2.8834 ms/op 2.7040 ms/op 1.07
validate gossip signedAggregateAndProof - struct 2.8002 ms/op 2.6966 ms/op 1.04
validate gossip attestation - vc 640000 1.4105 ms/op 1.3356 ms/op 1.06
batch validate gossip attestation - vc 640000 - chunk 32 168.73 us/op 159.49 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 143.11 us/op 144.14 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 128 126.44 us/op 129.93 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 256 124.07 us/op 126.39 us/op 0.98
pickEth1Vote - no votes 1.1085 ms/op 1.1281 ms/op 0.98
pickEth1Vote - max votes 7.6979 ms/op 7.1796 ms/op 1.07
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.644 ms/op 11.879 ms/op 1.06
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.803 ms/op 19.743 ms/op 1.05
pickEth1Vote - Eth1Data fastSerialize value x2048 566.22 us/op 524.28 us/op 1.08
pickEth1Vote - Eth1Data fastSerialize tree x2048 6.6439 ms/op 4.0591 ms/op 1.64
bytes32 toHexString 493.00 ns/op 448.00 ns/op 1.10
bytes32 Buffer.toString(hex) 290.00 ns/op 249.00 ns/op 1.16
bytes32 Buffer.toString(hex) from Uint8Array 414.00 ns/op 366.00 ns/op 1.13
bytes32 Buffer.toString(hex) + 0x 287.00 ns/op 257.00 ns/op 1.12
Object access 1 prop 0.15100 ns/op 0.14000 ns/op 1.08
Map access 1 prop 0.14800 ns/op 0.14000 ns/op 1.06
Object get x1000 7.0300 ns/op 5.9220 ns/op 1.19
Map get x1000 7.3440 ns/op 6.3790 ns/op 1.15
Object set x1000 36.740 ns/op 42.910 ns/op 0.86
Map set x1000 25.446 ns/op 28.220 ns/op 0.90
Return object 10000 times 0.31840 ns/op 0.30770 ns/op 1.03
Throw Error 10000 times 3.5907 us/op 3.6702 us/op 0.98
fastMsgIdFn sha256 / 200 bytes 2.4040 us/op 2.3170 us/op 1.04
fastMsgIdFn h32 xxhash / 200 bytes 306.00 ns/op 274.00 ns/op 1.12
fastMsgIdFn h64 xxhash / 200 bytes 297.00 ns/op 286.00 ns/op 1.04
fastMsgIdFn sha256 / 1000 bytes 7.8300 us/op 7.6870 us/op 1.02
fastMsgIdFn h32 xxhash / 1000 bytes 438.00 ns/op 432.00 ns/op 1.01
fastMsgIdFn h64 xxhash / 1000 bytes 376.00 ns/op 376.00 ns/op 1.00
fastMsgIdFn sha256 / 10000 bytes 70.845 us/op 66.800 us/op 1.06
fastMsgIdFn h32 xxhash / 10000 bytes 2.0220 us/op 2.0120 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.3160 us/op 1.2920 us/op 1.02
send data - 1000 256B messages 14.377 ms/op 14.945 ms/op 0.96
send data - 1000 512B messages 19.944 ms/op 20.436 ms/op 0.98
send data - 1000 1024B messages 29.477 ms/op 29.596 ms/op 1.00
send data - 1000 1200B messages 19.890 ms/op 26.683 ms/op 0.75
send data - 1000 2048B messages 35.552 ms/op 35.683 ms/op 1.00
send data - 1000 4096B messages 34.925 ms/op 36.519 ms/op 0.96
send data - 1000 16384B messages 77.175 ms/op 78.059 ms/op 0.99
send data - 1000 65536B messages 235.97 ms/op 239.50 ms/op 0.99
enrSubnets - fastDeserialize 64 bits 1.1810 us/op 1.1560 us/op 1.02
enrSubnets - ssz BitVector 64 bits 377.00 ns/op 405.00 ns/op 0.93
enrSubnets - fastDeserialize 4 bits 167.00 ns/op 165.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 382.00 ns/op 372.00 ns/op 1.03
prioritizePeers score -10:0 att 32-0.1 sync 2-0 179.67 us/op 156.13 us/op 1.15
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 183.54 us/op 191.12 us/op 0.96
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 230.06 us/op 256.10 us/op 0.90
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 425.00 us/op 469.68 us/op 0.90
prioritizePeers score 0:0 att 64-1 sync 4-1 540.59 us/op 652.94 us/op 0.83
array of 16000 items push then shift 1.7171 us/op 1.7058 us/op 1.01
LinkedList of 16000 items push then shift 7.4440 ns/op 7.7900 ns/op 0.96
array of 16000 items push then pop 111.56 ns/op 125.58 ns/op 0.89
LinkedList of 16000 items push then pop 7.2290 ns/op 7.6650 ns/op 0.94
array of 24000 items push then shift 2.5073 us/op 2.4899 us/op 1.01
LinkedList of 24000 items push then shift 7.5180 ns/op 7.6060 ns/op 0.99
array of 24000 items push then pop 130.88 ns/op 148.86 ns/op 0.88
LinkedList of 24000 items push then pop 7.1010 ns/op 7.6950 ns/op 0.92
intersect bitArray bitLen 8 6.4730 ns/op 6.9210 ns/op 0.94
intersect array and set length 8 44.729 ns/op 47.521 ns/op 0.94
intersect bitArray bitLen 128 30.295 ns/op 32.063 ns/op 0.94
intersect array and set length 128 669.44 ns/op 700.84 ns/op 0.96
bitArray.getTrueBitIndexes() bitLen 128 1.2700 us/op 1.2840 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 248 2.1530 us/op 2.2470 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 512 4.4460 us/op 4.5490 us/op 0.98
Buffer.concat 32 items 891.00 ns/op 938.00 ns/op 0.95
Uint8Array.set 32 items 1.5070 us/op 1.5620 us/op 0.96
Buffer.copy 1.5590 us/op 1.9060 us/op 0.82
Uint8Array.set - with subarray 2.2690 us/op 2.7230 us/op 0.83
Uint8Array.set - without subarray 1.3440 us/op 1.4910 us/op 0.90
getUint32 - dataview 237.00 ns/op 235.00 ns/op 1.01
getUint32 - manual 154.00 ns/op 151.00 ns/op 1.02
Set add up to 64 items then delete first 2.1834 us/op 2.1973 us/op 0.99
OrderedSet add up to 64 items then delete first 3.2986 us/op 3.3767 us/op 0.98
Set add up to 64 items then delete last 2.5366 us/op 2.5621 us/op 0.99
OrderedSet add up to 64 items then delete last 3.7573 us/op 3.7109 us/op 1.01
Set add up to 64 items then delete middle 2.6006 us/op 2.6718 us/op 0.97
OrderedSet add up to 64 items then delete middle 5.2683 us/op 5.6637 us/op 0.93
Set add up to 128 items then delete first 5.1640 us/op 6.0998 us/op 0.85
OrderedSet add up to 128 items then delete first 7.9593 us/op 8.6829 us/op 0.92
Set add up to 128 items then delete last 4.9443 us/op 5.5037 us/op 0.90
OrderedSet add up to 128 items then delete last 7.4019 us/op 7.7411 us/op 0.96
Set add up to 128 items then delete middle 4.9086 us/op 6.3847 us/op 0.77
OrderedSet add up to 128 items then delete middle 13.849 us/op 15.685 us/op 0.88
Set add up to 256 items then delete first 10.481 us/op 12.837 us/op 0.82
OrderedSet add up to 256 items then delete first 17.336 us/op 17.627 us/op 0.98
Set add up to 256 items then delete last 10.111 us/op 11.607 us/op 0.87
OrderedSet add up to 256 items then delete last 14.764 us/op 18.016 us/op 0.82
Set add up to 256 items then delete middle 9.7913 us/op 11.428 us/op 0.86
OrderedSet add up to 256 items then delete middle 42.162 us/op 46.181 us/op 0.91
transfer serialized Status (84 B) 1.4710 us/op 1.4440 us/op 1.02
copy serialized Status (84 B) 1.1240 us/op 1.2110 us/op 0.93
transfer serialized SignedVoluntaryExit (112 B) 1.4790 us/op 1.4590 us/op 1.01
copy serialized SignedVoluntaryExit (112 B) 1.1900 us/op 1.2750 us/op 0.93
transfer serialized ProposerSlashing (416 B) 1.6130 us/op 1.8570 us/op 0.87
copy serialized ProposerSlashing (416 B) 1.5380 us/op 2.2550 us/op 0.68
transfer serialized Attestation (485 B) 1.7090 us/op 2.1810 us/op 0.78
copy serialized Attestation (485 B) 1.7220 us/op 2.3570 us/op 0.73
transfer serialized AttesterSlashing (33232 B) 1.8550 us/op 2.3010 us/op 0.81
copy serialized AttesterSlashing (33232 B) 4.6780 us/op 7.7210 us/op 0.61
transfer serialized Small SignedBeaconBlock (128000 B) 2.4350 us/op 2.6490 us/op 0.92
copy serialized Small SignedBeaconBlock (128000 B) 13.180 us/op 16.864 us/op 0.78
transfer serialized Avg SignedBeaconBlock (200000 B) 2.8520 us/op 2.9680 us/op 0.96
copy serialized Avg SignedBeaconBlock (200000 B) 22.053 us/op 27.805 us/op 0.79
transfer serialized BlobsSidecar (524380 B) 2.7250 us/op 3.2250 us/op 0.84
copy serialized BlobsSidecar (524380 B) 81.059 us/op 110.94 us/op 0.73
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1670 us/op 3.2810 us/op 0.97
copy serialized Big SignedBeaconBlock (1000000 B) 346.91 us/op 162.19 us/op 2.14
pass gossip attestations to forkchoice per slot 3.4097 ms/op 3.4197 ms/op 1.00
forkChoice updateHead vc 100000 bc 64 eq 0 506.48 us/op 635.48 us/op 0.80
forkChoice updateHead vc 600000 bc 64 eq 0 3.1573 ms/op 3.6467 ms/op 0.87
forkChoice updateHead vc 1000000 bc 64 eq 0 5.6124 ms/op 6.1748 ms/op 0.91
forkChoice updateHead vc 600000 bc 320 eq 0 3.2554 ms/op 3.5598 ms/op 0.91
forkChoice updateHead vc 600000 bc 1200 eq 0 3.4502 ms/op 3.4654 ms/op 1.00
forkChoice updateHead vc 600000 bc 7200 eq 0 4.6383 ms/op 4.6157 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 1000 11.118 ms/op 10.839 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 10000 11.079 ms/op 11.049 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 300000 15.388 ms/op 15.237 ms/op 1.01
computeDeltas 500000 validators 300 proto nodes 3.7438 ms/op 4.0682 ms/op 0.92
computeDeltas 500000 validators 1200 proto nodes 3.8087 ms/op 4.0797 ms/op 0.93
computeDeltas 500000 validators 7200 proto nodes 3.7751 ms/op 4.1031 ms/op 0.92
computeDeltas 750000 validators 300 proto nodes 5.4305 ms/op 5.8236 ms/op 0.93
computeDeltas 750000 validators 1200 proto nodes 5.5378 ms/op 6.2116 ms/op 0.89
computeDeltas 750000 validators 7200 proto nodes 5.5226 ms/op 5.8927 ms/op 0.94
computeDeltas 1400000 validators 300 proto nodes 9.8908 ms/op 10.703 ms/op 0.92
computeDeltas 1400000 validators 1200 proto nodes 9.8709 ms/op 10.468 ms/op 0.94
computeDeltas 1400000 validators 7200 proto nodes 10.250 ms/op 10.251 ms/op 1.00
computeDeltas 2100000 validators 300 proto nodes 16.193 ms/op 17.258 ms/op 0.94
computeDeltas 2100000 validators 1200 proto nodes 16.175 ms/op 17.210 ms/op 0.94
computeDeltas 2100000 validators 7200 proto nodes 17.060 ms/op 16.521 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 1.9032 ms/op 2.0065 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei worstcase 2.8430 ms/op 2.9230 ms/op 0.97
altair processAttestation - setStatus - 1/6 committees join 95.130 us/op 100.72 us/op 0.94
altair processAttestation - setStatus - 1/3 committees join 186.63 us/op 212.67 us/op 0.88
altair processAttestation - setStatus - 1/2 committees join 272.52 us/op 274.80 us/op 0.99
altair processAttestation - setStatus - 2/3 committees join 371.86 us/op 358.16 us/op 1.04
altair processAttestation - setStatus - 4/5 committees join 499.92 us/op 508.72 us/op 0.98
altair processAttestation - setStatus - 100% committees join 587.78 us/op 616.37 us/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 4.4376 ms/op 4.4654 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase hashState 26.890 ms/op 25.500 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 47.081 ms/op 48.710 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 89.641 ms/op 86.586 ms/op 1.04
phase0 processBlock - 250000 vs - 7PWei normalcase 2.2736 ms/op 2.3192 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei worstcase 30.880 ms/op 28.133 ms/op 1.10
altair processEth1Data - 250000 vs - 7PWei normalcase 377.87 us/op 324.48 us/op 1.16
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.2360 us/op 7.7880 us/op 0.93
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 31.241 us/op 26.438 us/op 1.18
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.3980 us/op 7.9130 us/op 1.19
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.1550 us/op 6.0250 us/op 1.35
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 114.68 us/op 138.70 us/op 0.83
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 854.28 us/op 849.69 us/op 1.01
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.1716 ms/op 1.1196 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2298 ms/op 1.1707 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.1227 ms/op 3.2321 ms/op 0.97
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8337 ms/op 1.8391 ms/op 1.00
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.3226 ms/op 5.0297 ms/op 1.06
Tree 40 250000 create 310.07 ms/op 488.08 ms/op 0.64
Tree 40 250000 get(125000) 176.50 ns/op 165.63 ns/op 1.07
Tree 40 250000 set(125000) 951.82 ns/op 1.6167 us/op 0.59
Tree 40 250000 toArray() 24.270 ms/op 26.147 ms/op 0.93
Tree 40 250000 iterate all - toArray() + loop 23.793 ms/op 24.182 ms/op 0.98
Tree 40 250000 iterate all - get(i) 69.015 ms/op 69.420 ms/op 0.99
MutableVector 250000 create 13.881 ms/op 14.147 ms/op 0.98
MutableVector 250000 get(125000) 7.0220 ns/op 7.1080 ns/op 0.99
MutableVector 250000 set(125000) 339.51 ns/op 359.60 ns/op 0.94
MutableVector 250000 toArray() 5.4040 ms/op 4.5215 ms/op 1.20
MutableVector 250000 iterate all - toArray() + loop 5.4687 ms/op 4.4564 ms/op 1.23
MutableVector 250000 iterate all - get(i) 2.1268 ms/op 1.8034 ms/op 1.18
Array 250000 create 4.7681 ms/op 3.8317 ms/op 1.24
Array 250000 clone - spread 2.8869 ms/op 1.6434 ms/op 1.76
Array 250000 get(125000) 0.51800 ns/op 0.47200 ns/op 1.10
Array 250000 set(125000) 0.54400 ns/op 0.50300 ns/op 1.08
Array 250000 iterate all - loop 126.03 us/op 99.321 us/op 1.27
effectiveBalanceIncrements clone Uint8Array 300000 74.284 us/op 49.946 us/op 1.49
effectiveBalanceIncrements clone MutableVector 300000 164.00 ns/op 140.00 ns/op 1.17
effectiveBalanceIncrements rw all Uint8Array 300000 251.84 us/op 241.37 us/op 1.04
effectiveBalanceIncrements rw all MutableVector 300000 156.53 ms/op 121.29 ms/op 1.29
phase0 afterProcessEpoch - 250000 vs - 7PWei 102.66 ms/op 93.549 ms/op 1.10
Array.fill - length 1000000 8.2979 ms/op 5.1616 ms/op 1.61
Array push - length 1000000 23.215 ms/op 21.328 ms/op 1.09
Array.get 0.29891 ns/op 0.29935 ns/op 1.00
Uint8Array.get 0.46996 ns/op 0.45749 ns/op 1.03
phase0 beforeProcessEpoch - 250000 vs - 7PWei 26.190 ms/op 24.623 ms/op 1.06
altair processEpoch - mainnet_e81889 405.49 ms/op 335.90 ms/op 1.21
mainnet_e81889 - altair beforeProcessEpoch 33.461 ms/op 33.769 ms/op 0.99
mainnet_e81889 - altair processJustificationAndFinalization 22.301 us/op 14.670 us/op 1.52
mainnet_e81889 - altair processInactivityUpdates 7.3327 ms/op 6.3492 ms/op 1.15
mainnet_e81889 - altair processRewardsAndPenalties 51.976 ms/op 52.271 ms/op 0.99
mainnet_e81889 - altair processRegistryUpdates 1.9770 us/op 2.6310 us/op 0.75
mainnet_e81889 - altair processSlashings 480.00 ns/op 492.00 ns/op 0.98
mainnet_e81889 - altair processEth1DataReset 387.00 ns/op 443.00 ns/op 0.87
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.5884 ms/op 1.9809 ms/op 0.80
mainnet_e81889 - altair processSlashingsReset 3.1990 us/op 2.5850 us/op 1.24
mainnet_e81889 - altair processRandaoMixesReset 8.7620 us/op 6.8290 us/op 1.28
mainnet_e81889 - altair processHistoricalRootsUpdate 621.00 ns/op 731.00 ns/op 0.85
mainnet_e81889 - altair processParticipationFlagUpdates 2.3320 us/op 2.6390 us/op 0.88
mainnet_e81889 - altair processSyncCommitteeUpdates 581.00 ns/op 636.00 ns/op 0.91
mainnet_e81889 - altair afterProcessEpoch 101.40 ms/op 98.395 ms/op 1.03
capella processEpoch - mainnet_e217614 1.2311 s/op 1.2242 s/op 1.01
mainnet_e217614 - capella beforeProcessEpoch 133.08 ms/op 143.82 ms/op 0.93
mainnet_e217614 - capella processJustificationAndFinalization 20.947 us/op 15.127 us/op 1.38
mainnet_e217614 - capella processInactivityUpdates 20.848 ms/op 21.398 ms/op 0.97
mainnet_e217614 - capella processRewardsAndPenalties 251.89 ms/op 272.22 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 16.176 us/op 20.215 us/op 0.80
mainnet_e217614 - capella processSlashings 437.00 ns/op 794.00 ns/op 0.55
mainnet_e217614 - capella processEth1DataReset 401.00 ns/op 455.00 ns/op 0.88
mainnet_e217614 - capella processEffectiveBalanceUpdates 18.669 ms/op 17.304 ms/op 1.08
mainnet_e217614 - capella processSlashingsReset 4.6200 us/op 3.5310 us/op 1.31
mainnet_e217614 - capella processRandaoMixesReset 4.4910 us/op 4.8930 us/op 0.92
mainnet_e217614 - capella processHistoricalRootsUpdate 1.7350 us/op 708.00 ns/op 2.45
mainnet_e217614 - capella processParticipationFlagUpdates 2.4960 us/op 2.3990 us/op 1.04
mainnet_e217614 - capella afterProcessEpoch 300.32 ms/op 290.80 ms/op 1.03
phase0 processEpoch - mainnet_e58758 395.86 ms/op 397.40 ms/op 1.00
mainnet_e58758 - phase0 beforeProcessEpoch 91.688 ms/op 104.99 ms/op 0.87
mainnet_e58758 - phase0 processJustificationAndFinalization 14.298 us/op 14.961 us/op 0.96
mainnet_e58758 - phase0 processRewardsAndPenalties 38.498 ms/op 33.771 ms/op 1.14
mainnet_e58758 - phase0 processRegistryUpdates 9.6750 us/op 8.5250 us/op 1.13
mainnet_e58758 - phase0 processSlashings 403.00 ns/op 775.00 ns/op 0.52
mainnet_e58758 - phase0 processEth1DataReset 346.00 ns/op 357.00 ns/op 0.97
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2945 ms/op 1.1280 ms/op 1.15
mainnet_e58758 - phase0 processSlashingsReset 2.9830 us/op 5.7080 us/op 0.52
mainnet_e58758 - phase0 processRandaoMixesReset 5.1290 us/op 6.2680 us/op 0.82
mainnet_e58758 - phase0 processHistoricalRootsUpdate 365.00 ns/op 505.00 ns/op 0.72
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.9170 us/op 3.5130 us/op 1.12
mainnet_e58758 - phase0 afterProcessEpoch 84.001 ms/op 84.092 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.5572 ms/op 1.2099 ms/op 1.29
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.6505 ms/op 2.5332 ms/op 1.05
altair processInactivityUpdates - 250000 normalcase 20.871 ms/op 21.761 ms/op 0.96
altair processInactivityUpdates - 250000 worstcase 19.991 ms/op 18.987 ms/op 1.05
phase0 processRegistryUpdates - 250000 normalcase 8.5000 us/op 9.3940 us/op 0.90
phase0 processRegistryUpdates - 250000 badcase_full_deposits 331.04 us/op 381.37 us/op 0.87
phase0 processRegistryUpdates - 250000 worstcase 0.5 123.78 ms/op 150.72 ms/op 0.82
altair processRewardsAndPenalties - 250000 normalcase 42.101 ms/op 44.587 ms/op 0.94
altair processRewardsAndPenalties - 250000 worstcase 46.190 ms/op 47.338 ms/op 0.98
phase0 getAttestationDeltas - 250000 normalcase 8.2303 ms/op 8.7278 ms/op 0.94
phase0 getAttestationDeltas - 250000 worstcase 9.5136 ms/op 11.483 ms/op 0.83
phase0 processSlashings - 250000 worstcase 110.76 us/op 118.78 us/op 0.93
altair processSyncCommitteeUpdates - 250000 144.72 ms/op 149.92 ms/op 0.97
BeaconState.hashTreeRoot - No change 405.00 ns/op 399.00 ns/op 1.02
BeaconState.hashTreeRoot - 1 full validator 113.48 us/op 160.28 us/op 0.71
BeaconState.hashTreeRoot - 32 full validator 1.1348 ms/op 1.7287 ms/op 0.66
BeaconState.hashTreeRoot - 512 full validator 12.426 ms/op 18.586 ms/op 0.67
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 137.04 us/op 183.28 us/op 0.75
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.2410 ms/op 2.5961 ms/op 0.86
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.674 ms/op 31.123 ms/op 1.05
BeaconState.hashTreeRoot - 1 balances 113.85 us/op 140.14 us/op 0.81
BeaconState.hashTreeRoot - 32 balances 1.1522 ms/op 1.2034 ms/op 0.96
BeaconState.hashTreeRoot - 512 balances 10.476 ms/op 14.623 ms/op 0.72
BeaconState.hashTreeRoot - 250000 balances 193.52 ms/op 229.15 ms/op 0.84
aggregationBits - 2048 els - zipIndexesInBitList 30.781 us/op 38.878 us/op 0.79
byteArrayEquals 32 59.452 ns/op 56.817 ns/op 1.05
Buffer.compare 32 19.342 ns/op 18.301 ns/op 1.06
byteArrayEquals 1024 1.7655 us/op 1.6710 us/op 1.06
Buffer.compare 1024 27.733 ns/op 26.683 ns/op 1.04
byteArrayEquals 16384 27.543 us/op 27.465 us/op 1.00
Buffer.compare 16384 216.90 ns/op 210.99 ns/op 1.03
byteArrayEquals 123687377 217.51 ms/op 210.09 ms/op 1.04
Buffer.compare 123687377 9.3534 ms/op 9.8067 ms/op 0.95
byteArrayEquals 32 - diff last byte 62.850 ns/op 59.082 ns/op 1.06
Buffer.compare 32 - diff last byte 19.635 ns/op 18.349 ns/op 1.07
byteArrayEquals 1024 - diff last byte 1.7057 us/op 1.6827 us/op 1.01
Buffer.compare 1024 - diff last byte 28.251 ns/op 27.463 ns/op 1.03
byteArrayEquals 16384 - diff last byte 27.597 us/op 26.467 us/op 1.04
Buffer.compare 16384 - diff last byte 208.79 ns/op 207.92 ns/op 1.00
byteArrayEquals 123687377 - diff last byte 211.22 ms/op 200.16 ms/op 1.06
Buffer.compare 123687377 - diff last byte 7.5866 ms/op 8.6258 ms/op 0.88
byteArrayEquals 32 - random bytes 5.8360 ns/op 5.4680 ns/op 1.07
Buffer.compare 32 - random bytes 19.859 ns/op 17.986 ns/op 1.10
byteArrayEquals 1024 - random bytes 5.8640 ns/op 5.4210 ns/op 1.08
Buffer.compare 1024 - random bytes 19.573 ns/op 17.763 ns/op 1.10
byteArrayEquals 16384 - random bytes 5.7850 ns/op 5.4000 ns/op 1.07
Buffer.compare 16384 - random bytes 19.619 ns/op 18.019 ns/op 1.09
byteArrayEquals 123687377 - random bytes 7.2000 ns/op 6.7100 ns/op 1.07
Buffer.compare 123687377 - random bytes 20.560 ns/op 20.030 ns/op 1.03
regular array get 100000 times 36.710 us/op 34.032 us/op 1.08
wrappedArray get 100000 times 34.937 us/op 34.786 us/op 1.00
arrayWithProxy get 100000 times 14.121 ms/op 15.407 ms/op 0.92
ssz.Root.equals 49.045 ns/op 48.809 ns/op 1.00
byteArrayEquals 48.724 ns/op 47.775 ns/op 1.02
Buffer.compare 11.311 ns/op 11.153 ns/op 1.01
shuffle list - 16384 els 6.9631 ms/op 6.8964 ms/op 1.01
shuffle list - 250000 els 101.39 ms/op 101.04 ms/op 1.00
processSlot - 1 slots 16.210 us/op 15.769 us/op 1.03
processSlot - 32 slots 2.8868 ms/op 3.3127 ms/op 0.87
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 39.676 ms/op 41.142 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 2.3688 ms/op 2.2812 ms/op 1.04
getCommitteeAssignments - req 100 vs - 250000 vc 4.5602 ms/op 4.6269 ms/op 0.99
getCommitteeAssignments - req 1000 vs - 250000 vc 4.7743 ms/op 4.9273 ms/op 0.97
findModifiedValidators - 10000 modified validators 293.91 ms/op 315.04 ms/op 0.93
findModifiedValidators - 1000 modified validators 208.65 ms/op 214.54 ms/op 0.97
findModifiedValidators - 100 modified validators 213.23 ms/op 217.27 ms/op 0.98
findModifiedValidators - 10 modified validators 232.65 ms/op 229.57 ms/op 1.01
findModifiedValidators - 1 modified validators 174.35 ms/op 217.07 ms/op 0.80
findModifiedValidators - no difference 194.30 ms/op 199.32 ms/op 0.97
compare ViewDUs 3.3933 s/op 3.9580 s/op 0.86
compare each validator Uint8Array 1.6315 s/op 2.2090 s/op 0.74
compare ViewDU to Uint8Array 1.1741 s/op 1.4046 s/op 0.84
migrate state 1000000 validators, 24 modified, 0 new 642.45 ms/op 790.75 ms/op 0.81
migrate state 1000000 validators, 1700 modified, 1000 new 1.1916 s/op 1.0151 s/op 1.17
migrate state 1000000 validators, 3400 modified, 2000 new 1.5575 s/op 1.1719 s/op 1.33
migrate state 1500000 validators, 24 modified, 0 new 815.12 ms/op 550.20 ms/op 1.48
migrate state 1500000 validators, 1700 modified, 1000 new 974.53 ms/op 881.09 ms/op 1.11
migrate state 1500000 validators, 3400 modified, 2000 new 1.3826 s/op 1.0281 s/op 1.34
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.1800 ns/op 4.5300 ns/op 1.36
state getBlockRootAtSlot - 250000 vs - 7PWei 792.55 ns/op 620.02 ns/op 1.28
computeProposers - vc 250000 8.8206 ms/op 8.4445 ms/op 1.04
computeEpochShuffling - vc 250000 121.87 ms/op 100.65 ms/op 1.21
getNextSyncCommittee - vc 250000 154.14 ms/op 137.36 ms/op 1.12
computeSigningRoot for AttestationData 26.331 us/op 25.095 us/op 1.05
hash AttestationData serialized data then Buffer.toString(base64) 1.9574 us/op 1.8774 us/op 1.04
toHexString serialized data 1.2564 us/op 1.1429 us/op 1.10
Buffer.toString(base64) 228.47 ns/op 229.38 ns/op 1.00

by benchmarkbot/action

@wemeetagain
Copy link
Member

🎉 This PR is included in v1.20.2 🎉

@wemeetagain
Copy link
Member

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