Skip to content

fix: reject attestation source epochs below the min-span lookback - #9999

Open
wemeetagain wants to merge 2 commits into
unstablefrom
cayman/slashing-protection-min-span-lookback
Open

fix: reject attestation source epochs below the min-span lookback#9999
wemeetagain wants to merge 2 commits into
unstablefrom
cayman/slashing-protection-min-span-lookback

Conversation

@wemeetagain

Copy link
Copy Markdown
Member

Motivation

MinMaxSurround only writes min-span entries for epochs within 4096 of each recorded source epoch (#5454), so a surround vote with an older source epoch is not detected. The comment there points to the minimal strategy as the backstop, but its lower bound is only written by interchange import.

Description

  • Reject any attestation whose source epoch is below the min-span lookback window of the latest recorded attestation (SOURCE_BELOW_MIN_SPAN_LOOKBACK). Inside the window min-max spans are complete, so behaviour there is unchanged and the EIP-3076 vectors pass as before.
  • Read the latest attestation with a single reverse-range query, which also replaces the same-target point read in the common case, so reads per attestation are unchanged.
  • Validate an interchange against existing spans before storing its attestations, so a rejected import leaves nothing behind.

AI-assisted with Claude Code, reviewed and tested locally.

Min-span entries are only written within 4096 epochs below each recorded
source epoch, so min-max surround cannot detect a surround vote with an
older source epoch. Reject any source epoch below the lookback window of
the latest recorded attestation, read with a single reverse-range query
that also replaces the same-target point read in the common case.

Validate an interchange against existing spans before storing its
attestations so a rejected import leaves nothing behind.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T20:56:35.651385Z 0901584 PR opened
🔒 Security Review Completed 2026-09-03T20:59:37.903549Z 0901584 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 090158476d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/validator/src/slashingProtection/attestation/index.ts Outdated
Comment thread packages/validator/src/slashingProtection/attestation/index.ts
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d143ccd Previous: 76b167b Ratio
getPubkeys - native cache - req 1000 vs - 250000 vc 468.96 us/op 454.18 us/op 1.03
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.090 us/op 38.139 us/op 1.02
BLS verify - blst 895.20 us/op 881.42 us/op 1.02
BLS verifyMultipleSignatures 3 - blst 1.3218 ms/op 1.3149 ms/op 1.01
BLS verifyMultipleSignatures 8 - blst 2.2211 ms/op 2.2056 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 7.2836 ms/op 7.1987 ms/op 1.01
BLS verifyMultipleSignatures 64 - blst 14.036 ms/op 13.781 ms/op 1.02
BLS verifyMultipleSignatures 128 - blst 26.708 ms/op 26.392 ms/op 1.01
BLS deserializing 10000 signatures 634.57 ms/op 623.58 ms/op 1.02
BLS deserializing 100000 signatures 6.4233 s/op 6.4203 s/op 1.00
BLS verifyMultipleSignatures - same message - 3 - blst 960.83 us/op 934.13 us/op 1.03
BLS verifyMultipleSignatures - same message - 8 - blst 1.0860 ms/op 1.0605 ms/op 1.02
BLS verifyMultipleSignatures - same message - 32 - blst 1.7132 ms/op 1.6659 ms/op 1.03
BLS verifyMultipleSignatures - same message - 64 - blst 2.5359 ms/op 2.4681 ms/op 1.03
BLS verifyMultipleSignatures - same message - 128 - blst 4.1266 ms/op 4.0904 ms/op 1.01
BLS aggregatePubkeys 32 - blst 19.362 us/op 18.956 us/op 1.02
BLS aggregatePubkeys 128 - blst 69.861 us/op 68.448 us/op 1.02
getSlashingsAndExits - default max 42.066 us/op 53.149 us/op 0.79
getSlashingsAndExits - 2k 378.88 us/op 406.70 us/op 0.93
proposeBlockBody type=full, size=empty 454.38 us/op 725.43 us/op 0.63
isKnown best case - 1 super set check 201.00 ns/op 160.00 ns/op 1.26
isKnown normal case - 2 super set checks 168.00 ns/op 157.00 ns/op 1.07
isKnown worse case - 16 super set checks 167.00 ns/op 156.00 ns/op 1.07
validate api signedAggregateAndProof - struct 1.5594 ms/op 1.5052 ms/op 1.04
validate gossip signedAggregateAndProof - struct 1.5417 ms/op 1.4876 ms/op 1.04
batch validate gossip attestation - vc 640000 - chunk 32 127.91 us/op 134.86 us/op 0.95
batch validate gossip attestation - vc 640000 - chunk 64 108.82 us/op 112.65 us/op 0.97
batch validate gossip attestation - vc 640000 - chunk 128 101.52 us/op 101.76 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 101.05 us/op 102.16 us/op 0.99
bytes32 toHexString 298.00 ns/op 275.00 ns/op 1.08
bytes32 Buffer.toString(hex) 181.00 ns/op 157.00 ns/op 1.15
bytes32 Buffer.toString(hex) from Uint8Array 255.00 ns/op 224.00 ns/op 1.14
bytes32 Buffer.toString(hex) + 0x 182.00 ns/op 162.00 ns/op 1.12
Return object 10000 times 0.21870 ns/op 0.21070 ns/op 1.04
Throw Error 10000 times 3.3117 us/op 3.3673 us/op 0.98
toHex 95.105 ns/op 94.258 ns/op 1.01
Buffer.from 87.621 ns/op 86.202 ns/op 1.02
shared Buffer 60.291 ns/op 58.588 ns/op 1.03
fastMsgIdFn sha256 / 200 bytes 1.5190 us/op 1.4810 us/op 1.03
fastMsgIdFn h32 xxhash / 200 bytes 161.00 ns/op 150.00 ns/op 1.07
fastMsgIdFn h64 xxhash / 200 bytes 227.00 ns/op 194.00 ns/op 1.17
fastMsgIdFn sha256 / 1000 bytes 4.8140 us/op 4.7530 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 246.00 ns/op 240.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 259.00 ns/op 245.00 ns/op 1.06
fastMsgIdFn sha256 / 10000 bytes 42.288 us/op 41.974 us/op 1.01
fastMsgIdFn h32 xxhash / 10000 bytes 1.3320 us/op 1.2370 us/op 1.08
fastMsgIdFn h64 xxhash / 10000 bytes 875.00 ns/op 793.00 ns/op 1.10
send data - 1000 256B messages 4.5849 ms/op 6.4436 ms/op 0.71
send data - 1000 512B messages 5.5289 ms/op 7.5116 ms/op 0.74
send data - 1000 1024B messages 6.2998 ms/op 7.9627 ms/op 0.79
send data - 1000 1200B messages 8.6568 ms/op 7.9167 ms/op 1.09
send data - 1000 2048B messages 17.609 ms/op 16.733 ms/op 1.05
send data - 1000 4096B messages 128.74 ms/op 127.32 ms/op 1.01
send data - 1000 16384B messages 462.13 ms/op 454.31 ms/op 1.02
send data - 1000 65536B messages 2.1018 s/op 1.9000 s/op 1.11
enrSubnets - fastDeserialize 64 bits 732.00 ns/op 728.00 ns/op 1.01
enrSubnets - ssz BitVector 64 bits 276.00 ns/op 253.00 ns/op 1.09
enrSubnets - fastDeserialize 4 bits 100.00 ns/op 97.000 ns/op 1.03
enrSubnets - ssz BitVector 4 bits 276.00 ns/op 258.00 ns/op 1.07
prioritizePeers score -10:0 att 32-0.1 sync 2-0 205.37 us/op 191.17 us/op 1.07
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 233.46 us/op 216.54 us/op 1.08
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 339.10 us/op 321.64 us/op 1.05
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 599.50 us/op 562.99 us/op 1.06
prioritizePeers score 0:0 att 64-1 sync 4-1 702.92 us/op 672.93 us/op 1.04
array of 16000 items push then shift 1.2834 us/op 1.2106 us/op 1.06
LinkedList of 16000 items push then shift 7.6730 ns/op 7.4340 ns/op 1.03
array of 16000 items push then pop 81.529 ns/op 85.470 ns/op 0.95
LinkedList of 16000 items push then pop 6.0920 ns/op 5.8390 ns/op 1.04
array of 24000 items push then shift 1.9040 us/op 1.8077 us/op 1.05
LinkedList of 24000 items push then shift 7.3350 ns/op 7.2500 ns/op 1.01
array of 24000 items push then pop 117.40 ns/op 122.01 ns/op 0.96
LinkedList of 24000 items push then pop 6.2050 ns/op 5.9210 ns/op 1.05
intersect bitArray bitLen 8 3.9360 ns/op 3.7020 ns/op 1.06
intersect array and set length 8 29.940 ns/op 28.178 ns/op 1.06
intersect bitArray bitLen 128 23.681 ns/op 22.196 ns/op 1.07
intersect array and set length 128 504.42 ns/op 476.06 ns/op 1.06
bitArray.getTrueBitIndexes() bitLen 128 943.00 ns/op 912.00 ns/op 1.03
bitArray.getTrueBitIndexes() bitLen 248 1.7030 us/op 1.6830 us/op 1.01
bitArray.getTrueBitIndexes() bitLen 512 3.5800 us/op 3.6080 us/op 0.99
Full columns - reconstruct all 6 blobs 156.79 us/op 167.03 us/op 0.94
Full columns - reconstruct half of the blobs out of 6 74.101 us/op 80.916 us/op 0.92
Full columns - reconstruct single blob out of 6 32.838 us/op 32.884 us/op 1.00
Half columns - reconstruct all 6 blobs 382.67 ms/op 368.65 ms/op 1.04
Half columns - reconstruct half of the blobs out of 6 190.32 ms/op 185.68 ms/op 1.03
Half columns - reconstruct single blob out of 6 67.588 ms/op 66.305 ms/op 1.02
Set add up to 64 items then delete first 2.2629 us/op 2.1661 us/op 1.04
OrderedSet add up to 64 items then delete first 3.4745 us/op 3.4442 us/op 1.01
Set add up to 64 items then delete last 2.4126 us/op 2.3903 us/op 1.01
OrderedSet add up to 64 items then delete last 3.4042 us/op 3.4611 us/op 0.98
Set add up to 64 items then delete middle 2.1514 us/op 2.1264 us/op 1.01
OrderedSet add up to 64 items then delete middle 4.8540 us/op 4.9476 us/op 0.98
Set add up to 128 items then delete first 4.2600 us/op 4.1662 us/op 1.02
OrderedSet add up to 128 items then delete first 6.5142 us/op 6.0565 us/op 1.08
Set add up to 128 items then delete last 3.7192 us/op 3.8508 us/op 0.97
OrderedSet add up to 128 items then delete last 5.7831 us/op 5.8553 us/op 0.99
Set add up to 128 items then delete middle 3.6926 us/op 3.7957 us/op 0.97
OrderedSet add up to 128 items then delete middle 11.399 us/op 11.911 us/op 0.96
Set add up to 256 items then delete first 7.7304 us/op 7.6694 us/op 1.01
OrderedSet add up to 256 items then delete first 12.041 us/op 11.271 us/op 1.07
Set add up to 256 items then delete last 7.2894 us/op 7.6513 us/op 0.95
OrderedSet add up to 256 items then delete last 11.329 us/op 13.641 us/op 0.83
Set add up to 256 items then delete middle 7.3707 us/op 7.5353 us/op 0.98
OrderedSet add up to 256 items then delete middle 35.934 us/op 37.543 us/op 0.96
runFastConfirmationRules vc:100000 bc:96 eq:0 4.7581 ms/op 4.5745 ms/op 1.04
runFastConfirmationRules vc:600000 bc:96 eq:0 35.192 ms/op 33.501 ms/op 1.05
runFastConfirmationRules vc:1000000 bc:96 eq:0 57.560 ms/op 57.700 ms/op 1.00
runFastConfirmationRules vc:600000 bc:320 eq:0 34.968 ms/op 34.902 ms/op 1.00
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.1197 s/op 1.1112 s/op 1.01
pass gossip attestations to forkchoice per slot 2.5939 ms/op 2.4882 ms/op 1.04
forkChoice updateHead vc 100000 bc 64 eq 0 395.14 us/op 389.00 us/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 0 2.3610 ms/op 2.3148 ms/op 1.02
forkChoice updateHead vc 1000000 bc 64 eq 0 3.9866 ms/op 3.9658 ms/op 1.01
forkChoice updateHead vc 600000 bc 320 eq 0 2.3828 ms/op 2.3390 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 2.4404 ms/op 2.3687 ms/op 1.03
forkChoice updateHead vc 600000 bc 7200 eq 0 3.1751 ms/op 2.9391 ms/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 1000 2.3687 ms/op 2.3145 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 10000 2.4532 ms/op 2.4083 ms/op 1.02
forkChoice updateHead vc 600000 bc 64 eq 300000 6.8202 ms/op 6.8565 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 0 gloas boosted 2.3600 ms/op 2.4233 ms/op 0.97
computeDeltas 1400000 validators 0% inactive 11.972 ms/op 11.820 ms/op 1.01
computeDeltas 1400000 validators 10% inactive 11.361 ms/op 11.026 ms/op 1.03
computeDeltas 1400000 validators 20% inactive 10.540 ms/op 10.663 ms/op 0.99
computeDeltas 1400000 validators 50% inactive 8.6694 ms/op 8.6090 ms/op 1.01
computeDeltas 2100000 validators 0% inactive 17.785 ms/op 17.504 ms/op 1.02
computeDeltas 2100000 validators 10% inactive 16.905 ms/op 16.374 ms/op 1.03
computeDeltas 2100000 validators 20% inactive 16.122 ms/op 15.427 ms/op 1.05
computeDeltas 2100000 validators 50% inactive 10.620 ms/op 10.189 ms/op 1.04
altair processAttestation - 250000 vs - 7PWei normalcase 2.0323 ms/op 1.9274 ms/op 1.05
altair processAttestation - 250000 vs - 7PWei worstcase 3.1755 ms/op 2.7900 ms/op 1.14
altair processAttestation - setStatus - 1/6 committees join 117.26 us/op 111.72 us/op 1.05
altair processAttestation - setStatus - 1/3 committees join 227.65 us/op 198.84 us/op 1.14
altair processAttestation - setStatus - 1/2 committees join 302.26 us/op 272.76 us/op 1.11
altair processAttestation - setStatus - 2/3 committees join 410.40 us/op 352.25 us/op 1.17
altair processAttestation - setStatus - 4/5 committees join 569.57 us/op 519.45 us/op 1.10
altair processAttestation - setStatus - 100% committees join 668.86 us/op 587.24 us/op 1.14
altair processBlock - 250000 vs - 7PWei normalcase 5.0363 ms/op 4.7872 ms/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase hashState 22.323 ms/op 22.755 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 25.112 ms/op 23.629 ms/op 1.06
altair processBlock - 250000 vs - 7PWei worstcase hashState 54.472 ms/op 54.593 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3640 ms/op 1.2385 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei worstcase 20.197 ms/op 20.547 ms/op 0.98
altair processEth1Data - 250000 vs - 7PWei normalcase 304.64 us/op 291.50 us/op 1.05
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.1830 us/op 3.1320 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 19.365 us/op 19.260 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.4530 us/op 5.3550 us/op 1.02
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 3.4710 us/op 3.4240 us/op 1.01
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 88.321 us/op 83.753 us/op 1.05
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4585 ms/op 1.3929 ms/op 1.05
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9057 ms/op 1.7940 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.9410 ms/op 1.7876 ms/op 1.09
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.9182 ms/op 4.0674 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.2368 ms/op 2.0667 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.2836 ms/op 4.9349 ms/op 0.87
Tree 40 250000 create 342.02 ms/op 337.24 ms/op 1.01
Tree 40 250000 get(125000) 94.292 ns/op 88.432 ns/op 1.07
Tree 40 250000 set(125000) 994.34 ns/op 958.49 ns/op 1.04
Tree 40 250000 toArray() 14.830 ms/op 15.995 ms/op 0.93
Tree 40 250000 iterate all - toArray() + loop 15.983 ms/op 16.680 ms/op 0.96
Tree 40 250000 iterate all - get(i) 39.283 ms/op 39.253 ms/op 1.00
Array 250000 create 2.5176 ms/op 2.5212 ms/op 1.00
Array 250000 clone - spread 779.95 us/op 779.78 us/op 1.00
Array 250000 get(125000) 0.30000 ns/op 0.28200 ns/op 1.06
Array 250000 set(125000) 0.29400 ns/op 0.28800 ns/op 1.02
Array 250000 iterate all - loop 57.017 us/op 54.690 us/op 1.04
phase0 afterProcessEpoch - 250000 vs - 7PWei 39.091 ms/op 62.789 ms/op 0.62
Array.fill - length 1000000 4.0787 ms/op 4.9397 ms/op 0.83
Array push - length 1000000 14.784 ms/op 16.963 ms/op 0.87
Array.get 0.20713 ns/op 0.19946 ns/op 1.04
Uint8Array.get 0.25246 ns/op 0.23520 ns/op 1.07
phase0 beforeProcessEpoch - 250000 vs - 7PWei 18.000 ms/op 19.410 ms/op 0.93
altair processEpoch - mainnet_e81889 228.32 ms/op 237.06 ms/op 0.96
mainnet_e81889 - altair beforeProcessEpoch 14.460 ms/op 36.963 ms/op 0.39
mainnet_e81889 - altair processJustificationAndFinalization 4.5830 us/op 4.9020 us/op 0.93
mainnet_e81889 - altair processInactivityUpdates 4.3076 ms/op 6.1735 ms/op 0.70
mainnet_e81889 - altair processRewardsAndPenalties 18.570 ms/op 19.072 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 594.00 ns/op 553.00 ns/op 1.07
mainnet_e81889 - altair processSlashings 156.00 ns/op 135.00 ns/op 1.16
mainnet_e81889 - altair processEth1DataReset 146.00 ns/op 132.00 ns/op 1.11
mainnet_e81889 - altair processEffectiveBalanceUpdates 4.5502 ms/op 9.5084 ms/op 0.48
mainnet_e81889 - altair processSlashingsReset 710.00 ns/op 668.00 ns/op 1.06
mainnet_e81889 - altair processRandaoMixesReset 937.00 ns/op 975.00 ns/op 0.96
mainnet_e81889 - altair processHistoricalRootsUpdate 143.00 ns/op 136.00 ns/op 1.05
mainnet_e81889 - altair processParticipationFlagUpdates 470.00 ns/op 461.00 ns/op 1.02
mainnet_e81889 - altair processSyncCommitteeUpdates 121.00 ns/op 105.00 ns/op 1.15
mainnet_e81889 - altair afterProcessEpoch 43.777 ms/op 40.821 ms/op 1.07
capella processEpoch - mainnet_e217614 782.68 ms/op 770.13 ms/op 1.02
mainnet_e217614 - capella beforeProcessEpoch 70.473 ms/op 68.243 ms/op 1.03
mainnet_e217614 - capella processJustificationAndFinalization 4.7590 us/op 6.6040 us/op 0.72
mainnet_e217614 - capella processInactivityUpdates 13.738 ms/op 15.131 ms/op 0.91
mainnet_e217614 - capella processRewardsAndPenalties 91.391 ms/op 92.292 ms/op 0.99
mainnet_e217614 - capella processRegistryUpdates 4.6310 us/op 4.3320 us/op 1.07
mainnet_e217614 - capella processSlashings 146.00 ns/op 135.00 ns/op 1.08
mainnet_e217614 - capella processEth1DataReset 145.00 ns/op 128.00 ns/op 1.13
mainnet_e217614 - capella processEffectiveBalanceUpdates 18.854 ms/op 16.455 ms/op 1.15
mainnet_e217614 - capella processSlashingsReset 715.00 ns/op 650.00 ns/op 1.10
mainnet_e217614 - capella processRandaoMixesReset 1.0160 us/op 964.00 ns/op 1.05
mainnet_e217614 - capella processHistoricalRootsUpdate 144.00 ns/op 132.00 ns/op 1.09
mainnet_e217614 - capella processParticipationFlagUpdates 474.00 ns/op 444.00 ns/op 1.07
mainnet_e217614 - capella afterProcessEpoch 111.09 ms/op 105.61 ms/op 1.05
phase0 processEpoch - mainnet_e58758 242.99 ms/op 216.00 ms/op 1.12
mainnet_e58758 - phase0 beforeProcessEpoch 51.300 ms/op 53.051 ms/op 0.97
mainnet_e58758 - phase0 processJustificationAndFinalization 5.2810 us/op 5.3990 us/op 0.98
mainnet_e58758 - phase0 processRewardsAndPenalties 15.914 ms/op 17.038 ms/op 0.93
mainnet_e58758 - phase0 processRegistryUpdates 2.3110 us/op 2.1500 us/op 1.07
mainnet_e58758 - phase0 processSlashings 162.00 ns/op 133.00 ns/op 1.22
mainnet_e58758 - phase0 processEth1DataReset 153.00 ns/op 227.00 ns/op 0.67
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 837.63 us/op 793.22 us/op 1.06
mainnet_e58758 - phase0 processSlashingsReset 905.00 ns/op 923.00 ns/op 0.98
mainnet_e58758 - phase0 processRandaoMixesReset 1.0400 us/op 1.0400 us/op 1.00
mainnet_e58758 - phase0 processHistoricalRootsUpdate 381.00 ns/op 134.00 ns/op 2.84
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.1850 us/op 1.0100 us/op 1.17
mainnet_e58758 - phase0 afterProcessEpoch 34.712 ms/op 32.096 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0181 ms/op 972.97 us/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6339 ms/op 1.5808 ms/op 1.03
gloas processInactivityUpdates - 250000 inactivity leak all eligible missed target 11.561 ms/op 11.663 ms/op 0.99
phase0 processRegistryUpdates - 250000 normalcase 2.3030 us/op 2.2580 us/op 1.02
phase0 processRegistryUpdates - 250000 badcase_full_deposits 144.02 us/op 132.31 us/op 1.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 63.676 ms/op 58.898 ms/op 1.08
altair processRewardsAndPenalties - 250000 normalcase 15.463 ms/op 14.919 ms/op 1.04
altair processRewardsAndPenalties - 250000 worstcase 15.269 ms/op 14.482 ms/op 1.05
phase0 getAttestationDeltas - 250000 normalcase 5.6879 ms/op 5.4402 ms/op 1.05
phase0 getAttestationDeltas - 250000 worstcase 5.7218 ms/op 5.5622 ms/op 1.03
phase0 processSlashings - 250000 worstcase 62.263 us/op 58.346 us/op 1.07
altair processSyncCommitteeUpdates - 250000 11.554 ms/op 10.729 ms/op 1.08
BeaconState.hashTreeRoot - No change 184.00 ns/op 166.00 ns/op 1.11
BeaconState.hashTreeRoot - 1 full validator 76.671 us/op 80.708 us/op 0.95
BeaconState.hashTreeRoot - 32 full validator 967.25 us/op 889.72 us/op 1.09
BeaconState.hashTreeRoot - 512 full validator 9.3781 ms/op 9.8509 ms/op 0.95
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 110.06 us/op 103.41 us/op 1.06
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.5044 ms/op 1.4323 ms/op 1.05
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.440 ms/op 23.047 ms/op 0.89
BeaconState.hashTreeRoot - 1 balances 91.934 us/op 81.010 us/op 1.13
BeaconState.hashTreeRoot - 32 balances 842.76 us/op 732.83 us/op 1.15
BeaconState.hashTreeRoot - 512 balances 6.5543 ms/op 7.5964 ms/op 0.86
BeaconState.hashTreeRoot - 250000 balances 138.79 ms/op 120.14 ms/op 1.16
aggregationBits - 2048 els - zipIndexesInBitList 20.279 us/op 19.432 us/op 1.04
regular array get 100000 times 23.617 us/op 22.166 us/op 1.07
wrappedArray get 100000 times 23.649 us/op 22.033 us/op 1.07
arrayWithProxy get 100000 times 14.803 ms/op 9.1497 ms/op 1.62
ssz.Root.equals 33.026 ns/op 20.434 ns/op 1.62
byteArrayEquals 21.662 ns/op 20.111 ns/op 1.08
Buffer.compare 8.9690 ns/op 8.4060 ns/op 1.07
processSlot - 1 slots 10.076 us/op 10.194 us/op 0.99
processSlot - 32 slots 2.3308 ms/op 2.0690 ms/op 1.13
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 5.2853 ms/op 4.5888 ms/op 1.15
getCommitteeAssignments - req 1 vs - 250000 vc 1.6275 ms/op 1.6104 ms/op 1.01
getCommitteeAssignments - req 100 vs - 250000 vc 3.3983 ms/op 3.3051 ms/op 1.03
getCommitteeAssignments - req 1000 vs - 250000 vc 3.5988 ms/op 3.5261 ms/op 1.02
findModifiedValidators - 10000 modified validators 720.32 ms/op 889.54 ms/op 0.81
findModifiedValidators - 1000 modified validators 505.73 ms/op 526.89 ms/op 0.96
findModifiedValidators - 100 modified validators 347.21 ms/op 357.37 ms/op 0.97
findModifiedValidators - 10 modified validators 219.24 ms/op 304.58 ms/op 0.72
findModifiedValidators - 1 modified validators 222.18 ms/op 220.78 ms/op 1.01
findModifiedValidators - no difference 183.34 ms/op 244.90 ms/op 0.75
migrate state 1500000 validators, 3400 modified, 2000 new 3.3139 s/op 3.3104 s/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.4900 ns/op 3.3700 ns/op 1.04
state getBlockRootAtSlot - 250000 vs - 7PWei 447.46 ns/op 455.87 ns/op 0.98
computeProposerIndex 100000 validators 1.4187 ms/op 1.3353 ms/op 1.06
getNextSyncCommitteeIndices 1000 validators 2.9406 ms/op 2.7802 ms/op 1.06
getNextSyncCommitteeIndices 10000 validators 26.501 ms/op 25.632 ms/op 1.03
getNextSyncCommitteeIndices 100000 validators 91.286 ms/op 90.091 ms/op 1.01
computeProposers - vc 250000 591.15 us/op 548.22 us/op 1.08
computeEpochShuffling - vc 250000 40.591 ms/op 38.829 ms/op 1.05
getNextSyncCommittee - vc 250000 9.4747 ms/op 10.982 ms/op 0.86
nodejs block root to RootHex using toHex 92.290 ns/op 93.130 ns/op 0.99
nodejs block root to RootHex using toRootHex 61.061 ns/op 60.807 ns/op 1.00
nodejs fromHex(blob) 923.62 us/op 919.19 us/op 1.00
nodejs fromHexInto(blob) 608.53 us/op 618.26 us/op 0.98
nodejs block root to RootHex using the deprecated toHexString 599.23 ns/op 631.58 ns/op 0.95
nodejs byteArrayEquals 32 bytes (block root) 25.592 ns/op 25.120 ns/op 1.02
nodejs byteArrayEquals 48 bytes (pubkey) 36.869 ns/op 36.524 ns/op 1.01
nodejs byteArrayEquals 96 bytes (signature) 33.860 ns/op 33.631 ns/op 1.01
nodejs byteArrayEquals 1024 bytes 41.150 ns/op 41.270 ns/op 1.00
nodejs byteArrayEquals 131072 bytes (blob) 1.7251 us/op 1.7014 us/op 1.01
browser block root to RootHex using toHex 139.78 ns/op 139.51 ns/op 1.00
browser block root to RootHex using toRootHex 126.51 ns/op 126.24 ns/op 1.00
browser fromHex(blob) 1.7205 ms/op 1.8157 ms/op 0.95
browser fromHexInto(blob) 624.69 us/op 614.19 us/op 1.02
browser block root to RootHex using the deprecated toHexString 400.90 ns/op 403.54 ns/op 0.99
browser byteArrayEquals 32 bytes (block root) 28.087 ns/op 26.840 ns/op 1.05
browser byteArrayEquals 48 bytes (pubkey) 39.058 ns/op 38.062 ns/op 1.03
browser byteArrayEquals 96 bytes (signature) 73.266 ns/op 70.958 ns/op 1.03
browser byteArrayEquals 1024 bytes 735.71 ns/op 724.80 ns/op 1.02
browser byteArrayEquals 131072 bytes (blob) 93.613 us/op 90.839 us/op 1.03

by benchmarkbot/action

…e beyond the lookback

The source epoch check relies on the highest target attestation having the
highest source epoch. Min-max surround does not detect a surround vote beyond
its lookback on import, so validate that explicitly before storing the
interchange.

Restore the original import write order, partial state left behind by a
rejected interchange is tracked separately.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant