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: ignore already known errors in API #6321

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

nflaig
Copy link
Member

@nflaig nflaig commented Jan 17, 2024

Motivation

Attestations might already be published by another node as part of a fallback setup or DVT cluster
and can reach our node by gossip before the api. The error can be ignored and should not result in a 500 response.

There are also other errors related to that like known aggregates which should be ignored as well (see previous PR #2598)

Description

Ignore already known (_ALREADY_KNOWN) errors in API and return 200 response.

Closes #6021

e instanceof SyncCommitteeError &&
e.type.code === SyncCommitteeErrorCode.SYNC_COMMITTEE_AGGREGATOR_ALREADY_KNOWN
) {
logger.debug("Ignoring known contributionAndProof", logCtx);
Copy link
Member Author

@nflaig nflaig Jan 17, 2024

Choose a reason for hiding this comment

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

This error was already ignored previously (added in #2598) but it got removed again by #2816 as the PR changed the error behavior.

In #4019 it was introduced again that the error is thrown during validation but the handling on the API was not re-added.

The error was recently observed (#6021 (comment)) and should be ignored again.

@@ -224,7 +234,7 @@ export function getBeaconPoolApi({
);

if (errors.length > 1) {
throw Error("Multiple errors on publishAggregateAndProofs\n" + errors.map((e) => e.message).join("\n"));
throw Error("Multiple errors on submitPoolSyncCommitteeSignatures\n" + errors.map((e) => e.message).join("\n"));
Copy link
Member Author

Choose a reason for hiding this comment

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

This just fixes a typo but it is worth highlighting that we don't need to handle already known errors in submitPoolSyncCommitteeSignatures as the api only verifies the signature

// Verify signature only, all other data is very likely to be correct, since the `signature` object is created by this node.
// Worst case if `signature` is not valid, gossip peers will drop it and slightly downscore us.
await validateApiSyncCommittee(chain, state, signature);

Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Merging #6321 (95fdf09) into unstable (9eb9cce) will increase coverage by 0.00%.
Report is 1 commits behind head on unstable.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6321   +/-   ##
=========================================
  Coverage     76.52%   76.53%           
=========================================
  Files           248      248           
  Lines         25935    25943    +8     
  Branches       1449     1449           
=========================================
+ Hits          19847    19855    +8     
  Misses         6058     6058           
  Partials         30       30           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 54c52fd Previous: 9eb9cce Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 709.65 us/op 791.59 us/op 0.90
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 168.99 us/op 103.01 us/op 1.64
BLS verify - blst-native 1.6773 ms/op 1.3680 ms/op 1.23
BLS verifyMultipleSignatures 3 - blst-native 3.3137 ms/op 2.8373 ms/op 1.17
BLS verifyMultipleSignatures 8 - blst-native 7.4540 ms/op 6.3555 ms/op 1.17
BLS verifyMultipleSignatures 32 - blst-native 26.236 ms/op 23.450 ms/op 1.12
BLS verifyMultipleSignatures 64 - blst-native 53.638 ms/op 46.093 ms/op 1.16
BLS verifyMultipleSignatures 128 - blst-native 105.15 ms/op 91.733 ms/op 1.15
BLS deserializing 10000 signatures 1.2272 s/op 958.74 ms/op 1.28
BLS deserializing 100000 signatures 11.186 s/op 9.7453 s/op 1.15
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.7277 ms/op 1.5295 ms/op 1.13
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.9339 ms/op 1.6159 ms/op 1.20
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.9089 ms/op 2.4445 ms/op 1.19
BLS verifyMultipleSignatures - same message - 64 - blst-native 4.7558 ms/op 3.9249 ms/op 1.21
BLS verifyMultipleSignatures - same message - 128 - blst-native 7.4908 ms/op 6.1466 ms/op 1.22
BLS aggregatePubkeys 32 - blst-native 34.432 us/op 28.447 us/op 1.21
BLS aggregatePubkeys 128 - blst-native 147.85 us/op 110.03 us/op 1.34
getAttestationsForBlock 72.923 ms/op 52.539 ms/op 1.39
getSlashingsAndExits - default max 428.41 us/op 168.34 us/op 2.54
getSlashingsAndExits - 2k 753.07 us/op 500.70 us/op 1.50
proposeBlockBody type=full, size=empty 7.3268 ms/op 6.3014 ms/op 1.16
isKnown best case - 1 super set check 767.00 ns/op 375.00 ns/op 2.05
isKnown normal case - 2 super set checks 816.00 ns/op 400.00 ns/op 2.04
isKnown worse case - 16 super set checks 888.00 ns/op 436.00 ns/op 2.04
CheckpointStateCache - add get delete 10.315 us/op 6.3900 us/op 1.61
validate api signedAggregateAndProof - struct 3.4584 ms/op 3.0515 ms/op 1.13
validate gossip signedAggregateAndProof - struct 3.4963 ms/op 3.0198 ms/op 1.16
validate gossip attestation - vc 640000 1.7656 ms/op 1.4890 ms/op 1.19
batch validate gossip attestation - vc 640000 - chunk 32 205.64 us/op 181.00 us/op 1.14
batch validate gossip attestation - vc 640000 - chunk 64 180.89 us/op 184.28 us/op 0.98
batch validate gossip attestation - vc 640000 - chunk 128 174.17 us/op 157.37 us/op 1.11
batch validate gossip attestation - vc 640000 - chunk 256 170.60 us/op 138.16 us/op 1.23
pickEth1Vote - no votes 1.8537 ms/op 1.3260 ms/op 1.40
pickEth1Vote - max votes 14.969 ms/op 13.394 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot value x2048 27.465 ms/op 21.799 ms/op 1.26
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 36.770 ms/op 30.195 ms/op 1.22
pickEth1Vote - Eth1Data fastSerialize value x2048 881.52 us/op 648.50 us/op 1.36
pickEth1Vote - Eth1Data fastSerialize tree x2048 7.0918 ms/op 7.0413 ms/op 1.01
bytes32 toHexString 951.00 ns/op 547.00 ns/op 1.74
bytes32 Buffer.toString(hex) 469.00 ns/op 293.00 ns/op 1.60
bytes32 Buffer.toString(hex) from Uint8Array 688.00 ns/op 438.00 ns/op 1.57
bytes32 Buffer.toString(hex) + 0x 394.00 ns/op 290.00 ns/op 1.36
Object access 1 prop 0.28600 ns/op 0.16600 ns/op 1.72
Map access 1 prop 0.18600 ns/op 0.15200 ns/op 1.22
Object get x1000 9.6000 ns/op 8.0580 ns/op 1.19
Map get x1000 1.0310 ns/op 0.79600 ns/op 1.30
Object set x1000 85.440 ns/op 53.724 ns/op 1.59
Map set x1000 64.659 ns/op 42.656 ns/op 1.52
Return object 10000 times 0.29610 ns/op 0.25040 ns/op 1.18
Throw Error 10000 times 4.3634 us/op 3.9591 us/op 1.10
fastMsgIdFn sha256 / 200 bytes 3.8930 us/op 3.4080 us/op 1.14
fastMsgIdFn h32 xxhash / 200 bytes 401.00 ns/op 294.00 ns/op 1.36
fastMsgIdFn h64 xxhash / 200 bytes 499.00 ns/op 346.00 ns/op 1.44
fastMsgIdFn sha256 / 1000 bytes 13.523 us/op 12.100 us/op 1.12
fastMsgIdFn h32 xxhash / 1000 bytes 573.00 ns/op 459.00 ns/op 1.25
fastMsgIdFn h64 xxhash / 1000 bytes 555.00 ns/op 445.00 ns/op 1.25
fastMsgIdFn sha256 / 10000 bytes 117.57 us/op 105.99 us/op 1.11
fastMsgIdFn h32 xxhash / 10000 bytes 2.2860 us/op 2.0250 us/op 1.13
fastMsgIdFn h64 xxhash / 10000 bytes 1.6010 us/op 1.4000 us/op 1.14
send data - 1000 256B messages 25.571 ms/op 20.806 ms/op 1.23
send data - 1000 512B messages 33.559 ms/op 27.238 ms/op 1.23
send data - 1000 1024B messages 58.741 ms/op 42.930 ms/op 1.37
send data - 1000 1200B messages 51.661 ms/op 38.623 ms/op 1.34
send data - 1000 2048B messages 67.006 ms/op 55.818 ms/op 1.20
send data - 1000 4096B messages 54.012 ms/op 49.729 ms/op 1.09
send data - 1000 16384B messages 153.62 ms/op 118.16 ms/op 1.30
send data - 1000 65536B messages 531.38 ms/op 556.71 ms/op 0.95
enrSubnets - fastDeserialize 64 bits 1.9270 us/op 1.7200 us/op 1.12
enrSubnets - ssz BitVector 64 bits 594.00 ns/op 620.00 ns/op 0.96
enrSubnets - fastDeserialize 4 bits 264.00 ns/op 278.00 ns/op 0.95
enrSubnets - ssz BitVector 4 bits 643.00 ns/op 771.00 ns/op 0.83
prioritizePeers score -10:0 att 32-0.1 sync 2-0 142.34 us/op 158.24 us/op 0.90
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 173.01 us/op 174.28 us/op 0.99
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 235.10 us/op 246.50 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 414.71 us/op 425.84 us/op 0.97
prioritizePeers score 0:0 att 64-1 sync 4-1 430.55 us/op 431.71 us/op 1.00
array of 16000 items push then shift 1.8092 us/op 2.0011 us/op 0.90
LinkedList of 16000 items push then shift 10.206 ns/op 11.875 ns/op 0.86
array of 16000 items push then pop 119.64 ns/op 131.59 ns/op 0.91
LinkedList of 16000 items push then pop 9.6560 ns/op 12.246 ns/op 0.79
array of 24000 items push then shift 2.7108 us/op 2.8680 us/op 0.95
LinkedList of 24000 items push then shift 11.197 ns/op 10.988 ns/op 1.02
array of 24000 items push then pop 183.73 ns/op 198.24 ns/op 0.93
LinkedList of 24000 items push then pop 10.936 ns/op 11.729 ns/op 0.93
intersect bitArray bitLen 8 8.9150 ns/op 7.9110 ns/op 1.13
intersect array and set length 8 118.27 ns/op 109.27 ns/op 1.08
intersect bitArray bitLen 128 56.499 ns/op 42.096 ns/op 1.34
intersect array and set length 128 1.5336 us/op 1.3022 us/op 1.18
bitArray.getTrueBitIndexes() bitLen 128 2.1660 us/op 2.1540 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 248 3.5750 us/op 3.5600 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 512 6.9580 us/op 8.6730 us/op 0.80
Buffer.concat 32 items 1.1620 us/op 1.4250 us/op 0.82
Uint8Array.set 32 items 2.7270 us/op 2.6590 us/op 1.03
Set add up to 64 items then delete first 6.0314 us/op 6.0124 us/op 1.00
OrderedSet add up to 64 items then delete first 7.8835 us/op 8.1531 us/op 0.97
Set add up to 64 items then delete last 6.4841 us/op 6.4095 us/op 1.01
OrderedSet add up to 64 items then delete last 8.6821 us/op 9.0354 us/op 0.96
Set add up to 64 items then delete middle 6.1419 us/op 6.8116 us/op 0.90
OrderedSet add up to 64 items then delete middle 10.007 us/op 10.682 us/op 0.94
Set add up to 128 items then delete first 12.942 us/op 12.387 us/op 1.04
OrderedSet add up to 128 items then delete first 17.689 us/op 16.667 us/op 1.06
Set add up to 128 items then delete last 12.834 us/op 11.479 us/op 1.12
OrderedSet add up to 128 items then delete last 17.061 us/op 19.986 us/op 0.85
Set add up to 128 items then delete middle 12.658 us/op 12.675 us/op 1.00
OrderedSet add up to 128 items then delete middle 23.373 us/op 27.400 us/op 0.85
Set add up to 256 items then delete first 25.890 us/op 25.894 us/op 1.00
OrderedSet add up to 256 items then delete first 35.620 us/op 34.277 us/op 1.04
Set add up to 256 items then delete last 23.986 us/op 25.513 us/op 0.94
OrderedSet add up to 256 items then delete last 33.713 us/op 42.812 us/op 0.79
Set add up to 256 items then delete middle 24.064 us/op 24.615 us/op 0.98
OrderedSet add up to 256 items then delete middle 59.854 us/op 66.267 us/op 0.90
transfer serialized Status (84 B) 2.3240 us/op 2.5780 us/op 0.90
copy serialized Status (84 B) 1.7570 us/op 2.1110 us/op 0.83
transfer serialized SignedVoluntaryExit (112 B) 2.5010 us/op 2.5620 us/op 0.98
copy serialized SignedVoluntaryExit (112 B) 1.8670 us/op 2.3970 us/op 0.78
transfer serialized ProposerSlashing (416 B) 3.7380 us/op 3.2320 us/op 1.16
copy serialized ProposerSlashing (416 B) 3.3100 us/op 3.3670 us/op 0.98
transfer serialized Attestation (485 B) 3.8860 us/op 3.8990 us/op 1.00
copy serialized Attestation (485 B) 3.5160 us/op 3.7870 us/op 0.93
transfer serialized AttesterSlashing (33232 B) 3.8700 us/op 5.5450 us/op 0.70
copy serialized AttesterSlashing (33232 B) 10.531 us/op 12.540 us/op 0.84
transfer serialized Small SignedBeaconBlock (128000 B) 3.4100 us/op 4.6560 us/op 0.73
copy serialized Small SignedBeaconBlock (128000 B) 32.364 us/op 40.181 us/op 0.81
transfer serialized Avg SignedBeaconBlock (200000 B) 4.6140 us/op 5.7870 us/op 0.80
copy serialized Avg SignedBeaconBlock (200000 B) 49.193 us/op 53.403 us/op 0.92
transfer serialized BlobsSidecar (524380 B) 5.2620 us/op 6.2430 us/op 0.84
copy serialized BlobsSidecar (524380 B) 123.34 us/op 336.52 us/op 0.37
transfer serialized Big SignedBeaconBlock (1000000 B) 5.2970 us/op 14.067 us/op 0.38
copy serialized Big SignedBeaconBlock (1000000 B) 193.16 us/op 492.89 us/op 0.39
pass gossip attestations to forkchoice per slot 5.9417 ms/op 5.1405 ms/op 1.16
forkChoice updateHead vc 100000 bc 64 eq 0 981.35 us/op 1.0162 ms/op 0.97
forkChoice updateHead vc 600000 bc 64 eq 0 6.6711 ms/op 8.6248 ms/op 0.77
forkChoice updateHead vc 1000000 bc 64 eq 0 14.854 ms/op 11.635 ms/op 1.28
forkChoice updateHead vc 600000 bc 320 eq 0 6.1324 ms/op 5.4436 ms/op 1.13
forkChoice updateHead vc 600000 bc 1200 eq 0 5.8141 ms/op 7.2623 ms/op 0.80
forkChoice updateHead vc 600000 bc 7200 eq 0 9.9605 ms/op 7.7341 ms/op 1.29
forkChoice updateHead vc 600000 bc 64 eq 1000 17.015 ms/op 15.114 ms/op 1.13
forkChoice updateHead vc 600000 bc 64 eq 10000 17.625 ms/op 16.043 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 300000 76.995 ms/op 62.507 ms/op 1.23
computeDeltas 500000 validators 300 proto nodes 8.5469 ms/op 8.3379 ms/op 1.03
computeDeltas 500000 validators 1200 proto nodes 8.0516 ms/op 8.4451 ms/op 0.95
computeDeltas 500000 validators 7200 proto nodes 7.7575 ms/op 8.1976 ms/op 0.95
computeDeltas 750000 validators 300 proto nodes 11.694 ms/op 12.277 ms/op 0.95
computeDeltas 750000 validators 1200 proto nodes 11.444 ms/op 12.609 ms/op 0.91
computeDeltas 750000 validators 7200 proto nodes 11.036 ms/op 11.994 ms/op 0.92
computeDeltas 1400000 validators 300 proto nodes 23.194 ms/op 23.369 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 22.729 ms/op 24.034 ms/op 0.95
computeDeltas 1400000 validators 7200 proto nodes 22.263 ms/op 24.347 ms/op 0.91
computeDeltas 2100000 validators 300 proto nodes 35.029 ms/op 32.664 ms/op 1.07
computeDeltas 2100000 validators 1200 proto nodes 34.232 ms/op 32.968 ms/op 1.04
computeDeltas 2100000 validators 7200 proto nodes 32.815 ms/op 34.412 ms/op 0.95
computeProposerBoostScoreFromBalances 500000 validators 4.4811 ms/op 4.5806 ms/op 0.98
computeProposerBoostScoreFromBalances 750000 validators 4.5070 ms/op 4.6154 ms/op 0.98
computeProposerBoostScoreFromBalances 1400000 validators 4.5997 ms/op 4.7396 ms/op 0.97
computeProposerBoostScoreFromBalances 2100000 validators 4.3616 ms/op 4.5402 ms/op 0.96
altair processAttestation - 250000 vs - 7PWei normalcase 3.6307 ms/op 5.0228 ms/op 0.72
altair processAttestation - 250000 vs - 7PWei worstcase 4.8142 ms/op 6.1000 ms/op 0.79
altair processAttestation - setStatus - 1/6 committees join 239.42 us/op 281.64 us/op 0.85
altair processAttestation - setStatus - 1/3 committees join 402.07 us/op 459.03 us/op 0.88
altair processAttestation - setStatus - 1/2 committees join 561.59 us/op 624.70 us/op 0.90
altair processAttestation - setStatus - 2/3 committees join 708.72 us/op 873.25 us/op 0.81
altair processAttestation - setStatus - 4/5 committees join 1.0166 ms/op 1.1522 ms/op 0.88
altair processAttestation - setStatus - 100% committees join 1.1382 ms/op 1.1969 ms/op 0.95
altair processBlock - 250000 vs - 7PWei normalcase 11.622 ms/op 17.274 ms/op 0.67
altair processBlock - 250000 vs - 7PWei normalcase hashState 45.673 ms/op 57.265 ms/op 0.80
altair processBlock - 250000 vs - 7PWei worstcase 52.318 ms/op 58.490 ms/op 0.89
altair processBlock - 250000 vs - 7PWei worstcase hashState 118.08 ms/op 139.63 ms/op 0.85
phase0 processBlock - 250000 vs - 7PWei normalcase 3.3075 ms/op 5.4960 ms/op 0.60
phase0 processBlock - 250000 vs - 7PWei worstcase 41.427 ms/op 40.786 ms/op 1.02
altair processEth1Data - 250000 vs - 7PWei normalcase 1.0146 ms/op 1.0833 ms/op 0.94
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 17.963 us/op 26.646 us/op 0.67
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 83.657 us/op 126.28 us/op 0.66
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 29.659 us/op 31.306 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 15.520 us/op 27.636 us/op 0.56
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 214.95 us/op 235.91 us/op 0.91
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.5839 ms/op 2.9163 ms/op 0.54
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9875 ms/op 3.2881 ms/op 0.60
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.6698 ms/op 2.8855 ms/op 0.93
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 4.2651 ms/op 5.7392 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 3.7394 ms/op 3.4394 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 7.6236 ms/op 10.660 ms/op 0.72
Tree 40 250000 create 850.27 ms/op 855.15 ms/op 0.99
Tree 40 250000 get(125000) 254.21 ns/op 230.35 ns/op 1.10
Tree 40 250000 set(125000) 2.1531 us/op 1.3870 us/op 1.55
Tree 40 250000 toArray() 30.413 ms/op 24.882 ms/op 1.22
Tree 40 250000 iterate all - toArray() + loop 30.531 ms/op 28.085 ms/op 1.09
Tree 40 250000 iterate all - get(i) 92.690 ms/op 82.785 ms/op 1.12
MutableVector 250000 create 18.812 ms/op 22.605 ms/op 0.83
MutableVector 250000 get(125000) 8.3150 ns/op 7.0330 ns/op 1.18
MutableVector 250000 set(125000) 476.54 ns/op 438.14 ns/op 1.09
MutableVector 250000 toArray() 5.5971 ms/op 5.6022 ms/op 1.00
MutableVector 250000 iterate all - toArray() + loop 5.5211 ms/op 5.6824 ms/op 0.97
MutableVector 250000 iterate all - get(i) 1.8729 ms/op 1.7159 ms/op 1.09
Array 250000 create 4.8615 ms/op 6.0469 ms/op 0.80
Array 250000 clone - spread 2.5945 ms/op 2.4923 ms/op 1.04
Array 250000 get(125000) 1.8300 ns/op 2.4120 ns/op 0.76
Array 250000 set(125000) 6.3890 ns/op 6.1790 ns/op 1.03
Array 250000 iterate all - loop 206.92 us/op 198.24 us/op 1.04
effectiveBalanceIncrements clone Uint8Array 300000 70.767 us/op 83.049 us/op 0.85
effectiveBalanceIncrements clone MutableVector 300000 600.00 ns/op 538.00 ns/op 1.12
effectiveBalanceIncrements rw all Uint8Array 300000 241.41 us/op 209.70 us/op 1.15
effectiveBalanceIncrements rw all MutableVector 300000 139.49 ms/op 140.29 ms/op 0.99
phase0 afterProcessEpoch - 250000 vs - 7PWei 156.85 ms/op 126.02 ms/op 1.24
phase0 beforeProcessEpoch - 250000 vs - 7PWei 77.436 ms/op 61.049 ms/op 1.27
altair processEpoch - mainnet_e81889 744.01 ms/op 616.40 ms/op 1.21
mainnet_e81889 - altair beforeProcessEpoch 137.39 ms/op 123.82 ms/op 1.11
mainnet_e81889 - altair processJustificationAndFinalization 31.313 us/op 26.018 us/op 1.20
mainnet_e81889 - altair processInactivityUpdates 10.028 ms/op 8.1916 ms/op 1.22
mainnet_e81889 - altair processRewardsAndPenalties 95.533 ms/op 74.802 ms/op 1.28
mainnet_e81889 - altair processRegistryUpdates 9.8600 us/op 3.7960 us/op 2.60
mainnet_e81889 - altair processSlashings 1.1020 us/op 727.00 ns/op 1.52
mainnet_e81889 - altair processEth1DataReset 1.5980 us/op 935.00 ns/op 1.71
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.9427 ms/op 1.9928 ms/op 0.97
mainnet_e81889 - altair processSlashingsReset 8.6970 us/op 9.6330 us/op 0.90
mainnet_e81889 - altair processRandaoMixesReset 13.449 us/op 8.3430 us/op 1.61
mainnet_e81889 - altair processHistoricalRootsUpdate 1.5310 us/op 882.00 ns/op 1.74
mainnet_e81889 - altair processParticipationFlagUpdates 4.5010 us/op 2.6210 us/op 1.72
mainnet_e81889 - altair processSyncCommitteeUpdates 1.2340 us/op 1.0270 us/op 1.20
mainnet_e81889 - altair afterProcessEpoch 147.18 ms/op 127.13 ms/op 1.16
capella processEpoch - mainnet_e217614 2.9152 s/op 2.5535 s/op 1.14
mainnet_e217614 - capella beforeProcessEpoch 725.16 ms/op 540.00 ms/op 1.34
mainnet_e217614 - capella processJustificationAndFinalization 32.581 us/op 30.922 us/op 1.05
mainnet_e217614 - capella processInactivityUpdates 31.854 ms/op 28.395 ms/op 1.12
mainnet_e217614 - capella processRewardsAndPenalties 564.17 ms/op 463.85 ms/op 1.22
mainnet_e217614 - capella processRegistryUpdates 53.216 us/op 30.967 us/op 1.72
mainnet_e217614 - capella processSlashings 1.6300 us/op 814.00 ns/op 2.00
mainnet_e217614 - capella processEth1DataReset 1.3700 us/op 714.00 ns/op 1.92
mainnet_e217614 - capella processEffectiveBalanceUpdates 17.324 ms/op 6.3268 ms/op 2.74
mainnet_e217614 - capella processSlashingsReset 7.7180 us/op 6.4720 us/op 1.19
mainnet_e217614 - capella processRandaoMixesReset 10.836 us/op 7.5620 us/op 1.43
mainnet_e217614 - capella processHistoricalRootsUpdate 1.0670 us/op 1.1990 us/op 0.89
mainnet_e217614 - capella processParticipationFlagUpdates 2.7660 us/op 4.3360 us/op 0.64
mainnet_e217614 - capella afterProcessEpoch 394.55 ms/op 371.76 ms/op 1.06
phase0 processEpoch - mainnet_e58758 550.81 ms/op 739.45 ms/op 0.74
mainnet_e58758 - phase0 beforeProcessEpoch 166.25 ms/op 203.35 ms/op 0.82
mainnet_e58758 - phase0 processJustificationAndFinalization 31.806 us/op 32.653 us/op 0.97
mainnet_e58758 - phase0 processRewardsAndPenalties 68.189 ms/op 64.884 ms/op 1.05
mainnet_e58758 - phase0 processRegistryUpdates 13.043 us/op 25.976 us/op 0.50
mainnet_e58758 - phase0 processSlashings 915.00 ns/op 1.0570 us/op 0.87
mainnet_e58758 - phase0 processEth1DataReset 930.00 ns/op 1.1170 us/op 0.83
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.6604 ms/op 1.6747 ms/op 0.99
mainnet_e58758 - phase0 processSlashingsReset 11.527 us/op 7.5670 us/op 1.52
mainnet_e58758 - phase0 processRandaoMixesReset 12.698 us/op 9.4380 us/op 1.35
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.5610 us/op 1.1370 us/op 1.37
mainnet_e58758 - phase0 processParticipationRecordUpdates 9.7130 us/op 9.3040 us/op 1.04
mainnet_e58758 - phase0 afterProcessEpoch 120.57 ms/op 105.97 ms/op 1.14
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.8314 ms/op 2.1864 ms/op 0.84
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9904 ms/op 2.5729 ms/op 0.77
altair processInactivityUpdates - 250000 normalcase 34.394 ms/op 39.608 ms/op 0.87
altair processInactivityUpdates - 250000 worstcase 46.992 ms/op 50.352 ms/op 0.93
phase0 processRegistryUpdates - 250000 normalcase 18.928 us/op 20.662 us/op 0.92
phase0 processRegistryUpdates - 250000 badcase_full_deposits 529.48 us/op 580.12 us/op 0.91
phase0 processRegistryUpdates - 250000 worstcase 0.5 208.12 ms/op 183.57 ms/op 1.13
altair processRewardsAndPenalties - 250000 normalcase 88.700 ms/op 68.748 ms/op 1.29
altair processRewardsAndPenalties - 250000 worstcase 71.775 ms/op 84.115 ms/op 0.85
phase0 getAttestationDeltas - 250000 normalcase 17.282 ms/op 14.683 ms/op 1.18
phase0 getAttestationDeltas - 250000 worstcase 17.569 ms/op 13.037 ms/op 1.35
phase0 processSlashings - 250000 worstcase 134.00 us/op 126.56 us/op 1.06
altair processSyncCommitteeUpdates - 250000 219.76 ms/op 213.77 ms/op 1.03
BeaconState.hashTreeRoot - No change 406.00 ns/op 303.00 ns/op 1.34
BeaconState.hashTreeRoot - 1 full validator 206.50 us/op 178.64 us/op 1.16
BeaconState.hashTreeRoot - 32 full validator 2.6090 ms/op 1.9040 ms/op 1.37
BeaconState.hashTreeRoot - 512 full validator 23.728 ms/op 22.272 ms/op 1.07
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 253.11 us/op 245.27 us/op 1.03
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 3.3379 ms/op 3.0218 ms/op 1.10
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 44.539 ms/op 37.984 ms/op 1.17
BeaconState.hashTreeRoot - 1 balances 219.79 us/op 166.06 us/op 1.32
BeaconState.hashTreeRoot - 32 balances 1.9093 ms/op 1.5801 ms/op 1.21
BeaconState.hashTreeRoot - 512 balances 17.091 ms/op 15.919 ms/op 1.07
BeaconState.hashTreeRoot - 250000 balances 325.25 ms/op 291.74 ms/op 1.11
aggregationBits - 2048 els - zipIndexesInBitList 43.428 us/op 34.288 us/op 1.27
byteArrayEquals 32 93.412 ns/op 90.774 ns/op 1.03
Buffer.compare 32 69.695 ns/op 58.936 ns/op 1.18
byteArrayEquals 1024 2.6789 us/op 2.1640 us/op 1.24
Buffer.compare 1024 103.74 ns/op 81.118 ns/op 1.28
byteArrayEquals 16384 43.302 us/op 37.212 us/op 1.16
Buffer.compare 16384 332.25 ns/op 317.16 ns/op 1.05
byteArrayEquals 123687377 317.89 ms/op 285.15 ms/op 1.11
Buffer.compare 123687377 10.995 ms/op 8.4471 ms/op 1.30
byteArrayEquals 32 - diff last byte 95.917 ns/op 83.331 ns/op 1.15
Buffer.compare 32 - diff last byte 76.309 ns/op 60.469 ns/op 1.26
byteArrayEquals 1024 - diff last byte 2.5341 us/op 2.1362 us/op 1.19
Buffer.compare 1024 - diff last byte 95.554 ns/op 76.499 ns/op 1.25
byteArrayEquals 16384 - diff last byte 45.933 us/op 36.493 us/op 1.26
Buffer.compare 16384 - diff last byte 318.75 ns/op 318.87 ns/op 1.00
byteArrayEquals 123687377 - diff last byte 295.78 ms/op 296.69 ms/op 1.00
Buffer.compare 123687377 - diff last byte 11.449 ms/op 9.1159 ms/op 1.26
byteArrayEquals 32 - random bytes 6.9530 ns/op 7.1290 ns/op 0.98
Buffer.compare 32 - random bytes 70.775 ns/op 70.094 ns/op 1.01
byteArrayEquals 1024 - random bytes 6.8580 ns/op 6.1880 ns/op 1.11
Buffer.compare 1024 - random bytes 68.490 ns/op 66.605 ns/op 1.03
byteArrayEquals 16384 - random bytes 6.9870 ns/op 6.3000 ns/op 1.11
Buffer.compare 16384 - random bytes 71.150 ns/op 69.270 ns/op 1.03
byteArrayEquals 123687377 - random bytes 10.760 ns/op 9.2700 ns/op 1.16
Buffer.compare 123687377 - random bytes 86.690 ns/op 74.540 ns/op 1.16
regular array get 100000 times 53.508 us/op 49.394 us/op 1.08
wrappedArray get 100000 times 51.453 us/op 48.543 us/op 1.06
arrayWithProxy get 100000 times 17.435 ms/op 15.502 ms/op 1.12
ssz.Root.equals 61.995 ns/op 59.572 ns/op 1.04
byteArrayEquals 60.141 ns/op 58.565 ns/op 1.03
Buffer.compare 13.418 ns/op 12.540 ns/op 1.07
shuffle list - 16384 els 7.9440 ms/op 7.3903 ms/op 1.07
shuffle list - 250000 els 121.40 ms/op 108.71 ms/op 1.12
processSlot - 1 slots 22.378 us/op 19.208 us/op 1.17
processSlot - 32 slots 4.7526 ms/op 4.5259 ms/op 1.05
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 73.617 ms/op 60.510 ms/op 1.22
getCommitteeAssignments - req 1 vs - 250000 vc 3.7614 ms/op 2.7159 ms/op 1.38
getCommitteeAssignments - req 100 vs - 250000 vc 5.7664 ms/op 4.0714 ms/op 1.42
getCommitteeAssignments - req 1000 vs - 250000 vc 5.7908 ms/op 4.3140 ms/op 1.34
findModifiedValidators - 10000 modified validators 848.99 ms/op 573.92 ms/op 1.48
findModifiedValidators - 1000 modified validators 930.56 ms/op 447.02 ms/op 2.08
findModifiedValidators - 100 modified validators 796.36 ms/op 458.15 ms/op 1.74
findModifiedValidators - 10 modified validators 694.61 ms/op 463.46 ms/op 1.50
findModifiedValidators - 1 modified validators 718.47 ms/op 485.65 ms/op 1.48
findModifiedValidators - no difference 739.10 ms/op 455.52 ms/op 1.62
compare ViewDUs 7.4984 s/op 5.1169 s/op 1.47
compare each validator Uint8Array 2.3163 s/op 1.9278 s/op 1.20
compare ViewDU to Uint8Array 1.6369 s/op 1.4412 s/op 1.14
migrate state 1000000 validators, 24 modified, 0 new 969.84 ms/op 903.31 ms/op 1.07
migrate state 1000000 validators, 1700 modified, 1000 new 1.3139 s/op 1.2271 s/op 1.07
migrate state 1000000 validators, 3400 modified, 2000 new 1.5976 s/op 1.5579 s/op 1.03
migrate state 1500000 validators, 24 modified, 0 new 962.14 ms/op 1.0198 s/op 0.94
migrate state 1500000 validators, 1700 modified, 1000 new 1.2005 s/op 1.4855 s/op 0.81
migrate state 1500000 validators, 3400 modified, 2000 new 1.3265 s/op 1.9378 s/op 0.68
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4300 ns/op 6.4800 ns/op 0.68
state getBlockRootAtSlot - 250000 vs - 7PWei 598.92 ns/op 819.92 ns/op 0.73
computeProposers - vc 250000 9.5508 ms/op 11.624 ms/op 0.82
computeEpochShuffling - vc 250000 109.49 ms/op 119.66 ms/op 0.91
getNextSyncCommittee - vc 250000 169.69 ms/op 225.91 ms/op 0.75
computeSigningRoot for AttestationData 27.657 us/op 33.525 us/op 0.82
hash AttestationData serialized data then Buffer.toString(base64) 2.6168 us/op 2.7060 us/op 0.97
toHexString serialized data 1.2054 us/op 1.5569 us/op 0.77
Buffer.toString(base64) 239.35 ns/op 255.00 ns/op 0.94

by benchmarkbot/action

Copy link
Member Author

@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.

I have tested this PR by running multiple Lodestar nodes and configured Teku VC to publish to all of them. The error can be easily reproduced by adding an artifical delay to the api as attestations will frequently reach the node by gossip before the api.

@nflaig nflaig marked this pull request as ready for review January 17, 2024 16:22
@nflaig nflaig requested a review from a team as a code owner January 17, 2024 16:22
@wemeetagain wemeetagain merged commit f3eb48a into unstable Jan 17, 2024
13 of 15 checks passed
@wemeetagain wemeetagain deleted the nflaig/ignore-known-attestations branch January 17, 2024 21:30
ensi321 pushed a commit to ensi321/lodestar that referenced this pull request Jan 22, 2024
* Ignore known attestations submitted through API

* Ignore known sync committee aggregate

* Add log contex to ignored aggregate attestations

* Fix typo in submitPoolSyncCommitteeSignatures
@wemeetagain
Copy link
Member

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

Ignore known attestations submitted through API
2 participants