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: gossipsub seen_ttl for EIP-7045 #6569

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Mar 20, 2024

Motivation

See 6567

Description

Closes #6567

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Merging #6569 (827eb09) into unstable (f9676f1) will not change coverage.
The diff coverage is 50.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##           unstable    #6569   +/-   ##
=========================================
  Coverage     61.46%   61.46%           
=========================================
  Files           556      556           
  Lines         58850    58850           
  Branches       1850     1850           
=========================================
  Hits          36171    36171           
  Misses        22638    22638           
  Partials         41       41           

Copy link
Contributor

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: a698133 Previous: f9676f1 Ratio
altair processEth1Data - 250000 vs - 7PWei normalcase 485.01 us/op 4.3122 ms/op 0.11
Full benchmark results
Benchmark suite Current: a698133 Previous: f9676f1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 505.75 us/op 1.4899 ms/op 0.34
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 84.399 us/op 140.63 us/op 0.60
BLS verify - blst-native 1.3602 ms/op 1.7309 ms/op 0.79
BLS verifyMultipleSignatures 3 - blst-native 2.8713 ms/op 3.6474 ms/op 0.79
BLS verifyMultipleSignatures 8 - blst-native 6.2807 ms/op 8.0317 ms/op 0.78
BLS verifyMultipleSignatures 32 - blst-native 23.115 ms/op 29.456 ms/op 0.78
BLS verifyMultipleSignatures 64 - blst-native 44.729 ms/op 59.252 ms/op 0.75
BLS verifyMultipleSignatures 128 - blst-native 91.240 ms/op 115.16 ms/op 0.79
BLS deserializing 10000 signatures 975.71 ms/op 1.2015 s/op 0.81
BLS deserializing 100000 signatures 9.4866 s/op 11.709 s/op 0.81
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.4819 ms/op 1.7681 ms/op 0.84
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.5979 ms/op 2.0264 ms/op 0.79
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.4611 ms/op 3.0875 ms/op 0.80
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.6393 ms/op 4.5769 ms/op 0.80
BLS verifyMultipleSignatures - same message - 128 - blst-native 5.7056 ms/op 7.5243 ms/op 0.76
BLS aggregatePubkeys 32 - blst-native 26.123 us/op 34.165 us/op 0.76
BLS aggregatePubkeys 128 - blst-native 105.58 us/op 131.94 us/op 0.80
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 66.569 ms/op 76.899 ms/op 0.87
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 71.532 ms/op 79.018 ms/op 0.91
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 51.587 ms/op 56.336 ms/op 0.92
getSlashingsAndExits - default max 272.68 us/op 299.60 us/op 0.91
getSlashingsAndExits - 2k 345.00 us/op 654.09 us/op 0.53
proposeBlockBody type=full, size=empty 6.8580 ms/op 7.5623 ms/op 0.91
isKnown best case - 1 super set check 323.00 ns/op 739.00 ns/op 0.44
isKnown normal case - 2 super set checks 309.00 ns/op 733.00 ns/op 0.42
isKnown worse case - 16 super set checks 312.00 ns/op 733.00 ns/op 0.43
CheckpointStateCache - add get delete 5.8920 us/op 9.7150 us/op 0.61
validate api signedAggregateAndProof - struct 2.8524 ms/op 3.7074 ms/op 0.77
validate gossip signedAggregateAndProof - struct 2.8737 ms/op 3.7124 ms/op 0.77
validate gossip attestation - vc 640000 1.4083 ms/op 1.8160 ms/op 0.78
batch validate gossip attestation - vc 640000 - chunk 32 165.68 us/op 233.50 us/op 0.71
batch validate gossip attestation - vc 640000 - chunk 64 156.40 us/op 204.04 us/op 0.77
batch validate gossip attestation - vc 640000 - chunk 128 150.66 us/op 206.64 us/op 0.73
batch validate gossip attestation - vc 640000 - chunk 256 154.46 us/op 182.84 us/op 0.84
pickEth1Vote - no votes 1.4756 ms/op 2.0266 ms/op 0.73
pickEth1Vote - max votes 10.649 ms/op 17.502 ms/op 0.61
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.275 ms/op 32.731 ms/op 0.65
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 31.486 ms/op 48.459 ms/op 0.65
pickEth1Vote - Eth1Data fastSerialize value x2048 697.67 us/op 1.2011 ms/op 0.58
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.6112 ms/op 11.866 ms/op 0.47
bytes32 toHexString 580.00 ns/op 985.00 ns/op 0.59
bytes32 Buffer.toString(hex) 330.00 ns/op 525.00 ns/op 0.63
bytes32 Buffer.toString(hex) from Uint8Array 495.00 ns/op 820.00 ns/op 0.60
bytes32 Buffer.toString(hex) + 0x 329.00 ns/op 535.00 ns/op 0.61
Object access 1 prop 0.17600 ns/op 0.29100 ns/op 0.60
Map access 1 prop 0.16500 ns/op 0.22800 ns/op 0.72
Object get x1000 8.8040 ns/op 11.448 ns/op 0.77
Map get x1000 0.80400 ns/op 1.1510 ns/op 0.70
Object set x1000 53.944 ns/op 91.412 ns/op 0.59
Map set x1000 41.510 ns/op 67.706 ns/op 0.61
Return object 10000 times 0.24630 ns/op 0.33380 ns/op 0.74
Throw Error 10000 times 4.2365 us/op 6.3300 us/op 0.67
fastMsgIdFn sha256 / 200 bytes 3.5720 us/op 4.7840 us/op 0.75
fastMsgIdFn h32 xxhash / 200 bytes 306.00 ns/op 483.00 ns/op 0.63
fastMsgIdFn h64 xxhash / 200 bytes 374.00 ns/op 579.00 ns/op 0.65
fastMsgIdFn sha256 / 1000 bytes 12.295 us/op 15.816 us/op 0.78
fastMsgIdFn h32 xxhash / 1000 bytes 438.00 ns/op 609.00 ns/op 0.72
fastMsgIdFn h64 xxhash / 1000 bytes 443.00 ns/op 649.00 ns/op 0.68
fastMsgIdFn sha256 / 10000 bytes 112.81 us/op 140.14 us/op 0.80
fastMsgIdFn h32 xxhash / 10000 bytes 1.9720 us/op 2.1380 us/op 0.92
fastMsgIdFn h64 xxhash / 10000 bytes 1.3720 us/op 1.4830 us/op 0.93
send data - 1000 256B messages 17.478 ms/op 29.949 ms/op 0.58
send data - 1000 512B messages 26.571 ms/op 38.473 ms/op 0.69
send data - 1000 1024B messages 39.795 ms/op 58.660 ms/op 0.68
send data - 1000 1200B messages 40.409 ms/op 65.198 ms/op 0.62
send data - 1000 2048B messages 51.598 ms/op 77.593 ms/op 0.66
send data - 1000 4096B messages 47.306 ms/op 48.421 ms/op 0.98
send data - 1000 16384B messages 122.44 ms/op 185.13 ms/op 0.66
send data - 1000 65536B messages 479.84 ms/op 755.93 ms/op 0.63
enrSubnets - fastDeserialize 64 bits 1.2550 us/op 2.5110 us/op 0.50
enrSubnets - ssz BitVector 64 bits 421.00 ns/op 837.00 ns/op 0.50
enrSubnets - fastDeserialize 4 bits 170.00 ns/op 326.00 ns/op 0.52
enrSubnets - ssz BitVector 4 bits 424.00 ns/op 799.00 ns/op 0.53
prioritizePeers score -10:0 att 32-0.1 sync 2-0 105.53 us/op 164.00 us/op 0.64
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 125.77 us/op 201.24 us/op 0.62
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 162.97 us/op 283.53 us/op 0.57
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 290.32 us/op 469.28 us/op 0.62
prioritizePeers score 0:0 att 64-1 sync 4-1 339.83 us/op 504.66 us/op 0.67
array of 16000 items push then shift 1.5932 us/op 2.3257 us/op 0.69
LinkedList of 16000 items push then shift 9.1110 ns/op 10.947 ns/op 0.83
array of 16000 items push then pop 78.070 ns/op 153.47 ns/op 0.51
LinkedList of 16000 items push then pop 8.7910 ns/op 11.258 ns/op 0.78
array of 24000 items push then shift 2.3729 us/op 3.4082 us/op 0.70
LinkedList of 24000 items push then shift 10.076 ns/op 10.944 ns/op 0.92
array of 24000 items push then pop 97.636 ns/op 202.40 ns/op 0.48
LinkedList of 24000 items push then pop 10.250 ns/op 10.785 ns/op 0.95
intersect bitArray bitLen 8 6.3020 ns/op 8.6490 ns/op 0.73
intersect array and set length 8 66.531 ns/op 124.99 ns/op 0.53
intersect bitArray bitLen 128 38.724 ns/op 49.338 ns/op 0.78
intersect array and set length 128 923.45 ns/op 1.4815 us/op 0.62
bitArray.getTrueBitIndexes() bitLen 128 1.5550 us/op 2.3830 us/op 0.65
bitArray.getTrueBitIndexes() bitLen 248 2.5610 us/op 4.0020 us/op 0.64
bitArray.getTrueBitIndexes() bitLen 512 4.8700 us/op 8.0910 us/op 0.60
Buffer.concat 32 items 981.00 ns/op 1.7910 us/op 0.55
Uint8Array.set 32 items 2.4030 us/op 2.7150 us/op 0.89
Set add up to 64 items then delete first 4.4299 us/op 6.0469 us/op 0.73
OrderedSet add up to 64 items then delete first 5.6282 us/op 8.1440 us/op 0.69
Set add up to 64 items then delete last 4.7794 us/op 6.6224 us/op 0.72
OrderedSet add up to 64 items then delete last 6.1106 us/op 8.9036 us/op 0.69
Set add up to 64 items then delete middle 4.8649 us/op 6.4994 us/op 0.75
OrderedSet add up to 64 items then delete middle 7.4593 us/op 10.467 us/op 0.71
Set add up to 128 items then delete first 9.6646 us/op 13.318 us/op 0.73
OrderedSet add up to 128 items then delete first 12.828 us/op 18.604 us/op 0.69
Set add up to 128 items then delete last 9.5289 us/op 13.107 us/op 0.73
OrderedSet add up to 128 items then delete last 11.988 us/op 17.720 us/op 0.68
Set add up to 128 items then delete middle 9.7087 us/op 13.262 us/op 0.73
OrderedSet add up to 128 items then delete middle 17.167 us/op 25.476 us/op 0.67
Set add up to 256 items then delete first 19.010 us/op 27.214 us/op 0.70
OrderedSet add up to 256 items then delete first 25.269 us/op 38.380 us/op 0.66
Set add up to 256 items then delete last 18.350 us/op 26.543 us/op 0.69
OrderedSet add up to 256 items then delete last 23.508 us/op 36.517 us/op 0.64
Set add up to 256 items then delete middle 18.907 us/op 26.717 us/op 0.71
OrderedSet add up to 256 items then delete middle 46.249 us/op 68.477 us/op 0.68
transfer serialized Status (84 B) 1.7020 us/op 3.0150 us/op 0.56
copy serialized Status (84 B) 1.3250 us/op 2.2860 us/op 0.58
transfer serialized SignedVoluntaryExit (112 B) 1.9130 us/op 3.2090 us/op 0.60
copy serialized SignedVoluntaryExit (112 B) 1.4710 us/op 2.3450 us/op 0.63
transfer serialized ProposerSlashing (416 B) 2.3890 us/op 3.6730 us/op 0.65
copy serialized ProposerSlashing (416 B) 2.5980 us/op 3.7790 us/op 0.69
transfer serialized Attestation (485 B) 2.6790 us/op 4.8540 us/op 0.55
copy serialized Attestation (485 B) 2.0650 us/op 4.5810 us/op 0.45
transfer serialized AttesterSlashing (33232 B) 2.7110 us/op 4.7060 us/op 0.58
copy serialized AttesterSlashing (33232 B) 5.0790 us/op 12.905 us/op 0.39
transfer serialized Small SignedBeaconBlock (128000 B) 2.8330 us/op 4.6140 us/op 0.61
copy serialized Small SignedBeaconBlock (128000 B) 12.701 us/op 34.541 us/op 0.37
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9720 us/op 5.2430 us/op 0.57
copy serialized Avg SignedBeaconBlock (200000 B) 19.749 us/op 49.499 us/op 0.40
transfer serialized BlobsSidecar (524380 B) 3.1180 us/op 5.6120 us/op 0.56
copy serialized BlobsSidecar (524380 B) 82.511 us/op 125.09 us/op 0.66
transfer serialized Big SignedBeaconBlock (1000000 B) 3.2020 us/op 6.6100 us/op 0.48
copy serialized Big SignedBeaconBlock (1000000 B) 167.30 us/op 229.40 us/op 0.73
pass gossip attestations to forkchoice per slot 4.6871 ms/op 6.1082 ms/op 0.77
forkChoice updateHead vc 100000 bc 64 eq 0 743.76 us/op 904.09 us/op 0.82
forkChoice updateHead vc 600000 bc 64 eq 0 4.6604 ms/op 7.3537 ms/op 0.63
forkChoice updateHead vc 1000000 bc 64 eq 0 7.5695 ms/op 9.3324 ms/op 0.81
forkChoice updateHead vc 600000 bc 320 eq 0 4.3838 ms/op 5.6187 ms/op 0.78
forkChoice updateHead vc 600000 bc 1200 eq 0 4.5129 ms/op 5.8381 ms/op 0.77
forkChoice updateHead vc 600000 bc 7200 eq 0 5.4200 ms/op 7.6788 ms/op 0.71
forkChoice updateHead vc 600000 bc 64 eq 1000 11.300 ms/op 17.230 ms/op 0.66
forkChoice updateHead vc 600000 bc 64 eq 10000 12.064 ms/op 17.437 ms/op 0.69
forkChoice updateHead vc 600000 bc 64 eq 300000 16.019 ms/op 24.728 ms/op 0.65
computeDeltas 500000 validators 300 proto nodes 6.8881 ms/op 8.9553 ms/op 0.77
computeDeltas 500000 validators 1200 proto nodes 6.7330 ms/op 9.2949 ms/op 0.72
computeDeltas 500000 validators 7200 proto nodes 6.6951 ms/op 9.0264 ms/op 0.74
computeDeltas 750000 validators 300 proto nodes 9.9082 ms/op 13.505 ms/op 0.73
computeDeltas 750000 validators 1200 proto nodes 10.061 ms/op 13.353 ms/op 0.75
computeDeltas 750000 validators 7200 proto nodes 10.008 ms/op 13.400 ms/op 0.75
computeDeltas 1400000 validators 300 proto nodes 18.915 ms/op 24.522 ms/op 0.77
computeDeltas 1400000 validators 1200 proto nodes 19.344 ms/op 25.644 ms/op 0.75
computeDeltas 1400000 validators 7200 proto nodes 19.092 ms/op 24.456 ms/op 0.78
computeDeltas 2100000 validators 300 proto nodes 28.984 ms/op 38.595 ms/op 0.75
computeDeltas 2100000 validators 1200 proto nodes 29.627 ms/op 39.240 ms/op 0.76
computeDeltas 2100000 validators 7200 proto nodes 29.896 ms/op 38.272 ms/op 0.78
altair processAttestation - 250000 vs - 7PWei normalcase 2.1818 ms/op 3.7609 ms/op 0.58
altair processAttestation - 250000 vs - 7PWei worstcase 3.3926 ms/op 5.4933 ms/op 0.62
altair processAttestation - setStatus - 1/6 committees join 194.84 us/op 270.62 us/op 0.72
altair processAttestation - setStatus - 1/3 committees join 358.13 us/op 537.42 us/op 0.67
altair processAttestation - setStatus - 1/2 committees join 479.67 us/op 724.28 us/op 0.66
altair processAttestation - setStatus - 2/3 committees join 608.41 us/op 927.99 us/op 0.66
altair processAttestation - setStatus - 4/5 committees join 813.25 us/op 1.1855 ms/op 0.69
altair processAttestation - setStatus - 100% committees join 1.0058 ms/op 1.3576 ms/op 0.74
altair processBlock - 250000 vs - 7PWei normalcase 10.972 ms/op 14.156 ms/op 0.78
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.268 ms/op 46.842 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 41.715 ms/op 56.581 ms/op 0.74
altair processBlock - 250000 vs - 7PWei worstcase hashState 96.121 ms/op 138.70 ms/op 0.69
phase0 processBlock - 250000 vs - 7PWei normalcase 2.9516 ms/op 4.2721 ms/op 0.69
phase0 processBlock - 250000 vs - 7PWei worstcase 31.285 ms/op 42.012 ms/op 0.74
altair processEth1Data - 250000 vs - 7PWei normalcase 485.01 us/op 4.3122 ms/op 0.11
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 18.199 us/op 28.223 us/op 0.64
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 77.301 us/op 102.61 us/op 0.75
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 16.067 us/op 34.859 us/op 0.46
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 17.957 us/op 22.472 us/op 0.80
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 255.38 us/op 338.50 us/op 0.75
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 2.0685 ms/op 2.8814 ms/op 0.72
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.2130 ms/op 3.2737 ms/op 0.68
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.7838 ms/op 3.3222 ms/op 0.84
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.0858 ms/op 6.2993 ms/op 0.49
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.5278 ms/op 4.9465 ms/op 0.51
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.8290 ms/op 8.2016 ms/op 0.59
Tree 40 250000 create 386.63 ms/op 857.31 ms/op 0.45
Tree 40 250000 get(125000) 208.11 ns/op 318.97 ns/op 0.65
Tree 40 250000 set(125000) 1.0058 us/op 3.0290 us/op 0.33
Tree 40 250000 toArray() 19.062 ms/op 28.597 ms/op 0.67
Tree 40 250000 iterate all - toArray() + loop 19.222 ms/op 28.648 ms/op 0.67
Tree 40 250000 iterate all - get(i) 66.157 ms/op 110.66 ms/op 0.60
MutableVector 250000 create 23.699 ms/op 25.758 ms/op 0.92
MutableVector 250000 get(125000) 6.7870 ns/op 9.7130 ns/op 0.70
MutableVector 250000 set(125000) 255.15 ns/op 682.58 ns/op 0.37
MutableVector 250000 toArray() 3.7083 ms/op 4.8961 ms/op 0.76
MutableVector 250000 iterate all - toArray() + loop 3.5122 ms/op 5.6930 ms/op 0.62
MutableVector 250000 iterate all - get(i) 1.6074 ms/op 2.4039 ms/op 0.67
Array 250000 create 3.0480 ms/op 4.8804 ms/op 0.62
Array 250000 clone - spread 1.2255 ms/op 3.0186 ms/op 0.41
Array 250000 get(125000) 1.0300 ns/op 2.0130 ns/op 0.51
Array 250000 set(125000) 4.0370 ns/op 4.8290 ns/op 0.84
Array 250000 iterate all - loop 168.08 us/op 225.73 us/op 0.74
effectiveBalanceIncrements clone Uint8Array 300000 27.925 us/op 72.262 us/op 0.39
effectiveBalanceIncrements clone MutableVector 300000 349.00 ns/op 1.0550 us/op 0.33
effectiveBalanceIncrements rw all Uint8Array 300000 215.99 us/op 300.81 us/op 0.72
effectiveBalanceIncrements rw all MutableVector 300000 83.386 ms/op 215.06 ms/op 0.39
phase0 afterProcessEpoch - 250000 vs - 7PWei 118.96 ms/op 160.58 ms/op 0.74
phase0 beforeProcessEpoch - 250000 vs - 7PWei 55.285 ms/op 74.027 ms/op 0.75
altair processEpoch - mainnet_e81889 551.52 ms/op 740.81 ms/op 0.74
mainnet_e81889 - altair beforeProcessEpoch 83.952 ms/op 116.89 ms/op 0.72
mainnet_e81889 - altair processJustificationAndFinalization 22.895 us/op 33.374 us/op 0.69
mainnet_e81889 - altair processInactivityUpdates 5.8178 ms/op 10.346 ms/op 0.56
mainnet_e81889 - altair processRewardsAndPenalties 83.813 ms/op 91.911 ms/op 0.91
mainnet_e81889 - altair processRegistryUpdates 3.7890 us/op 5.9580 us/op 0.64
mainnet_e81889 - altair processSlashings 813.00 ns/op 1.0240 us/op 0.79
mainnet_e81889 - altair processEth1DataReset 917.00 ns/op 1.5010 us/op 0.61
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.5780 ms/op 2.6398 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 5.3330 us/op 8.6850 us/op 0.61
mainnet_e81889 - altair processRandaoMixesReset 8.3090 us/op 10.493 us/op 0.79
mainnet_e81889 - altair processHistoricalRootsUpdate 1.6720 us/op 1.3860 us/op 1.21
mainnet_e81889 - altair processParticipationFlagUpdates 3.1400 us/op 4.3380 us/op 0.72
mainnet_e81889 - altair processSyncCommitteeUpdates 1.2840 us/op 1.4150 us/op 0.91
mainnet_e81889 - altair afterProcessEpoch 122.01 ms/op 171.18 ms/op 0.71
capella processEpoch - mainnet_e217614 2.1136 s/op 3.2047 s/op 0.66
mainnet_e217614 - capella beforeProcessEpoch 472.48 ms/op 744.72 ms/op 0.63
mainnet_e217614 - capella processJustificationAndFinalization 19.590 us/op 31.329 us/op 0.63
mainnet_e217614 - capella processInactivityUpdates 21.374 ms/op 27.756 ms/op 0.77
mainnet_e217614 - capella processRewardsAndPenalties 599.34 ms/op 821.96 ms/op 0.73
mainnet_e217614 - capella processRegistryUpdates 31.849 us/op 47.506 us/op 0.67
mainnet_e217614 - capella processSlashings 948.00 ns/op 1.5170 us/op 0.62
mainnet_e217614 - capella processEth1DataReset 732.00 ns/op 1.0690 us/op 0.68
mainnet_e217614 - capella processEffectiveBalanceUpdates 4.2861 ms/op 7.5465 ms/op 0.57
mainnet_e217614 - capella processSlashingsReset 5.1050 us/op 5.6780 us/op 0.90
mainnet_e217614 - capella processRandaoMixesReset 7.1850 us/op 10.646 us/op 0.67
mainnet_e217614 - capella processHistoricalRootsUpdate 916.00 ns/op 1.2500 us/op 0.73
mainnet_e217614 - capella processParticipationFlagUpdates 2.1090 us/op 3.6320 us/op 0.58
mainnet_e217614 - capella afterProcessEpoch 311.73 ms/op 527.18 ms/op 0.59
phase0 processEpoch - mainnet_e58758 524.66 ms/op 711.00 ms/op 0.74
mainnet_e58758 - phase0 beforeProcessEpoch 167.35 ms/op 235.91 ms/op 0.71
mainnet_e58758 - phase0 processJustificationAndFinalization 24.601 us/op 38.247 us/op 0.64
mainnet_e58758 - phase0 processRewardsAndPenalties 79.174 ms/op 78.943 ms/op 1.00
mainnet_e58758 - phase0 processRegistryUpdates 15.276 us/op 21.427 us/op 0.71
mainnet_e58758 - phase0 processSlashings 1.0320 us/op 1.2770 us/op 0.81
mainnet_e58758 - phase0 processEth1DataReset 651.00 ns/op 1.2420 us/op 0.52
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.1116 ms/op 2.6001 ms/op 0.81
mainnet_e58758 - phase0 processSlashingsReset 4.5460 us/op 7.2060 us/op 0.63
mainnet_e58758 - phase0 processRandaoMixesReset 6.2000 us/op 9.6340 us/op 0.64
mainnet_e58758 - phase0 processHistoricalRootsUpdate 690.00 ns/op 1.1990 us/op 0.58
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.4660 us/op 9.0110 us/op 0.61
mainnet_e58758 - phase0 afterProcessEpoch 101.11 ms/op 141.88 ms/op 0.71
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2347 ms/op 3.0409 ms/op 0.41
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.5771 ms/op 3.0245 ms/op 0.85
altair processInactivityUpdates - 250000 normalcase 28.091 ms/op 41.679 ms/op 0.67
altair processInactivityUpdates - 250000 worstcase 34.045 ms/op 47.210 ms/op 0.72
phase0 processRegistryUpdates - 250000 normalcase 14.671 us/op 23.351 us/op 0.63
phase0 processRegistryUpdates - 250000 badcase_full_deposits 746.30 us/op 958.26 us/op 0.78
phase0 processRegistryUpdates - 250000 worstcase 0.5 154.50 ms/op 243.16 ms/op 0.64
altair processRewardsAndPenalties - 250000 normalcase 86.181 ms/op 110.20 ms/op 0.78
altair processRewardsAndPenalties - 250000 worstcase 98.477 ms/op 115.68 ms/op 0.85
phase0 getAttestationDeltas - 250000 normalcase 9.0569 ms/op 15.552 ms/op 0.58
phase0 getAttestationDeltas - 250000 worstcase 8.8787 ms/op 15.657 ms/op 0.57
phase0 processSlashings - 250000 worstcase 128.63 us/op 201.65 us/op 0.64
altair processSyncCommitteeUpdates - 250000 145.58 ms/op 258.40 ms/op 0.56
BeaconState.hashTreeRoot - No change 347.00 ns/op 1.0220 us/op 0.34
BeaconState.hashTreeRoot - 1 full validator 172.77 us/op 232.20 us/op 0.74
BeaconState.hashTreeRoot - 32 full validator 1.7997 ms/op 2.3868 ms/op 0.75
BeaconState.hashTreeRoot - 512 full validator 17.323 ms/op 23.838 ms/op 0.73
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 174.16 us/op 228.59 us/op 0.76
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.0054 ms/op 3.1884 ms/op 0.63
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 24.721 ms/op 61.487 ms/op 0.40
BeaconState.hashTreeRoot - 1 balances 155.90 us/op 181.33 us/op 0.86
BeaconState.hashTreeRoot - 32 balances 1.5657 ms/op 1.6054 ms/op 0.98
BeaconState.hashTreeRoot - 512 balances 14.689 ms/op 16.107 ms/op 0.91
BeaconState.hashTreeRoot - 250000 balances 214.14 ms/op 303.28 ms/op 0.71
aggregationBits - 2048 els - zipIndexesInBitList 27.782 us/op 51.158 us/op 0.54
byteArrayEquals 32 76.490 ns/op 107.92 ns/op 0.71
Buffer.compare 32 56.573 ns/op 92.800 ns/op 0.61
byteArrayEquals 1024 2.0657 us/op 2.7927 us/op 0.74
Buffer.compare 1024 72.967 ns/op 93.983 ns/op 0.78
byteArrayEquals 16384 32.831 us/op 44.605 us/op 0.74
Buffer.compare 16384 245.37 ns/op 369.19 ns/op 0.66
byteArrayEquals 123687377 257.74 ms/op 335.46 ms/op 0.77
Buffer.compare 123687377 6.5831 ms/op 10.121 ms/op 0.65
byteArrayEquals 32 - diff last byte 78.573 ns/op 98.680 ns/op 0.80
Buffer.compare 32 - diff last byte 60.362 ns/op 89.630 ns/op 0.67
byteArrayEquals 1024 - diff last byte 2.2001 us/op 2.7854 us/op 0.79
Buffer.compare 1024 - diff last byte 77.736 ns/op 94.667 ns/op 0.82
byteArrayEquals 16384 - diff last byte 35.672 us/op 44.528 us/op 0.80
Buffer.compare 16384 - diff last byte 270.42 ns/op 359.23 ns/op 0.75
byteArrayEquals 123687377 - diff last byte 258.78 ms/op 337.37 ms/op 0.77
Buffer.compare 123687377 - diff last byte 6.6285 ms/op 10.250 ms/op 0.65
byteArrayEquals 32 - random bytes 6.0490 ns/op 8.1840 ns/op 0.74
Buffer.compare 32 - random bytes 73.013 ns/op 92.012 ns/op 0.79
byteArrayEquals 1024 - random bytes 6.0610 ns/op 7.8110 ns/op 0.78
Buffer.compare 1024 - random bytes 68.819 ns/op 88.934 ns/op 0.77
byteArrayEquals 16384 - random bytes 5.8490 ns/op 7.7870 ns/op 0.75
Buffer.compare 16384 - random bytes 67.826 ns/op 90.205 ns/op 0.75
byteArrayEquals 123687377 - random bytes 9.0100 ns/op 15.680 ns/op 0.57
Buffer.compare 123687377 - random bytes 71.040 ns/op 96.800 ns/op 0.73
regular array get 100000 times 49.218 us/op 60.984 us/op 0.81
wrappedArray get 100000 times 50.426 us/op 60.852 us/op 0.83
arrayWithProxy get 100000 times 15.810 ms/op 26.458 ms/op 0.60
ssz.Root.equals 60.682 ns/op 83.308 ns/op 0.73
byteArrayEquals 61.741 ns/op 82.734 ns/op 0.75
Buffer.compare 12.694 ns/op 16.592 ns/op 0.77
shuffle list - 16384 els 9.6217 ms/op 12.047 ms/op 0.80
shuffle list - 250000 els 141.80 ms/op 175.53 ms/op 0.81
processSlot - 1 slots 17.160 us/op 30.874 us/op 0.56
processSlot - 32 slots 3.2016 ms/op 6.2641 ms/op 0.51
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 61.451 ms/op 90.649 ms/op 0.68
getCommitteeAssignments - req 1 vs - 250000 vc 2.7008 ms/op 4.1630 ms/op 0.65
getCommitteeAssignments - req 100 vs - 250000 vc 3.9023 ms/op 5.9788 ms/op 0.65
getCommitteeAssignments - req 1000 vs - 250000 vc 4.2738 ms/op 6.4321 ms/op 0.66
findModifiedValidators - 10000 modified validators 571.43 ms/op 884.41 ms/op 0.65
findModifiedValidators - 1000 modified validators 466.93 ms/op 682.54 ms/op 0.68
findModifiedValidators - 100 modified validators 461.92 ms/op 664.39 ms/op 0.70
findModifiedValidators - 10 modified validators 454.01 ms/op 718.20 ms/op 0.63
findModifiedValidators - 1 modified validators 440.42 ms/op 678.49 ms/op 0.65
findModifiedValidators - no difference 438.44 ms/op 670.88 ms/op 0.65
compare ViewDUs 4.9790 s/op 7.2137 s/op 0.69
compare each validator Uint8Array 1.8638 s/op 2.7797 s/op 0.67
compare ViewDU to Uint8Array 1.1045 s/op 2.2684 s/op 0.49
migrate state 1000000 validators, 24 modified, 0 new 926.52 ms/op 1.3269 s/op 0.70
migrate state 1000000 validators, 1700 modified, 1000 new 1.2285 s/op 1.8038 s/op 0.68
migrate state 1000000 validators, 3400 modified, 2000 new 1.4819 s/op 2.1289 s/op 0.70
migrate state 1500000 validators, 24 modified, 0 new 907.20 ms/op 1.3643 s/op 0.66
migrate state 1500000 validators, 1700 modified, 1000 new 1.2187 s/op 1.8601 s/op 0.66
migrate state 1500000 validators, 3400 modified, 2000 new 1.4316 s/op 2.2647 s/op 0.63
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.2800 ns/op 7.7800 ns/op 0.55
state getBlockRootAtSlot - 250000 vs - 7PWei 755.23 ns/op 1.5564 us/op 0.49
computeProposers - vc 250000 8.6804 ms/op 15.073 ms/op 0.58
computeEpochShuffling - vc 250000 125.73 ms/op 175.50 ms/op 0.72
getNextSyncCommittee - vc 250000 146.11 ms/op 250.79 ms/op 0.58
computeSigningRoot for AttestationData 33.952 us/op 43.694 us/op 0.78
hash AttestationData serialized data then Buffer.toString(base64) 2.3373 us/op 3.3113 us/op 0.71
toHexString serialized data 1.0974 us/op 1.8364 us/op 0.60
Buffer.toString(base64) 237.78 ns/op 412.58 ns/op 0.58

by benchmarkbot/action

@@ -99,7 +99,7 @@ export class Eth2Gossipsub extends GossipSub {
fanoutTTL: 60 * 1000,
mcacheLength: 6,
mcacheGossip: 3,
seenTTL: 550 * GOSSIPSUB_HEARTBEAT_INTERVAL,
seenTTL: config.SECONDS_PER_SLOT * SLOTS_PER_EPOCH * 2,
Copy link
Contributor

Choose a reason for hiding this comment

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

Would adding a comment pointing to the specs make sense here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a pretty straightforward value which can be easily found in the spec
also EIP-7045 happens in a couple of places not just this one

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should be in ms not second, fixed in #6607

@twoeths twoeths added this to the v1.18.0 milestone Mar 26, 2024
@twoeths twoeths marked this pull request as ready for review March 26, 2024 03:02
@twoeths twoeths requested a review from a team as a code owner March 26, 2024 03:02
@twoeths
Copy link
Contributor Author

twoeths commented Mar 26, 2024

Some other clients already merged this updated seenTTL

@twoeths twoeths merged commit 2f6e819 into unstable Mar 26, 2024
17 of 20 checks passed
@twoeths twoeths deleted the tuyen/fix_gossipsub_seen_ttl branch March 26, 2024 03:03
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.18.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend ttl_seen valid lifetime of an attestation/aggregate to 2 epochs
3 participants