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: handle 0x prefix from execution client commit #7273

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

Conversation

ensi321
Copy link
Contributor

@ensi321 ensi321 commented Dec 3, 2024

Lodestar currently sets default graffiti containing execution client commit with 0x prefix eg. GE0x2bLSae1f.

We should not include the prefix in the graffiti.

@ensi321 ensi321 requested a review from a team as a code owner December 3, 2024 01:27
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.50%. Comparing base (64eb015) to head (8e1cca8).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7273      +/-   ##
============================================
- Coverage     48.51%   48.50%   -0.01%     
============================================
  Files           600      600              
  Lines         40138    40138              
  Branches       2058     2057       -1     
============================================
- Hits          19471    19470       -1     
- Misses        20629    20630       +1     
  Partials         38       38              

Copy link
Contributor

github-actions bot commented Dec 3, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 4967dbf Previous: 64eb015 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.0545 ms/op 2.1753 ms/op 0.94
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 48.006 us/op 67.606 us/op 0.71
BLS verify - blst 1.3312 ms/op 916.60 us/op 1.45
BLS verifyMultipleSignatures 3 - blst 2.2362 ms/op 1.3247 ms/op 1.69
BLS verifyMultipleSignatures 8 - blst 1.8345 ms/op 1.9759 ms/op 0.93
BLS verifyMultipleSignatures 32 - blst 7.1445 ms/op 7.0878 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 11.155 ms/op 10.320 ms/op 1.08
BLS verifyMultipleSignatures 128 - blst 17.777 ms/op 20.134 ms/op 0.88
BLS deserializing 10000 signatures 681.19 ms/op 769.00 ms/op 0.89
BLS deserializing 100000 signatures 6.7366 s/op 7.4681 s/op 0.90
BLS verifyMultipleSignatures - same message - 3 - blst 1.2673 ms/op 960.70 us/op 1.32
BLS verifyMultipleSignatures - same message - 8 - blst 1.0864 ms/op 1.0181 ms/op 1.07
BLS verifyMultipleSignatures - same message - 32 - blst 1.7089 ms/op 1.7953 ms/op 0.95
BLS verifyMultipleSignatures - same message - 64 - blst 2.5976 ms/op 2.6869 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 4.4361 ms/op 4.5014 ms/op 0.99
BLS aggregatePubkeys 32 - blst 20.220 us/op 20.827 us/op 0.97
BLS aggregatePubkeys 128 - blst 70.991 us/op 73.689 us/op 0.96
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 84.731 ms/op 62.278 ms/op 1.36
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 57.874 ms/op 58.530 ms/op 0.99
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 50.050 ms/op 44.326 ms/op 1.13
getSlashingsAndExits - default max 88.877 us/op 116.01 us/op 0.77
getSlashingsAndExits - 2k 276.19 us/op 359.07 us/op 0.77
proposeBlockBody type=full, size=empty 5.7018 ms/op 7.7504 ms/op 0.74
isKnown best case - 1 super set check 298.00 ns/op 526.00 ns/op 0.57
isKnown normal case - 2 super set checks 287.00 ns/op 569.00 ns/op 0.50
isKnown worse case - 16 super set checks 282.00 ns/op 530.00 ns/op 0.53
InMemoryCheckpointStateCache - add get delete 2.6170 us/op 3.5200 us/op 0.74
validate api signedAggregateAndProof - struct 2.3258 ms/op 1.6175 ms/op 1.44
validate gossip signedAggregateAndProof - struct 2.5956 ms/op 1.7813 ms/op 1.46
batch validate gossip attestation - vc 640000 - chunk 32 136.71 us/op 151.31 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 64 120.33 us/op 140.22 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 128 114.74 us/op 140.54 us/op 0.82
batch validate gossip attestation - vc 640000 - chunk 256 109.27 us/op 147.98 us/op 0.74
pickEth1Vote - no votes 1.2132 ms/op 1.5844 ms/op 0.77
pickEth1Vote - max votes 6.0618 ms/op 11.358 ms/op 0.53
pickEth1Vote - Eth1Data hashTreeRoot value x2048 12.061 ms/op 21.088 ms/op 0.57
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 18.673 ms/op 33.431 ms/op 0.56
pickEth1Vote - Eth1Data fastSerialize value x2048 491.18 us/op 649.48 us/op 0.76
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.5350 ms/op 4.4810 ms/op 0.57
bytes32 toHexString 445.00 ns/op 854.00 ns/op 0.52
bytes32 Buffer.toString(hex) 264.00 ns/op 315.00 ns/op 0.84
bytes32 Buffer.toString(hex) from Uint8Array 399.00 ns/op 524.00 ns/op 0.76
bytes32 Buffer.toString(hex) + 0x 275.00 ns/op 293.00 ns/op 0.94
Object access 1 prop 0.14800 ns/op 0.20700 ns/op 0.71
Map access 1 prop 0.13900 ns/op 0.16100 ns/op 0.86
Object get x1000 6.4290 ns/op 6.7870 ns/op 0.95
Map get x1000 6.6150 ns/op 7.1870 ns/op 0.92
Object set x1000 34.639 ns/op 63.311 ns/op 0.55
Map set x1000 23.943 ns/op 41.228 ns/op 0.58
Return object 10000 times 0.30630 ns/op 0.33950 ns/op 0.90
Throw Error 10000 times 3.4523 us/op 3.9370 us/op 0.88
toHex 156.95 ns/op 202.49 ns/op 0.78
Buffer.from 149.64 ns/op 192.31 ns/op 0.78
shared Buffer 87.433 ns/op 109.24 ns/op 0.80
fastMsgIdFn sha256 / 200 bytes 2.3230 us/op 2.6760 us/op 0.87
fastMsgIdFn h32 xxhash / 200 bytes 260.00 ns/op 343.00 ns/op 0.76
fastMsgIdFn h64 xxhash / 200 bytes 272.00 ns/op 308.00 ns/op 0.88
fastMsgIdFn sha256 / 1000 bytes 7.4160 us/op 8.5350 us/op 0.87
fastMsgIdFn h32 xxhash / 1000 bytes 384.00 ns/op 523.00 ns/op 0.73
fastMsgIdFn h64 xxhash / 1000 bytes 347.00 ns/op 404.00 ns/op 0.86
fastMsgIdFn sha256 / 10000 bytes 65.826 us/op 70.815 us/op 0.93
fastMsgIdFn h32 xxhash / 10000 bytes 1.8780 us/op 2.1020 us/op 0.89
fastMsgIdFn h64 xxhash / 10000 bytes 1.2170 us/op 1.3850 us/op 0.88
send data - 1000 256B messages 13.545 ms/op 17.917 ms/op 0.76
send data - 1000 512B messages 17.461 ms/op 24.837 ms/op 0.70
send data - 1000 1024B messages 27.133 ms/op 33.736 ms/op 0.80
send data - 1000 1200B messages 24.796 ms/op 37.078 ms/op 0.67
send data - 1000 2048B messages 33.794 ms/op 46.960 ms/op 0.72
send data - 1000 4096B messages 31.310 ms/op 51.288 ms/op 0.61
send data - 1000 16384B messages 76.785 ms/op 99.623 ms/op 0.77
send data - 1000 65536B messages 261.07 ms/op 290.72 ms/op 0.90
enrSubnets - fastDeserialize 64 bits 1.8140 us/op 1.7720 us/op 1.02
enrSubnets - ssz BitVector 64 bits 502.00 ns/op 572.00 ns/op 0.88
enrSubnets - fastDeserialize 4 bits 235.00 ns/op 254.00 ns/op 0.93
enrSubnets - ssz BitVector 4 bits 443.00 ns/op 527.00 ns/op 0.84
prioritizePeers score -10:0 att 32-0.1 sync 2-0 205.01 us/op 280.98 us/op 0.73
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 200.13 us/op 314.94 us/op 0.64
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 366.32 us/op 602.91 us/op 0.61
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 561.92 us/op 615.13 us/op 0.91
prioritizePeers score 0:0 att 64-1 sync 4-1 1.0790 ms/op 1.2699 ms/op 0.85
array of 16000 items push then shift 1.8283 us/op 1.9536 us/op 0.94
LinkedList of 16000 items push then shift 10.308 ns/op 15.730 ns/op 0.66
array of 16000 items push then pop 191.42 ns/op 229.66 ns/op 0.83
LinkedList of 16000 items push then pop 10.180 ns/op 12.659 ns/op 0.80
array of 24000 items push then shift 2.6317 us/op 3.0235 us/op 0.87
LinkedList of 24000 items push then shift 11.069 ns/op 11.867 ns/op 0.93
array of 24000 items push then pop 190.87 ns/op 236.21 ns/op 0.81
LinkedList of 24000 items push then pop 8.9580 ns/op 9.1910 ns/op 0.97
intersect bitArray bitLen 8 7.1120 ns/op 7.4420 ns/op 0.96
intersect array and set length 8 105.53 ns/op 82.874 ns/op 1.27
intersect bitArray bitLen 128 31.686 ns/op 33.126 ns/op 0.96
intersect array and set length 128 1.0432 us/op 1.0180 us/op 1.02
bitArray.getTrueBitIndexes() bitLen 128 2.6800 us/op 2.7610 us/op 0.97
bitArray.getTrueBitIndexes() bitLen 248 4.5190 us/op 5.2900 us/op 0.85
bitArray.getTrueBitIndexes() bitLen 512 10.652 us/op 10.653 us/op 1.00
Buffer.concat 32 items 1.1150 us/op 1.2840 us/op 0.87
Uint8Array.set 32 items 2.1220 us/op 2.1500 us/op 0.99
Buffer.copy 2.5160 us/op 2.5980 us/op 0.97
Uint8Array.set - with subarray 4.9360 us/op 3.7780 us/op 1.31
Uint8Array.set - without subarray 2.6670 us/op 1.9950 us/op 1.34
getUint32 - dataview 385.00 ns/op 389.00 ns/op 0.99
getUint32 - manual 308.00 ns/op 352.00 ns/op 0.88
Set add up to 64 items then delete first 3.3264 us/op 3.3592 us/op 0.99
OrderedSet add up to 64 items then delete first 5.1497 us/op 5.4020 us/op 0.95
Set add up to 64 items then delete last 3.8257 us/op 3.8164 us/op 1.00
OrderedSet add up to 64 items then delete last 5.9603 us/op 5.9708 us/op 1.00
Set add up to 64 items then delete middle 4.2156 us/op 3.9159 us/op 1.08
OrderedSet add up to 64 items then delete middle 8.1772 us/op 8.3545 us/op 0.98
Set add up to 128 items then delete first 8.1777 us/op 8.6570 us/op 0.94
OrderedSet add up to 128 items then delete first 12.630 us/op 12.367 us/op 1.02
Set add up to 128 items then delete last 8.2513 us/op 8.2078 us/op 1.01
OrderedSet add up to 128 items then delete last 12.109 us/op 12.338 us/op 0.98
Set add up to 128 items then delete middle 7.5482 us/op 7.4449 us/op 1.01
OrderedSet add up to 128 items then delete middle 18.551 us/op 19.338 us/op 0.96
Set add up to 256 items then delete first 15.861 us/op 18.078 us/op 0.88
OrderedSet add up to 256 items then delete first 25.352 us/op 26.396 us/op 0.96
Set add up to 256 items then delete last 16.023 us/op 17.380 us/op 0.92
OrderedSet add up to 256 items then delete last 24.990 us/op 25.308 us/op 0.99
Set add up to 256 items then delete middle 16.683 us/op 15.623 us/op 1.07
OrderedSet add up to 256 items then delete middle 56.685 us/op 53.283 us/op 1.06
transfer serialized Status (84 B) 1.8580 us/op 1.7800 us/op 1.04
copy serialized Status (84 B) 1.6650 us/op 1.5220 us/op 1.09
transfer serialized SignedVoluntaryExit (112 B) 1.8840 us/op 1.7780 us/op 1.06
copy serialized SignedVoluntaryExit (112 B) 1.6100 us/op 1.4860 us/op 1.08
transfer serialized ProposerSlashing (416 B) 2.4060 us/op 2.1510 us/op 1.12
copy serialized ProposerSlashing (416 B) 3.0750 us/op 2.4080 us/op 1.28
transfer serialized Attestation (485 B) 2.7950 us/op 2.3790 us/op 1.17
copy serialized Attestation (485 B) 2.7830 us/op 2.4510 us/op 1.14
transfer serialized AttesterSlashing (33232 B) 3.4970 us/op 2.8990 us/op 1.21
copy serialized AttesterSlashing (33232 B) 13.613 us/op 10.591 us/op 1.29
transfer serialized Small SignedBeaconBlock (128000 B) 4.1210 us/op 3.9120 us/op 1.05
copy serialized Small SignedBeaconBlock (128000 B) 38.363 us/op 33.139 us/op 1.16
transfer serialized Avg SignedBeaconBlock (200000 B) 4.3520 us/op 4.4310 us/op 0.98
copy serialized Avg SignedBeaconBlock (200000 B) 56.563 us/op 53.401 us/op 1.06
transfer serialized BlobsSidecar (524380 B) 6.2580 us/op 6.5750 us/op 0.95
copy serialized BlobsSidecar (524380 B) 102.33 us/op 165.04 us/op 0.62
transfer serialized Big SignedBeaconBlock (1000000 B) 4.2170 us/op 5.8650 us/op 0.72
copy serialized Big SignedBeaconBlock (1000000 B) 221.51 us/op 551.22 us/op 0.40
pass gossip attestations to forkchoice per slot 3.0607 ms/op 3.3650 ms/op 0.91
forkChoice updateHead vc 100000 bc 64 eq 0 565.57 us/op 1.2806 ms/op 0.44
forkChoice updateHead vc 600000 bc 64 eq 0 3.2285 ms/op 5.2573 ms/op 0.61
forkChoice updateHead vc 1000000 bc 64 eq 0 5.2629 ms/op 6.8726 ms/op 0.77
forkChoice updateHead vc 600000 bc 320 eq 0 3.2124 ms/op 4.0167 ms/op 0.80
forkChoice updateHead vc 600000 bc 1200 eq 0 3.6269 ms/op 4.4697 ms/op 0.81
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5547 ms/op 5.0860 ms/op 0.70
forkChoice updateHead vc 600000 bc 64 eq 1000 11.112 ms/op 12.335 ms/op 0.90
forkChoice updateHead vc 600000 bc 64 eq 10000 11.071 ms/op 12.083 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 14.046 ms/op 37.084 ms/op 0.38
computeDeltas 500000 validators 300 proto nodes 4.1424 ms/op 5.2711 ms/op 0.79
computeDeltas 500000 validators 1200 proto nodes 4.1083 ms/op 6.5298 ms/op 0.63
computeDeltas 500000 validators 7200 proto nodes 4.0970 ms/op 6.2988 ms/op 0.65
computeDeltas 750000 validators 300 proto nodes 6.1761 ms/op 8.4042 ms/op 0.73
computeDeltas 750000 validators 1200 proto nodes 6.1445 ms/op 8.5595 ms/op 0.72
computeDeltas 750000 validators 7200 proto nodes 6.1377 ms/op 9.1306 ms/op 0.67
computeDeltas 1400000 validators 300 proto nodes 11.893 ms/op 15.576 ms/op 0.76
computeDeltas 1400000 validators 1200 proto nodes 11.786 ms/op 12.601 ms/op 0.94
computeDeltas 1400000 validators 7200 proto nodes 11.856 ms/op 12.897 ms/op 0.92
computeDeltas 2100000 validators 300 proto nodes 17.724 ms/op 18.782 ms/op 0.94
computeDeltas 2100000 validators 1200 proto nodes 17.525 ms/op 19.930 ms/op 0.88
computeDeltas 2100000 validators 7200 proto nodes 17.426 ms/op 19.735 ms/op 0.88
altair processAttestation - 250000 vs - 7PWei normalcase 1.8043 ms/op 2.6254 ms/op 0.69
altair processAttestation - 250000 vs - 7PWei worstcase 2.6425 ms/op 3.1422 ms/op 0.84
altair processAttestation - setStatus - 1/6 committees join 89.884 us/op 113.03 us/op 0.80
altair processAttestation - setStatus - 1/3 committees join 179.62 us/op 215.61 us/op 0.83
altair processAttestation - setStatus - 1/2 committees join 252.06 us/op 280.51 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 329.49 us/op 396.02 us/op 0.83
altair processAttestation - setStatus - 4/5 committees join 458.71 us/op 578.24 us/op 0.79
altair processAttestation - setStatus - 100% committees join 571.67 us/op 675.72 us/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase 5.4197 ms/op 4.9905 ms/op 1.09
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.444 ms/op 28.637 ms/op 1.10
altair processBlock - 250000 vs - 7PWei worstcase 40.189 ms/op 50.108 ms/op 0.80
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.470 ms/op 87.661 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4510 ms/op 2.7546 ms/op 0.89
phase0 processBlock - 250000 vs - 7PWei worstcase 24.809 ms/op 26.771 ms/op 0.93
altair processEth1Data - 250000 vs - 7PWei normalcase 372.35 us/op 401.89 us/op 0.93
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.4820 us/op 7.1300 us/op 0.77
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 37.618 us/op 47.788 us/op 0.79
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 10.335 us/op 12.593 us/op 0.82
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 6.1860 us/op 7.4700 us/op 0.83
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 160.43 us/op 144.32 us/op 1.11
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3221 ms/op 1.2633 ms/op 1.05
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8573 ms/op 1.6843 ms/op 1.10
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5017 ms/op 1.6899 ms/op 0.89
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.5091 ms/op 4.8858 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.8737 ms/op 1.7893 ms/op 1.61
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.6490 ms/op 5.8669 ms/op 0.62
Tree 40 250000 create 229.83 ms/op 467.44 ms/op 0.49
Tree 40 250000 get(125000) 149.22 ns/op 170.00 ns/op 0.88
Tree 40 250000 set(125000) 755.28 ns/op 838.71 ns/op 0.90
Tree 40 250000 toArray() 16.708 ms/op 22.991 ms/op 0.73
Tree 40 250000 iterate all - toArray() + loop 15.935 ms/op 22.693 ms/op 0.70
Tree 40 250000 iterate all - get(i) 51.897 ms/op 62.529 ms/op 0.83
Array 250000 create 2.9383 ms/op 4.1336 ms/op 0.71
Array 250000 clone - spread 1.3927 ms/op 1.7261 ms/op 0.81
Array 250000 get(125000) 0.42500 ns/op 0.50300 ns/op 0.84
Array 250000 set(125000) 0.44600 ns/op 0.51400 ns/op 0.87
Array 250000 iterate all - loop 111.08 us/op 102.71 us/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 51.624 ms/op 59.003 ms/op 0.87
Array.fill - length 1000000 3.4796 ms/op 6.2827 ms/op 0.55
Array push - length 1000000 18.279 ms/op 40.846 ms/op 0.45
Array.get 0.28482 ns/op 0.32523 ns/op 0.88
Uint8Array.get 0.45522 ns/op 0.47666 ns/op 0.96
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.502 ms/op 25.226 ms/op 0.73
altair processEpoch - mainnet_e81889 290.40 ms/op 359.56 ms/op 0.81
mainnet_e81889 - altair beforeProcessEpoch 19.512 ms/op 23.130 ms/op 0.84
mainnet_e81889 - altair processJustificationAndFinalization 19.880 us/op 18.893 us/op 1.05
mainnet_e81889 - altair processInactivityUpdates 5.5485 ms/op 7.1031 ms/op 0.78
mainnet_e81889 - altair processRewardsAndPenalties 59.589 ms/op 41.343 ms/op 1.44
mainnet_e81889 - altair processRegistryUpdates 1.6660 us/op 1.9340 us/op 0.86
mainnet_e81889 - altair processSlashings 365.00 ns/op 498.00 ns/op 0.73
mainnet_e81889 - altair processEth1DataReset 487.00 ns/op 410.00 ns/op 1.19
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9193 ms/op 1.9743 ms/op 0.97
mainnet_e81889 - altair processSlashingsReset 4.4830 us/op 2.9260 us/op 1.53
mainnet_e81889 - altair processRandaoMixesReset 3.1370 us/op 3.7430 us/op 0.84
mainnet_e81889 - altair processHistoricalRootsUpdate 316.00 ns/op 428.00 ns/op 0.74
mainnet_e81889 - altair processParticipationFlagUpdates 1.8530 us/op 2.5600 us/op 0.72
mainnet_e81889 - altair processSyncCommitteeUpdates 453.00 ns/op 502.00 ns/op 0.90
mainnet_e81889 - altair afterProcessEpoch 52.649 ms/op 53.537 ms/op 0.98
capella processEpoch - mainnet_e217614 1.0049 s/op 1.1084 s/op 0.91
mainnet_e217614 - capella beforeProcessEpoch 72.697 ms/op 77.539 ms/op 0.94
mainnet_e217614 - capella processJustificationAndFinalization 15.551 us/op 19.776 us/op 0.79
mainnet_e217614 - capella processInactivityUpdates 17.974 ms/op 18.927 ms/op 0.95
mainnet_e217614 - capella processRewardsAndPenalties 247.61 ms/op 230.04 ms/op 1.08
mainnet_e217614 - capella processRegistryUpdates 20.939 us/op 15.088 us/op 1.39
mainnet_e217614 - capella processSlashings 558.00 ns/op 562.00 ns/op 0.99
mainnet_e217614 - capella processEth1DataReset 502.00 ns/op 350.00 ns/op 1.43
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.3541 ms/op 17.490 ms/op 0.25
mainnet_e217614 - capella processSlashingsReset 3.1200 us/op 6.6460 us/op 0.47
mainnet_e217614 - capella processRandaoMixesReset 5.2180 us/op 4.8140 us/op 1.08
mainnet_e217614 - capella processHistoricalRootsUpdate 517.00 ns/op 776.00 ns/op 0.67
mainnet_e217614 - capella processParticipationFlagUpdates 5.9190 us/op 2.0480 us/op 2.89
mainnet_e217614 - capella afterProcessEpoch 126.21 ms/op 129.97 ms/op 0.97
phase0 processEpoch - mainnet_e58758 314.58 ms/op 366.05 ms/op 0.86
mainnet_e58758 - phase0 beforeProcessEpoch 84.322 ms/op 81.181 ms/op 1.04
mainnet_e58758 - phase0 processJustificationAndFinalization 18.557 us/op 19.417 us/op 0.96
mainnet_e58758 - phase0 processRewardsAndPenalties 32.884 ms/op 28.654 ms/op 1.15
mainnet_e58758 - phase0 processRegistryUpdates 10.848 us/op 9.2600 us/op 1.17
mainnet_e58758 - phase0 processSlashings 553.00 ns/op 545.00 ns/op 1.01
mainnet_e58758 - phase0 processEth1DataReset 480.00 ns/op 577.00 ns/op 0.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.1300 ms/op 1.3461 ms/op 1.58
mainnet_e58758 - phase0 processSlashingsReset 4.8770 us/op 3.7760 us/op 1.29
mainnet_e58758 - phase0 processRandaoMixesReset 4.4280 us/op 6.0740 us/op 0.73
mainnet_e58758 - phase0 processHistoricalRootsUpdate 494.00 ns/op 532.00 ns/op 0.93
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.2680 us/op 4.0280 us/op 1.06
mainnet_e58758 - phase0 afterProcessEpoch 42.789 ms/op 49.103 ms/op 0.87
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8243 ms/op 1.7299 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.9932 ms/op 5.0592 ms/op 0.59
altair processInactivityUpdates - 250000 normalcase 19.325 ms/op 21.355 ms/op 0.90
altair processInactivityUpdates - 250000 worstcase 19.591 ms/op 19.229 ms/op 1.02
phase0 processRegistryUpdates - 250000 normalcase 11.370 us/op 13.129 us/op 0.87
phase0 processRegistryUpdates - 250000 badcase_full_deposits 441.97 us/op 361.28 us/op 1.22
phase0 processRegistryUpdates - 250000 worstcase 0.5 140.02 ms/op 134.98 ms/op 1.04
altair processRewardsAndPenalties - 250000 normalcase 50.443 ms/op 44.447 ms/op 1.13
altair processRewardsAndPenalties - 250000 worstcase 44.596 ms/op 53.638 ms/op 0.83
phase0 getAttestationDeltas - 250000 normalcase 7.5075 ms/op 12.817 ms/op 0.59
phase0 getAttestationDeltas - 250000 worstcase 7.9318 ms/op 9.7929 ms/op 0.81
phase0 processSlashings - 250000 worstcase 122.06 us/op 110.28 us/op 1.11
altair processSyncCommitteeUpdates - 250000 126.68 ms/op 160.32 ms/op 0.79
BeaconState.hashTreeRoot - No change 230.00 ns/op 314.00 ns/op 0.73
BeaconState.hashTreeRoot - 1 full validator 133.91 us/op 174.79 us/op 0.77
BeaconState.hashTreeRoot - 32 full validator 1.3447 ms/op 1.2350 ms/op 1.09
BeaconState.hashTreeRoot - 512 full validator 12.396 ms/op 12.210 ms/op 1.02
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 145.54 us/op 168.25 us/op 0.87
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.9506 ms/op 2.2705 ms/op 0.86
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.797 ms/op 27.540 ms/op 0.90
BeaconState.hashTreeRoot - 1 balances 146.92 us/op 122.50 us/op 1.20
BeaconState.hashTreeRoot - 32 balances 1.3217 ms/op 1.1899 ms/op 1.11
BeaconState.hashTreeRoot - 512 balances 8.8795 ms/op 8.9544 ms/op 0.99
BeaconState.hashTreeRoot - 250000 balances 211.03 ms/op 207.52 ms/op 1.02
aggregationBits - 2048 els - zipIndexesInBitList 22.853 us/op 33.576 us/op 0.68
byteArrayEquals 32 52.736 ns/op 58.719 ns/op 0.90
Buffer.compare 32 16.908 ns/op 19.741 ns/op 0.86
byteArrayEquals 1024 1.5560 us/op 1.8375 us/op 0.85
Buffer.compare 1024 25.008 ns/op 30.693 ns/op 0.81
byteArrayEquals 16384 24.823 us/op 26.878 us/op 0.92
Buffer.compare 16384 197.13 ns/op 212.25 ns/op 0.93
byteArrayEquals 123687377 187.40 ms/op 227.40 ms/op 0.82
Buffer.compare 123687377 6.8069 ms/op 11.411 ms/op 0.60
byteArrayEquals 32 - diff last byte 52.733 ns/op 61.514 ns/op 0.86
Buffer.compare 32 - diff last byte 17.660 ns/op 20.127 ns/op 0.88
byteArrayEquals 1024 - diff last byte 1.5998 us/op 1.8097 us/op 0.88
Buffer.compare 1024 - diff last byte 25.228 ns/op 28.819 ns/op 0.88
byteArrayEquals 16384 - diff last byte 25.509 us/op 27.876 us/op 0.92
Buffer.compare 16384 - diff last byte 208.10 ns/op 210.91 ns/op 0.99
byteArrayEquals 123687377 - diff last byte 201.21 ms/op 204.41 ms/op 0.98
Buffer.compare 123687377 - diff last byte 7.7298 ms/op 9.3300 ms/op 0.83
byteArrayEquals 32 - random bytes 5.2760 ns/op 5.5320 ns/op 0.95
Buffer.compare 32 - random bytes 17.404 ns/op 18.932 ns/op 0.92
byteArrayEquals 1024 - random bytes 5.2280 ns/op 5.6410 ns/op 0.93
Buffer.compare 1024 - random bytes 17.403 ns/op 19.621 ns/op 0.89
byteArrayEquals 16384 - random bytes 5.0880 ns/op 5.6670 ns/op 0.90
Buffer.compare 16384 - random bytes 17.208 ns/op 19.679 ns/op 0.87
byteArrayEquals 123687377 - random bytes 6.5000 ns/op 6.8400 ns/op 0.95
Buffer.compare 123687377 - random bytes 18.470 ns/op 20.070 ns/op 0.92
regular array get 100000 times 43.152 us/op 38.328 us/op 1.13
wrappedArray get 100000 times 32.835 us/op 46.233 us/op 0.71
arrayWithProxy get 100000 times 12.831 ms/op 15.979 ms/op 0.80
ssz.Root.equals 45.340 ns/op 49.039 ns/op 0.92
byteArrayEquals 44.865 ns/op 49.342 ns/op 0.91
Buffer.compare 10.248 ns/op 11.521 ns/op 0.89
processSlot - 1 slots 16.770 us/op 16.017 us/op 1.05
processSlot - 32 slots 3.7126 ms/op 3.3897 ms/op 1.10
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 40.596 ms/op 37.336 ms/op 1.09
getCommitteeAssignments - req 1 vs - 250000 vc 2.0943 ms/op 2.1806 ms/op 0.96
getCommitteeAssignments - req 100 vs - 250000 vc 4.0836 ms/op 4.2460 ms/op 0.96
getCommitteeAssignments - req 1000 vs - 250000 vc 4.5593 ms/op 4.5495 ms/op 1.00
findModifiedValidators - 10000 modified validators 257.24 ms/op 299.39 ms/op 0.86
findModifiedValidators - 1000 modified validators 168.52 ms/op 200.36 ms/op 0.84
findModifiedValidators - 100 modified validators 153.06 ms/op 241.35 ms/op 0.63
findModifiedValidators - 10 modified validators 151.37 ms/op 210.53 ms/op 0.72
findModifiedValidators - 1 modified validators 147.16 ms/op 178.62 ms/op 0.82
findModifiedValidators - no difference 161.25 ms/op 194.46 ms/op 0.83
compare ViewDUs 3.1784 s/op 3.5308 s/op 0.90
compare each validator Uint8Array 1.3611 s/op 1.4081 s/op 0.97
compare ViewDU to Uint8Array 1.1498 s/op 1.1004 s/op 1.04
migrate state 1000000 validators, 24 modified, 0 new 768.94 ms/op 710.93 ms/op 1.08
migrate state 1000000 validators, 1700 modified, 1000 new 994.51 ms/op 960.91 ms/op 1.03
migrate state 1000000 validators, 3400 modified, 2000 new 1.2300 s/op 1.2237 s/op 1.01
migrate state 1500000 validators, 24 modified, 0 new 861.11 ms/op 728.41 ms/op 1.18
migrate state 1500000 validators, 1700 modified, 1000 new 1.0708 s/op 936.50 ms/op 1.14
migrate state 1500000 validators, 3400 modified, 2000 new 1.3276 s/op 1.1647 s/op 1.14
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.2300 ns/op 4.8800 ns/op 1.07
state getBlockRootAtSlot - 250000 vs - 7PWei 1.0096 us/op 734.76 ns/op 1.37
computeProposers - vc 250000 9.3929 ms/op 8.2840 ms/op 1.13
computeEpochShuffling - vc 250000 47.884 ms/op 43.527 ms/op 1.10
getNextSyncCommittee - vc 250000 168.28 ms/op 141.99 ms/op 1.19
computeSigningRoot for AttestationData 29.263 us/op 23.428 us/op 1.25
hash AttestationData serialized data then Buffer.toString(base64) 1.7830 us/op 1.6673 us/op 1.07
toHexString serialized data 1.2021 us/op 1.0285 us/op 1.17
Buffer.toString(base64) 225.44 ns/op 196.12 ns/op 1.15
nodejs block root to RootHex using toHex 181.26 ns/op 189.84 ns/op 0.95
nodejs block root to RootHex using toRootHex 115.25 ns/op 96.987 ns/op 1.19
browser block root to RootHex using the deprecated toHexString 307.60 ns/op 259.37 ns/op 1.19
browser block root to RootHex using toHex 277.19 ns/op 186.13 ns/op 1.49
browser block root to RootHex using toRootHex 210.64 ns/op 177.21 ns/op 1.19

by benchmarkbot/action

const {code: executionCode, commit: executionCommit} = executionClientVersion;
let {code: executionCode, commit: executionCommit} = executionClientVersion;

executionCommit = executionCommit.startsWith("0x") ? executionCommit.slice(2, 6) : executionCommit.slice(0, 4);
Copy link
Member

Choose a reason for hiding this comment

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

why is there are 0x prefix in the first place? I think our deserialization is not correct, we also don't serialize it correctly according to #7217

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we also don't serialize it correctly according to #7217

Yea will address it in a separate PR

Copy link
Member

Choose a reason for hiding this comment

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

DATA type must be prepended by 0x as per https://github.com/ethereum/execution-apis/blob/main/src/engine/common.md#encoding

but isn't that the encoding in transit, e.g. see parentHash for example, it's bytes internally but will be hex encoded in transit

parentHash: bytesToData(data.parentHash),

see data conversion functions

export function bytesToData(bytes: Uint8Array): DATA {
return toHex(bytes);
}
/**
* DATA as defined in ethereum execution layer JSON RPC https://eth.wiki/json-rpc/API
*/
export function dataToBytes(hex: DATA, fixedLength: number | null): Uint8Array {
try {
const bytes = fromHex(hex);
if (fixedLength != null && bytes.length !== fixedLength) {
throw Error(`Wrong data length ${bytes.length} expected ${fixedLength}`);
}
return bytes;
} catch (e) {
(e as Error).message = `Invalid hex string: ${(e as Error).message}`;
throw e;
}
}

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