Skip to content

fix: preserve gossip arrival time of repeat proposals for PTC timeliness - #10070

Draft
nflaig wants to merge 1 commit into
unstablefrom
nflaig/repeat-proposal-first-seen-timeliness
Draft

nflaig wants to merge 1 commit into
unstablefrom
nflaig/repeat-proposal-first-seen-timeliness

Conversation

@nflaig

@nflaig nflaig commented Sep 12, 2026

Copy link
Copy Markdown
Member

A repeat proposal received over gossip is ignored on the wire but imported locally (#9805), bounded by the two signature-verified roots the seen cache keeps per proposer and slot (#9795). Since the cache fills on signature alone, a signed but invalid block burns one of the two slots, and a valid sibling arriving after that is dropped without ever reaching fork choice. If it was released before the PTC deadline, should_apply_proposer_boost should count it as an early equivocation and get_proposer_head should see the equivocation, but we never learn about it. Raising the cap does not help, a proposer can send as many signed blocks as it takes.

This keeps the bound on full imports and instead records when each repeat proposal was first seen. A sibling that later becomes relevant is fetched by sync anyway, through unknown parent or attestation lookups, and is now imported with its gossip arrival for the PTC timeliness flag rather than the download time. Validation work is only spent on siblings that gained attestation weight or a descendant, so it is bounded by what the attacker can get attested rather than by a constant.

  • record the first seen timestamp of every repeat proposal in SeenBlockProposers, capped per slot and pruned on finalization
  • drop the seeded block input and payload envelope input of repeat proposals that are not imported, they are re-downloaded if ever referenced
  • add an optional PTC receive delay to ForkChoice.onBlock and pass the first seen time through processBlock from unknown block sync

Attestation timeliness and proposer boost eligibility of a fetched block still use the import time, so the existing boost guard for downloaded blocks of a known proposer is unchanged. A valid timely sibling that never gains weight or a descendant stays out of fork choice, which by the reasoning in ethereum/consensus-specs#4807 is not a dangerous block.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 12, 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-12T14:36:47.033297Z b6fda77 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.

@nflaig
nflaig marked this pull request as draft September 12, 2026 14:32

@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: b6fda77e14

ℹ️ 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".

stateRoot: toRootHex(block.stateRoot),
timeliness: isTimely,
ptcTimeliness: this.isBlockPtcTimely(block, receiveDelaySec),
ptcTimeliness: this.isBlockPtcTimely(block, ptcReceiveDelaySec),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Honor first-seen slot when computing PTC timeliness

When unknown-block sync imports an early-seen sibling after its slot has ended, passing only the saved delay here does not preserve its timeliness: isBlockPtcTimely() also requires fcStore.currentSlot === block.slot. This occurs when the sibling becomes relevant through a descendant in the next slot, so it is still recorded as not PTC-timely and shouldApplyProposerBoost() misses the early equivocation. Derive the current-slot condition from the saved arrival time or pass a precomputed first-seen timeliness value.

Useful? React with 👍 / 👎.

Comment on lines +145 to +147
for (const slot of this.firstSeenTimestampSecBySlot.keys()) {
if (slot < finalizedSlot) {
this.firstSeenTimestampSecBySlot.delete(slot);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Evict first-seen entries without waiting for finalization

If finality stalls, this cleanup never removes entries for later slots, so the new cache can grow by up to 4096 roots for every affected slot indefinitely. After a proposer has supplied two signature-verified siblings, additional repeat proposals skip signature verification, making it practical for an equivocating proposer and its peers to fill this allowance on each selected slot and steadily exhaust node memory during an extended non-finalizing period. Retain only the small recent-slot window in which PTC timeliness can still matter, or enforce a global bound.

Useful? React with 👍 / 👎.

validBlobSidecars?: BlobSidecarValidation;
/** Seen timestamp seconds */
seenTimestampSec?: number;
/** Seconds the block was first seen on gossip, if it was ignored there as a repeat proposal. Only affects PTC timeliness */

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Only affects PTC timeliness

so confusing that the ptc deadline was reused for this, also kinda arbitrary

@github-actions

Copy link
Copy Markdown
Contributor

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 1cd344b Previous: a0619b2 Ratio
archive index / 1 slots / 8 columns / legacy 79.816 us/op 281.57 us/op 0.28
Full benchmark results
Benchmark suite Current: 1cd344b Previous: a0619b2 Ratio
getPubkeys - native cache - req 1000 vs - 250000 vc 398.96 us/op 387.84 us/op 1.03
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 46.879 us/op 38.438 us/op 1.22
BLS verify - blst 882.33 us/op 884.24 us/op 1.00
BLS verifyMultipleSignatures 3 - blst 1.3665 ms/op 1.3629 ms/op 1.00
BLS verifyMultipleSignatures 8 - blst 2.2567 ms/op 2.2390 ms/op 1.01
BLS verifyMultipleSignatures 32 - blst 7.4173 ms/op 7.4027 ms/op 1.00
BLS verifyMultipleSignatures 64 - blst 14.186 ms/op 14.174 ms/op 1.00
BLS verifyMultipleSignatures 128 - blst 26.776 ms/op 26.885 ms/op 1.00
BLS deserializing 10000 signatures 630.25 ms/op 623.93 ms/op 1.01
BLS deserializing 100000 signatures 6.3645 s/op 6.3074 s/op 1.01
BLS verifyMultipleSignatures - same message - 3 - blst 940.31 us/op 939.68 us/op 1.00
BLS verifyMultipleSignatures - same message - 8 - blst 1.0839 ms/op 1.0682 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst 1.6932 ms/op 1.6755 ms/op 1.01
BLS verifyMultipleSignatures - same message - 64 - blst 2.5146 ms/op 2.4910 ms/op 1.01
BLS verifyMultipleSignatures - same message - 128 - blst 4.1286 ms/op 4.0876 ms/op 1.01
BLS aggregatePubkeys 32 - blst 19.308 us/op 19.290 us/op 1.00
BLS aggregatePubkeys 128 - blst 70.004 us/op 70.464 us/op 0.99
getSlashingsAndExits - default max 40.447 us/op 38.384 us/op 1.05
getSlashingsAndExits - 2k 337.12 us/op 333.21 us/op 1.01
proposeBlockBody type=full, size=empty 723.88 us/op 622.54 us/op 1.16
isKnown best case - 1 super set check 166.00 ns/op 165.00 ns/op 1.01
isKnown normal case - 2 super set checks 164.00 ns/op 157.00 ns/op 1.04
isKnown worse case - 16 super set checks 167.00 ns/op 156.00 ns/op 1.07
validate api signedAggregateAndProof - struct 1.5182 ms/op 1.5164 ms/op 1.00
validate gossip signedAggregateAndProof - struct 1.5153 ms/op 1.5110 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 124.61 us/op 123.71 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 64 107.00 us/op 106.64 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 128 95.012 us/op 95.297 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 94.677 us/op 93.394 us/op 1.01
bytes32 toHexString 295.00 ns/op 284.00 ns/op 1.04
bytes32 Buffer.toString(hex) 167.00 ns/op 165.00 ns/op 1.01
bytes32 Buffer.toString(hex) from Uint8Array 234.00 ns/op 239.00 ns/op 0.98
bytes32 Buffer.toString(hex) + 0x 167.00 ns/op 167.00 ns/op 1.00
Return object 10000 times 0.21220 ns/op 0.20940 ns/op 1.01
Throw Error 10000 times 3.3532 us/op 3.3492 us/op 1.00
toHex 100.84 ns/op 96.266 ns/op 1.05
Buffer.from 91.496 ns/op 86.735 ns/op 1.05
shared Buffer 62.183 ns/op 61.677 ns/op 1.01
fastMsgIdFn sha256 / 200 bytes 1.4570 us/op 1.4520 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 150.00 ns/op 155.00 ns/op 0.97
fastMsgIdFn h64 xxhash / 200 bytes 204.00 ns/op 199.00 ns/op 1.03
fastMsgIdFn sha256 / 1000 bytes 4.7280 us/op 4.7140 us/op 1.00
fastMsgIdFn h32 xxhash / 1000 bytes 242.00 ns/op 245.00 ns/op 0.99
fastMsgIdFn h64 xxhash / 1000 bytes 245.00 ns/op 245.00 ns/op 1.00
fastMsgIdFn sha256 / 10000 bytes 41.765 us/op 41.716 us/op 1.00
fastMsgIdFn h32 xxhash / 10000 bytes 1.2970 us/op 1.2700 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 857.00 ns/op 827.00 ns/op 1.04
send data - 1000 256B messages 3.9108 ms/op 3.9901 ms/op 0.98
send data - 1000 512B messages 4.9991 ms/op 5.0736 ms/op 0.99
send data - 1000 1024B messages 5.0960 ms/op 5.3044 ms/op 0.96
send data - 1000 1200B messages 6.6212 ms/op 5.9965 ms/op 1.10
send data - 1000 2048B messages 8.8134 ms/op 11.908 ms/op 0.74
send data - 1000 4096B messages 90.381 ms/op 54.708 ms/op 1.65
send data - 1000 16384B messages 518.28 ms/op 293.57 ms/op 1.77
send data - 1000 65536B messages 1.7177 s/op 1.8383 s/op 0.93
enrSubnets - fastDeserialize 64 bits 770.00 ns/op 750.00 ns/op 1.03
enrSubnets - ssz BitVector 64 bits 267.00 ns/op 252.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 105.00 ns/op 104.00 ns/op 1.01
enrSubnets - ssz BitVector 4 bits 260.00 ns/op 264.00 ns/op 0.98
prioritizePeers score -10:0 att 32-0.1 sync 2-0 201.69 us/op 199.21 us/op 1.01
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 231.37 us/op 224.39 us/op 1.03
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 329.62 us/op 325.65 us/op 1.01
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 583.08 us/op 579.22 us/op 1.01
prioritizePeers score 0:0 att 64-1 sync 4-1 703.19 us/op 674.58 us/op 1.04
archive index / 1 slot / archive root index lookup 17.028 us/op 17.096 us/op 1.00
archive index / 1 slot / archive block lookup, decode and hash 2.7738 ms/op 2.6950 ms/op 1.03
archive index / 1 slots / 1 columns / legacy 22.739 us/op 23.034 us/op 0.99
archive index / 1 slots / 1 columns / flat files 146.85 us/op 160.43 us/op 0.92
archive index / 1 slots / 8 columns / legacy 79.816 us/op 281.57 us/op 0.28
archive index / 1 slots / 8 columns / flat files 374.41 us/op 360.85 us/op 1.04
archive index / 1 slots / 128 columns / legacy 5.4924 ms/op 9.2573 ms/op 0.59
archive index / 1 slots / 128 columns / flat files 4.5553 ms/op 4.4689 ms/op 1.02
archive index / 8 slots / 1 columns / legacy 177.83 us/op 173.24 us/op 1.03
archive index / 8 slots / 1 columns / flat files 1.2298 ms/op 1.1080 ms/op 1.11
archive index / 8 slots / 8 columns / legacy 6.1156 ms/op 2.1946 ms/op 2.79
archive index / 8 slots / 8 columns / flat files 3.2655 ms/op 2.8030 ms/op 1.17
archive index / 8 slots / 128 columns / legacy 98.291 ms/op 63.773 ms/op 1.54
archive index / 8 slots / 128 columns / flat files 237.68 ms/op 232.05 ms/op 1.02
head state / 1 slot / archive root index lookup 19.222 us/op 16.028 us/op 1.20
head state / 1 slot / archive block lookup, decode and hash 2.7071 ms/op 2.6790 ms/op 1.01
head state / 1 slots / 1 columns / legacy 21.035 us/op 21.952 us/op 0.96
head state / 1 slots / 1 columns / flat files 121.15 us/op 115.69 us/op 1.05
head state / 1 slots / 8 columns / legacy 79.557 us/op 73.431 us/op 1.08
head state / 1 slots / 8 columns / flat files 348.51 us/op 314.36 us/op 1.11
head state / 1 slots / 128 columns / legacy 8.0121 ms/op 8.2863 ms/op 0.97
head state / 1 slots / 128 columns / flat files 4.6167 ms/op 4.5691 ms/op 1.01
head state / 8 slots / 1 columns / legacy 173.72 us/op 172.91 us/op 1.00
head state / 8 slots / 1 columns / flat files 972.00 us/op 933.51 us/op 1.04
head state / 8 slots / 8 columns / legacy 1.1359 ms/op 752.15 us/op 1.51
head state / 8 slots / 8 columns / flat files 2.7551 ms/op 2.4293 ms/op 1.13
head state / 8 slots / 128 columns / legacy 84.456 ms/op 99.995 ms/op 0.84
head state / 8 slots / 128 columns / flat files 218.03 ms/op 229.96 ms/op 0.95
array of 16000 items push then shift 1.3134 us/op 1.2911 us/op 1.02
LinkedList of 16000 items push then shift 7.2350 ns/op 6.7310 ns/op 1.07
array of 16000 items push then pop 78.662 ns/op 76.163 ns/op 1.03
LinkedList of 16000 items push then pop 5.9210 ns/op 5.8320 ns/op 1.02
array of 24000 items push then shift 1.9250 us/op 1.9129 us/op 1.01
LinkedList of 24000 items push then shift 6.4860 ns/op 6.4200 ns/op 1.01
array of 24000 items push then pop 107.84 ns/op 104.22 ns/op 1.03
LinkedList of 24000 items push then pop 5.9140 ns/op 5.8810 ns/op 1.01
intersect bitArray bitLen 8 3.8790 ns/op 3.8190 ns/op 1.02
intersect array and set length 8 30.156 ns/op 29.213 ns/op 1.03
intersect bitArray bitLen 128 23.287 ns/op 23.091 ns/op 1.01
intersect array and set length 128 512.69 ns/op 492.67 ns/op 1.04
bitArray.getTrueBitIndexes() bitLen 128 939.00 ns/op 913.00 ns/op 1.03
bitArray.getTrueBitIndexes() bitLen 248 1.7370 us/op 1.6630 us/op 1.04
bitArray.getTrueBitIndexes() bitLen 512 3.5890 us/op 3.4400 us/op 1.04
Full columns - reconstruct all 6 blobs 133.17 us/op 161.30 us/op 0.83
Full columns - reconstruct half of the blobs out of 6 65.948 us/op 70.034 us/op 0.94
Full columns - reconstruct single blob out of 6 34.114 us/op 34.265 us/op 1.00
Half columns - reconstruct all 6 blobs 376.49 ms/op 375.03 ms/op 1.00
Half columns - reconstruct half of the blobs out of 6 187.00 ms/op 188.46 ms/op 0.99
Half columns - reconstruct single blob out of 6 65.642 ms/op 66.142 ms/op 0.99
Set add up to 64 items then delete first 1.6638 us/op 1.6442 us/op 1.01
OrderedSet add up to 64 items then delete first 2.5346 us/op 2.4954 us/op 1.02
Set add up to 64 items then delete last 1.9456 us/op 1.8707 us/op 1.04
OrderedSet add up to 64 items then delete last 2.8039 us/op 2.7500 us/op 1.02
Set add up to 64 items then delete middle 1.9533 us/op 1.8611 us/op 1.05
OrderedSet add up to 64 items then delete middle 4.2456 us/op 4.1789 us/op 1.02
Set add up to 128 items then delete first 3.8645 us/op 3.6997 us/op 1.04
OrderedSet add up to 128 items then delete first 5.7094 us/op 5.7013 us/op 1.00
Set add up to 128 items then delete last 3.7220 us/op 3.5395 us/op 1.05
OrderedSet add up to 128 items then delete last 5.3968 us/op 5.2497 us/op 1.03
Set add up to 128 items then delete middle 3.7361 us/op 3.5775 us/op 1.04
OrderedSet add up to 128 items then delete middle 11.183 us/op 10.978 us/op 1.02
Set add up to 256 items then delete first 7.6285 us/op 7.6045 us/op 1.00
OrderedSet add up to 256 items then delete first 11.737 us/op 11.450 us/op 1.03
Set add up to 256 items then delete last 7.3607 us/op 7.1719 us/op 1.03
OrderedSet add up to 256 items then delete last 11.071 us/op 10.875 us/op 1.02
Set add up to 256 items then delete middle 7.3837 us/op 7.2151 us/op 1.02
OrderedSet add up to 256 items then delete middle 35.465 us/op 33.973 us/op 1.04
runFastConfirmationRules vc:100000 bc:96 eq:0 4.9915 ms/op 4.5318 ms/op 1.10
runFastConfirmationRules vc:600000 bc:96 eq:0 39.128 ms/op 33.858 ms/op 1.16
runFastConfirmationRules vc:1000000 bc:96 eq:0 57.024 ms/op 57.811 ms/op 0.99
runFastConfirmationRules vc:600000 bc:320 eq:0 33.830 ms/op 33.936 ms/op 1.00
runFastConfirmationRules vc:100000 bc:96 eq:1000 1.1195 s/op 1.1232 s/op 1.00
pass gossip attestations to forkchoice per slot 2.8031 ms/op 2.5425 ms/op 1.10
forkChoice updateHead vc 100000 bc 64 eq 0 463.55 us/op 429.78 us/op 1.08
forkChoice updateHead vc 600000 bc 64 eq 0 2.6980 ms/op 2.5681 ms/op 1.05
forkChoice updateHead vc 1000000 bc 64 eq 0 4.4163 ms/op 4.2218 ms/op 1.05
forkChoice updateHead vc 600000 bc 320 eq 0 2.7068 ms/op 2.5015 ms/op 1.08
forkChoice updateHead vc 600000 bc 1200 eq 0 2.7433 ms/op 2.5559 ms/op 1.07
forkChoice updateHead vc 600000 bc 7200 eq 0 3.2039 ms/op 2.9977 ms/op 1.07
forkChoice updateHead vc 600000 bc 64 eq 1000 2.7222 ms/op 2.5993 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 10000 2.8036 ms/op 2.6337 ms/op 1.06
forkChoice updateHead vc 600000 bc 64 eq 300000 7.0100 ms/op 6.9802 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 0 gloas boosted 2.7179 ms/op 2.4995 ms/op 1.09
computeDeltas 1400000 validators 0% inactive 13.251 ms/op 12.384 ms/op 1.07
computeDeltas 1400000 validators 10% inactive 12.542 ms/op 11.953 ms/op 1.05
computeDeltas 1400000 validators 20% inactive 11.947 ms/op 11.295 ms/op 1.06
computeDeltas 1400000 validators 50% inactive 9.6721 ms/op 9.0310 ms/op 1.07
computeDeltas 2100000 validators 0% inactive 19.917 ms/op 18.815 ms/op 1.06
computeDeltas 2100000 validators 10% inactive 18.828 ms/op 17.975 ms/op 1.05
computeDeltas 2100000 validators 20% inactive 17.895 ms/op 16.768 ms/op 1.07
computeDeltas 2100000 validators 50% inactive 14.494 ms/op 11.395 ms/op 1.27
altair processAttestation - 250000 vs - 7PWei normalcase 1.5562 ms/op 1.5342 ms/op 1.01
altair processAttestation - 250000 vs - 7PWei worstcase 2.3942 ms/op 2.3748 ms/op 1.01
altair processAttestation - setStatus - 1/6 committees join 105.64 us/op 100.01 us/op 1.06
altair processAttestation - setStatus - 1/3 committees join 197.97 us/op 191.65 us/op 1.03
altair processAttestation - setStatus - 1/2 committees join 285.66 us/op 278.66 us/op 1.03
altair processAttestation - setStatus - 2/3 committees join 369.42 us/op 359.86 us/op 1.03
altair processAttestation - setStatus - 4/5 committees join 524.11 us/op 506.73 us/op 1.03
altair processAttestation - setStatus - 100% committees join 613.09 us/op 597.49 us/op 1.03
altair processBlock - 250000 vs - 7PWei normalcase 3.5286 ms/op 3.2729 ms/op 1.08
altair processBlock - 250000 vs - 7PWei normalcase hashState 20.623 ms/op 20.987 ms/op 0.98
altair processBlock - 250000 vs - 7PWei worstcase 23.730 ms/op 21.970 ms/op 1.08
altair processBlock - 250000 vs - 7PWei worstcase hashState 54.775 ms/op 49.803 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei normalcase 1.2660 ms/op 1.2645 ms/op 1.00
phase0 processBlock - 250000 vs - 7PWei worstcase 19.676 ms/op 19.393 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 305.26 us/op 300.18 us/op 1.02
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.3420 us/op 3.5490 us/op 0.94
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 20.493 us/op 21.600 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.7770 us/op 6.1090 us/op 0.95
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 11.294 us/op 4.8870 us/op 2.31
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 90.387 us/op 102.63 us/op 0.88
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.4420 ms/op 1.3818 ms/op 1.04
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.9049 ms/op 1.8309 ms/op 1.04
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8805 ms/op 1.7970 ms/op 1.05
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.7457 ms/op 3.3612 ms/op 1.11
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.1925 ms/op 2.0710 ms/op 1.06
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9969 ms/op 3.6782 ms/op 1.09
Tree 40 250000 create 318.66 ms/op 303.06 ms/op 1.05
Tree 40 250000 get(125000) 96.420 ns/op 98.393 ns/op 0.98
Tree 40 250000 set(125000) 1.0457 us/op 1.0426 us/op 1.00
Tree 40 250000 toArray() 10.768 ms/op 9.5534 ms/op 1.13
Tree 40 250000 iterate all - toArray() + loop 10.587 ms/op 9.5833 ms/op 1.10
Tree 40 250000 iterate all - get(i) 39.088 ms/op 33.637 ms/op 1.16
Array 250000 create 2.3404 ms/op 2.3022 ms/op 1.02
Array 250000 clone - spread 772.99 us/op 752.72 us/op 1.03
Array 250000 get(125000) 0.29100 ns/op 0.29100 ns/op 1.00
Array 250000 set(125000) 0.29300 ns/op 0.29500 ns/op 0.99
Array 250000 iterate all - loop 57.305 us/op 56.446 us/op 1.02
phase0 afterProcessEpoch - 250000 vs - 7PWei 38.651 ms/op 57.633 ms/op 0.67
Array.fill - length 1000000 3.7650 ms/op 4.0299 ms/op 0.93
Array push - length 1000000 12.765 ms/op 13.210 ms/op 0.97
Array.get 0.20494 ns/op 0.20074 ns/op 1.02
Uint8Array.get 0.25678 ns/op 0.25890 ns/op 0.99
phase0 beforeProcessEpoch - 250000 vs - 7PWei 13.345 ms/op 12.961 ms/op 1.03
altair processEpoch - mainnet_e81889 197.87 ms/op 199.40 ms/op 0.99
mainnet_e81889 - altair beforeProcessEpoch 21.896 ms/op 37.367 ms/op 0.59
mainnet_e81889 - altair processJustificationAndFinalization 4.4070 us/op 4.5250 us/op 0.97
mainnet_e81889 - altair processInactivityUpdates 3.4477 ms/op 3.4114 ms/op 1.01
mainnet_e81889 - altair processRewardsAndPenalties 17.303 ms/op 16.460 ms/op 1.05
mainnet_e81889 - altair processRegistryUpdates 571.00 ns/op 556.00 ns/op 1.03
mainnet_e81889 - altair processSlashings 146.00 ns/op 145.00 ns/op 1.01
mainnet_e81889 - altair processEth1DataReset 143.00 ns/op 142.00 ns/op 1.01
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.6254 ms/op 1.6515 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 686.00 ns/op 683.00 ns/op 1.00
mainnet_e81889 - altair processRandaoMixesReset 914.00 ns/op 893.00 ns/op 1.02
mainnet_e81889 - altair processHistoricalRootsUpdate 143.00 ns/op 144.00 ns/op 0.99
mainnet_e81889 - altair processParticipationFlagUpdates 454.00 ns/op 453.00 ns/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 111.00 ns/op 117.00 ns/op 0.95
mainnet_e81889 - altair afterProcessEpoch 43.132 ms/op 41.095 ms/op 1.05
capella processEpoch - mainnet_e217614 650.81 ms/op 614.64 ms/op 1.06
mainnet_e217614 - capella beforeProcessEpoch 55.091 ms/op 64.309 ms/op 0.86
mainnet_e217614 - capella processJustificationAndFinalization 4.6830 us/op 4.4330 us/op 1.06
mainnet_e217614 - capella processInactivityUpdates 11.414 ms/op 10.936 ms/op 1.04
mainnet_e217614 - capella processRewardsAndPenalties 85.717 ms/op 92.161 ms/op 0.93
mainnet_e217614 - capella processRegistryUpdates 4.4170 us/op 4.4140 us/op 1.00
mainnet_e217614 - capella processSlashings 149.00 ns/op 146.00 ns/op 1.02
mainnet_e217614 - capella processEth1DataReset 146.00 ns/op 146.00 ns/op 1.00
mainnet_e217614 - capella processEffectiveBalanceUpdates 5.7268 ms/op 5.1780 ms/op 1.11
mainnet_e217614 - capella processSlashingsReset 690.00 ns/op 664.00 ns/op 1.04
mainnet_e217614 - capella processRandaoMixesReset 949.00 ns/op 890.00 ns/op 1.07
mainnet_e217614 - capella processHistoricalRootsUpdate 138.00 ns/op 143.00 ns/op 0.97
mainnet_e217614 - capella processParticipationFlagUpdates 448.00 ns/op 444.00 ns/op 1.01
mainnet_e217614 - capella afterProcessEpoch 109.53 ms/op 108.29 ms/op 1.01
phase0 processEpoch - mainnet_e58758 201.51 ms/op 192.36 ms/op 1.05
mainnet_e58758 - phase0 beforeProcessEpoch 44.018 ms/op 37.830 ms/op 1.16
mainnet_e58758 - phase0 processJustificationAndFinalization 4.6670 us/op 4.5410 us/op 1.03
mainnet_e58758 - phase0 processRewardsAndPenalties 15.971 ms/op 15.546 ms/op 1.03
mainnet_e58758 - phase0 processRegistryUpdates 2.2940 us/op 2.1920 us/op 1.05
mainnet_e58758 - phase0 processSlashings 146.00 ns/op 145.00 ns/op 1.01
mainnet_e58758 - phase0 processEth1DataReset 144.00 ns/op 139.00 ns/op 1.04
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 822.34 us/op 821.41 us/op 1.00
mainnet_e58758 - phase0 processSlashingsReset 814.00 ns/op 796.00 ns/op 1.02
mainnet_e58758 - phase0 processRandaoMixesReset 924.00 ns/op 901.00 ns/op 1.03
mainnet_e58758 - phase0 processHistoricalRootsUpdate 146.00 ns/op 141.00 ns/op 1.04
mainnet_e58758 - phase0 processParticipationRecordUpdates 936.00 ns/op 914.00 ns/op 1.02
mainnet_e58758 - phase0 afterProcessEpoch 33.909 ms/op 32.645 ms/op 1.04
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0098 ms/op 998.14 us/op 1.01
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.6304 ms/op 1.6668 ms/op 0.98
gloas processInactivityUpdates - 250000 inactivity leak all eligible missed target 9.1210 ms/op 8.9377 ms/op 1.02
phase0 processRegistryUpdates - 250000 normalcase 2.3820 us/op 2.6560 us/op 0.90
phase0 processRegistryUpdates - 250000 badcase_full_deposits 141.01 us/op 148.94 us/op 0.95
phase0 processRegistryUpdates - 250000 worstcase 0.5 54.889 ms/op 47.669 ms/op 1.15
altair processRewardsAndPenalties - 250000 normalcase 13.667 ms/op 14.024 ms/op 0.97
altair processRewardsAndPenalties - 250000 worstcase 13.886 ms/op 13.718 ms/op 1.01
phase0 getAttestationDeltas - 250000 normalcase 5.6298 ms/op 5.5054 ms/op 1.02
phase0 getAttestationDeltas - 250000 worstcase 5.6746 ms/op 5.5299 ms/op 1.03
phase0 processSlashings - 250000 worstcase 60.354 us/op 70.205 us/op 0.86
altair processSyncCommitteeUpdates - 250000 9.9229 ms/op 9.8196 ms/op 1.01
BeaconState.hashTreeRoot - No change 176.00 ns/op 178.00 ns/op 0.99
BeaconState.hashTreeRoot - 1 full validator 65.135 us/op 63.408 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 674.35 us/op 667.22 us/op 1.01
BeaconState.hashTreeRoot - 512 full validator 6.3776 ms/op 7.1109 ms/op 0.90
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 73.469 us/op 75.670 us/op 0.97
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1020 ms/op 1.0720 ms/op 1.03
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 14.176 ms/op 14.421 ms/op 0.98
BeaconState.hashTreeRoot - 1 balances 58.773 us/op 60.152 us/op 0.98
BeaconState.hashTreeRoot - 32 balances 593.00 us/op 592.70 us/op 1.00
BeaconState.hashTreeRoot - 512 balances 4.7925 ms/op 4.9233 ms/op 0.97
BeaconState.hashTreeRoot - 250000 balances 116.04 ms/op 112.57 ms/op 1.03
aggregationBits - 2048 els - zipIndexesInBitList 19.754 us/op 18.645 us/op 1.06
regular array get 100000 times 23.034 us/op 22.405 us/op 1.03
wrappedArray get 100000 times 23.138 us/op 22.406 us/op 1.03
arrayWithProxy get 100000 times 28.648 ms/op 10.347 ms/op 2.77
ssz.Root.equals 24.646 ns/op 21.218 ns/op 1.16
byteArrayEquals 21.387 ns/op 21.040 ns/op 1.02
Buffer.compare 8.9400 ns/op 8.7480 ns/op 1.02
processSlot - 1 slots 9.1140 us/op 8.1690 us/op 1.12
processSlot - 32 slots 1.9415 ms/op 1.6243 ms/op 1.20
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 4.0504 ms/op 2.6748 ms/op 1.51
getCommitteeAssignments - req 1 vs - 250000 vc 2.0905 ms/op 1.6652 ms/op 1.26
getCommitteeAssignments - req 100 vs - 250000 vc 3.4530 ms/op 3.3943 ms/op 1.02
getCommitteeAssignments - req 1000 vs - 250000 vc 3.7102 ms/op 3.6437 ms/op 1.02
findModifiedValidators - 10000 modified validators 840.54 ms/op 804.58 ms/op 1.04
findModifiedValidators - 1000 modified validators 626.97 ms/op 492.35 ms/op 1.27
findModifiedValidators - 100 modified validators 414.58 ms/op 341.94 ms/op 1.21
findModifiedValidators - 10 modified validators 310.55 ms/op 296.70 ms/op 1.05
findModifiedValidators - 1 modified validators 220.67 ms/op 177.71 ms/op 1.24
findModifiedValidators - no difference 224.23 ms/op 217.90 ms/op 1.03
migrate state 1500000 validators, 3400 modified, 2000 new 2.7621 s/op 2.6768 s/op 1.03
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5900 ns/op 3.6700 ns/op 0.98
state getBlockRootAtSlot - 250000 vs - 7PWei 279.91 ns/op 309.37 ns/op 0.90
computeProposerIndex 100000 validators 1.3511 ms/op 1.3553 ms/op 1.00
getNextSyncCommitteeIndices 1000 validators 2.8379 ms/op 2.8672 ms/op 0.99
getNextSyncCommitteeIndices 10000 validators 25.668 ms/op 25.853 ms/op 0.99
getNextSyncCommitteeIndices 100000 validators 86.814 ms/op 88.010 ms/op 0.99
computeProposers - vc 250000 550.93 us/op 586.16 us/op 0.94
computeEpochShuffling - vc 250000 37.745 ms/op 38.189 ms/op 0.99
getNextSyncCommittee - vc 250000 9.3236 ms/op 9.5178 ms/op 0.98
nodejs block root to RootHex using toHex 96.250 ns/op 96.145 ns/op 1.00
nodejs block root to RootHex using toRootHex 65.440 ns/op 64.684 ns/op 1.01
nodejs fromHex(blob) 920.47 us/op 826.78 us/op 1.11
nodejs fromHexInto(blob) 654.61 us/op 633.20 us/op 1.03
nodejs block root to RootHex using the deprecated toHexString 656.50 ns/op 645.29 ns/op 1.02
nodejs byteArrayEquals 32 bytes (block root) 25.635 ns/op 25.916 ns/op 0.99
nodejs byteArrayEquals 48 bytes (pubkey) 37.039 ns/op 37.291 ns/op 0.99
nodejs byteArrayEquals 96 bytes (signature) 39.107 ns/op 39.276 ns/op 1.00
nodejs byteArrayEquals 1024 bytes 44.659 ns/op 46.394 ns/op 0.96
nodejs byteArrayEquals 131072 bytes (blob) 1.7296 us/op 1.7439 us/op 0.99
browser block root to RootHex using toHex 144.33 ns/op 145.82 ns/op 0.99
browser block root to RootHex using toRootHex 129.47 ns/op 129.85 ns/op 1.00
browser fromHex(blob) 1.8520 ms/op 1.8256 ms/op 1.01
browser fromHexInto(blob) 647.13 us/op 637.18 us/op 1.02
browser block root to RootHex using the deprecated toHexString 431.35 ns/op 419.29 ns/op 1.03
browser byteArrayEquals 32 bytes (block root) 27.611 ns/op 28.210 ns/op 0.98
browser byteArrayEquals 48 bytes (pubkey) 38.862 ns/op 39.831 ns/op 0.98
browser byteArrayEquals 96 bytes (signature) 72.619 ns/op 74.451 ns/op 0.98
browser byteArrayEquals 1024 bytes 737.45 ns/op 754.64 ns/op 0.98
browser byteArrayEquals 131072 bytes (blob) 93.338 us/op 95.307 us/op 0.98

by benchmarkbot/action

This branch has not been deployed

No deployments
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