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 retry functionality in the api for builder publish #6387

Merged
merged 3 commits into from
Feb 17, 2024

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Feb 2, 2024

add retry capability in the Api specifically for builder and configure builder blinded block publish to use it

@g11tech g11tech requested a review from a team as a code owner February 2, 2024 10:27
Copy link
Contributor

github-actions bot commented Feb 2, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 2af0bc5 Previous: 4c09412 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 903.04 us/op 758.58 us/op 1.19
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 50.331 us/op 80.883 us/op 0.62
BLS verify - blst-native 1.0605 ms/op 1.2779 ms/op 0.83
BLS verifyMultipleSignatures 3 - blst-native 2.2570 ms/op 2.6825 ms/op 0.84
BLS verifyMultipleSignatures 8 - blst-native 4.9983 ms/op 5.8957 ms/op 0.85
BLS verifyMultipleSignatures 32 - blst-native 18.351 ms/op 21.528 ms/op 0.85
BLS verifyMultipleSignatures 64 - blst-native 36.155 ms/op 42.414 ms/op 0.85
BLS verifyMultipleSignatures 128 - blst-native 71.774 ms/op 84.136 ms/op 0.85
BLS deserializing 10000 signatures 791.35 ms/op 899.65 ms/op 0.88
BLS deserializing 100000 signatures 8.1565 s/op 9.1503 s/op 0.89
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.0730 ms/op 1.2990 ms/op 0.83
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2095 ms/op 1.6119 ms/op 0.75
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4702 ms/op 2.9967 ms/op 0.82
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.9128 ms/op 3.3270 ms/op 1.18
BLS verifyMultipleSignatures - same message - 128 - blst-native 6.1652 ms/op 7.6611 ms/op 0.80
BLS aggregatePubkeys 32 - blst-native 22.956 us/op 26.189 us/op 0.88
BLS aggregatePubkeys 128 - blst-native 88.036 us/op 97.623 us/op 0.90
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 39.791 ms/op 50.043 ms/op 0.80
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 35.861 ms/op 51.693 ms/op 0.69
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 26.153 ms/op 30.283 ms/op 0.86
getSlashingsAndExits - default max 156.31 us/op 167.73 us/op 0.93
getSlashingsAndExits - 2k 308.01 us/op 445.11 us/op 0.69
proposeBlockBody type=full, size=empty 3.9851 ms/op 4.9593 ms/op 0.80
isKnown best case - 1 super set check 299.00 ns/op 283.00 ns/op 1.06
isKnown normal case - 2 super set checks 293.00 ns/op 275.00 ns/op 1.07
isKnown worse case - 16 super set checks 294.00 ns/op 273.00 ns/op 1.08
CheckpointStateCache - add get delete 3.6210 us/op 4.8180 us/op 0.75
validate api signedAggregateAndProof - struct 2.3817 ms/op 2.6807 ms/op 0.89
validate gossip signedAggregateAndProof - struct 2.3798 ms/op 2.6600 ms/op 0.89
validate gossip attestation - vc 640000 1.1392 ms/op 1.3034 ms/op 0.87
batch validate gossip attestation - vc 640000 - chunk 32 137.24 us/op 158.50 us/op 0.87
batch validate gossip attestation - vc 640000 - chunk 64 123.07 us/op 139.78 us/op 0.88
batch validate gossip attestation - vc 640000 - chunk 128 120.74 us/op 130.70 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 256 119.24 us/op 129.17 us/op 0.92
pickEth1Vote - no votes 998.19 us/op 1.1292 ms/op 0.88
pickEth1Vote - max votes 9.6364 ms/op 10.533 ms/op 0.91
pickEth1Vote - Eth1Data hashTreeRoot value x2048 16.915 ms/op 19.564 ms/op 0.86
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 29.336 ms/op 29.634 ms/op 0.99
pickEth1Vote - Eth1Data fastSerialize value x2048 536.01 us/op 578.39 us/op 0.93
pickEth1Vote - Eth1Data fastSerialize tree x2048 4.3466 ms/op 6.3119 ms/op 0.69
bytes32 toHexString 674.00 ns/op 458.00 ns/op 1.47
bytes32 Buffer.toString(hex) 398.00 ns/op 276.00 ns/op 1.44
bytes32 Buffer.toString(hex) from Uint8Array 553.00 ns/op 400.00 ns/op 1.38
bytes32 Buffer.toString(hex) + 0x 389.00 ns/op 275.00 ns/op 1.41
Object access 1 prop 0.26400 ns/op 0.15000 ns/op 1.76
Map access 1 prop 0.25900 ns/op 0.14600 ns/op 1.77
Object get x1000 5.0940 ns/op 6.7210 ns/op 0.76
Map get x1000 0.82000 ns/op 0.70400 ns/op 1.16
Object set x1000 44.964 ns/op 47.043 ns/op 0.96
Map set x1000 26.762 ns/op 37.439 ns/op 0.71
Return object 10000 times 0.23570 ns/op 0.22790 ns/op 1.03
Throw Error 10000 times 2.8160 us/op 3.7186 us/op 0.76
fastMsgIdFn sha256 / 200 bytes 2.1680 us/op 3.1350 us/op 0.69
fastMsgIdFn h32 xxhash / 200 bytes 406.00 ns/op 255.00 ns/op 1.59
fastMsgIdFn h64 xxhash / 200 bytes 410.00 ns/op 323.00 ns/op 1.27
fastMsgIdFn sha256 / 1000 bytes 6.4330 us/op 10.838 us/op 0.59
fastMsgIdFn h32 xxhash / 1000 bytes 531.00 ns/op 382.00 ns/op 1.39
fastMsgIdFn h64 xxhash / 1000 bytes 471.00 ns/op 388.00 ns/op 1.21
fastMsgIdFn sha256 / 10000 bytes 52.902 us/op 99.091 us/op 0.53
fastMsgIdFn h32 xxhash / 10000 bytes 1.8920 us/op 1.8070 us/op 1.05
fastMsgIdFn h64 xxhash / 10000 bytes 1.3130 us/op 1.2430 us/op 1.06
send data - 1000 256B messages 15.052 ms/op 18.298 ms/op 0.82
send data - 1000 512B messages 17.336 ms/op 23.011 ms/op 0.75
send data - 1000 1024B messages 26.825 ms/op 40.000 ms/op 0.67
send data - 1000 1200B messages 28.780 ms/op 37.753 ms/op 0.76
send data - 1000 2048B messages 39.272 ms/op 48.673 ms/op 0.81
send data - 1000 4096B messages 35.188 ms/op 43.321 ms/op 0.81
send data - 1000 16384B messages 96.385 ms/op 110.61 ms/op 0.87
send data - 1000 65536B messages 414.42 ms/op 453.08 ms/op 0.91
enrSubnets - fastDeserialize 64 bits 1.0330 us/op 1.2610 us/op 0.82
enrSubnets - ssz BitVector 64 bits 448.00 ns/op 400.00 ns/op 1.12
enrSubnets - fastDeserialize 4 bits 219.00 ns/op 160.00 ns/op 1.37
enrSubnets - ssz BitVector 4 bits 454.00 ns/op 400.00 ns/op 1.14
prioritizePeers score -10:0 att 32-0.1 sync 2-0 69.172 us/op 101.01 us/op 0.68
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 84.698 us/op 123.16 us/op 0.69
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 114.78 us/op 173.62 us/op 0.66
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 190.02 us/op 277.43 us/op 0.68
prioritizePeers score 0:0 att 64-1 sync 4-1 216.43 us/op 331.97 us/op 0.65
array of 16000 items push then shift 1.3434 us/op 1.5413 us/op 0.87
LinkedList of 16000 items push then shift 6.0310 ns/op 8.4690 ns/op 0.71
array of 16000 items push then pop 90.433 ns/op 81.385 ns/op 1.11
LinkedList of 16000 items push then pop 6.1460 ns/op 8.2100 ns/op 0.75
array of 24000 items push then shift 1.8972 us/op 2.2620 us/op 0.84
LinkedList of 24000 items push then shift 7.3880 ns/op 8.4170 ns/op 0.88
array of 24000 items push then pop 100.72 ns/op 88.507 ns/op 1.14
LinkedList of 24000 items push then pop 6.0280 ns/op 8.3130 ns/op 0.73
intersect bitArray bitLen 8 4.7530 ns/op 5.5880 ns/op 0.85
intersect array and set length 8 67.066 ns/op 60.742 ns/op 1.10
intersect bitArray bitLen 128 29.111 ns/op 34.641 ns/op 0.84
intersect array and set length 128 900.97 ns/op 831.58 ns/op 1.08
bitArray.getTrueBitIndexes() bitLen 128 1.7620 us/op 1.4320 us/op 1.23
bitArray.getTrueBitIndexes() bitLen 248 2.5310 us/op 2.4370 us/op 1.04
bitArray.getTrueBitIndexes() bitLen 512 6.0180 us/op 4.7060 us/op 1.28
Buffer.concat 32 items 916.00 ns/op 957.00 ns/op 0.96
Uint8Array.set 32 items 1.9120 us/op 1.8920 us/op 1.01
Set add up to 64 items then delete first 1.7795 us/op 4.1652 us/op 0.43
OrderedSet add up to 64 items then delete first 2.7083 us/op 5.2420 us/op 0.52
Set add up to 64 items then delete last 2.0175 us/op 4.4326 us/op 0.46
OrderedSet add up to 64 items then delete last 3.0117 us/op 5.6005 us/op 0.54
Set add up to 64 items then delete middle 2.0186 us/op 4.4954 us/op 0.45
OrderedSet add up to 64 items then delete middle 4.2656 us/op 6.7746 us/op 0.63
Set add up to 128 items then delete first 4.0078 us/op 8.9120 us/op 0.45
OrderedSet add up to 128 items then delete first 6.2912 us/op 11.832 us/op 0.53
Set add up to 128 items then delete last 3.9705 us/op 8.7914 us/op 0.45
OrderedSet add up to 128 items then delete last 5.8312 us/op 11.031 us/op 0.53
Set add up to 128 items then delete middle 3.7920 us/op 8.7948 us/op 0.43
OrderedSet add up to 128 items then delete middle 10.759 us/op 16.251 us/op 0.66
Set add up to 256 items then delete first 7.7791 us/op 18.193 us/op 0.43
OrderedSet add up to 256 items then delete first 12.563 us/op 24.363 us/op 0.52
Set add up to 256 items then delete last 7.6628 us/op 17.575 us/op 0.44
OrderedSet add up to 256 items then delete last 11.836 us/op 22.289 us/op 0.53
Set add up to 256 items then delete middle 7.7143 us/op 17.481 us/op 0.44
OrderedSet add up to 256 items then delete middle 32.715 us/op 43.410 us/op 0.75
transfer serialized Status (84 B) 1.4350 us/op 1.5750 us/op 0.91
copy serialized Status (84 B) 1.2170 us/op 1.2110 us/op 1.00
transfer serialized SignedVoluntaryExit (112 B) 1.5860 us/op 1.6900 us/op 0.94
copy serialized SignedVoluntaryExit (112 B) 1.2640 us/op 1.3810 us/op 0.92
transfer serialized ProposerSlashing (416 B) 2.0050 us/op 2.1800 us/op 0.92
copy serialized ProposerSlashing (416 B) 2.0760 us/op 1.7400 us/op 1.19
transfer serialized Attestation (485 B) 2.4420 us/op 2.1290 us/op 1.15
copy serialized Attestation (485 B) 2.0450 us/op 1.9660 us/op 1.04
transfer serialized AttesterSlashing (33232 B) 2.1540 us/op 2.4020 us/op 0.90
copy serialized AttesterSlashing (33232 B) 4.3900 us/op 5.5660 us/op 0.79
transfer serialized Small SignedBeaconBlock (128000 B) 2.4200 us/op 2.6400 us/op 0.92
copy serialized Small SignedBeaconBlock (128000 B) 10.386 us/op 14.485 us/op 0.72
transfer serialized Avg SignedBeaconBlock (200000 B) 2.4270 us/op 2.8360 us/op 0.86
copy serialized Avg SignedBeaconBlock (200000 B) 14.179 us/op 20.732 us/op 0.68
transfer serialized BlobsSidecar (524380 B) 2.4540 us/op 2.8340 us/op 0.87
copy serialized BlobsSidecar (524380 B) 77.128 us/op 122.61 us/op 0.63
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9110 us/op 3.0850 us/op 0.94
copy serialized Big SignedBeaconBlock (1000000 B) 134.44 us/op 369.90 us/op 0.36
pass gossip attestations to forkchoice per slot 2.9085 ms/op 3.7880 ms/op 0.77
forkChoice updateHead vc 100000 bc 64 eq 0 437.65 us/op 678.29 us/op 0.65
forkChoice updateHead vc 600000 bc 64 eq 0 2.8007 ms/op 4.1032 ms/op 0.68
forkChoice updateHead vc 1000000 bc 64 eq 0 4.4774 ms/op 6.9472 ms/op 0.64
forkChoice updateHead vc 600000 bc 320 eq 0 2.6196 ms/op 4.1264 ms/op 0.63
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7241 ms/op 4.2997 ms/op 0.63
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4628 ms/op 5.3498 ms/op 0.65
forkChoice updateHead vc 600000 bc 64 eq 1000 10.160 ms/op 11.032 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 10000 9.8830 ms/op 11.538 ms/op 0.86
forkChoice updateHead vc 600000 bc 64 eq 300000 11.988 ms/op 15.629 ms/op 0.77
computeDeltas 500000 validators 300 proto nodes 3.0806 ms/op 6.3708 ms/op 0.48
computeDeltas 500000 validators 1200 proto nodes 2.9908 ms/op 6.3169 ms/op 0.47
computeDeltas 500000 validators 7200 proto nodes 2.9169 ms/op 6.2523 ms/op 0.47
computeDeltas 750000 validators 300 proto nodes 4.6380 ms/op 9.4090 ms/op 0.49
computeDeltas 750000 validators 1200 proto nodes 4.4664 ms/op 9.2567 ms/op 0.48
computeDeltas 750000 validators 7200 proto nodes 4.5180 ms/op 9.4638 ms/op 0.48
computeDeltas 1400000 validators 300 proto nodes 8.6610 ms/op 18.326 ms/op 0.47
computeDeltas 1400000 validators 1200 proto nodes 8.9844 ms/op 18.503 ms/op 0.49
computeDeltas 1400000 validators 7200 proto nodes 8.4431 ms/op 18.586 ms/op 0.45
computeDeltas 2100000 validators 300 proto nodes 12.701 ms/op 27.708 ms/op 0.46
computeDeltas 2100000 validators 1200 proto nodes 12.731 ms/op 28.043 ms/op 0.45
computeDeltas 2100000 validators 7200 proto nodes 13.167 ms/op 27.604 ms/op 0.48
altair processAttestation - 250000 vs - 7PWei normalcase 1.4722 ms/op 2.0667 ms/op 0.71
altair processAttestation - 250000 vs - 7PWei worstcase 2.0950 ms/op 3.0190 ms/op 0.69
altair processAttestation - setStatus - 1/6 committees join 89.987 us/op 176.40 us/op 0.51
altair processAttestation - setStatus - 1/3 committees join 194.72 us/op 343.57 us/op 0.57
altair processAttestation - setStatus - 1/2 committees join 272.86 us/op 453.83 us/op 0.60
altair processAttestation - setStatus - 2/3 committees join 370.60 us/op 569.99 us/op 0.65
altair processAttestation - setStatus - 4/5 committees join 476.93 us/op 774.16 us/op 0.62
altair processAttestation - setStatus - 100% committees join 557.38 us/op 884.01 us/op 0.63
altair processBlock - 250000 vs - 7PWei normalcase 7.6961 ms/op 10.297 ms/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase hashState 32.773 ms/op 39.057 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase 31.322 ms/op 37.331 ms/op 0.84
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.444 ms/op 97.700 ms/op 0.75
phase0 processBlock - 250000 vs - 7PWei normalcase 2.5493 ms/op 2.4778 ms/op 1.03
phase0 processBlock - 250000 vs - 7PWei worstcase 25.017 ms/op 28.716 ms/op 0.87
altair processEth1Data - 250000 vs - 7PWei normalcase 290.97 us/op 514.57 us/op 0.57
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.2510 us/op 11.038 us/op 0.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 46.782 us/op 58.535 us/op 0.80
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 7.7780 us/op 16.230 us/op 0.48
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 10.296 us/op 7.2850 us/op 1.41
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 91.557 us/op 126.21 us/op 0.73
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 716.73 us/op 1.4408 ms/op 0.50
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 794.25 us/op 1.5513 ms/op 0.51
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.3795 ms/op 1.5892 ms/op 0.87
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.2085 ms/op 3.4554 ms/op 0.64
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4458 ms/op 2.2994 ms/op 0.63
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.4007 ms/op 5.1577 ms/op 0.66
Tree 40 250000 create 240.92 ms/op 344.83 ms/op 0.70
Tree 40 250000 get(125000) 110.68 ns/op 196.61 ns/op 0.56
Tree 40 250000 set(125000) 701.82 ns/op 965.95 ns/op 0.73
Tree 40 250000 toArray() 9.1407 ms/op 18.288 ms/op 0.50
Tree 40 250000 iterate all - toArray() + loop 9.3282 ms/op 18.326 ms/op 0.51
Tree 40 250000 iterate all - get(i) 39.333 ms/op 64.586 ms/op 0.61
MutableVector 250000 create 11.962 ms/op 14.482 ms/op 0.83
MutableVector 250000 get(125000) 5.3420 ns/op 8.4990 ns/op 0.63
MutableVector 250000 set(125000) 196.74 ns/op 252.44 ns/op 0.78
MutableVector 250000 toArray() 2.2728 ms/op 3.2858 ms/op 0.69
MutableVector 250000 iterate all - toArray() + loop 2.3190 ms/op 3.3241 ms/op 0.70
MutableVector 250000 iterate all - get(i) 1.3268 ms/op 1.5703 ms/op 0.84
Array 250000 create 2.2278 ms/op 2.8107 ms/op 0.79
Array 250000 clone - spread 1.1878 ms/op 1.2439 ms/op 0.95
Array 250000 get(125000) 1.0670 ns/op 1.0450 ns/op 1.02
Array 250000 set(125000) 1.2850 ns/op 4.0420 ns/op 0.32
Array 250000 iterate all - loop 153.64 us/op 161.53 us/op 0.95
effectiveBalanceIncrements clone Uint8Array 300000 14.808 us/op 28.316 us/op 0.52
effectiveBalanceIncrements clone MutableVector 300000 455.00 ns/op 389.00 ns/op 1.17
effectiveBalanceIncrements rw all Uint8Array 300000 183.99 us/op 194.88 us/op 0.94
effectiveBalanceIncrements rw all MutableVector 300000 67.331 ms/op 79.824 ms/op 0.84
phase0 afterProcessEpoch - 250000 vs - 7PWei 75.625 ms/op 109.48 ms/op 0.69
phase0 beforeProcessEpoch - 250000 vs - 7PWei 33.054 ms/op 52.100 ms/op 0.63
altair processEpoch - mainnet_e81889 431.61 ms/op 525.57 ms/op 0.82
mainnet_e81889 - altair beforeProcessEpoch 67.539 ms/op 81.849 ms/op 0.83
mainnet_e81889 - altair processJustificationAndFinalization 6.4500 us/op 14.241 us/op 0.45
mainnet_e81889 - altair processInactivityUpdates 4.7334 ms/op 5.8015 ms/op 0.82
mainnet_e81889 - altair processRewardsAndPenalties 47.508 ms/op 60.408 ms/op 0.79
mainnet_e81889 - altair processRegistryUpdates 1.7750 us/op 2.5150 us/op 0.71
mainnet_e81889 - altair processSlashings 610.00 ns/op 483.00 ns/op 1.26
mainnet_e81889 - altair processEth1DataReset 575.00 ns/op 475.00 ns/op 1.21
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7897 ms/op 1.3729 ms/op 1.30
mainnet_e81889 - altair processSlashingsReset 1.5000 us/op 3.5830 us/op 0.42
mainnet_e81889 - altair processRandaoMixesReset 3.3040 us/op 3.6750 us/op 0.90
mainnet_e81889 - altair processHistoricalRootsUpdate 720.00 ns/op 691.00 ns/op 1.04
mainnet_e81889 - altair processParticipationFlagUpdates 1.1160 us/op 1.3470 us/op 0.83
mainnet_e81889 - altair processSyncCommitteeUpdates 659.00 ns/op 554.00 ns/op 1.19
mainnet_e81889 - altair afterProcessEpoch 72.965 ms/op 114.48 ms/op 0.64
capella processEpoch - mainnet_e217614 1.7001 s/op 2.0328 s/op 0.84
mainnet_e217614 - capella beforeProcessEpoch 387.70 ms/op 467.31 ms/op 0.83
mainnet_e217614 - capella processJustificationAndFinalization 10.143 us/op 14.422 us/op 0.70
mainnet_e217614 - capella processInactivityUpdates 18.787 ms/op 18.994 ms/op 0.99
mainnet_e217614 - capella processRewardsAndPenalties 371.49 ms/op 396.83 ms/op 0.94
mainnet_e217614 - capella processRegistryUpdates 16.370 us/op 17.614 us/op 0.93
mainnet_e217614 - capella processSlashings 529.00 ns/op 557.00 ns/op 0.95
mainnet_e217614 - capella processEth1DataReset 499.00 ns/op 398.00 ns/op 1.25
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.5738 ms/op 4.8092 ms/op 0.74
mainnet_e217614 - capella processSlashingsReset 1.9960 us/op 2.7200 us/op 0.73
mainnet_e217614 - capella processRandaoMixesReset 2.7730 us/op 3.8470 us/op 0.72
mainnet_e217614 - capella processHistoricalRootsUpdate 571.00 ns/op 693.00 ns/op 0.82
mainnet_e217614 - capella processParticipationFlagUpdates 1.5930 us/op 1.8140 us/op 0.88
mainnet_e217614 - capella afterProcessEpoch 196.37 ms/op 286.93 ms/op 0.68
phase0 processEpoch - mainnet_e58758 367.14 ms/op 440.96 ms/op 0.83
mainnet_e58758 - phase0 beforeProcessEpoch 116.38 ms/op 141.97 ms/op 0.82
mainnet_e58758 - phase0 processJustificationAndFinalization 12.764 us/op 14.631 us/op 0.87
mainnet_e58758 - phase0 processRewardsAndPenalties 39.669 ms/op 33.950 ms/op 1.17
mainnet_e58758 - phase0 processRegistryUpdates 7.7370 us/op 9.9970 us/op 0.77
mainnet_e58758 - phase0 processSlashings 562.00 ns/op 562.00 ns/op 1.00
mainnet_e58758 - phase0 processEth1DataReset 503.00 ns/op 421.00 ns/op 1.19
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.3747 ms/op 1.0840 ms/op 1.27
mainnet_e58758 - phase0 processSlashingsReset 3.7900 us/op 2.7340 us/op 1.39
mainnet_e58758 - phase0 processRandaoMixesReset 2.8030 us/op 3.8510 us/op 0.73
mainnet_e58758 - phase0 processHistoricalRootsUpdate 546.00 ns/op 390.00 ns/op 1.40
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.3840 us/op 3.5480 us/op 0.95
mainnet_e58758 - phase0 afterProcessEpoch 60.593 ms/op 92.432 ms/op 0.66
phase0 processEffectiveBalanceUpdates - 250000 normalcase 966.33 us/op 1.3691 ms/op 0.71
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1184 ms/op 1.4567 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 22.677 ms/op 22.192 ms/op 1.02
altair processInactivityUpdates - 250000 worstcase 20.751 ms/op 25.906 ms/op 0.80
phase0 processRegistryUpdates - 250000 normalcase 6.6830 us/op 8.5710 us/op 0.78
phase0 processRegistryUpdates - 250000 badcase_full_deposits 432.02 us/op 360.49 us/op 1.20
phase0 processRegistryUpdates - 250000 worstcase 0.5 127.47 ms/op 127.84 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 61.593 ms/op 57.485 ms/op 1.07
altair processRewardsAndPenalties - 250000 worstcase 57.802 ms/op 41.190 ms/op 1.40
phase0 getAttestationDeltas - 250000 normalcase 4.6418 ms/op 8.1104 ms/op 0.57
phase0 getAttestationDeltas - 250000 worstcase 5.0596 ms/op 8.1239 ms/op 0.62
phase0 processSlashings - 250000 worstcase 76.811 us/op 80.305 us/op 0.96
altair processSyncCommitteeUpdates - 250000 104.03 ms/op 150.37 ms/op 0.69
BeaconState.hashTreeRoot - No change 324.00 ns/op 358.00 ns/op 0.91
BeaconState.hashTreeRoot - 1 full validator 150.81 us/op 170.77 us/op 0.88
BeaconState.hashTreeRoot - 32 full validator 1.6414 ms/op 1.7126 ms/op 0.96
BeaconState.hashTreeRoot - 512 full validator 15.350 ms/op 18.126 ms/op 0.85
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 157.85 us/op 184.95 us/op 0.85
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8459 ms/op 2.5474 ms/op 0.72
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 27.964 ms/op 33.913 ms/op 0.82
BeaconState.hashTreeRoot - 1 balances 130.66 us/op 137.26 us/op 0.95
BeaconState.hashTreeRoot - 32 balances 1.3815 ms/op 1.3192 ms/op 1.05
BeaconState.hashTreeRoot - 512 balances 11.671 ms/op 11.434 ms/op 1.02
BeaconState.hashTreeRoot - 250000 balances 205.25 ms/op 210.52 ms/op 0.97
aggregationBits - 2048 els - zipIndexesInBitList 10.275 us/op 16.362 us/op 0.63
byteArrayEquals 32 64.291 ns/op 72.806 ns/op 0.88
Buffer.compare 32 37.831 ns/op 53.679 ns/op 0.70
byteArrayEquals 1024 1.7507 us/op 1.9821 us/op 0.88
Buffer.compare 1024 45.670 ns/op 68.056 ns/op 0.67
byteArrayEquals 16384 28.577 us/op 31.553 us/op 0.91
Buffer.compare 16384 210.78 ns/op 246.88 ns/op 0.85
byteArrayEquals 123687377 207.50 ms/op 238.34 ms/op 0.87
Buffer.compare 123687377 3.5766 ms/op 6.0197 ms/op 0.59
byteArrayEquals 32 - diff last byte 62.064 ns/op 69.983 ns/op 0.89
Buffer.compare 32 - diff last byte 37.942 ns/op 54.082 ns/op 0.70
byteArrayEquals 1024 - diff last byte 1.7344 us/op 1.9785 us/op 0.88
Buffer.compare 1024 - diff last byte 47.913 ns/op 68.680 ns/op 0.70
byteArrayEquals 16384 - diff last byte 27.791 us/op 31.570 us/op 0.88
Buffer.compare 16384 - diff last byte 227.41 ns/op 268.82 ns/op 0.85
byteArrayEquals 123687377 - diff last byte 206.52 ms/op 238.73 ms/op 0.87
Buffer.compare 123687377 - diff last byte 4.0171 ms/op 6.0973 ms/op 0.66
byteArrayEquals 32 - random bytes 4.6210 ns/op 5.2890 ns/op 0.87
Buffer.compare 32 - random bytes 40.228 ns/op 59.244 ns/op 0.68
byteArrayEquals 1024 - random bytes 4.4340 ns/op 5.0680 ns/op 0.87
Buffer.compare 1024 - random bytes 37.636 ns/op 59.005 ns/op 0.64
byteArrayEquals 16384 - random bytes 4.4660 ns/op 5.0600 ns/op 0.88
Buffer.compare 16384 - random bytes 38.278 ns/op 58.662 ns/op 0.65
byteArrayEquals 123687377 - random bytes 7.9100 ns/op 8.2600 ns/op 0.96
Buffer.compare 123687377 - random bytes 41.720 ns/op 62.150 ns/op 0.67
regular array get 100000 times 41.027 us/op 43.224 us/op 0.95
wrappedArray get 100000 times 40.970 us/op 43.153 us/op 0.95
arrayWithProxy get 100000 times 9.5863 ms/op 14.691 ms/op 0.65
ssz.Root.equals 51.425 ns/op 53.106 ns/op 0.97
byteArrayEquals 50.654 ns/op 51.466 ns/op 0.98
Buffer.compare 8.4620 ns/op 10.481 ns/op 0.81
shuffle list - 16384 els 4.5538 ms/op 6.8000 ms/op 0.67
shuffle list - 250000 els 67.559 ms/op 98.720 ms/op 0.68
processSlot - 1 slots 15.997 us/op 17.220 us/op 0.93
processSlot - 32 slots 3.7695 ms/op 3.3644 ms/op 1.12
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 53.452 ms/op 57.143 ms/op 0.94
getCommitteeAssignments - req 1 vs - 250000 vc 2.2187 ms/op 2.4721 ms/op 0.90
getCommitteeAssignments - req 100 vs - 250000 vc 3.3330 ms/op 3.6749 ms/op 0.91
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6001 ms/op 4.0122 ms/op 0.90
findModifiedValidators - 10000 modified validators 411.00 ms/op 514.46 ms/op 0.80
findModifiedValidators - 1000 modified validators 306.70 ms/op 413.38 ms/op 0.74
findModifiedValidators - 100 modified validators 330.43 ms/op 399.15 ms/op 0.83
findModifiedValidators - 10 modified validators 300.88 ms/op 407.17 ms/op 0.74
findModifiedValidators - 1 modified validators 279.55 ms/op 401.50 ms/op 0.70
findModifiedValidators - no difference 296.67 ms/op 389.68 ms/op 0.76
compare ViewDUs 3.8362 s/op 4.2357 s/op 0.91
compare each validator Uint8Array 1.4477 s/op 1.6233 s/op 0.89
compare ViewDU to Uint8Array 815.52 ms/op 1.0785 s/op 0.76
migrate state 1000000 validators, 24 modified, 0 new 738.11 ms/op 806.04 ms/op 0.92
migrate state 1000000 validators, 1700 modified, 1000 new 999.56 ms/op 1.0848 s/op 0.92
migrate state 1000000 validators, 3400 modified, 2000 new 1.1777 s/op 1.3513 s/op 0.87
migrate state 1500000 validators, 24 modified, 0 new 728.70 ms/op 779.14 ms/op 0.94
migrate state 1500000 validators, 1700 modified, 1000 new 900.40 ms/op 1.1275 s/op 0.80
migrate state 1500000 validators, 3400 modified, 2000 new 1.1954 s/op 1.4276 s/op 0.84
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4600 ns/op 4.3900 ns/op 1.02
state getBlockRootAtSlot - 250000 vs - 7PWei 802.82 ns/op 642.35 ns/op 1.25
computeProposers - vc 250000 6.5302 ms/op 9.2524 ms/op 0.71
computeEpochShuffling - vc 250000 68.121 ms/op 103.48 ms/op 0.66
getNextSyncCommittee - vc 250000 113.84 ms/op 153.97 ms/op 0.74
computeSigningRoot for AttestationData 28.499 us/op 26.717 us/op 1.07
hash AttestationData serialized data then Buffer.toString(base64) 1.2579 us/op 2.3823 us/op 0.53
toHexString serialized data 807.89 ns/op 1.1756 us/op 0.69
Buffer.toString(base64) 160.13 ns/op 254.52 ns/op 0.63

by benchmarkbot/action

Copy link

codecov bot commented Feb 7, 2024

Codecov Report

Merging #6387 (4fdb813) into unstable (227930c) will increase coverage by 0.00%.
Report is 2 commits behind head on unstable.
The diff coverage is 82.35%.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6387   +/-   ##
=========================================
  Coverage     61.71%   61.71%           
=========================================
  Files           553      553           
  Lines         57866    57900   +34     
  Branches       1829     1832    +3     
=========================================
+ Hits          35710    35733   +23     
- Misses        22119    22130   +11     
  Partials         37       37           

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

@g11tech g11tech merged commit 290c301 into unstable Feb 17, 2024
18 of 20 checks passed
@g11tech g11tech deleted the api-retries-builder branch February 17, 2024 17:41
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.16.0 🎉

wemeetagain added a commit that referenced this pull request Jun 10, 2024
* Add config route definitions

* Add debug route definitions

* Add events route description

* Add lightclient route definitions

* Flatten function params

* Type safety for optional params in write / parse req

* Method args are optional if only optional props

* Fix genesisValidatorsRoot type issue

* Revert requiring all params in write / parse req

* Update http client errors

* Add lodestar route definitions

* Add node route definitions

* Add proof route definitions

* Add builder route definitions

* Add validator route definitions

* Application method response can be void

* Generic options can be passed to application methods

* Default endpoint request type has body property

* Improve types of transform methods

* Export server types from index (to be removed)

* Update config api impl

* Update lightclient api impl

* Update events api impl

* Update lodestar api impl

* Update proof api impl

* Update node api impl

* Update debug api impl

* Update state api impl

* Update pool api impl

* Update blocks api impl

* Partially update validator api impl

* Update beacon routes export

* Align submitPoolBlsToExecutionChange method args

* Filters are always a object

* Update errors messages

* Add beacon client methods

* Add missing routeId label to stream time metric

* Fix json casing in codecs

* Apply remaining changes from #6227

* Produce block apis only have version meta

* Add block values meta to all produce block apis

* Apply changes from #6337

* Handle unsafe version in WithMeta and WithVersion

* Restore server api error

* Update fastify route types

* Update server routes / handlers

* Remove unnecessary type cast

* Restore per route clients

* Fix beacon route types

* Remove option to patch fetch from http client

* Update eventstream client, remove fetch override

Fallback does not work like this, see #6180 for proper solution

* Use StringType for validator status until #6059

* Remove empty fetch.ts file

* Add a few todos

* Update builder client and server routes

* Update beacon exports

* Update api index exports

* Update builder index imports

* Improve type safety of schema definitions

* Add headers to fastify schema

* Fix schema definition type

* Add missing schemas to route definitions

* Fix response codec type

* Remove response codec type casts

* Fix casing in json only codec

* Reuse EmptyResponseCodec

* Update base rest api server

* Update keymanager routes, client and server

* Reuse data types in keymanager impl

* Do not await setting headers, not a promise

* Improve type safety of empty codecs

* Only require to implement supported req methods

* Handle requests that only support one format

* Handle responses that only support one format

* Add json / ssz only req codecs

* Update only support errors

* Fix assertion

* Set correct accept header if only supports one format

* Fix eslint / prettier issues

* More formatting fixes

* Fix fallback request retries in case of http errors

* Formatting of res.error

* Add add retry functionality to http client (from #6387)

* Update rewards routes and server (#6178 and #6260)

* Allow to omit body in ssz req if not defined

* Always set metadata headers in response

* Cache wire format in api response

* Only call raw body for json meta

* Update api package tests (wip)

* Test json and ssz format in generic server tests

* Add a bunch of todos

* Fix a few broken route definitions

* Fix partial config test

* Another todo note

* Stringify body of json requests

* Override default response json method

* Validate external consensus version headers in request

* Add error handling todo

* Skip body schema validation for ssz request bodies

* Clean up generic server tests

* Pass node, proof, events generic tests

* Use enum for media types

* Fix a bunch of route definitions

* Add justified to blockid type

* Properly handle booleans, remove block values codec

* Create Uint8Array test data without allocating Buffer

* Let fastify handle Buffer conversion

* Convert Buffer to Uint8Array in content type parser

* Fix build issues

* Fix fork type in builder routes

* Add some notes

* Properly parse request headers

* Fix incorrect type assumptions in transform

* Generic server tests are passing (except lightclient)

* Correctly handle APIs with empty responses

* Update getHeader return type to reflect no bid responses

* Do not append '?' to URL if query string is empty

* Let server handler set status code for parsing errors

* Remove unused import

* Rename function, request specific

* Completely drop ssz support from getSpec

* Spec tests are passing against latest releases

* Drop unused fastify route config

* Drop ssz request from builder routes, not yet supported

* Remove import

* Apply change from #6695

* Update execution optimistic meta

* Apply changes from #6645

* Add workaround to fix epoch committees type issue

* Add todo to fix inefficient state conversion

* Convert committee to normal array

* Apply changes from #6655

* Align args of validators endpoints

* Convert indices to str in rewards apis

* Update api spec version of README badges

* Revert table formatting changes

* Make this accessible for class-basd API implementations

* Throw err if metadata is accessed for failed response

* Add assertOk to api response

* Tweak api error message

* Update operationIds match spec value

* Add missing version to blob sidecars metadata

* Test headers and ssz bodies against spec

* Minor reordering of code in spec parsing

* submitBlindedBlock throws err if fork is not execution

* responseOk might be undefined

* Remove statusOk from route definition

* Remove stale comment

* Less build errors in beacon-node

* getBlobSidecars return version from server impl

* Update validator produce block impl

* More expressive pool method args

* Application methods might be undefined in mock implementations

* Adress open TODOs in server handler

* Api response methods are synchronous now

* Fix all remaining build issues

* Use more performant from/toHex in server api impls

* Clean up some TODOs

* Fix ApiError type

* Errors related to parsing return a 400 status code

* Simplify method binding

* Forward api context to application methods

* There is no easy way to make generic opts typesafe

* Better separation of server / client code

* Fix comment about missing builder bid

* Remove todo, not worth the change / extra indentation

* Rename route definitions functions

* Return 400 if data passed to keymanager is invalid

* Properly handle response metadata headers

* Fix lint issues

* Add header jsdoc

* Move metadata related code into separate file

* Remove ssz from POST requests without body

* Only set content-type header if body exists

* Fix headers extra

* POST requests without body are handled similar to GET requests

* Fix http client options tests

* Improve validation and type safety of JSON metadata

* Add type guard for request without body

* Differentiate based on body instead of GET vs POST

* More renaming

* Simplify RequestCode type

* Review routes, improve validation

* Remaining local diff

* Fix accept header handling if only support one wire format

* Update 406 error to more closely match spec example

* Enforce version header via custom check instead of schema

* Use ssz as default request wire format

* Log failure to receive head event to verbose

* Do not set default value for context

* Update getClient return type to better align with method name

* Consistent pattern to get route definitions

* Dedupe api client type for builder and keymanager

* Fix fallback logic if server returns http error

* Update head event error logging

* Retry 415 errors with JSON and cache SSZ not supported

* Use fetch spy to assert call times

* Update comment

* Update getLightClientUpdatesByRange endpoint meta

* Do not forward ssz bytes of blinded block to publishBlock

* Fix lightclient e2e tests

* Version header in publishBlock api is optional

* Reduce type duplication

* Add option to override request init in route definition

* Add JsonOnlyResp codec

* Validate boolean str value from headers

* Document default wire formats

* Simplify merging of inits in http client

* Remove type hacks from fetchBeaconHealth

* Reduce call stack in http client

* Add .ssz() equivalent method for json to api response

* More http client tests

* Ensure topics query is provided to eventstream api

* Validate request content type in handler

Fastify does not cover all edge cases

* Review routes, fix param docs, no empty comments

* Fix typo

* Add note about builder spec not supporting ssz

* Consistently move keymanager jsdoc to routes

* Sanitize user provided init values before merging

* Remove unused ssz only codec

* Allow passing wire formats as string literals

* chore: review proof routes (#6843)

Review proof routes

* chore: review lightclient routes (#6842)

Review lightclient routes

* chore: review node routes (#6844)

Review node routes

* feat: add cli flags to configure http wire format (#6840)

* Review PR, mostly cosmetic changes

* Fix event stream error handling

---------

Co-authored-by: Cayman <caymannava@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants