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: set Eth-Consensus-Version header in publish block requests #6593

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

jeluard
Copy link
Contributor

@jeluard jeluard commented Mar 25, 2024

Motivation

Follow the beacon-APIs specs.

Note that submitBlindedBlock reuses publishBlindedBlock serializers.

Description

Properly sets Eth-Consensus-Version when calling relevant beacon-APIs endpoints. This is a short term fix. The proper solution will ship via a later refactoring.

Fixes #6580

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Merging #6593 (91baef9) into unstable (d135329) will increase coverage by 0.00%.
Report is 3 commits behind head on unstable.
The diff coverage is 75.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6593   +/-   ##
=========================================
  Coverage     61.49%   61.49%           
=========================================
  Files           556      556           
  Lines         58895    58903    +8     
  Branches       1856     1857    +1     
=========================================
+ Hits          36216    36222    +6     
- Misses        22638    22640    +2     
  Partials         41       41           

Copy link
Contributor

github-actions bot commented Mar 25, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 9db27b1 Previous: 59a49ff Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 408.51 us/op 702.22 us/op 0.58
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 54.503 us/op 52.244 us/op 1.04
BLS verify - blst-native 1.1530 ms/op 1.0730 ms/op 1.07
BLS verifyMultipleSignatures 3 - blst-native 2.4544 ms/op 2.2932 ms/op 1.07
BLS verifyMultipleSignatures 8 - blst-native 5.5075 ms/op 5.0727 ms/op 1.09
BLS verifyMultipleSignatures 32 - blst-native 20.070 ms/op 18.630 ms/op 1.08
BLS verifyMultipleSignatures 64 - blst-native 39.550 ms/op 37.374 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst-native 78.452 ms/op 75.284 ms/op 1.04
BLS deserializing 10000 signatures 811.49 ms/op 790.72 ms/op 1.03
BLS deserializing 100000 signatures 8.5014 s/op 8.3216 s/op 1.02
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1541 ms/op 1.1389 ms/op 1.01
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2955 ms/op 1.2908 ms/op 1.00
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.0241 ms/op 2.0310 ms/op 1.00
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.8966 ms/op 3.8367 ms/op 1.02
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.1018 ms/op 5.0126 ms/op 1.02
BLS aggregatePubkeys 32 - blst-native 23.084 us/op 22.717 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 90.403 us/op 88.836 us/op 1.02
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 46.653 ms/op 49.227 ms/op 0.95
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 59.148 ms/op 43.485 ms/op 1.36
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 27.099 ms/op 26.989 ms/op 1.00
getSlashingsAndExits - default max 130.68 us/op 132.15 us/op 0.99
getSlashingsAndExits - 2k 351.66 us/op 589.16 us/op 0.60
proposeBlockBody type=full, size=empty 4.8288 ms/op 4.5829 ms/op 1.05
isKnown best case - 1 super set check 593.00 ns/op 625.00 ns/op 0.95
isKnown normal case - 2 super set checks 566.00 ns/op 656.00 ns/op 0.86
isKnown worse case - 16 super set checks 711.00 ns/op 645.00 ns/op 1.10
CheckpointStateCache - add get delete 6.7700 us/op 5.8740 us/op 1.15
validate api signedAggregateAndProof - struct 2.5258 ms/op 2.4744 ms/op 1.02
validate gossip signedAggregateAndProof - struct 2.5026 ms/op 2.4112 ms/op 1.04
validate gossip attestation - vc 640000 1.1986 ms/op 1.1962 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 160.44 us/op 151.33 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 137.68 us/op 136.09 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 128 135.16 us/op 132.04 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 256 132.75 us/op 125.97 us/op 1.05
pickEth1Vote - no votes 1.0904 ms/op 888.51 us/op 1.23
pickEth1Vote - max votes 10.469 ms/op 7.6490 ms/op 1.37
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.982 ms/op 12.310 ms/op 1.38
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 35.607 ms/op 24.006 ms/op 1.48
pickEth1Vote - Eth1Data fastSerialize value x2048 592.72 us/op 433.08 us/op 1.37
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.4804 ms/op 5.8644 ms/op 0.93
bytes32 toHexString 692.00 ns/op 472.00 ns/op 1.47
bytes32 Buffer.toString(hex) 467.00 ns/op 325.00 ns/op 1.44
bytes32 Buffer.toString(hex) from Uint8Array 565.00 ns/op 437.00 ns/op 1.29
bytes32 Buffer.toString(hex) + 0x 412.00 ns/op 331.00 ns/op 1.24
Object access 1 prop 0.28600 ns/op 0.21000 ns/op 1.36
Map access 1 prop 0.23900 ns/op 0.19300 ns/op 1.24
Object get x1000 5.4320 ns/op 5.3700 ns/op 1.01
Map get x1000 0.86600 ns/op 0.79600 ns/op 1.09
Object set x1000 29.822 ns/op 25.441 ns/op 1.17
Map set x1000 21.275 ns/op 17.722 ns/op 1.20
Return object 10000 times 0.24960 ns/op 0.23720 ns/op 1.05
Throw Error 10000 times 3.3288 us/op 2.7777 us/op 1.20
fastMsgIdFn sha256 / 200 bytes 2.3840 us/op 2.0690 us/op 1.15
fastMsgIdFn h32 xxhash / 200 bytes 406.00 ns/op 328.00 ns/op 1.24
fastMsgIdFn h64 xxhash / 200 bytes 444.00 ns/op 367.00 ns/op 1.21
fastMsgIdFn sha256 / 1000 bytes 7.0330 us/op 6.3540 us/op 1.11
fastMsgIdFn h32 xxhash / 1000 bytes 563.00 ns/op 438.00 ns/op 1.29
fastMsgIdFn h64 xxhash / 1000 bytes 565.00 ns/op 417.00 ns/op 1.35
fastMsgIdFn sha256 / 10000 bytes 56.022 us/op 53.976 us/op 1.04
fastMsgIdFn h32 xxhash / 10000 bytes 2.0140 us/op 1.8990 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.3800 us/op 1.2740 us/op 1.08
send data - 1000 256B messages 16.593 ms/op 12.425 ms/op 1.34
send data - 1000 512B messages 20.294 ms/op 14.897 ms/op 1.36
send data - 1000 1024B messages 34.843 ms/op 27.121 ms/op 1.28
send data - 1000 1200B messages 40.651 ms/op 31.509 ms/op 1.29
send data - 1000 2048B messages 46.893 ms/op 38.901 ms/op 1.21
send data - 1000 4096B messages 56.594 ms/op 33.472 ms/op 1.69
send data - 1000 16384B messages 131.84 ms/op 100.11 ms/op 1.32
send data - 1000 65536B messages 464.36 ms/op 381.11 ms/op 1.22
enrSubnets - fastDeserialize 64 bits 1.3640 us/op 1.0150 us/op 1.34
enrSubnets - ssz BitVector 64 bits 539.00 ns/op 456.00 ns/op 1.18
enrSubnets - fastDeserialize 4 bits 251.00 ns/op 204.00 ns/op 1.23
enrSubnets - ssz BitVector 4 bits 510.00 ns/op 446.00 ns/op 1.14
prioritizePeers score -10:0 att 32-0.1 sync 2-0 86.568 us/op 69.105 us/op 1.25
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 115.60 us/op 85.405 us/op 1.35
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 193.21 us/op 120.91 us/op 1.60
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 307.93 us/op 226.64 us/op 1.36
prioritizePeers score 0:0 att 64-1 sync 4-1 308.09 us/op 205.02 us/op 1.50
array of 16000 items push then shift 1.3260 us/op 1.2957 us/op 1.02
LinkedList of 16000 items push then shift 7.7290 ns/op 5.8340 ns/op 1.32
array of 16000 items push then pop 115.51 ns/op 51.289 ns/op 2.25
LinkedList of 16000 items push then pop 6.2510 ns/op 5.6360 ns/op 1.11
array of 24000 items push then shift 2.0439 us/op 1.8761 us/op 1.09
LinkedList of 24000 items push then shift 7.5190 ns/op 5.8270 ns/op 1.29
array of 24000 items push then pop 151.22 ns/op 80.226 ns/op 1.88
LinkedList of 24000 items push then pop 6.3730 ns/op 5.6510 ns/op 1.13
intersect bitArray bitLen 8 5.1700 ns/op 4.5510 ns/op 1.14
intersect array and set length 8 51.768 ns/op 47.854 ns/op 1.08
intersect bitArray bitLen 128 30.179 ns/op 28.601 ns/op 1.06
intersect array and set length 128 722.23 ns/op 676.70 ns/op 1.07
bitArray.getTrueBitIndexes() bitLen 128 1.3580 us/op 1.2680 us/op 1.07
bitArray.getTrueBitIndexes() bitLen 248 2.4780 us/op 2.0620 us/op 1.20
bitArray.getTrueBitIndexes() bitLen 512 4.3940 us/op 3.9410 us/op 1.11
Buffer.concat 32 items 872.00 ns/op 892.00 ns/op 0.98
Uint8Array.set 32 items 1.6100 us/op 1.8630 us/op 0.86
Set add up to 64 items then delete first 1.8028 us/op 1.7379 us/op 1.04
OrderedSet add up to 64 items then delete first 2.9128 us/op 2.6519 us/op 1.10
Set add up to 64 items then delete last 2.0640 us/op 1.9814 us/op 1.04
OrderedSet add up to 64 items then delete last 3.0400 us/op 2.9397 us/op 1.03
Set add up to 64 items then delete middle 2.0375 us/op 1.9803 us/op 1.03
OrderedSet add up to 64 items then delete middle 4.3317 us/op 4.1372 us/op 1.05
Set add up to 128 items then delete first 4.3286 us/op 3.9253 us/op 1.10
OrderedSet add up to 128 items then delete first 6.3535 us/op 6.1099 us/op 1.04
Set add up to 128 items then delete last 3.9338 us/op 3.7622 us/op 1.05
OrderedSet add up to 128 items then delete last 5.9652 us/op 5.6536 us/op 1.06
Set add up to 128 items then delete middle 4.5901 us/op 3.7523 us/op 1.22
OrderedSet add up to 128 items then delete middle 13.771 us/op 10.505 us/op 1.31
Set add up to 256 items then delete first 7.9044 us/op 7.6853 us/op 1.03
OrderedSet add up to 256 items then delete first 12.585 us/op 12.078 us/op 1.04
Set add up to 256 items then delete last 7.4904 us/op 7.3913 us/op 1.01
OrderedSet add up to 256 items then delete last 11.655 us/op 11.291 us/op 1.03
Set add up to 256 items then delete middle 7.7015 us/op 7.3991 us/op 1.04
OrderedSet add up to 256 items then delete middle 31.985 us/op 30.189 us/op 1.06
transfer serialized Status (84 B) 1.3750 us/op 1.3200 us/op 1.04
copy serialized Status (84 B) 1.0870 us/op 1.0740 us/op 1.01
transfer serialized SignedVoluntaryExit (112 B) 1.3690 us/op 1.4010 us/op 0.98
copy serialized SignedVoluntaryExit (112 B) 1.0790 us/op 1.1060 us/op 0.98
transfer serialized ProposerSlashing (416 B) 1.8780 us/op 2.0570 us/op 0.91
copy serialized ProposerSlashing (416 B) 1.8250 us/op 1.9890 us/op 0.92
transfer serialized Attestation (485 B) 3.1380 us/op 1.9540 us/op 1.61
copy serialized Attestation (485 B) 2.4030 us/op 1.8380 us/op 1.31
transfer serialized AttesterSlashing (33232 B) 2.1620 us/op 2.1090 us/op 1.03
copy serialized AttesterSlashing (33232 B) 7.8920 us/op 4.0480 us/op 1.95
transfer serialized Small SignedBeaconBlock (128000 B) 2.0910 us/op 1.7850 us/op 1.17
copy serialized Small SignedBeaconBlock (128000 B) 23.815 us/op 8.3590 us/op 2.85
transfer serialized Avg SignedBeaconBlock (200000 B) 2.7060 us/op 1.9330 us/op 1.40
copy serialized Avg SignedBeaconBlock (200000 B) 26.034 us/op 12.225 us/op 2.13
transfer serialized BlobsSidecar (524380 B) 2.3810 us/op 2.0250 us/op 1.18
copy serialized BlobsSidecar (524380 B) 81.047 us/op 171.27 us/op 0.47
transfer serialized Big SignedBeaconBlock (1000000 B) 2.5240 us/op 2.5140 us/op 1.00
copy serialized Big SignedBeaconBlock (1000000 B) 201.60 us/op 144.72 us/op 1.39
pass gossip attestations to forkchoice per slot 2.8208 ms/op 2.7276 ms/op 1.03
forkChoice updateHead vc 100000 bc 64 eq 0 422.70 us/op 489.19 us/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 0 3.1811 ms/op 2.7366 ms/op 1.16
forkChoice updateHead vc 1000000 bc 64 eq 0 6.3588 ms/op 4.5229 ms/op 1.41
forkChoice updateHead vc 600000 bc 320 eq 0 2.8849 ms/op 2.5552 ms/op 1.13
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8437 ms/op 2.6651 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5602 ms/op 3.3438 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 1000 10.237 ms/op 9.6986 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 10000 9.9316 ms/op 9.7625 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 300000 13.904 ms/op 12.114 ms/op 1.15
computeDeltas 500000 validators 300 proto nodes 3.2434 ms/op 3.1287 ms/op 1.04
computeDeltas 500000 validators 1200 proto nodes 3.1822 ms/op 2.9631 ms/op 1.07
computeDeltas 500000 validators 7200 proto nodes 3.3056 ms/op 3.2632 ms/op 1.01
computeDeltas 750000 validators 300 proto nodes 5.4421 ms/op 4.8526 ms/op 1.12
computeDeltas 750000 validators 1200 proto nodes 5.6636 ms/op 4.7782 ms/op 1.19
computeDeltas 750000 validators 7200 proto nodes 5.7903 ms/op 4.8722 ms/op 1.19
computeDeltas 1400000 validators 300 proto nodes 9.2940 ms/op 9.0137 ms/op 1.03
computeDeltas 1400000 validators 1200 proto nodes 9.4702 ms/op 9.1248 ms/op 1.04
computeDeltas 1400000 validators 7200 proto nodes 9.0917 ms/op 9.0139 ms/op 1.01
computeDeltas 2100000 validators 300 proto nodes 14.243 ms/op 12.666 ms/op 1.12
computeDeltas 2100000 validators 1200 proto nodes 13.782 ms/op 12.957 ms/op 1.06
computeDeltas 2100000 validators 7200 proto nodes 13.752 ms/op 13.313 ms/op 1.03
altair processAttestation - 250000 vs - 7PWei normalcase 3.0595 ms/op 1.6027 ms/op 1.91
altair processAttestation - 250000 vs - 7PWei worstcase 2.9905 ms/op 2.3175 ms/op 1.29
altair processAttestation - setStatus - 1/6 committees join 109.40 us/op 98.768 us/op 1.11
altair processAttestation - setStatus - 1/3 committees join 233.22 us/op 200.85 us/op 1.16
altair processAttestation - setStatus - 1/2 committees join 362.34 us/op 281.44 us/op 1.29
altair processAttestation - setStatus - 2/3 committees join 388.32 us/op 375.87 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 513.51 us/op 491.76 us/op 1.04
altair processAttestation - setStatus - 100% committees join 612.65 us/op 580.77 us/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase 10.393 ms/op 7.2186 ms/op 1.44
altair processBlock - 250000 vs - 7PWei normalcase hashState 35.246 ms/op 30.114 ms/op 1.17
altair processBlock - 250000 vs - 7PWei worstcase 32.613 ms/op 30.940 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase hashState 71.497 ms/op 90.184 ms/op 0.79
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5941 ms/op 1.8863 ms/op 1.38
phase0 processBlock - 250000 vs - 7PWei worstcase 27.777 ms/op 23.704 ms/op 1.17
altair processEth1Data - 250000 vs - 7PWei normalcase 361.33 us/op 368.48 us/op 0.98
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 9.2410 us/op 9.0520 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 67.058 us/op 53.013 us/op 1.26
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 16.267 us/op 17.918 us/op 0.91
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.2800 us/op 8.0010 us/op 1.03
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 171.50 us/op 101.56 us/op 1.69
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4087 ms/op 1.0578 ms/op 1.33
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.6421 ms/op 1.0323 ms/op 1.59
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.2431 ms/op 1.4796 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.1377 ms/op 2.3059 ms/op 1.36
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1712 ms/op 1.5118 ms/op 1.44
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 6.0013 ms/op 3.4643 ms/op 1.73
Tree 40 250000 create 353.92 ms/op 249.83 ms/op 1.42
Tree 40 250000 get(125000) 130.66 ns/op 111.66 ns/op 1.17
Tree 40 250000 set(125000) 1.0359 us/op 748.71 ns/op 1.38
Tree 40 250000 toArray() 25.341 ms/op 9.1599 ms/op 2.77
Tree 40 250000 iterate all - toArray() + loop 26.407 ms/op 9.3845 ms/op 2.81
Tree 40 250000 iterate all - get(i) 57.726 ms/op 37.441 ms/op 1.54
MutableVector 250000 create 11.695 ms/op 11.616 ms/op 1.01
MutableVector 250000 get(125000) 6.3610 ns/op 5.6400 ns/op 1.13
MutableVector 250000 set(125000) 220.72 ns/op 204.44 ns/op 1.08
MutableVector 250000 toArray() 2.7878 ms/op 2.3744 ms/op 1.17
MutableVector 250000 iterate all - toArray() + loop 2.7126 ms/op 2.5834 ms/op 1.05
MutableVector 250000 iterate all - get(i) 1.4069 ms/op 1.2848 ms/op 1.09
Array 250000 create 2.4288 ms/op 2.3550 ms/op 1.03
Array 250000 clone - spread 1.2567 ms/op 1.1757 ms/op 1.07
Array 250000 get(125000) 1.1120 ns/op 1.0650 ns/op 1.04
Array 250000 set(125000) 1.3110 ns/op 1.2760 ns/op 1.03
Array 250000 iterate all - loop 165.44 us/op 152.42 us/op 1.09
effectiveBalanceIncrements clone Uint8Array 300000 14.804 us/op 14.953 us/op 0.99
effectiveBalanceIncrements clone MutableVector 300000 453.00 ns/op 447.00 ns/op 1.01
effectiveBalanceIncrements rw all Uint8Array 300000 190.09 us/op 182.38 us/op 1.04
effectiveBalanceIncrements rw all MutableVector 300000 73.542 ms/op 66.367 ms/op 1.11
phase0 afterProcessEpoch - 250000 vs - 7PWei 82.799 ms/op 76.436 ms/op 1.08
phase0 beforeProcessEpoch - 250000 vs - 7PWei 49.898 ms/op 42.630 ms/op 1.17
altair processEpoch - mainnet_e81889 524.98 ms/op 404.27 ms/op 1.30
mainnet_e81889 - altair beforeProcessEpoch 82.147 ms/op 67.733 ms/op 1.21
mainnet_e81889 - altair processJustificationAndFinalization 15.538 us/op 10.550 us/op 1.47
mainnet_e81889 - altair processInactivityUpdates 5.8186 ms/op 4.0237 ms/op 1.45
mainnet_e81889 - altair processRewardsAndPenalties 61.934 ms/op 63.182 ms/op 0.98
mainnet_e81889 - altair processRegistryUpdates 2.2440 us/op 1.5430 us/op 1.45
mainnet_e81889 - altair processSlashings 674.00 ns/op 546.00 ns/op 1.23
mainnet_e81889 - altair processEth1DataReset 803.00 ns/op 561.00 ns/op 1.43
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7488 ms/op 1.7538 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 3.3030 us/op 2.2460 us/op 1.47
mainnet_e81889 - altair processRandaoMixesReset 4.1070 us/op 2.5420 us/op 1.62
mainnet_e81889 - altair processHistoricalRootsUpdate 837.00 ns/op 683.00 ns/op 1.23
mainnet_e81889 - altair processParticipationFlagUpdates 1.4670 us/op 1.6330 us/op 0.90
mainnet_e81889 - altair processSyncCommitteeUpdates 703.00 ns/op 524.00 ns/op 1.34
mainnet_e81889 - altair afterProcessEpoch 82.040 ms/op 81.552 ms/op 1.01
capella processEpoch - mainnet_e217614 1.7941 s/op 1.7112 s/op 1.05
mainnet_e217614 - capella beforeProcessEpoch 441.67 ms/op 387.16 ms/op 1.14
mainnet_e217614 - capella processJustificationAndFinalization 13.675 us/op 7.4610 us/op 1.83
mainnet_e217614 - capella processInactivityUpdates 14.836 ms/op 16.184 ms/op 0.92
mainnet_e217614 - capella processRewardsAndPenalties 472.24 ms/op 443.90 ms/op 1.06
mainnet_e217614 - capella processRegistryUpdates 19.323 us/op 24.923 us/op 0.78
mainnet_e217614 - capella processSlashings 628.00 ns/op 622.00 ns/op 1.01
mainnet_e217614 - capella processEth1DataReset 731.00 ns/op 666.00 ns/op 1.10
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.3871 ms/op 3.5063 ms/op 0.97
mainnet_e217614 - capella processSlashingsReset 3.0370 us/op 2.6990 us/op 1.13
mainnet_e217614 - capella processRandaoMixesReset 3.8420 us/op 5.3110 us/op 0.72
mainnet_e217614 - capella processHistoricalRootsUpdate 1.1460 us/op 474.00 ns/op 2.42
mainnet_e217614 - capella processParticipationFlagUpdates 2.5590 us/op 1.2230 us/op 2.09
mainnet_e217614 - capella afterProcessEpoch 218.52 ms/op 208.28 ms/op 1.05
phase0 processEpoch - mainnet_e58758 428.05 ms/op 367.95 ms/op 1.16
mainnet_e58758 - phase0 beforeProcessEpoch 120.10 ms/op 104.41 ms/op 1.15
mainnet_e58758 - phase0 processJustificationAndFinalization 14.376 us/op 14.108 us/op 1.02
mainnet_e58758 - phase0 processRewardsAndPenalties 56.706 ms/op 58.003 ms/op 0.98
mainnet_e58758 - phase0 processRegistryUpdates 8.0810 us/op 8.5600 us/op 0.94
mainnet_e58758 - phase0 processSlashings 626.00 ns/op 565.00 ns/op 1.11
mainnet_e58758 - phase0 processEth1DataReset 779.00 ns/op 568.00 ns/op 1.37
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 863.65 us/op 806.72 us/op 1.07
mainnet_e58758 - phase0 processSlashingsReset 3.6660 us/op 2.3460 us/op 1.56
mainnet_e58758 - phase0 processRandaoMixesReset 4.7880 us/op 3.8630 us/op 1.24
mainnet_e58758 - phase0 processHistoricalRootsUpdate 909.00 ns/op 588.00 ns/op 1.55
mainnet_e58758 - phase0 processParticipationRecordUpdates 6.5050 us/op 3.4800 us/op 1.87
mainnet_e58758 - phase0 afterProcessEpoch 74.091 ms/op 68.290 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0757 ms/op 1.0074 ms/op 1.07
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1624 ms/op 1.1336 ms/op 1.03
altair processInactivityUpdates - 250000 normalcase 30.313 ms/op 21.702 ms/op 1.40
altair processInactivityUpdates - 250000 worstcase 28.939 ms/op 25.116 ms/op 1.15
phase0 processRegistryUpdates - 250000 normalcase 11.115 us/op 10.234 us/op 1.09
phase0 processRegistryUpdates - 250000 badcase_full_deposits 484.76 us/op 407.61 us/op 1.19
phase0 processRegistryUpdates - 250000 worstcase 0.5 139.68 ms/op 108.79 ms/op 1.28
altair processRewardsAndPenalties - 250000 normalcase 65.802 ms/op 71.084 ms/op 0.93
altair processRewardsAndPenalties - 250000 worstcase 74.316 ms/op 58.030 ms/op 1.28
phase0 getAttestationDeltas - 250000 normalcase 7.5223 ms/op 5.6628 ms/op 1.33
phase0 getAttestationDeltas - 250000 worstcase 9.2947 ms/op 5.8396 ms/op 1.59
phase0 processSlashings - 250000 worstcase 103.03 us/op 89.160 us/op 1.16
altair processSyncCommitteeUpdates - 250000 121.51 ms/op 110.90 ms/op 1.10
BeaconState.hashTreeRoot - No change 458.00 ns/op 401.00 ns/op 1.14
BeaconState.hashTreeRoot - 1 full validator 111.10 us/op 95.098 us/op 1.17
BeaconState.hashTreeRoot - 32 full validator 1.0471 ms/op 1.1800 ms/op 0.89
BeaconState.hashTreeRoot - 512 full validator 18.973 ms/op 13.236 ms/op 1.43
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 146.03 us/op 202.53 us/op 0.72
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.1421 ms/op 2.5664 ms/op 0.83
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 32.968 ms/op 32.653 ms/op 1.01
BeaconState.hashTreeRoot - 1 balances 149.62 us/op 132.72 us/op 1.13
BeaconState.hashTreeRoot - 32 balances 1.1773 ms/op 1.2885 ms/op 0.91
BeaconState.hashTreeRoot - 512 balances 13.050 ms/op 13.275 ms/op 0.98
BeaconState.hashTreeRoot - 250000 balances 169.92 ms/op 220.65 ms/op 0.77
aggregationBits - 2048 els - zipIndexesInBitList 25.207 us/op 28.187 us/op 0.89
byteArrayEquals 32 66.613 ns/op 63.299 ns/op 1.05
Buffer.compare 32 39.208 ns/op 35.853 ns/op 1.09
byteArrayEquals 1024 1.8263 us/op 1.7071 us/op 1.07
Buffer.compare 1024 45.134 ns/op 43.227 ns/op 1.04
byteArrayEquals 16384 31.283 us/op 26.886 us/op 1.16
Buffer.compare 16384 193.58 ns/op 223.80 ns/op 0.86
byteArrayEquals 123687377 214.26 ms/op 207.56 ms/op 1.03
Buffer.compare 123687377 5.5410 ms/op 3.9913 ms/op 1.39
byteArrayEquals 32 - diff last byte 63.850 ns/op 61.177 ns/op 1.04
Buffer.compare 32 - diff last byte 45.161 ns/op 37.759 ns/op 1.20
byteArrayEquals 1024 - diff last byte 1.8074 us/op 1.7043 us/op 1.06
Buffer.compare 1024 - diff last byte 45.786 ns/op 46.105 ns/op 0.99
byteArrayEquals 16384 - diff last byte 30.443 us/op 27.228 us/op 1.12
Buffer.compare 16384 - diff last byte 195.93 ns/op 217.83 ns/op 0.90
byteArrayEquals 123687377 - diff last byte 224.43 ms/op 198.89 ms/op 1.13
Buffer.compare 123687377 - diff last byte 7.7718 ms/op 5.3550 ms/op 1.45
byteArrayEquals 32 - random bytes 5.7180 ns/op 4.5880 ns/op 1.25
Buffer.compare 32 - random bytes 41.745 ns/op 38.711 ns/op 1.08
byteArrayEquals 1024 - random bytes 5.2660 ns/op 4.2930 ns/op 1.23
Buffer.compare 1024 - random bytes 42.204 ns/op 34.313 ns/op 1.23
byteArrayEquals 16384 - random bytes 5.3690 ns/op 4.2980 ns/op 1.25
Buffer.compare 16384 - random bytes 39.889 ns/op 34.966 ns/op 1.14
byteArrayEquals 123687377 - random bytes 9.4400 ns/op 7.7700 ns/op 1.21
Buffer.compare 123687377 - random bytes 53.800 ns/op 38.470 ns/op 1.40
regular array get 100000 times 45.620 us/op 39.840 us/op 1.15
wrappedArray get 100000 times 55.308 us/op 39.454 us/op 1.40
arrayWithProxy get 100000 times 11.350 ms/op 9.9750 ms/op 1.14
ssz.Root.equals 65.279 ns/op 53.394 ns/op 1.22
byteArrayEquals 62.804 ns/op 51.928 ns/op 1.21
Buffer.compare 10.701 ns/op 9.1380 ns/op 1.17
shuffle list - 16384 els 6.1497 ms/op 5.7688 ms/op 1.07
shuffle list - 250000 els 115.06 ms/op 81.578 ms/op 1.41
processSlot - 1 slots 27.959 us/op 11.472 us/op 2.44
processSlot - 32 slots 5.0581 ms/op 2.2436 ms/op 2.25
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 67.878 ms/op 52.021 ms/op 1.30
getCommitteeAssignments - req 1 vs - 250000 vc 2.5547 ms/op 2.3972 ms/op 1.07
getCommitteeAssignments - req 100 vs - 250000 vc 3.8088 ms/op 3.5289 ms/op 1.08
getCommitteeAssignments - req 1000 vs - 250000 vc 4.0827 ms/op 3.8139 ms/op 1.07
findModifiedValidators - 10000 modified validators 1.0470 s/op 397.34 ms/op 2.64
findModifiedValidators - 1000 modified validators 686.50 ms/op 325.29 ms/op 2.11
findModifiedValidators - 100 modified validators 425.47 ms/op 316.90 ms/op 1.34
findModifiedValidators - 10 modified validators 389.23 ms/op 320.17 ms/op 1.22
findModifiedValidators - 1 modified validators 363.03 ms/op 290.97 ms/op 1.25
findModifiedValidators - no difference 358.18 ms/op 319.64 ms/op 1.12
compare ViewDUs 4.7803 s/op 3.9119 s/op 1.22
compare each validator Uint8Array 1.7537 s/op 1.5831 s/op 1.11
compare ViewDU to Uint8Array 1.2433 s/op 843.24 ms/op 1.47
migrate state 1000000 validators, 24 modified, 0 new 957.06 ms/op 712.52 ms/op 1.34
migrate state 1000000 validators, 1700 modified, 1000 new 1.4457 s/op 901.27 ms/op 1.60
migrate state 1000000 validators, 3400 modified, 2000 new 1.5423 s/op 1.1255 s/op 1.37
migrate state 1500000 validators, 24 modified, 0 new 798.24 ms/op 694.00 ms/op 1.15
migrate state 1500000 validators, 1700 modified, 1000 new 1.0332 s/op 983.19 ms/op 1.05
migrate state 1500000 validators, 3400 modified, 2000 new 1.2307 s/op 1.0847 s/op 1.13
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.1400 ns/op 4.4100 ns/op 1.17
state getBlockRootAtSlot - 250000 vs - 7PWei 800.96 ns/op 383.44 ns/op 2.09
computeProposers - vc 250000 7.3172 ms/op 5.6799 ms/op 1.29
computeEpochShuffling - vc 250000 87.692 ms/op 83.109 ms/op 1.06
getNextSyncCommittee - vc 250000 130.86 ms/op 96.041 ms/op 1.36
computeSigningRoot for AttestationData 28.991 us/op 29.922 us/op 0.97
hash AttestationData serialized data then Buffer.toString(base64) 1.3332 us/op 1.2464 us/op 1.07
toHexString serialized data 890.90 ns/op 789.90 ns/op 1.13
Buffer.toString(base64) 196.58 ns/op 158.06 ns/op 1.24

by benchmarkbot/action

@jeluard jeluard marked this pull request as ready for review March 26, 2024 10:24
@jeluard jeluard requested a review from a team as a code owner March 26, 2024 10:24
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.

Need to make sure to test blinded block publish flow as well, can be easily done by adding --blindedLocal flag

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.

Looks good to me, giving this a try locally as spec tests don't cover headers yet

@@ -335,6 +341,7 @@ export function getReqSerializers(config: ChainForkConfig): ReqSerializers<Api,
writeReq: (item, {broadcastValidation} = {}) => ({
body: AllForksSignedBlockOrContents.toJson(item),
query: {broadcast_validation: broadcastValidation},
headers: {"Eth-Consensus-Version": config.getForkName(extractSlot(item))},
Copy link
Member

Choose a reason for hiding this comment

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

nit: I would probably just inline the logic here, avoids jumping in multiple functions if you wanna review the code but doesn't matter much for this change

@jeluard jeluard marked this pull request as draft March 26, 2024 13:54
@nflaig nflaig changed the title feat: properly set Eth-Consensus-Version header fix: set Eth-Consensus-Version header in publish block requests Mar 27, 2024
@jeluard jeluard requested a review from nflaig March 27, 2024 12:22
@jeluard jeluard marked this pull request as ready for review March 27, 2024 12:27
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.

LGTM

@jeluard jeluard merged commit 4069b41 into unstable Mar 27, 2024
19 of 21 checks passed
@jeluard jeluard deleted the jeluard/api-consensus-header branch March 27, 2024 13:35
@wemeetagain
Copy link
Member

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

Eth-Consensus-Version header is missing in publish block requests
3 participants