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: return 404 error if no sync committee contribution is available #6649

Merged
merged 4 commits into from
Aug 18, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Apr 7, 2024

Motivation

Similar to #6648 we should be return a 404 error instead of 500 internal server error.

Description

Return 404 error if sync committee contribution is not available for slot / subnet / block root.

Note: This is not yet defined in the spec, see ethereum/beacon-APIs#440

@nflaig nflaig requested a review from a team as a code owner April 7, 2024 16:13
Copy link

codecov bot commented Apr 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.25%. Comparing base (550c349) to head (6decde4).
Report is 1 commits behind head on unstable.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6649   +/-   ##
=========================================
  Coverage     49.25%   49.25%           
=========================================
  Files           578      578           
  Lines         37443    37443           
  Branches       2172     2167    -5     
=========================================
  Hits          18441    18441           
  Misses        18962    18962           
  Partials         40       40           

Copy link
Contributor

github-actions bot commented Apr 7, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 389cb6b Previous: 550c349 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.8278 ms/op 1.8887 ms/op 0.97
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 47.005 us/op 53.714 us/op 0.88
BLS verify - blst 864.00 us/op 1.0483 ms/op 0.82
BLS verifyMultipleSignatures 3 - blst 1.2498 ms/op 1.4036 ms/op 0.89
BLS verifyMultipleSignatures 8 - blst 1.8543 ms/op 2.1042 ms/op 0.88
BLS verifyMultipleSignatures 32 - blst 5.5718 ms/op 5.5743 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 10.397 ms/op 10.643 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 16.815 ms/op 17.292 ms/op 0.97
BLS deserializing 10000 signatures 668.81 ms/op 702.51 ms/op 0.95
BLS deserializing 100000 signatures 6.7018 s/op 6.8525 s/op 0.98
BLS verifyMultipleSignatures - same message - 3 - blst 1.2449 ms/op 1.0984 ms/op 1.13
BLS verifyMultipleSignatures - same message - 8 - blst 1.6084 ms/op 1.2125 ms/op 1.33
BLS verifyMultipleSignatures - same message - 32 - blst 1.9333 ms/op 2.0119 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst 2.6779 ms/op 2.9316 ms/op 0.91
BLS verifyMultipleSignatures - same message - 128 - blst 4.2927 ms/op 4.7093 ms/op 0.91
BLS aggregatePubkeys 32 - blst 19.529 us/op 20.878 us/op 0.94
BLS aggregatePubkeys 128 - blst 69.771 us/op 74.430 us/op 0.94
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 73.328 ms/op 85.841 ms/op 0.85
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 58.968 ms/op 85.995 ms/op 0.69
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 41.707 ms/op 37.396 ms/op 1.12
getSlashingsAndExits - default max 100.66 us/op 117.04 us/op 0.86
getSlashingsAndExits - 2k 285.54 us/op 316.71 us/op 0.90
proposeBlockBody type=full, size=empty 5.7236 ms/op 5.9370 ms/op 0.96
isKnown best case - 1 super set check 297.00 ns/op 339.00 ns/op 0.88
isKnown normal case - 2 super set checks 286.00 ns/op 342.00 ns/op 0.84
isKnown worse case - 16 super set checks 278.00 ns/op 305.00 ns/op 0.91
InMemoryCheckpointStateCache - add get delete 3.0520 us/op 3.0740 us/op 0.99
validate api signedAggregateAndProof - struct 1.6685 ms/op 1.6041 ms/op 1.04
validate gossip signedAggregateAndProof - struct 1.7070 ms/op 1.4871 ms/op 1.15
validate gossip attestation - vc 640000 1.0476 ms/op 1.0920 ms/op 0.96
batch validate gossip attestation - vc 640000 - chunk 32 138.53 us/op 137.77 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 122.61 us/op 116.20 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 128 119.55 us/op 104.92 us/op 1.14
batch validate gossip attestation - vc 640000 - chunk 256 107.59 us/op 107.69 us/op 1.00
pickEth1Vote - no votes 1.0362 ms/op 1.0715 ms/op 0.97
pickEth1Vote - max votes 7.8296 ms/op 6.8288 ms/op 1.15
pickEth1Vote - Eth1Data hashTreeRoot value x2048 25.735 ms/op 18.866 ms/op 1.36
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 27.734 ms/op 20.017 ms/op 1.39
pickEth1Vote - Eth1Data fastSerialize value x2048 441.32 us/op 481.07 us/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.8289 ms/op 4.6008 ms/op 0.83
bytes32 toHexString 433.00 ns/op 497.00 ns/op 0.87
bytes32 Buffer.toString(hex) 249.00 ns/op 262.00 ns/op 0.95
bytes32 Buffer.toString(hex) from Uint8Array 374.00 ns/op 378.00 ns/op 0.99
bytes32 Buffer.toString(hex) + 0x 250.00 ns/op 261.00 ns/op 0.96
Object access 1 prop 0.13200 ns/op 0.14900 ns/op 0.89
Map access 1 prop 0.12900 ns/op 0.14000 ns/op 0.92
Object get x1000 6.1030 ns/op 6.2720 ns/op 0.97
Map get x1000 6.3680 ns/op 6.5930 ns/op 0.97
Object set x1000 32.133 ns/op 38.814 ns/op 0.83
Map set x1000 22.361 ns/op 26.675 ns/op 0.84
Return object 10000 times 0.28780 ns/op 0.30730 ns/op 0.94
Throw Error 10000 times 3.3898 us/op 3.5582 us/op 0.95
toHex 147.74 ns/op 164.94 ns/op 0.90
Buffer.from 130.65 ns/op 143.44 ns/op 0.91
shared Buffer 86.609 ns/op 96.840 ns/op 0.89
fastMsgIdFn sha256 / 200 bytes 2.3520 us/op 2.4750 us/op 0.95
fastMsgIdFn h32 xxhash / 200 bytes 236.00 ns/op 275.00 ns/op 0.86
fastMsgIdFn h64 xxhash / 200 bytes 276.00 ns/op 292.00 ns/op 0.95
fastMsgIdFn sha256 / 1000 bytes 7.4460 us/op 7.8070 us/op 0.95
fastMsgIdFn h32 xxhash / 1000 bytes 385.00 ns/op 392.00 ns/op 0.98
fastMsgIdFn h64 xxhash / 1000 bytes 354.00 ns/op 361.00 ns/op 0.98
fastMsgIdFn sha256 / 10000 bytes 64.688 us/op 65.859 us/op 0.98
fastMsgIdFn h32 xxhash / 10000 bytes 1.8760 us/op 1.9320 us/op 0.97
fastMsgIdFn h64 xxhash / 10000 bytes 1.2500 us/op 1.2650 us/op 0.99
send data - 1000 256B messages 13.356 ms/op 13.891 ms/op 0.96
send data - 1000 512B messages 16.772 ms/op 18.084 ms/op 0.93
send data - 1000 1024B messages 25.230 ms/op 28.866 ms/op 0.87
send data - 1000 1200B messages 27.077 ms/op 26.902 ms/op 1.01
send data - 1000 2048B messages 33.227 ms/op 33.098 ms/op 1.00
send data - 1000 4096B messages 32.748 ms/op 36.520 ms/op 0.90
send data - 1000 16384B messages 71.376 ms/op 78.815 ms/op 0.91
send data - 1000 65536B messages 206.65 ms/op 235.02 ms/op 0.88
enrSubnets - fastDeserialize 64 bits 991.00 ns/op 1.2310 us/op 0.81
enrSubnets - ssz BitVector 64 bits 347.00 ns/op 405.00 ns/op 0.86
enrSubnets - fastDeserialize 4 bits 142.00 ns/op 187.00 ns/op 0.76
enrSubnets - ssz BitVector 4 bits 347.00 ns/op 387.00 ns/op 0.90
prioritizePeers score -10:0 att 32-0.1 sync 2-0 142.32 us/op 195.46 us/op 0.73
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 138.25 us/op 213.97 us/op 0.65
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 327.24 us/op 296.14 us/op 1.11
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 524.00 us/op 547.71 us/op 0.96
prioritizePeers score 0:0 att 64-1 sync 4-1 704.19 us/op 953.61 us/op 0.74
array of 16000 items push then shift 1.5543 us/op 1.7185 us/op 0.90
LinkedList of 16000 items push then shift 6.8800 ns/op 7.8690 ns/op 0.87
array of 16000 items push then pop 76.653 ns/op 135.16 ns/op 0.57
LinkedList of 16000 items push then pop 6.7590 ns/op 7.6000 ns/op 0.89
array of 24000 items push then shift 2.3594 us/op 2.5501 us/op 0.93
LinkedList of 24000 items push then shift 6.8580 ns/op 7.8860 ns/op 0.87
array of 24000 items push then pop 150.66 ns/op 169.07 ns/op 0.89
LinkedList of 24000 items push then pop 6.7420 ns/op 7.6410 ns/op 0.88
intersect bitArray bitLen 8 6.2050 ns/op 6.9850 ns/op 0.89
intersect array and set length 8 44.295 ns/op 50.810 ns/op 0.87
intersect bitArray bitLen 128 28.916 ns/op 30.769 ns/op 0.94
intersect array and set length 128 659.17 ns/op 755.01 ns/op 0.87
bitArray.getTrueBitIndexes() bitLen 128 2.1600 us/op 2.3030 us/op 0.94
bitArray.getTrueBitIndexes() bitLen 248 4.0930 us/op 4.5460 us/op 0.90
bitArray.getTrueBitIndexes() bitLen 512 8.3720 us/op 8.7540 us/op 0.96
Buffer.concat 32 items 928.00 ns/op 995.00 ns/op 0.93
Uint8Array.set 32 items 1.5470 us/op 2.2950 us/op 0.67
Buffer.copy 1.8520 us/op 2.8270 us/op 0.66
Uint8Array.set - with subarray 2.9350 us/op 3.7360 us/op 0.79
Uint8Array.set - without subarray 1.8040 us/op 2.1720 us/op 0.83
getUint32 - dataview 237.00 ns/op 335.00 ns/op 0.71
getUint32 - manual 157.00 ns/op 289.00 ns/op 0.54
Set add up to 64 items then delete first 2.1681 us/op 2.5981 us/op 0.83
OrderedSet add up to 64 items then delete first 3.2293 us/op 4.3687 us/op 0.74
Set add up to 64 items then delete last 2.5492 us/op 3.1546 us/op 0.81
OrderedSet add up to 64 items then delete last 3.8856 us/op 4.8596 us/op 0.80
Set add up to 64 items then delete middle 2.6617 us/op 3.2344 us/op 0.82
OrderedSet add up to 64 items then delete middle 5.6522 us/op 6.4894 us/op 0.87
Set add up to 128 items then delete first 4.9518 us/op 6.3338 us/op 0.78
OrderedSet add up to 128 items then delete first 7.8599 us/op 10.919 us/op 0.72
Set add up to 128 items then delete last 5.2355 us/op 6.4672 us/op 0.81
OrderedSet add up to 128 items then delete last 7.6888 us/op 10.612 us/op 0.72
Set add up to 128 items then delete middle 5.0621 us/op 6.8545 us/op 0.74
OrderedSet add up to 128 items then delete middle 13.927 us/op 16.913 us/op 0.82
Set add up to 256 items then delete first 10.909 us/op 13.773 us/op 0.79
OrderedSet add up to 256 items then delete first 15.555 us/op 20.050 us/op 0.78
Set add up to 256 items then delete last 10.393 us/op 14.037 us/op 0.74
OrderedSet add up to 256 items then delete last 15.509 us/op 18.464 us/op 0.84
Set add up to 256 items then delete middle 9.9162 us/op 14.218 us/op 0.70
OrderedSet add up to 256 items then delete middle 40.005 us/op 50.154 us/op 0.80
transfer serialized Status (84 B) 1.3390 us/op 1.6050 us/op 0.83
copy serialized Status (84 B) 1.1460 us/op 1.3430 us/op 0.85
transfer serialized SignedVoluntaryExit (112 B) 1.4670 us/op 1.5190 us/op 0.97
copy serialized SignedVoluntaryExit (112 B) 1.1630 us/op 1.3710 us/op 0.85
transfer serialized ProposerSlashing (416 B) 1.5990 us/op 1.9970 us/op 0.80
copy serialized ProposerSlashing (416 B) 1.5770 us/op 1.9430 us/op 0.81
transfer serialized Attestation (485 B) 1.6290 us/op 1.9930 us/op 0.82
copy serialized Attestation (485 B) 1.4270 us/op 2.0680 us/op 0.69
transfer serialized AttesterSlashing (33232 B) 2.0010 us/op 1.9260 us/op 1.04
copy serialized AttesterSlashing (33232 B) 5.3890 us/op 11.276 us/op 0.48
transfer serialized Small SignedBeaconBlock (128000 B) 2.8600 us/op 4.3180 us/op 0.66
copy serialized Small SignedBeaconBlock (128000 B) 18.207 us/op 26.756 us/op 0.68
transfer serialized Avg SignedBeaconBlock (200000 B) 3.8170 us/op 4.2630 us/op 0.90
copy serialized Avg SignedBeaconBlock (200000 B) 27.418 us/op 34.848 us/op 0.79
transfer serialized BlobsSidecar (524380 B) 3.2690 us/op 4.9490 us/op 0.66
copy serialized BlobsSidecar (524380 B) 81.650 us/op 256.50 us/op 0.32
transfer serialized Big SignedBeaconBlock (1000000 B) 2.9530 us/op 4.9730 us/op 0.59
copy serialized Big SignedBeaconBlock (1000000 B) 210.88 us/op 206.09 us/op 1.02
pass gossip attestations to forkchoice per slot 3.6383 ms/op 3.0153 ms/op 1.21
forkChoice updateHead vc 100000 bc 64 eq 0 509.64 us/op 627.11 us/op 0.81
forkChoice updateHead vc 600000 bc 64 eq 0 3.0077 ms/op 3.2812 ms/op 0.92
forkChoice updateHead vc 1000000 bc 64 eq 0 5.4608 ms/op 7.3866 ms/op 0.74
forkChoice updateHead vc 600000 bc 320 eq 0 3.1500 ms/op 3.2270 ms/op 0.98
forkChoice updateHead vc 600000 bc 1200 eq 0 3.8494 ms/op 3.4158 ms/op 1.13
forkChoice updateHead vc 600000 bc 7200 eq 0 3.7546 ms/op 4.2092 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 10.893 ms/op 11.072 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 10.813 ms/op 11.112 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 300000 14.804 ms/op 15.718 ms/op 0.94
computeDeltas 500000 validators 300 proto nodes 3.6254 ms/op 3.8161 ms/op 0.95
computeDeltas 500000 validators 1200 proto nodes 3.6097 ms/op 3.8832 ms/op 0.93
computeDeltas 500000 validators 7200 proto nodes 3.6381 ms/op 3.9521 ms/op 0.92
computeDeltas 750000 validators 300 proto nodes 5.2051 ms/op 5.7777 ms/op 0.90
computeDeltas 750000 validators 1200 proto nodes 5.1976 ms/op 5.7444 ms/op 0.90
computeDeltas 750000 validators 7200 proto nodes 5.2427 ms/op 5.7672 ms/op 0.91
computeDeltas 1400000 validators 300 proto nodes 9.8223 ms/op 10.506 ms/op 0.93
computeDeltas 1400000 validators 1200 proto nodes 9.8706 ms/op 10.661 ms/op 0.93
computeDeltas 1400000 validators 7200 proto nodes 9.7031 ms/op 10.410 ms/op 0.93
computeDeltas 2100000 validators 300 proto nodes 14.457 ms/op 15.439 ms/op 0.94
computeDeltas 2100000 validators 1200 proto nodes 14.410 ms/op 15.103 ms/op 0.95
computeDeltas 2100000 validators 7200 proto nodes 14.497 ms/op 15.268 ms/op 0.95
altair processAttestation - 250000 vs - 7PWei normalcase 2.6101 ms/op 1.7407 ms/op 1.50
altair processAttestation - 250000 vs - 7PWei worstcase 3.4275 ms/op 2.6723 ms/op 1.28
altair processAttestation - setStatus - 1/6 committees join 85.668 us/op 95.575 us/op 0.90
altair processAttestation - setStatus - 1/3 committees join 346.99 us/op 182.83 us/op 1.90
altair processAttestation - setStatus - 1/2 committees join 239.10 us/op 252.75 us/op 0.95
altair processAttestation - setStatus - 2/3 committees join 494.69 us/op 328.74 us/op 1.50
altair processAttestation - setStatus - 4/5 committees join 463.51 us/op 497.29 us/op 0.93
altair processAttestation - setStatus - 100% committees join 555.83 us/op 650.97 us/op 0.85
altair processBlock - 250000 vs - 7PWei normalcase 7.8543 ms/op 5.5519 ms/op 1.41
altair processBlock - 250000 vs - 7PWei normalcase hashState 31.992 ms/op 28.006 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase 49.267 ms/op 40.202 ms/op 1.23
altair processBlock - 250000 vs - 7PWei worstcase hashState 84.281 ms/op 84.062 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 2.4300 ms/op 2.4151 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 27.349 ms/op 26.314 ms/op 1.04
altair processEth1Data - 250000 vs - 7PWei normalcase 293.72 us/op 387.49 us/op 0.76
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 8.1380 us/op 7.1300 us/op 1.14
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 27.764 us/op 27.304 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 11.356 us/op 12.035 us/op 0.94
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 8.3720 us/op 6.4340 us/op 1.30
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 121.69 us/op 94.983 us/op 1.28
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.2047 ms/op 1.1159 ms/op 1.08
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 898.38 us/op 1.1078 ms/op 0.81
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.5414 ms/op 1.2379 ms/op 1.25
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.3322 ms/op 2.7228 ms/op 0.86
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.8361 ms/op 1.6645 ms/op 1.70
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.7355 ms/op 4.4624 ms/op 0.84
Tree 40 250000 create 223.42 ms/op 381.81 ms/op 0.59
Tree 40 250000 get(125000) 141.56 ns/op 166.74 ns/op 0.85
Tree 40 250000 set(125000) 633.38 ns/op 910.69 ns/op 0.70
Tree 40 250000 toArray() 14.787 ms/op 24.516 ms/op 0.60
Tree 40 250000 iterate all - toArray() + loop 14.875 ms/op 23.540 ms/op 0.63
Tree 40 250000 iterate all - get(i) 52.557 ms/op 64.667 ms/op 0.81
MutableVector 250000 create 13.316 ms/op 14.806 ms/op 0.90
MutableVector 250000 get(125000) 6.0740 ns/op 10.270 ns/op 0.59
MutableVector 250000 set(125000) 183.99 ns/op 440.82 ns/op 0.42
MutableVector 250000 toArray() 3.3711 ms/op 5.5448 ms/op 0.61
MutableVector 250000 iterate all - toArray() + loop 3.4744 ms/op 5.4105 ms/op 0.64
MutableVector 250000 iterate all - get(i) 1.6727 ms/op 1.7305 ms/op 0.97
Array 250000 create 2.9856 ms/op 4.6257 ms/op 0.65
Array 250000 clone - spread 1.3332 ms/op 1.9746 ms/op 0.68
Array 250000 get(125000) 0.40100 ns/op 0.49000 ns/op 0.82
Array 250000 set(125000) 0.42600 ns/op 0.54000 ns/op 0.79
Array 250000 iterate all - loop 106.07 us/op 91.042 us/op 1.17
effectiveBalanceIncrements clone Uint8Array 300000 29.389 us/op 73.650 us/op 0.40
effectiveBalanceIncrements clone MutableVector 300000 126.00 ns/op 142.00 ns/op 0.89
effectiveBalanceIncrements rw all Uint8Array 300000 195.26 us/op 211.77 us/op 0.92
effectiveBalanceIncrements rw all MutableVector 300000 61.318 ms/op 94.868 ms/op 0.65
phase0 afterProcessEpoch - 250000 vs - 7PWei 87.300 ms/op 94.160 ms/op 0.93
Array.fill - length 1000000 3.5423 ms/op 5.6884 ms/op 0.62
Array push - length 1000000 17.333 ms/op 25.259 ms/op 0.69
Array.get 0.26586 ns/op 0.30609 ns/op 0.87
Uint8Array.get 0.41823 ns/op 0.47453 ns/op 0.88
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.814 ms/op 20.903 ms/op 0.80
altair processEpoch - mainnet_e81889 368.06 ms/op 402.39 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 16.747 ms/op 26.242 ms/op 0.64
mainnet_e81889 - altair processJustificationAndFinalization 11.178 us/op 29.579 us/op 0.38
mainnet_e81889 - altair processInactivityUpdates 4.9177 ms/op 6.5830 ms/op 0.75
mainnet_e81889 - altair processRewardsAndPenalties 65.078 ms/op 56.544 ms/op 1.15
mainnet_e81889 - altair processRegistryUpdates 2.6100 us/op 3.8090 us/op 0.69
mainnet_e81889 - altair processSlashings 685.00 ns/op 1.3050 us/op 0.52
mainnet_e81889 - altair processEth1DataReset 454.00 ns/op 963.00 ns/op 0.47
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.1668 ms/op 3.8312 ms/op 0.83
mainnet_e81889 - altair processSlashingsReset 4.1830 us/op 6.5710 us/op 0.64
mainnet_e81889 - altair processRandaoMixesReset 5.1480 us/op 6.6240 us/op 0.78
mainnet_e81889 - altair processHistoricalRootsUpdate 502.00 ns/op 1.2680 us/op 0.40
mainnet_e81889 - altair processParticipationFlagUpdates 2.6520 us/op 4.0450 us/op 0.66
mainnet_e81889 - altair processSyncCommitteeUpdates 437.00 ns/op 1.2590 us/op 0.35
mainnet_e81889 - altair afterProcessEpoch 90.580 ms/op 99.092 ms/op 0.91
capella processEpoch - mainnet_e217614 1.2457 s/op 1.4026 s/op 0.89
mainnet_e217614 - capella beforeProcessEpoch 68.705 ms/op 74.907 ms/op 0.92
mainnet_e217614 - capella processJustificationAndFinalization 18.015 us/op 22.696 us/op 0.79
mainnet_e217614 - capella processInactivityUpdates 16.607 ms/op 21.230 ms/op 0.78
mainnet_e217614 - capella processRewardsAndPenalties 289.14 ms/op 261.86 ms/op 1.10
mainnet_e217614 - capella processRegistryUpdates 20.103 us/op 13.660 us/op 1.47
mainnet_e217614 - capella processSlashings 617.00 ns/op 364.00 ns/op 1.70
mainnet_e217614 - capella processEth1DataReset 544.00 ns/op 1.3850 us/op 0.39
mainnet_e217614 - capella processEffectiveBalanceUpdates 10.179 ms/op 15.334 ms/op 0.66
mainnet_e217614 - capella processSlashingsReset 2.4180 us/op 3.1340 us/op 0.77
mainnet_e217614 - capella processRandaoMixesReset 5.2090 us/op 4.4460 us/op 1.17
mainnet_e217614 - capella processHistoricalRootsUpdate 547.00 ns/op 552.00 ns/op 0.99
mainnet_e217614 - capella processParticipationFlagUpdates 4.4700 us/op 2.0460 us/op 2.18
mainnet_e217614 - capella afterProcessEpoch 232.23 ms/op 238.98 ms/op 0.97
phase0 processEpoch - mainnet_e58758 399.84 ms/op 458.33 ms/op 0.87
mainnet_e58758 - phase0 beforeProcessEpoch 97.339 ms/op 97.366 ms/op 1.00
mainnet_e58758 - phase0 processJustificationAndFinalization 24.632 us/op 22.207 us/op 1.11
mainnet_e58758 - phase0 processRewardsAndPenalties 36.535 ms/op 36.315 ms/op 1.01
mainnet_e58758 - phase0 processRegistryUpdates 11.544 us/op 11.762 us/op 0.98
mainnet_e58758 - phase0 processSlashings 592.00 ns/op 483.00 ns/op 1.23
mainnet_e58758 - phase0 processEth1DataReset 535.00 ns/op 528.00 ns/op 1.01
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.7094 ms/op 2.5797 ms/op 0.66
mainnet_e58758 - phase0 processSlashingsReset 4.7770 us/op 4.8210 us/op 0.99
mainnet_e58758 - phase0 processRandaoMixesReset 6.1350 us/op 6.8220 us/op 0.90
mainnet_e58758 - phase0 processHistoricalRootsUpdate 526.00 ns/op 558.00 ns/op 0.94
mainnet_e58758 - phase0 processParticipationRecordUpdates 4.4860 us/op 4.4210 us/op 1.01
mainnet_e58758 - phase0 afterProcessEpoch 74.551 ms/op 74.454 ms/op 1.00
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.6730 ms/op 2.0066 ms/op 0.83
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7660 ms/op 2.2831 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 20.512 ms/op 19.060 ms/op 1.08
altair processInactivityUpdates - 250000 worstcase 21.964 ms/op 21.778 ms/op 1.01
phase0 processRegistryUpdates - 250000 normalcase 8.6780 us/op 9.1390 us/op 0.95
phase0 processRegistryUpdates - 250000 badcase_full_deposits 469.39 us/op 472.64 us/op 0.99
phase0 processRegistryUpdates - 250000 worstcase 0.5 138.40 ms/op 136.69 ms/op 1.01
altair processRewardsAndPenalties - 250000 normalcase 42.052 ms/op 44.202 ms/op 0.95
altair processRewardsAndPenalties - 250000 worstcase 43.743 ms/op 56.226 ms/op 0.78
phase0 getAttestationDeltas - 250000 normalcase 7.6645 ms/op 7.3755 ms/op 1.04
phase0 getAttestationDeltas - 250000 worstcase 7.7170 ms/op 7.3847 ms/op 1.04
phase0 processSlashings - 250000 worstcase 102.00 us/op 119.63 us/op 0.85
altair processSyncCommitteeUpdates - 250000 131.73 ms/op 123.76 ms/op 1.06
BeaconState.hashTreeRoot - No change 299.00 ns/op 279.00 ns/op 1.07
BeaconState.hashTreeRoot - 1 full validator 105.16 us/op 149.39 us/op 0.70
BeaconState.hashTreeRoot - 32 full validator 1.2335 ms/op 1.5423 ms/op 0.80
BeaconState.hashTreeRoot - 512 full validator 13.535 ms/op 14.158 ms/op 0.96
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 106.47 us/op 161.44 us/op 0.66
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8581 ms/op 1.9491 ms/op 0.95
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 25.127 ms/op 28.644 ms/op 0.88
BeaconState.hashTreeRoot - 1 balances 129.77 us/op 112.22 us/op 1.16
BeaconState.hashTreeRoot - 32 balances 1.0481 ms/op 988.72 us/op 1.06
BeaconState.hashTreeRoot - 512 balances 9.6340 ms/op 11.157 ms/op 0.86
BeaconState.hashTreeRoot - 250000 balances 201.31 ms/op 153.07 ms/op 1.32
aggregationBits - 2048 els - zipIndexesInBitList 64.671 us/op 24.710 us/op 2.62
byteArrayEquals 32 52.291 ns/op 54.581 ns/op 0.96
Buffer.compare 32 17.255 ns/op 18.076 ns/op 0.95
byteArrayEquals 1024 1.5500 us/op 1.5948 us/op 0.97
Buffer.compare 1024 25.449 ns/op 27.245 ns/op 0.93
byteArrayEquals 16384 24.684 us/op 25.391 us/op 0.97
Buffer.compare 16384 200.28 ns/op 188.97 ns/op 1.06
byteArrayEquals 123687377 187.33 ms/op 188.75 ms/op 0.99
Buffer.compare 123687377 6.1212 ms/op 6.5521 ms/op 0.93
byteArrayEquals 32 - diff last byte 51.604 ns/op 50.847 ns/op 1.01
Buffer.compare 32 - diff last byte 17.149 ns/op 17.145 ns/op 1.00
byteArrayEquals 1024 - diff last byte 1.5569 us/op 1.5307 us/op 1.02
Buffer.compare 1024 - diff last byte 25.959 ns/op 25.784 ns/op 1.01
byteArrayEquals 16384 - diff last byte 24.802 us/op 24.498 us/op 1.01
Buffer.compare 16384 - diff last byte 214.58 ns/op 187.12 ns/op 1.15
byteArrayEquals 123687377 - diff last byte 188.88 ms/op 183.72 ms/op 1.03
Buffer.compare 123687377 - diff last byte 6.5341 ms/op 6.1122 ms/op 1.07
byteArrayEquals 32 - random bytes 5.2170 ns/op 4.9550 ns/op 1.05
Buffer.compare 32 - random bytes 17.383 ns/op 17.223 ns/op 1.01
byteArrayEquals 1024 - random bytes 5.0440 ns/op 4.9470 ns/op 1.02
Buffer.compare 1024 - random bytes 17.114 ns/op 17.137 ns/op 1.00
byteArrayEquals 16384 - random bytes 5.0290 ns/op 5.2540 ns/op 0.96
Buffer.compare 16384 - random bytes 17.181 ns/op 17.275 ns/op 0.99
byteArrayEquals 123687377 - random bytes 6.2900 ns/op 6.2000 ns/op 1.01
Buffer.compare 123687377 - random bytes 18.440 ns/op 18.580 ns/op 0.99
regular array get 100000 times 33.508 us/op 41.667 us/op 0.80
wrappedArray get 100000 times 32.152 us/op 41.520 us/op 0.77
arrayWithProxy get 100000 times 13.369 ms/op 12.867 ms/op 1.04
ssz.Root.equals 45.127 ns/op 43.472 ns/op 1.04
byteArrayEquals 44.504 ns/op 42.854 ns/op 1.04
Buffer.compare 10.353 ns/op 9.7710 ns/op 1.06
shuffle list - 16384 els 6.1596 ms/op 6.1460 ms/op 1.00
shuffle list - 250000 els 91.888 ms/op 90.482 ms/op 1.02
processSlot - 1 slots 13.563 us/op 12.906 us/op 1.05
processSlot - 32 slots 2.9197 ms/op 3.5572 ms/op 0.82
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 42.616 ms/op 40.432 ms/op 1.05
getCommitteeAssignments - req 1 vs - 250000 vc 2.1667 ms/op 2.1333 ms/op 1.02
getCommitteeAssignments - req 100 vs - 250000 vc 4.1527 ms/op 4.1026 ms/op 1.01
getCommitteeAssignments - req 1000 vs - 250000 vc 4.4538 ms/op 4.3805 ms/op 1.02
findModifiedValidators - 10000 modified validators 255.67 ms/op 232.32 ms/op 1.10
findModifiedValidators - 1000 modified validators 198.52 ms/op 163.36 ms/op 1.22
findModifiedValidators - 100 modified validators 167.25 ms/op 145.13 ms/op 1.15
findModifiedValidators - 10 modified validators 199.87 ms/op 135.19 ms/op 1.48
findModifiedValidators - 1 modified validators 151.34 ms/op 135.88 ms/op 1.11
findModifiedValidators - no difference 153.77 ms/op 140.57 ms/op 1.09
compare ViewDUs 3.2519 s/op 3.1700 s/op 1.03
compare each validator Uint8Array 1.6462 s/op 1.6532 s/op 1.00
compare ViewDU to Uint8Array 1.0279 s/op 994.33 ms/op 1.03
migrate state 1000000 validators, 24 modified, 0 new 650.09 ms/op 577.03 ms/op 1.13
migrate state 1000000 validators, 1700 modified, 1000 new 899.65 ms/op 751.63 ms/op 1.20
migrate state 1000000 validators, 3400 modified, 2000 new 1.1085 s/op 998.92 ms/op 1.11
migrate state 1500000 validators, 24 modified, 0 new 670.89 ms/op 553.54 ms/op 1.21
migrate state 1500000 validators, 1700 modified, 1000 new 898.57 ms/op 779.92 ms/op 1.15
migrate state 1500000 validators, 3400 modified, 2000 new 1.1042 s/op 939.77 ms/op 1.17
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2300 ns/op 4.3100 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 670.55 ns/op 491.77 ns/op 1.36
computeProposers - vc 250000 7.7273 ms/op 7.2055 ms/op 1.07
computeEpochShuffling - vc 250000 89.206 ms/op 92.197 ms/op 0.97
getNextSyncCommittee - vc 250000 125.45 ms/op 119.98 ms/op 1.05
computeSigningRoot for AttestationData 21.088 us/op 16.999 us/op 1.24
hash AttestationData serialized data then Buffer.toString(base64) 1.4896 us/op 1.5847 us/op 0.94
toHexString serialized data 844.23 ns/op 881.18 ns/op 0.96
Buffer.toString(base64) 178.70 ns/op 168.03 ns/op 1.06
block root to RootHex using toHex 141.33 ns/op 142.24 ns/op 0.99
block root to RootHex using toRootHex 87.365 ns/op 94.619 ns/op 0.92

by benchmarkbot/action

@nflaig nflaig marked this pull request as draft April 7, 2024 23:27
@nflaig
Copy link
Member Author

nflaig commented Apr 7, 2024

Keeping as draft until behavior is clarified in spec

@nflaig nflaig marked this pull request as ready for review August 13, 2024 21:15
@nflaig
Copy link
Member Author

nflaig commented Aug 13, 2024

Keeping as draft until behavior is clarified in spec

Spec PR has been merged

@wemeetagain wemeetagain merged commit 6f470f8 into unstable Aug 18, 2024
20 checks passed
@wemeetagain wemeetagain deleted the nflaig/404-no-contribution branch August 18, 2024 02:00
philknows pushed a commit that referenced this pull request Sep 3, 2024
…6649)

* fix: return 404 error if no sync committee contribution is available

* Return 404 error if block not in fork choice
@wemeetagain
Copy link
Member

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

2 participants