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 builder api #7180

Merged
merged 2 commits into from
Oct 21, 2024
Merged

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Oct 19, 2024

Motivation

Description

Minimal implementation to add SSZ support to Builder API as per ethereum/builder-specs#104.

Few more things to consider

  • forward blinded block bytes directly to submitBlindedBlock, this saves an extra serialization step
  • possibly add CLI flag to enforce JSON for all requests / responses, could be useful for debugging
  • while de-/serialization is covered by generic api tests, we need to consider how we better e2e test builder flow

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.19%. Comparing base (b1b5623) to head (2a17fb1).
Report is 4 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7180      +/-   ##
============================================
+ Coverage     49.18%   49.19%   +0.01%     
============================================
  Files           598      598              
  Lines         39770    39785      +15     
  Branches       2092     2086       -6     
============================================
+ Hits          19560    19574      +14     
- Misses        20170    20171       +1     
  Partials         40       40              

Copy link
Contributor

github-actions bot commented Oct 19, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 50a84b2 Previous: b1b5623 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7485 ms/op 1.7892 ms/op 0.98
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 40.330 us/op 38.001 us/op 1.06
BLS verify - blst 881.52 us/op 897.95 us/op 0.98
BLS verifyMultipleSignatures 3 - blst 1.2919 ms/op 1.3066 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 2.0794 ms/op 2.1210 ms/op 0.98
BLS verifyMultipleSignatures 32 - blst 4.4754 ms/op 4.4409 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 8.2599 ms/op 8.4126 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 15.964 ms/op 16.018 ms/op 1.00
BLS deserializing 10000 signatures 624.91 ms/op 620.40 ms/op 1.01
BLS deserializing 100000 signatures 6.2245 s/op 6.1995 s/op 1.00
BLS verifyMultipleSignatures - same message - 3 - blst 943.33 us/op 954.87 us/op 0.99
BLS verifyMultipleSignatures - same message - 8 - blst 1.0863 ms/op 1.0434 ms/op 1.04
BLS verifyMultipleSignatures - same message - 32 - blst 1.6835 ms/op 1.6406 ms/op 1.03
BLS verifyMultipleSignatures - same message - 64 - blst 2.3662 ms/op 2.4460 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 3.9345 ms/op 3.9680 ms/op 0.99
BLS aggregatePubkeys 32 - blst 16.504 us/op 18.021 us/op 0.92
BLS aggregatePubkeys 128 - blst 58.573 us/op 63.128 us/op 0.93
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 59.980 ms/op 59.430 ms/op 1.01
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 44.678 ms/op 42.433 ms/op 1.05
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 36.473 ms/op 36.511 ms/op 1.00
getSlashingsAndExits - default max 64.346 us/op 71.069 us/op 0.91
getSlashingsAndExits - 2k 267.51 us/op 216.37 us/op 1.24
proposeBlockBody type=full, size=empty 4.5189 ms/op 4.8571 ms/op 0.93
isKnown best case - 1 super set check 449.00 ns/op 464.00 ns/op 0.97
isKnown normal case - 2 super set checks 438.00 ns/op 456.00 ns/op 0.96
isKnown worse case - 16 super set checks 435.00 ns/op 457.00 ns/op 0.95
InMemoryCheckpointStateCache - add get delete 2.5440 us/op 2.6540 us/op 0.96
updateUnfinalizedPubkeys - updating 10 pubkeys 737.07 us/op 671.34 us/op 1.10
updateUnfinalizedPubkeys - updating 100 pubkeys 2.7959 ms/op 2.8378 ms/op 0.99
updateUnfinalizedPubkeys - updating 1000 pubkeys 37.839 ms/op 41.781 ms/op 0.91
validate api signedAggregateAndProof - struct 1.4685 ms/op 1.9415 ms/op 0.76
validate gossip signedAggregateAndProof - struct 1.8449 ms/op 1.9275 ms/op 0.96
batch validate gossip attestation - vc 640000 - chunk 32 117.48 us/op 118.83 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 64 101.15 us/op 105.00 us/op 0.96
batch validate gossip attestation - vc 640000 - chunk 128 94.481 us/op 96.760 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 256 91.535 us/op 94.103 us/op 0.97
pickEth1Vote - no votes 845.25 us/op 897.98 us/op 0.94
pickEth1Vote - max votes 5.5168 ms/op 5.4872 ms/op 1.01
pickEth1Vote - Eth1Data hashTreeRoot value x2048 14.268 ms/op 13.959 ms/op 1.02
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.463 ms/op 19.537 ms/op 1.05
pickEth1Vote - Eth1Data fastSerialize value x2048 324.93 us/op 369.82 us/op 0.88
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.9692 ms/op 3.1327 ms/op 0.95
bytes32 toHexString 589.00 ns/op 596.00 ns/op 0.99
bytes32 Buffer.toString(hex) 423.00 ns/op 417.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 517.00 ns/op 521.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 424.00 ns/op 415.00 ns/op 1.02
Object access 1 prop 0.32400 ns/op 0.31600 ns/op 1.03
Map access 1 prop 0.31900 ns/op 0.31000 ns/op 1.03
Object get x1000 5.1750 ns/op 5.1900 ns/op 1.00
Map get x1000 5.5470 ns/op 5.7190 ns/op 0.97
Object set x1000 21.894 ns/op 24.969 ns/op 0.88
Map set x1000 18.262 ns/op 18.655 ns/op 0.98
Return object 10000 times 0.30370 ns/op 0.29570 ns/op 1.03
Throw Error 10000 times 2.6437 us/op 2.7222 us/op 0.97
toHex 111.56 ns/op 112.36 ns/op 0.99
Buffer.from 103.23 ns/op 104.28 ns/op 0.99
shared Buffer 71.225 ns/op 70.093 ns/op 1.02
fastMsgIdFn sha256 / 200 bytes 1.9830 us/op 1.9870 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 413.00 ns/op 392.00 ns/op 1.05
fastMsgIdFn h64 xxhash / 200 bytes 451.00 ns/op 431.00 ns/op 1.05
fastMsgIdFn sha256 / 1000 bytes 5.8150 us/op 5.9840 us/op 0.97
fastMsgIdFn h32 xxhash / 1000 bytes 555.00 ns/op 510.00 ns/op 1.09
fastMsgIdFn h64 xxhash / 1000 bytes 541.00 ns/op 496.00 ns/op 1.09
fastMsgIdFn sha256 / 10000 bytes 49.037 us/op 49.702 us/op 0.99
fastMsgIdFn h32 xxhash / 10000 bytes 1.9160 us/op 1.8870 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.3370 us/op 1.3210 us/op 1.01
send data - 1000 256B messages 9.4805 ms/op 9.9779 ms/op 0.95
send data - 1000 512B messages 13.202 ms/op 12.941 ms/op 1.02
send data - 1000 1024B messages 21.779 ms/op 22.195 ms/op 0.98
send data - 1000 1200B messages 22.980 ms/op 23.191 ms/op 0.99
send data - 1000 2048B messages 29.189 ms/op 29.239 ms/op 1.00
send data - 1000 4096B messages 25.804 ms/op 26.728 ms/op 0.97
send data - 1000 16384B messages 65.754 ms/op 63.943 ms/op 1.03
send data - 1000 65536B messages 238.60 ms/op 242.63 ms/op 0.98
enrSubnets - fastDeserialize 64 bits 1.0490 us/op 1.1160 us/op 0.94
enrSubnets - ssz BitVector 64 bits 499.00 ns/op 502.00 ns/op 0.99
enrSubnets - fastDeserialize 4 bits 319.00 ns/op 320.00 ns/op 1.00
enrSubnets - ssz BitVector 4 bits 526.00 ns/op 504.00 ns/op 1.04
prioritizePeers score -10:0 att 32-0.1 sync 2-0 122.20 us/op 128.36 us/op 0.95
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 133.47 us/op 163.57 us/op 0.82
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 254.18 us/op 235.03 us/op 1.08
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 490.94 us/op 419.09 us/op 1.17
prioritizePeers score 0:0 att 64-1 sync 4-1 624.31 us/op 632.54 us/op 0.99
array of 16000 items push then shift 1.2423 us/op 1.2914 us/op 0.96
LinkedList of 16000 items push then shift 7.3900 ns/op 6.3210 ns/op 1.17
array of 16000 items push then pop 84.444 ns/op 78.839 ns/op 1.07
LinkedList of 16000 items push then pop 6.1610 ns/op 6.2430 ns/op 0.99
array of 24000 items push then shift 1.8012 us/op 1.8947 us/op 0.95
LinkedList of 24000 items push then shift 6.7210 ns/op 6.4570 ns/op 1.04
array of 24000 items push then pop 105.05 ns/op 109.00 ns/op 0.96
LinkedList of 24000 items push then pop 5.9510 ns/op 6.4130 ns/op 0.93
intersect bitArray bitLen 8 5.1280 ns/op 5.5110 ns/op 0.93
intersect array and set length 8 36.205 ns/op 40.070 ns/op 0.90
intersect bitArray bitLen 128 25.382 ns/op 26.518 ns/op 0.96
intersect array and set length 128 542.09 ns/op 591.45 ns/op 0.92
bitArray.getTrueBitIndexes() bitLen 128 2.0780 us/op 2.2770 us/op 0.91
bitArray.getTrueBitIndexes() bitLen 248 3.3700 us/op 4.0680 us/op 0.83
bitArray.getTrueBitIndexes() bitLen 512 6.2060 us/op 6.6840 us/op 0.93
Buffer.concat 32 items 1.0130 us/op 998.00 ns/op 1.02
Uint8Array.set 32 items 1.6710 us/op 1.7230 us/op 0.97
Buffer.copy 1.7760 us/op 2.0950 us/op 0.85
Uint8Array.set - with subarray 2.2260 us/op 2.7110 us/op 0.82
Uint8Array.set - without subarray 1.7030 us/op 1.9500 us/op 0.87
getUint32 - dataview 404.00 ns/op 392.00 ns/op 1.03
getUint32 - manual 342.00 ns/op 336.00 ns/op 1.02
Set add up to 64 items then delete first 1.7954 us/op 1.8394 us/op 0.98
OrderedSet add up to 64 items then delete first 2.8140 us/op 2.8008 us/op 1.00
Set add up to 64 items then delete last 2.0551 us/op 2.0570 us/op 1.00
OrderedSet add up to 64 items then delete last 3.0852 us/op 3.0916 us/op 1.00
Set add up to 64 items then delete middle 2.0566 us/op 2.0469 us/op 1.00
OrderedSet add up to 64 items then delete middle 4.4896 us/op 4.4776 us/op 1.00
Set add up to 128 items then delete first 4.0439 us/op 4.0651 us/op 0.99
OrderedSet add up to 128 items then delete first 6.3065 us/op 6.3123 us/op 1.00
Set add up to 128 items then delete last 4.0344 us/op 3.9209 us/op 1.03
OrderedSet add up to 128 items then delete last 6.0513 us/op 5.9555 us/op 1.02
Set add up to 128 items then delete middle 3.8967 us/op 3.9158 us/op 1.00
OrderedSet add up to 128 items then delete middle 11.510 us/op 11.872 us/op 0.97
Set add up to 256 items then delete first 7.8628 us/op 7.9374 us/op 0.99
OrderedSet add up to 256 items then delete first 12.544 us/op 12.529 us/op 1.00
Set add up to 256 items then delete last 7.6218 us/op 7.7124 us/op 0.99
OrderedSet add up to 256 items then delete last 11.752 us/op 11.843 us/op 0.99
Set add up to 256 items then delete middle 7.5972 us/op 7.6752 us/op 0.99
OrderedSet add up to 256 items then delete middle 34.468 us/op 34.389 us/op 1.00
transfer serialized Status (84 B) 1.4420 us/op 1.4230 us/op 1.01
copy serialized Status (84 B) 1.2430 us/op 1.2080 us/op 1.03
transfer serialized SignedVoluntaryExit (112 B) 1.5980 us/op 1.6160 us/op 0.99
copy serialized SignedVoluntaryExit (112 B) 1.2960 us/op 1.3960 us/op 0.93
transfer serialized ProposerSlashing (416 B) 1.9340 us/op 2.5440 us/op 0.76
copy serialized ProposerSlashing (416 B) 2.1800 us/op 2.5270 us/op 0.86
transfer serialized Attestation (485 B) 2.2300 us/op 2.4570 us/op 0.91
copy serialized Attestation (485 B) 2.1670 us/op 1.9920 us/op 1.09
transfer serialized AttesterSlashing (33232 B) 2.3820 us/op 1.7470 us/op 1.36
copy serialized AttesterSlashing (33232 B) 5.0740 us/op 4.5030 us/op 1.13
transfer serialized Small SignedBeaconBlock (128000 B) 3.0650 us/op 2.4650 us/op 1.24
copy serialized Small SignedBeaconBlock (128000 B) 10.519 us/op 14.637 us/op 0.72
transfer serialized Avg SignedBeaconBlock (200000 B) 3.2680 us/op 2.2800 us/op 1.43
copy serialized Avg SignedBeaconBlock (200000 B) 13.932 us/op 12.804 us/op 1.09
transfer serialized BlobsSidecar (524380 B) 3.0960 us/op 2.2020 us/op 1.41
copy serialized BlobsSidecar (524380 B) 68.469 us/op 72.196 us/op 0.95
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1920 us/op 2.9230 us/op 1.09
copy serialized Big SignedBeaconBlock (1000000 B) 133.01 us/op 141.16 us/op 0.94
pass gossip attestations to forkchoice per slot 2.2809 ms/op 2.4131 ms/op 0.95
forkChoice updateHead vc 100000 bc 64 eq 0 327.81 us/op 413.81 us/op 0.79
forkChoice updateHead vc 600000 bc 64 eq 0 2.0444 ms/op 2.4721 ms/op 0.83
forkChoice updateHead vc 1000000 bc 64 eq 0 3.5548 ms/op 3.9789 ms/op 0.89
forkChoice updateHead vc 600000 bc 320 eq 0 2.0721 ms/op 2.3967 ms/op 0.86
forkChoice updateHead vc 600000 bc 1200 eq 0 2.1509 ms/op 2.4955 ms/op 0.86
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9038 ms/op 2.6407 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 1000 8.8009 ms/op 9.3567 ms/op 0.94
forkChoice updateHead vc 600000 bc 64 eq 10000 8.6875 ms/op 8.5536 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 300000 11.373 ms/op 11.244 ms/op 1.01
computeDeltas 500000 validators 300 proto nodes 5.0899 ms/op 3.1677 ms/op 1.61
computeDeltas 500000 validators 1200 proto nodes 5.0375 ms/op 3.1904 ms/op 1.58
computeDeltas 500000 validators 7200 proto nodes 5.2159 ms/op 3.2121 ms/op 1.62
computeDeltas 750000 validators 300 proto nodes 8.2818 ms/op 4.8394 ms/op 1.71
computeDeltas 750000 validators 1200 proto nodes 8.0097 ms/op 4.7684 ms/op 1.68
computeDeltas 750000 validators 7200 proto nodes 8.4257 ms/op 4.8081 ms/op 1.75
computeDeltas 1400000 validators 300 proto nodes 14.232 ms/op 8.9304 ms/op 1.59
computeDeltas 1400000 validators 1200 proto nodes 14.205 ms/op 8.8296 ms/op 1.61
computeDeltas 1400000 validators 7200 proto nodes 14.594 ms/op 8.8853 ms/op 1.64
computeDeltas 2100000 validators 300 proto nodes 19.724 ms/op 13.376 ms/op 1.47
computeDeltas 2100000 validators 1200 proto nodes 20.934 ms/op 13.754 ms/op 1.52
computeDeltas 2100000 validators 7200 proto nodes 20.218 ms/op 13.486 ms/op 1.50
altair processAttestation - 250000 vs - 7PWei normalcase 1.3889 ms/op 1.4000 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei worstcase 2.1082 ms/op 2.1208 ms/op 0.99
altair processAttestation - setStatus - 1/6 committees join 69.616 us/op 65.442 us/op 1.06
altair processAttestation - setStatus - 1/3 committees join 143.26 us/op 124.12 us/op 1.15
altair processAttestation - setStatus - 1/2 committees join 204.04 us/op 187.76 us/op 1.09
altair processAttestation - setStatus - 2/3 committees join 263.79 us/op 259.04 us/op 1.02
altair processAttestation - setStatus - 4/5 committees join 363.42 us/op 374.88 us/op 0.97
altair processAttestation - setStatus - 100% committees join 451.44 us/op 447.16 us/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase 5.2065 ms/op 4.5155 ms/op 1.15
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.012 ms/op 24.202 ms/op 1.24
altair processBlock - 250000 vs - 7PWei worstcase 38.290 ms/op 35.969 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase hashState 85.356 ms/op 71.303 ms/op 1.20
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6642 ms/op 1.7882 ms/op 0.93
phase0 processBlock - 250000 vs - 7PWei worstcase 22.833 ms/op 22.245 ms/op 1.03
altair processEth1Data - 250000 vs - 7PWei normalcase 247.11 us/op 255.19 us/op 0.97
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.4920 us/op 2.8770 us/op 1.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 26.986 us/op 34.094 us/op 0.79
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 8.0880 us/op 8.5090 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 4.8540 us/op 7.4350 us/op 0.65
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 115.66 us/op 121.00 us/op 0.96
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 806.15 us/op 782.92 us/op 1.03
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.0987 ms/op 1.1485 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.1818 ms/op 1.1325 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.7192 ms/op 2.9111 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.1457 ms/op 1.0950 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 2.8927 ms/op 2.7518 ms/op 1.05
Tree 40 250000 create 181.25 ms/op 193.12 ms/op 0.94
Tree 40 250000 get(125000) 115.30 ns/op 106.02 ns/op 1.09
Tree 40 250000 set(125000) 526.54 ns/op 512.41 ns/op 1.03
Tree 40 250000 toArray() 9.4448 ms/op 12.326 ms/op 0.77
Tree 40 250000 iterate all - toArray() + loop 9.5728 ms/op 12.212 ms/op 0.78
Tree 40 250000 iterate all - get(i) 39.239 ms/op 39.589 ms/op 0.99
Array 250000 create 2.3430 ms/op 2.3432 ms/op 1.00
Array 250000 clone - spread 1.2751 ms/op 1.1788 ms/op 1.08
Array 250000 get(125000) 0.58200 ns/op 0.57100 ns/op 1.02
Array 250000 set(125000) 0.58300 ns/op 0.56700 ns/op 1.03
Array 250000 iterate all - loop 76.782 us/op 73.694 us/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.401 ms/op 41.668 ms/op 1.02
Array.fill - length 1000000 2.5732 ms/op 2.4310 ms/op 1.06
Array push - length 1000000 13.920 ms/op 13.833 ms/op 1.01
Array.get 0.24769 ns/op 0.26495 ns/op 0.93
Uint8Array.get 0.32243 ns/op 0.34188 ns/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 15.770 ms/op 12.722 ms/op 1.24
altair processEpoch - mainnet_e81889 295.66 ms/op 250.36 ms/op 1.18
mainnet_e81889 - altair beforeProcessEpoch 15.595 ms/op 18.590 ms/op 0.84
mainnet_e81889 - altair processJustificationAndFinalization 5.5360 us/op 10.911 us/op 0.51
mainnet_e81889 - altair processInactivityUpdates 4.0124 ms/op 4.2832 ms/op 0.94
mainnet_e81889 - altair processRewardsAndPenalties 47.238 ms/op 49.946 ms/op 0.95
mainnet_e81889 - altair processRegistryUpdates 1.5920 us/op 2.0480 us/op 0.78
mainnet_e81889 - altair processSlashings 698.00 ns/op 777.00 ns/op 0.90
mainnet_e81889 - altair processEth1DataReset 660.00 ns/op 683.00 ns/op 0.97
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0507 ms/op 965.01 us/op 1.09
mainnet_e81889 - altair processSlashingsReset 1.3660 us/op 1.5170 us/op 0.90
mainnet_e81889 - altair processRandaoMixesReset 1.6060 us/op 3.2270 us/op 0.50
mainnet_e81889 - altair processHistoricalRootsUpdate 666.00 ns/op 707.00 ns/op 0.94
mainnet_e81889 - altair processParticipationFlagUpdates 1.2910 us/op 3.2010 us/op 0.40
mainnet_e81889 - altair processSyncCommitteeUpdates 586.00 ns/op 775.00 ns/op 0.76
mainnet_e81889 - altair afterProcessEpoch 42.713 ms/op 40.709 ms/op 1.05
capella processEpoch - mainnet_e217614 1.0345 s/op 1.0117 s/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 62.825 ms/op 64.863 ms/op 0.97
mainnet_e217614 - capella processJustificationAndFinalization 9.6780 us/op 13.019 us/op 0.74
mainnet_e217614 - capella processInactivityUpdates 12.313 ms/op 14.913 ms/op 0.83
mainnet_e217614 - capella processRewardsAndPenalties 233.86 ms/op 258.02 ms/op 0.91
mainnet_e217614 - capella processRegistryUpdates 11.761 us/op 12.298 us/op 0.96
mainnet_e217614 - capella processSlashings 859.00 ns/op 752.00 ns/op 1.14
mainnet_e217614 - capella processEth1DataReset 695.00 ns/op 715.00 ns/op 0.97
mainnet_e217614 - capella processEffectiveBalanceUpdates 7.0820 ms/op 5.8999 ms/op 1.20
mainnet_e217614 - capella processSlashingsReset 1.3620 us/op 2.0570 us/op 0.66
mainnet_e217614 - capella processRandaoMixesReset 2.9960 us/op 3.3180 us/op 0.90
mainnet_e217614 - capella processHistoricalRootsUpdate 723.00 ns/op 702.00 ns/op 1.03
mainnet_e217614 - capella processParticipationFlagUpdates 1.4870 us/op 1.7520 us/op 0.85
mainnet_e217614 - capella afterProcessEpoch 104.36 ms/op 101.24 ms/op 1.03
phase0 processEpoch - mainnet_e58758 315.85 ms/op 295.35 ms/op 1.07
mainnet_e58758 - phase0 beforeProcessEpoch 80.073 ms/op 79.572 ms/op 1.01
mainnet_e58758 - phase0 processJustificationAndFinalization 10.200 us/op 11.225 us/op 0.91
mainnet_e58758 - phase0 processRewardsAndPenalties 27.031 ms/op 26.864 ms/op 1.01
mainnet_e58758 - phase0 processRegistryUpdates 5.5630 us/op 3.6130 us/op 1.54
mainnet_e58758 - phase0 processSlashings 698.00 ns/op 722.00 ns/op 0.97
mainnet_e58758 - phase0 processEth1DataReset 670.00 ns/op 727.00 ns/op 0.92
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.9691 ms/op 1.9703 ms/op 1.00
mainnet_e58758 - phase0 processSlashingsReset 2.1200 us/op 2.9830 us/op 0.71
mainnet_e58758 - phase0 processRandaoMixesReset 3.0720 us/op 2.9400 us/op 1.04
mainnet_e58758 - phase0 processHistoricalRootsUpdate 708.00 ns/op 701.00 ns/op 1.01
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.9960 us/op 2.6000 us/op 1.15
mainnet_e58758 - phase0 afterProcessEpoch 35.689 ms/op 35.903 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0248 ms/op 1.0369 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7024 ms/op 1.7230 ms/op 0.99
altair processInactivityUpdates - 250000 normalcase 16.713 ms/op 15.267 ms/op 1.09
altair processInactivityUpdates - 250000 worstcase 15.825 ms/op 17.056 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 3.3530 us/op 3.2820 us/op 1.02
phase0 processRegistryUpdates - 250000 badcase_full_deposits 306.93 us/op 297.02 us/op 1.03
phase0 processRegistryUpdates - 250000 worstcase 0.5 103.08 ms/op 108.53 ms/op 0.95
altair processRewardsAndPenalties - 250000 normalcase 47.212 ms/op 31.691 ms/op 1.49
altair processRewardsAndPenalties - 250000 worstcase 43.880 ms/op 39.978 ms/op 1.10
phase0 getAttestationDeltas - 250000 normalcase 6.1883 ms/op 6.2172 ms/op 1.00
phase0 getAttestationDeltas - 250000 worstcase 5.6817 ms/op 5.8980 ms/op 0.96
phase0 processSlashings - 250000 worstcase 81.996 us/op 81.700 us/op 1.00
altair processSyncCommitteeUpdates - 250000 98.042 ms/op 97.478 ms/op 1.01
BeaconState.hashTreeRoot - No change 434.00 ns/op 430.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 139.98 us/op 127.77 us/op 1.10
BeaconState.hashTreeRoot - 32 full validator 1.4623 ms/op 1.1153 ms/op 1.31
BeaconState.hashTreeRoot - 512 full validator 11.382 ms/op 10.137 ms/op 1.12
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 127.80 us/op 155.14 us/op 0.82
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8435 ms/op 1.9751 ms/op 0.93
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 21.981 ms/op 23.000 ms/op 0.96
BeaconState.hashTreeRoot - 1 balances 121.28 us/op 108.66 us/op 1.12
BeaconState.hashTreeRoot - 32 balances 952.38 us/op 943.98 us/op 1.01
BeaconState.hashTreeRoot - 512 balances 7.3574 ms/op 7.3682 ms/op 1.00
BeaconState.hashTreeRoot - 250000 balances 159.93 ms/op 185.91 ms/op 0.86
aggregationBits - 2048 els - zipIndexesInBitList 19.059 us/op 19.124 us/op 1.00
byteArrayEquals 32 47.657 ns/op 47.882 ns/op 1.00
Buffer.compare 32 15.546 ns/op 15.530 ns/op 1.00
byteArrayEquals 1024 1.2737 us/op 1.2700 us/op 1.00
Buffer.compare 1024 23.560 ns/op 24.139 ns/op 0.98
byteArrayEquals 16384 20.127 us/op 20.157 us/op 1.00
Buffer.compare 16384 177.00 ns/op 173.16 ns/op 1.02
byteArrayEquals 123687377 151.09 ms/op 151.83 ms/op 1.00
Buffer.compare 123687377 3.6998 ms/op 3.6907 ms/op 1.00
byteArrayEquals 32 - diff last byte 46.832 ns/op 47.473 ns/op 0.99
Buffer.compare 32 - diff last byte 15.968 ns/op 15.900 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.2555 us/op 1.2604 us/op 1.00
Buffer.compare 1024 - diff last byte 23.431 ns/op 24.398 ns/op 0.96
byteArrayEquals 16384 - diff last byte 19.887 us/op 20.010 us/op 0.99
Buffer.compare 16384 - diff last byte 200.63 ns/op 202.72 ns/op 0.99
byteArrayEquals 123687377 - diff last byte 150.03 ms/op 151.72 ms/op 0.99
Buffer.compare 123687377 - diff last byte 3.7949 ms/op 3.9692 ms/op 0.96
byteArrayEquals 32 - random bytes 4.8500 ns/op 4.9650 ns/op 0.98
Buffer.compare 32 - random bytes 16.633 ns/op 16.112 ns/op 1.03
byteArrayEquals 1024 - random bytes 4.8230 ns/op 4.8980 ns/op 0.98
Buffer.compare 1024 - random bytes 16.114 ns/op 15.993 ns/op 1.01
byteArrayEquals 16384 - random bytes 4.8350 ns/op 4.9160 ns/op 0.98
Buffer.compare 16384 - random bytes 16.079 ns/op 16.029 ns/op 1.00
byteArrayEquals 123687377 - random bytes 7.6500 ns/op 7.8400 ns/op 0.98
Buffer.compare 123687377 - random bytes 20.310 ns/op 19.510 ns/op 1.04
regular array get 100000 times 30.530 us/op 31.174 us/op 0.98
wrappedArray get 100000 times 30.511 us/op 31.155 us/op 0.98
arrayWithProxy get 100000 times 10.984 ms/op 11.095 ms/op 0.99
ssz.Root.equals 43.677 ns/op 48.185 ns/op 0.91
byteArrayEquals 42.067 ns/op 39.369 ns/op 1.07
Buffer.compare 9.8110 ns/op 9.3560 ns/op 1.05
processSlot - 1 slots 13.871 us/op 12.915 us/op 1.07
processSlot - 32 slots 2.7860 ms/op 1.7861 ms/op 1.56
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 43.999 ms/op 37.476 ms/op 1.17
getCommitteeAssignments - req 1 vs - 250000 vc 1.6384 ms/op 1.7676 ms/op 0.93
getCommitteeAssignments - req 100 vs - 250000 vc 3.2180 ms/op 3.5007 ms/op 0.92
getCommitteeAssignments - req 1000 vs - 250000 vc 3.4333 ms/op 3.7226 ms/op 0.92
findModifiedValidators - 10000 modified validators 221.30 ms/op 237.91 ms/op 0.93
findModifiedValidators - 1000 modified validators 138.63 ms/op 157.89 ms/op 0.88
findModifiedValidators - 100 modified validators 132.67 ms/op 140.78 ms/op 0.94
findModifiedValidators - 10 modified validators 142.29 ms/op 141.70 ms/op 1.00
findModifiedValidators - 1 modified validators 121.44 ms/op 142.92 ms/op 0.85
findModifiedValidators - no difference 127.44 ms/op 132.64 ms/op 0.96
compare ViewDUs 3.4149 s/op 3.0401 s/op 1.12
compare each validator Uint8Array 1.8690 s/op 1.7336 s/op 1.08
compare ViewDU to Uint8Array 681.09 ms/op 702.13 ms/op 0.97
migrate state 1000000 validators, 24 modified, 0 new 694.31 ms/op 706.10 ms/op 0.98
migrate state 1000000 validators, 1700 modified, 1000 new 932.40 ms/op 965.47 ms/op 0.97
migrate state 1000000 validators, 3400 modified, 2000 new 1.1292 s/op 1.1850 s/op 0.95
migrate state 1500000 validators, 24 modified, 0 new 710.79 ms/op 746.29 ms/op 0.95
migrate state 1500000 validators, 1700 modified, 1000 new 932.59 ms/op 962.47 ms/op 0.97
migrate state 1500000 validators, 3400 modified, 2000 new 1.0804 s/op 1.1736 s/op 0.92
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.2300 ns/op 5.8100 ns/op 1.07
state getBlockRootAtSlot - 250000 vs - 7PWei 678.36 ns/op 1.0510 us/op 0.65
computeProposers - vc 250000 6.4476 ms/op 6.6653 ms/op 0.97
computeEpochShuffling - vc 250000 34.952 ms/op 35.751 ms/op 0.98
getNextSyncCommittee - vc 250000 109.86 ms/op 116.53 ms/op 0.94
computeSigningRoot for AttestationData 20.679 us/op 30.032 us/op 0.69
hash AttestationData serialized data then Buffer.toString(base64) 1.1722 us/op 1.2067 us/op 0.97
toHexString serialized data 768.60 ns/op 793.75 ns/op 0.97
Buffer.toString(base64) 140.87 ns/op 145.47 ns/op 0.97
nodejs block root to RootHex using toHex 118.95 ns/op 120.73 ns/op 0.99
nodejs block root to RootHex using toRootHex 78.750 ns/op 80.469 ns/op 0.98
browser block root to RootHex using the deprecated toHexString 204.80 ns/op 205.33 ns/op 1.00
browser block root to RootHex using toHex 166.77 ns/op 167.44 ns/op 1.00
browser block root to RootHex using toRootHex 146.31 ns/op 145.14 ns/op 1.01

by benchmarkbot/action

@nflaig nflaig marked this pull request as ready for review October 21, 2024 08:00
@nflaig nflaig requested a review from a team as a code owner October 21, 2024 08:00
@wemeetagain wemeetagain merged commit 0e4ea98 into unstable Oct 21, 2024
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/builder-ssz-support branch October 21, 2024 13:51
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