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 standard endpoint to retrieve fork choice context #7127

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 4, 2024

Motivation

Description

Add standardized endpoint from beacon-api spec to retrieve fork choice context

Closes #5700

@nflaig nflaig requested a review from a team as a code owner October 4, 2024 14:41
@nflaig nflaig added this to the v1.23.0 milestone Oct 4, 2024
data: ForkChoiceResponseType,
meta: EmptyMetaCodec,
onlySupport: WireFormat.json,
transform: {
Copy link
Member Author

@nflaig nflaig Oct 4, 2024

Choose a reason for hiding this comment

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

as per spec it's not wrapped in data container... it's too late to change it now though 😢

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.09%. Comparing base (0d1fd9c) to head (58c2e4c).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7127      +/-   ##
============================================
+ Coverage     49.04%   49.09%   +0.04%     
============================================
  Files           596      596              
  Lines         39743    39782      +39     
  Branches       2065     2059       -6     
============================================
+ Hits          19493    19531      +38     
- Misses        20209    20210       +1     
  Partials         41       41              

Copy link
Contributor

github-actions bot commented Oct 4, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 04f5519 Previous: 0d1fd9c Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.5642 ms/op 1.8512 ms/op 1.39
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 74.438 us/op 39.441 us/op 1.89
BLS verify - blst 979.93 us/op 852.98 us/op 1.15
BLS verifyMultipleSignatures 3 - blst 1.4837 ms/op 1.4373 ms/op 1.03
BLS verifyMultipleSignatures 8 - blst 2.0731 ms/op 2.0655 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst 6.2299 ms/op 4.4732 ms/op 1.39
BLS verifyMultipleSignatures 64 - blst 11.439 ms/op 8.1416 ms/op 1.41
BLS verifyMultipleSignatures 128 - blst 18.544 ms/op 15.782 ms/op 1.17
BLS deserializing 10000 signatures 738.01 ms/op 603.08 ms/op 1.22
BLS deserializing 100000 signatures 7.2285 s/op 6.0504 s/op 1.19
BLS verifyMultipleSignatures - same message - 3 - blst 1.0305 ms/op 939.94 us/op 1.10
BLS verifyMultipleSignatures - same message - 8 - blst 1.1323 ms/op 1.1121 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.8205 ms/op 1.6300 ms/op 1.12
BLS verifyMultipleSignatures - same message - 64 - blst 2.7042 ms/op 2.4197 ms/op 1.12
BLS verifyMultipleSignatures - same message - 128 - blst 4.4466 ms/op 4.1835 ms/op 1.06
BLS aggregatePubkeys 32 - blst 20.465 us/op 17.921 us/op 1.14
BLS aggregatePubkeys 128 - blst 71.594 us/op 63.060 us/op 1.14
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 84.940 ms/op 58.388 ms/op 1.45
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 68.782 ms/op 40.352 ms/op 1.70
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 40.361 ms/op 28.706 ms/op 1.41
getSlashingsAndExits - default max 220.10 us/op 80.735 us/op 2.73
getSlashingsAndExits - 2k 404.57 us/op 269.88 us/op 1.50
proposeBlockBody type=full, size=empty 6.8125 ms/op 5.1155 ms/op 1.33
isKnown best case - 1 super set check 689.00 ns/op 566.00 ns/op 1.22
isKnown normal case - 2 super set checks 534.00 ns/op 542.00 ns/op 0.99
isKnown worse case - 16 super set checks 448.00 ns/op 519.00 ns/op 0.86
InMemoryCheckpointStateCache - add get delete 3.6790 us/op 3.2790 us/op 1.12
updateUnfinalizedPubkeys - updating 10 pubkeys 1.6244 ms/op 678.84 us/op 2.39
updateUnfinalizedPubkeys - updating 100 pubkeys 4.5447 ms/op 2.4769 ms/op 1.83
updateUnfinalizedPubkeys - updating 1000 pubkeys 57.908 ms/op 37.960 ms/op 1.53
validate api signedAggregateAndProof - struct 1.5181 ms/op 1.9665 ms/op 0.77
validate gossip signedAggregateAndProof - struct 1.5230 ms/op 1.9115 ms/op 0.80
validate gossip attestation - vc 640000 1.0625 ms/op 981.08 us/op 1.08
batch validate gossip attestation - vc 640000 - chunk 32 149.95 us/op 129.87 us/op 1.15
batch validate gossip attestation - vc 640000 - chunk 64 137.11 us/op 116.78 us/op 1.17
batch validate gossip attestation - vc 640000 - chunk 128 124.64 us/op 104.72 us/op 1.19
batch validate gossip attestation - vc 640000 - chunk 256 128.05 us/op 102.28 us/op 1.25
pickEth1Vote - no votes 1.1789 ms/op 846.22 us/op 1.39
pickEth1Vote - max votes 7.4707 ms/op 4.4186 ms/op 1.69
pickEth1Vote - Eth1Data hashTreeRoot value x2048 17.875 ms/op 9.9643 ms/op 1.79
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 23.222 ms/op 13.724 ms/op 1.69
pickEth1Vote - Eth1Data fastSerialize value x2048 653.90 us/op 357.46 us/op 1.83
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.0478 ms/op 2.0672 ms/op 1.96
bytes32 toHexString 514.00 ns/op 585.00 ns/op 0.88
bytes32 Buffer.toString(hex) 301.00 ns/op 445.00 ns/op 0.68
bytes32 Buffer.toString(hex) from Uint8Array 518.00 ns/op 542.00 ns/op 0.96
bytes32 Buffer.toString(hex) + 0x 292.00 ns/op 442.00 ns/op 0.66
Object access 1 prop 0.18600 ns/op 0.33300 ns/op 0.56
Map access 1 prop 0.15100 ns/op 0.32700 ns/op 0.46
Object get x1000 6.6170 ns/op 5.1200 ns/op 1.29
Map get x1000 7.0350 ns/op 5.8540 ns/op 1.20
Object set x1000 47.653 ns/op 22.954 ns/op 2.08
Map set x1000 31.795 ns/op 18.840 ns/op 1.69
Return object 10000 times 0.33970 ns/op 0.30080 ns/op 1.13
Throw Error 10000 times 3.7491 us/op 2.7184 us/op 1.38
toHex 184.03 ns/op 111.52 ns/op 1.65
Buffer.from 175.93 ns/op 102.96 ns/op 1.71
shared Buffer 110.84 ns/op 69.944 ns/op 1.58
fastMsgIdFn sha256 / 200 bytes 2.5300 us/op 2.0710 us/op 1.22
fastMsgIdFn h32 xxhash / 200 bytes 306.00 ns/op 412.00 ns/op 0.74
fastMsgIdFn h64 xxhash / 200 bytes 301.00 ns/op 459.00 ns/op 0.66
fastMsgIdFn sha256 / 1000 bytes 8.0390 us/op 5.9260 us/op 1.36
fastMsgIdFn h32 xxhash / 1000 bytes 454.00 ns/op 546.00 ns/op 0.83
fastMsgIdFn h64 xxhash / 1000 bytes 384.00 ns/op 537.00 ns/op 0.72
fastMsgIdFn sha256 / 10000 bytes 67.285 us/op 49.986 us/op 1.35
fastMsgIdFn h32 xxhash / 10000 bytes 2.0130 us/op 1.9500 us/op 1.03
fastMsgIdFn h64 xxhash / 10000 bytes 1.2940 us/op 1.3550 us/op 0.95
send data - 1000 256B messages 13.798 ms/op 9.4972 ms/op 1.45
send data - 1000 512B messages 19.660 ms/op 13.188 ms/op 1.49
send data - 1000 1024B messages 32.605 ms/op 24.936 ms/op 1.31
send data - 1000 1200B messages 29.734 ms/op 22.437 ms/op 1.33
send data - 1000 2048B messages 37.977 ms/op 28.732 ms/op 1.32
send data - 1000 4096B messages 36.838 ms/op 25.077 ms/op 1.47
send data - 1000 16384B messages 86.477 ms/op 63.834 ms/op 1.35
send data - 1000 65536B messages 252.01 ms/op 233.01 ms/op 1.08
enrSubnets - fastDeserialize 64 bits 1.8010 us/op 1.1600 us/op 1.55
enrSubnets - ssz BitVector 64 bits 476.00 ns/op 521.00 ns/op 0.91
enrSubnets - fastDeserialize 4 bits 216.00 ns/op 325.00 ns/op 0.66
enrSubnets - ssz BitVector 4 bits 502.00 ns/op 518.00 ns/op 0.97
prioritizePeers score -10:0 att 32-0.1 sync 2-0 204.70 us/op 109.66 us/op 1.87
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 246.77 us/op 137.38 us/op 1.80
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 360.73 us/op 201.24 us/op 1.79
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 527.61 us/op 333.69 us/op 1.58
prioritizePeers score 0:0 att 64-1 sync 4-1 986.46 us/op 423.20 us/op 2.33
array of 16000 items push then shift 1.7494 us/op 1.2336 us/op 1.42
LinkedList of 16000 items push then shift 9.2400 ns/op 7.5650 ns/op 1.22
array of 16000 items push then pop 141.78 ns/op 99.399 ns/op 1.43
LinkedList of 16000 items push then pop 7.8280 ns/op 6.1760 ns/op 1.27
array of 24000 items push then shift 2.6239 us/op 1.8010 us/op 1.46
LinkedList of 24000 items push then shift 8.3360 ns/op 6.8930 ns/op 1.21
array of 24000 items push then pop 196.54 ns/op 125.49 ns/op 1.57
LinkedList of 24000 items push then pop 8.6210 ns/op 6.1900 ns/op 1.39
intersect bitArray bitLen 8 6.7620 ns/op 5.1430 ns/op 1.31
intersect array and set length 8 53.389 ns/op 37.152 ns/op 1.44
intersect bitArray bitLen 128 32.464 ns/op 25.386 ns/op 1.28
intersect array and set length 128 931.77 ns/op 549.85 ns/op 1.69
bitArray.getTrueBitIndexes() bitLen 128 2.4160 us/op 1.4880 us/op 1.62
bitArray.getTrueBitIndexes() bitLen 248 4.4480 us/op 2.2750 us/op 1.96
bitArray.getTrueBitIndexes() bitLen 512 9.5870 us/op 4.1950 us/op 2.29
Buffer.concat 32 items 1.0170 us/op 948.00 ns/op 1.07
Uint8Array.set 32 items 1.6280 us/op 1.5160 us/op 1.07
Buffer.copy 2.1640 us/op 1.7490 us/op 1.24
Uint8Array.set - with subarray 2.9190 us/op 2.2670 us/op 1.29
Uint8Array.set - without subarray 1.8510 us/op 1.5110 us/op 1.23
getUint32 - dataview 316.00 ns/op 386.00 ns/op 0.82
getUint32 - manual 290.00 ns/op 331.00 ns/op 0.88
Set add up to 64 items then delete first 3.7859 us/op 1.6622 us/op 2.28
OrderedSet add up to 64 items then delete first 4.8572 us/op 2.7679 us/op 1.75
Set add up to 64 items then delete last 4.6853 us/op 1.9191 us/op 2.44
OrderedSet add up to 64 items then delete last 5.3565 us/op 3.0305 us/op 1.77
Set add up to 64 items then delete middle 3.8045 us/op 2.0029 us/op 1.90
OrderedSet add up to 64 items then delete middle 8.1059 us/op 4.2560 us/op 1.90
Set add up to 128 items then delete first 9.2642 us/op 3.7615 us/op 2.46
OrderedSet add up to 128 items then delete first 13.113 us/op 5.8568 us/op 2.24
Set add up to 128 items then delete last 8.9047 us/op 3.6270 us/op 2.46
OrderedSet add up to 128 items then delete last 11.637 us/op 5.5414 us/op 2.10
Set add up to 128 items then delete middle 9.2723 us/op 3.6341 us/op 2.55
OrderedSet add up to 128 items then delete middle 18.748 us/op 11.264 us/op 1.66
Set add up to 256 items then delete first 18.232 us/op 7.3960 us/op 2.47
OrderedSet add up to 256 items then delete first 29.478 us/op 11.963 us/op 2.46
Set add up to 256 items then delete last 19.997 us/op 7.2074 us/op 2.77
OrderedSet add up to 256 items then delete last 27.062 us/op 11.202 us/op 2.42
Set add up to 256 items then delete middle 19.227 us/op 7.1048 us/op 2.71
OrderedSet add up to 256 items then delete middle 55.408 us/op 34.528 us/op 1.60
transfer serialized Status (84 B) 1.5840 us/op 1.4030 us/op 1.13
copy serialized Status (84 B) 1.4930 us/op 1.2000 us/op 1.24
transfer serialized SignedVoluntaryExit (112 B) 1.7580 us/op 1.5450 us/op 1.14
copy serialized SignedVoluntaryExit (112 B) 1.5020 us/op 1.3420 us/op 1.12
transfer serialized ProposerSlashing (416 B) 2.6290 us/op 1.6980 us/op 1.55
copy serialized ProposerSlashing (416 B) 2.7440 us/op 2.1530 us/op 1.27
transfer serialized Attestation (485 B) 2.8600 us/op 2.0920 us/op 1.37
copy serialized Attestation (485 B) 2.7110 us/op 2.0210 us/op 1.34
transfer serialized AttesterSlashing (33232 B) 3.0690 us/op 2.2850 us/op 1.34
copy serialized AttesterSlashing (33232 B) 9.3560 us/op 5.1650 us/op 1.81
transfer serialized Small SignedBeaconBlock (128000 B) 3.7190 us/op 2.7910 us/op 1.33
copy serialized Small SignedBeaconBlock (128000 B) 32.996 us/op 9.5210 us/op 3.47
transfer serialized Avg SignedBeaconBlock (200000 B) 4.3010 us/op 2.4920 us/op 1.73
copy serialized Avg SignedBeaconBlock (200000 B) 44.409 us/op 11.831 us/op 3.75
transfer serialized BlobsSidecar (524380 B) 4.5340 us/op 3.0330 us/op 1.49
copy serialized BlobsSidecar (524380 B) 142.34 us/op 73.961 us/op 1.92
transfer serialized Big SignedBeaconBlock (1000000 B) 5.1100 us/op 3.1730 us/op 1.61
copy serialized Big SignedBeaconBlock (1000000 B) 345.29 us/op 132.52 us/op 2.61
pass gossip attestations to forkchoice per slot 3.3083 ms/op 2.4098 ms/op 1.37
forkChoice updateHead vc 100000 bc 64 eq 0 606.08 us/op 472.22 us/op 1.28
forkChoice updateHead vc 600000 bc 64 eq 0 4.8081 ms/op 2.6057 ms/op 1.85
forkChoice updateHead vc 1000000 bc 64 eq 0 6.4284 ms/op 4.0555 ms/op 1.59
forkChoice updateHead vc 600000 bc 320 eq 0 3.6084 ms/op 2.4924 ms/op 1.45
forkChoice updateHead vc 600000 bc 1200 eq 0 3.9863 ms/op 2.5436 ms/op 1.57
forkChoice updateHead vc 600000 bc 7200 eq 0 4.6189 ms/op 2.7706 ms/op 1.67
forkChoice updateHead vc 600000 bc 64 eq 1000 12.325 ms/op 9.6252 ms/op 1.28
forkChoice updateHead vc 600000 bc 64 eq 10000 12.447 ms/op 9.4451 ms/op 1.32
forkChoice updateHead vc 600000 bc 64 eq 300000 21.330 ms/op 11.589 ms/op 1.84
computeDeltas 500000 validators 300 proto nodes 4.5929 ms/op 3.0197 ms/op 1.52
computeDeltas 500000 validators 1200 proto nodes 4.5623 ms/op 3.0237 ms/op 1.51
computeDeltas 500000 validators 7200 proto nodes 4.1910 ms/op 3.1144 ms/op 1.35
computeDeltas 750000 validators 300 proto nodes 6.0642 ms/op 4.4246 ms/op 1.37
computeDeltas 750000 validators 1200 proto nodes 6.3652 ms/op 4.3886 ms/op 1.45
computeDeltas 750000 validators 7200 proto nodes 6.3015 ms/op 4.5213 ms/op 1.39
computeDeltas 1400000 validators 300 proto nodes 11.872 ms/op 8.6127 ms/op 1.38
computeDeltas 1400000 validators 1200 proto nodes 12.249 ms/op 8.5352 ms/op 1.44
computeDeltas 1400000 validators 7200 proto nodes 13.824 ms/op 8.5737 ms/op 1.61
computeDeltas 2100000 validators 300 proto nodes 18.298 ms/op 13.151 ms/op 1.39
computeDeltas 2100000 validators 1200 proto nodes 19.976 ms/op 12.746 ms/op 1.57
computeDeltas 2100000 validators 7200 proto nodes 18.864 ms/op 12.778 ms/op 1.48
altair processAttestation - 250000 vs - 7PWei normalcase 3.1916 ms/op 1.4115 ms/op 2.26
altair processAttestation - 250000 vs - 7PWei worstcase 3.9053 ms/op 2.0993 ms/op 1.86
altair processAttestation - setStatus - 1/6 committees join 94.862 us/op 72.076 us/op 1.32
altair processAttestation - setStatus - 1/3 committees join 204.00 us/op 146.36 us/op 1.39
altair processAttestation - setStatus - 1/2 committees join 272.17 us/op 183.48 us/op 1.48
altair processAttestation - setStatus - 2/3 committees join 372.31 us/op 278.70 us/op 1.34
altair processAttestation - setStatus - 4/5 committees join 530.68 us/op 431.82 us/op 1.23
altair processAttestation - setStatus - 100% committees join 628.95 us/op 514.96 us/op 1.22
altair processBlock - 250000 vs - 7PWei normalcase 5.8031 ms/op 5.2211 ms/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase hashState 28.044 ms/op 26.210 ms/op 1.07
altair processBlock - 250000 vs - 7PWei worstcase 37.863 ms/op 34.790 ms/op 1.09
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.489 ms/op 76.777 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4569 ms/op 2.0183 ms/op 1.22
phase0 processBlock - 250000 vs - 7PWei worstcase 25.931 ms/op 22.970 ms/op 1.13
altair processEth1Data - 250000 vs - 7PWei normalcase 474.36 us/op 259.01 us/op 1.83
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.0490 us/op 6.1370 us/op 0.99
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 37.007 us/op 28.803 us/op 1.28
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.404 us/op 9.7820 us/op 1.06
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.8920 us/op 5.8820 us/op 1.17
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 166.47 us/op 131.53 us/op 1.27
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4398 ms/op 864.55 us/op 1.67
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8511 ms/op 1.2773 ms/op 1.45
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9974 ms/op 1.1102 ms/op 1.80
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.2173 ms/op 2.9440 ms/op 1.43
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.7240 ms/op 1.1777 ms/op 1.46
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.1739 ms/op 3.1553 ms/op 1.32
Tree 40 250000 create 252.55 ms/op 228.02 ms/op 1.11
Tree 40 250000 get(125000) 160.40 ns/op 119.08 ns/op 1.35
Tree 40 250000 set(125000) 809.30 ns/op 545.30 ns/op 1.48
Tree 40 250000 toArray() 22.658 ms/op 24.008 ms/op 0.94
Tree 40 250000 iterate all - toArray() + loop 23.169 ms/op 22.474 ms/op 1.03
Tree 40 250000 iterate all - get(i) 66.087 ms/op 56.913 ms/op 1.16
Array 250000 create 4.3351 ms/op 3.8791 ms/op 1.12
Array 250000 clone - spread 2.0003 ms/op 1.2256 ms/op 1.63
Array 250000 get(125000) 0.46300 ns/op 0.59700 ns/op 0.78
Array 250000 set(125000) 0.48800 ns/op 0.60600 ns/op 0.81
Array 250000 iterate all - loop 114.56 us/op 76.362 us/op 1.50
phase0 afterProcessEpoch - 250000 vs - 7PWei 98.776 ms/op 86.728 ms/op 1.14
Array.fill - length 1000000 5.7026 ms/op 2.7566 ms/op 2.07
Array push - length 1000000 21.943 ms/op 17.435 ms/op 1.26
Array.get 0.29991 ns/op 0.27840 ns/op 1.08
Uint8Array.get 0.45081 ns/op 0.36012 ns/op 1.25
phase0 beforeProcessEpoch - 250000 vs - 7PWei 20.837 ms/op 23.350 ms/op 0.89
altair processEpoch - mainnet_e81889 326.57 ms/op 276.08 ms/op 1.18
mainnet_e81889 - altair beforeProcessEpoch 20.448 ms/op 23.343 ms/op 0.88
mainnet_e81889 - altair processJustificationAndFinalization 17.649 us/op 16.318 us/op 1.08
mainnet_e81889 - altair processInactivityUpdates 5.9760 ms/op 4.6084 ms/op 1.30
mainnet_e81889 - altair processRewardsAndPenalties 50.032 ms/op 49.484 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 2.3930 us/op 2.0300 us/op 1.18
mainnet_e81889 - altair processSlashings 403.00 ns/op 721.00 ns/op 0.56
mainnet_e81889 - altair processEth1DataReset 352.00 ns/op 714.00 ns/op 0.49
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6251 ms/op 1.6882 ms/op 0.96
mainnet_e81889 - altair processSlashingsReset 2.6970 us/op 2.6200 us/op 1.03
mainnet_e81889 - altair processRandaoMixesReset 4.0240 us/op 3.2170 us/op 1.25
mainnet_e81889 - altair processHistoricalRootsUpdate 498.00 ns/op 742.00 ns/op 0.67
mainnet_e81889 - altair processParticipationFlagUpdates 2.7050 us/op 4.2740 us/op 0.63
mainnet_e81889 - altair processSyncCommitteeUpdates 396.00 ns/op 850.00 ns/op 0.47
mainnet_e81889 - altair afterProcessEpoch 94.506 ms/op 82.189 ms/op 1.15
capella processEpoch - mainnet_e217614 1.1512 s/op 1.2437 s/op 0.93
mainnet_e217614 - capella beforeProcessEpoch 76.160 ms/op 140.75 ms/op 0.54
mainnet_e217614 - capella processJustificationAndFinalization 15.121 us/op 22.496 us/op 0.67
mainnet_e217614 - capella processInactivityUpdates 20.014 ms/op 24.694 ms/op 0.81
mainnet_e217614 - capella processRewardsAndPenalties 240.35 ms/op 303.03 ms/op 0.79
mainnet_e217614 - capella processRegistryUpdates 13.036 us/op 16.256 us/op 0.80
mainnet_e217614 - capella processSlashings 422.00 ns/op 960.00 ns/op 0.44
mainnet_e217614 - capella processEth1DataReset 317.00 ns/op 995.00 ns/op 0.32
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.165 ms/op 18.998 ms/op 0.80
mainnet_e217614 - capella processSlashingsReset 3.3550 us/op 4.9010 us/op 0.68
mainnet_e217614 - capella processRandaoMixesReset 3.6580 us/op 7.4200 us/op 0.49
mainnet_e217614 - capella processHistoricalRootsUpdate 302.00 ns/op 1.1200 us/op 0.27
mainnet_e217614 - capella processParticipationFlagUpdates 1.7280 us/op 5.4880 us/op 0.31
mainnet_e217614 - capella afterProcessEpoch 239.31 ms/op 202.38 ms/op 1.18
phase0 processEpoch - mainnet_e58758 373.70 ms/op 401.07 ms/op 0.93
mainnet_e58758 - phase0 beforeProcessEpoch 78.661 ms/op 122.65 ms/op 0.64
mainnet_e58758 - phase0 processJustificationAndFinalization 13.535 us/op 19.905 us/op 0.68
mainnet_e58758 - phase0 processRewardsAndPenalties 38.271 ms/op 25.219 ms/op 1.52
mainnet_e58758 - phase0 processRegistryUpdates 6.6750 us/op 12.576 us/op 0.53
mainnet_e58758 - phase0 processSlashings 595.00 ns/op 979.00 ns/op 0.61
mainnet_e58758 - phase0 processEth1DataReset 481.00 ns/op 951.00 ns/op 0.51
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.5501 ms/op 1.4756 ms/op 1.05
mainnet_e58758 - phase0 processSlashingsReset 4.8190 us/op 6.5900 us/op 0.73
mainnet_e58758 - phase0 processRandaoMixesReset 5.6880 us/op 7.1580 us/op 0.79
mainnet_e58758 - phase0 processHistoricalRootsUpdate 769.00 ns/op 1.4820 us/op 0.52
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.2360 us/op 4.6910 us/op 1.12
mainnet_e58758 - phase0 afterProcessEpoch 77.066 ms/op 66.784 ms/op 1.15
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8351 ms/op 966.36 us/op 1.90
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.4837 ms/op 1.9654 ms/op 1.26
altair processInactivityUpdates - 250000 normalcase 21.466 ms/op 20.650 ms/op 1.04
altair processInactivityUpdates - 250000 worstcase 20.444 ms/op 24.639 ms/op 0.83
phase0 processRegistryUpdates - 250000 normalcase 10.620 us/op 6.0020 us/op 1.77
phase0 processRegistryUpdates - 250000 badcase_full_deposits 269.27 us/op 332.41 us/op 0.81
phase0 processRegistryUpdates - 250000 worstcase 0.5 126.14 ms/op 126.69 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 46.909 ms/op 59.693 ms/op 0.79
altair processRewardsAndPenalties - 250000 worstcase 45.542 ms/op 45.258 ms/op 1.01
phase0 getAttestationDeltas - 250000 normalcase 7.5907 ms/op 6.3114 ms/op 1.20
phase0 getAttestationDeltas - 250000 worstcase 7.3835 ms/op 6.6061 ms/op 1.12
phase0 processSlashings - 250000 worstcase 117.98 us/op 91.586 us/op 1.29
altair processSyncCommitteeUpdates - 250000 124.53 ms/op 105.07 ms/op 1.19
BeaconState.hashTreeRoot - No change 234.00 ns/op 455.00 ns/op 0.51
BeaconState.hashTreeRoot - 1 full validator 127.87 us/op 147.54 us/op 0.87
BeaconState.hashTreeRoot - 32 full validator 1.2372 ms/op 1.4310 ms/op 0.86
BeaconState.hashTreeRoot - 512 full validator 12.032 ms/op 8.4238 ms/op 1.43
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 148.54 us/op 91.510 us/op 1.62
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8116 ms/op 1.8866 ms/op 0.96
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 26.682 ms/op 21.464 ms/op 1.24
BeaconState.hashTreeRoot - 1 balances 107.61 us/op 89.457 us/op 1.20
BeaconState.hashTreeRoot - 32 balances 1.1412 ms/op 726.01 us/op 1.57
BeaconState.hashTreeRoot - 512 balances 7.9286 ms/op 6.6603 ms/op 1.19
BeaconState.hashTreeRoot - 250000 balances 162.65 ms/op 130.03 ms/op 1.25
aggregationBits - 2048 els - zipIndexesInBitList 23.802 us/op 23.726 us/op 1.00
byteArrayEquals 32 53.819 ns/op 47.490 ns/op 1.13
Buffer.compare 32 17.523 ns/op 15.093 ns/op 1.16
byteArrayEquals 1024 1.5937 us/op 1.2427 us/op 1.28
Buffer.compare 1024 26.078 ns/op 22.716 ns/op 1.15
byteArrayEquals 16384 25.400 us/op 19.735 us/op 1.29
Buffer.compare 16384 211.69 ns/op 178.22 ns/op 1.19
byteArrayEquals 123687377 197.68 ms/op 150.11 ms/op 1.32
Buffer.compare 123687377 7.4749 ms/op 4.3862 ms/op 1.70
byteArrayEquals 32 - diff last byte 52.788 ns/op 46.648 ns/op 1.13
Buffer.compare 32 - diff last byte 17.382 ns/op 15.796 ns/op 1.10
byteArrayEquals 1024 - diff last byte 1.6232 us/op 1.2502 us/op 1.30
Buffer.compare 1024 - diff last byte 27.511 ns/op 24.032 ns/op 1.14
byteArrayEquals 16384 - diff last byte 25.565 us/op 19.838 us/op 1.29
Buffer.compare 16384 - diff last byte 186.04 ns/op 201.91 ns/op 0.92
byteArrayEquals 123687377 - diff last byte 203.16 ms/op 144.07 ms/op 1.41
Buffer.compare 123687377 - diff last byte 14.584 ms/op 5.4276 ms/op 2.69
byteArrayEquals 32 - random bytes 5.5470 ns/op 4.8040 ns/op 1.15
Buffer.compare 32 - random bytes 18.694 ns/op 15.070 ns/op 1.24
byteArrayEquals 1024 - random bytes 5.7540 ns/op 4.7800 ns/op 1.20
Buffer.compare 1024 - random bytes 19.176 ns/op 14.797 ns/op 1.30
byteArrayEquals 16384 - random bytes 5.8060 ns/op 4.7000 ns/op 1.24
Buffer.compare 16384 - random bytes 18.797 ns/op 14.832 ns/op 1.27
byteArrayEquals 123687377 - random bytes 6.9500 ns/op 7.5600 ns/op 0.92
Buffer.compare 123687377 - random bytes 20.290 ns/op 17.680 ns/op 1.15
regular array get 100000 times 45.082 us/op 29.324 us/op 1.54
wrappedArray get 100000 times 33.850 us/op 29.330 us/op 1.15
arrayWithProxy get 100000 times 14.192 ms/op 10.186 ms/op 1.39
ssz.Root.equals 49.041 ns/op 44.283 ns/op 1.11
byteArrayEquals 48.903 ns/op 43.086 ns/op 1.14
Buffer.compare 11.737 ns/op 9.1160 ns/op 1.29
shuffle list - 16384 els 6.9238 ms/op 5.3620 ms/op 1.29
shuffle list - 250000 els 105.01 ms/op 79.830 ms/op 1.32
processSlot - 1 slots 21.226 us/op 12.714 us/op 1.67
processSlot - 32 slots 3.6659 ms/op 2.5557 ms/op 1.43
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 45.754 ms/op 38.478 ms/op 1.19
getCommitteeAssignments - req 1 vs - 250000 vc 2.2109 ms/op 1.8144 ms/op 1.22
getCommitteeAssignments - req 100 vs - 250000 vc 4.4342 ms/op 3.4647 ms/op 1.28
getCommitteeAssignments - req 1000 vs - 250000 vc 4.8042 ms/op 3.7900 ms/op 1.27
findModifiedValidators - 10000 modified validators 312.56 ms/op 229.85 ms/op 1.36
findModifiedValidators - 1000 modified validators 222.97 ms/op 136.68 ms/op 1.63
findModifiedValidators - 100 modified validators 302.21 ms/op 139.80 ms/op 2.16
findModifiedValidators - 10 modified validators 327.71 ms/op 141.79 ms/op 2.31
findModifiedValidators - 1 modified validators 249.06 ms/op 145.86 ms/op 1.71
findModifiedValidators - no difference 197.18 ms/op 139.20 ms/op 1.42
compare ViewDUs 3.8935 s/op 3.0761 s/op 1.27
compare each validator Uint8Array 2.8975 s/op 1.5870 s/op 1.83
compare ViewDU to Uint8Array 1.4130 s/op 772.85 ms/op 1.83
migrate state 1000000 validators, 24 modified, 0 new 1.0613 s/op 805.87 ms/op 1.32
migrate state 1000000 validators, 1700 modified, 1000 new 1.3260 s/op 1.0616 s/op 1.25
migrate state 1000000 validators, 3400 modified, 2000 new 1.5233 s/op 1.2092 s/op 1.26
migrate state 1500000 validators, 24 modified, 0 new 1.0148 s/op 762.24 ms/op 1.33
migrate state 1500000 validators, 1700 modified, 1000 new 1.2839 s/op 1.1511 s/op 1.12
migrate state 1500000 validators, 3400 modified, 2000 new 1.5630 s/op 1.3126 s/op 1.19
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.7000 ns/op 6.4000 ns/op 0.73
state getBlockRootAtSlot - 250000 vs - 7PWei 700.18 ns/op 415.03 ns/op 1.69
computeProposers - vc 250000 9.6370 ms/op 5.5841 ms/op 1.73
computeEpochShuffling - vc 250000 104.27 ms/op 78.132 ms/op 1.33
getNextSyncCommittee - vc 250000 165.81 ms/op 95.009 ms/op 1.75
computeSigningRoot for AttestationData 28.684 us/op 25.349 us/op 1.13
hash AttestationData serialized data then Buffer.toString(base64) 1.7569 us/op 1.2006 us/op 1.46
toHexString serialized data 1.2790 us/op 862.56 ns/op 1.48
Buffer.toString(base64) 245.25 ns/op 165.31 ns/op 1.48
nodejs block root to RootHex using toHex 200.72 ns/op 115.54 ns/op 1.74
nodejs block root to RootHex using toRootHex 122.28 ns/op 74.927 ns/op 1.63
browser block root to RootHex using the deprecated toHexString 373.35 ns/op 227.98 ns/op 1.64
browser block root to RootHex using toHex 279.28 ns/op 176.07 ns/op 1.59
browser block root to RootHex using toRootHex 195.29 ns/op 148.12 ns/op 1.32

by benchmarkbot/action

@nflaig nflaig merged commit 5f7b611 into unstable Oct 7, 2024
20 checks passed
@nflaig nflaig deleted the nflaig/debug-forkchoice branch October 7, 2024 19:26
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.

Implement debug fork choice API
2 participants