Skip to content

feat: fast confirmation rule#8837

Draft
nazarhussain wants to merge 12 commits intounstablefrom
feature/fast-confirmation
Draft

feat: fast confirmation rule#8837
nazarhussain wants to merge 12 commits intounstablefrom
feature/fast-confirmation

Conversation

@nazarhussain
Copy link
Contributor

Motivation

Introduce assumption based fast confirmation rule.

Description

Specs: ethereum/consensus-specs#4747

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nazarhussain, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a significant new feature: an assumption-based Fast Confirmation Rule (FCR) for the beacon node. The primary goal is to accelerate the confirmation of blocks by implementing a sophisticated algorithm that evaluates various network and validator-related metrics. This involves deep integration into the existing fork choice mechanism, providing a new configurable option for users, and updating how 'safe' blocks are identified within the system. The changes are comprehensive, spanning core logic, configuration, state management, and observability.

Highlights

  • Fast Confirmation Rule (FCR) Implementation: Introduced a new FastConfirmationRule class and its supporting types and metrics, which encapsulates the logic for an assumption-based fast block confirmation mechanism. This rule aims to provide faster block finality by evaluating attestation scores, committee weights, and other factors.
  • Fork Choice Integration: The core ForkChoice class has been updated to optionally enable and integrate the Fast Confirmation Rule. When active, the FCR's logic is executed at the start of each slot to determine and update a 'confirmed root', which can then be queried by other parts of the system.
  • Configurability and CLI Options: A new configuration option, enableFastConfirmation, has been added to the chain options, allowing users to enable or disable this experimental feature via a CLI argument. Additionally, a CONFIRMATION_BYZANTINE_THRESHOLD constant has been introduced to chain configurations, providing a configurable parameter for the FCR.
  • Enhanced Safe Block Determination: The getSafeBeaconBlockRoot and getSafeExecutionBlockHash functions now prioritize the FCR's determined 'confirmed root' if the feature is enabled, falling back to the traditional justified checkpoint if the FCR is not active or doesn't provide a confirmed root. This ensures that the fastest available confirmation is used.
  • State Management and Metrics: The ForkChoiceStore and related interfaces have been extended to store the necessary internal state for the FCR, such as observed justified checkpoints and balances. New Prometheus metrics have also been added to monitor the FCR's performance, confirmed epochs/slots, and any resets.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a fast confirmation rule, an experimental feature designed to provide faster block confirmations. The changes are comprehensive, including the core logic in a new FastConfirmationRule class, configuration options to enable it, and integration into the existing ForkChoice and safe block determination logic. The implementation appears to align well with the provided specification. My review includes a couple of minor suggestions to enhance code quality and readability.


if (activeIndices !== null) {
for (const i of activeIndices) {
if (!state) continue;
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This null check for state is redundant. The activeIndices array is derived from state on line 241. If state were null, activeIndices would also be null, and this code block would not be entered. Therefore, state is guaranteed to be non-null here.

Suggested change
if (!state) continue;
if (state.validators.get(i)?.slashed) continue;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TS give error 'state' is possibly 'null' and don't want to use non-null assertion.

Comment on lines +1676 to +1684
getTrackedVotesCount: () => {
let count = 0;
for (let i = 0; i < this.voteNextIndices.length; i++) {
if (this.voteNextIndices[i] !== NULL_VOTE_INDEX) {
count++;
}
}
return count;
},
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

For improved conciseness and readability, this loop can be replaced with the filter array method. This is more idiomatic in TypeScript and achieves the same result.

      getTrackedVotesCount: () => {
        return this.voteNextIndices.filter((i) => i !== NULL_VOTE_INDEX).length;
      },

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We prefer for over other iterative approaches for performance reasons.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 26f8e9c Previous: 2b1dac3 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.0622 ms/op 1.1646 ms/op 0.91
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 35.701 us/op 37.448 us/op 0.95
BLS verify - blst 912.59 us/op 818.12 us/op 1.12
BLS verifyMultipleSignatures 3 - blst 1.7510 ms/op 1.1548 ms/op 1.52
BLS verifyMultipleSignatures 8 - blst 2.1101 ms/op 1.6106 ms/op 1.31
BLS verifyMultipleSignatures 32 - blst 4.5114 ms/op 4.7666 ms/op 0.95
BLS verifyMultipleSignatures 64 - blst 8.3834 ms/op 9.1462 ms/op 0.92
BLS verifyMultipleSignatures 128 - blst 16.058 ms/op 16.858 ms/op 0.95
BLS deserializing 10000 signatures 621.74 ms/op 679.09 ms/op 0.92
BLS deserializing 100000 signatures 6.2129 s/op 6.8601 s/op 0.91
BLS verifyMultipleSignatures - same message - 3 - blst 958.50 us/op 879.17 us/op 1.09
BLS verifyMultipleSignatures - same message - 8 - blst 1.0873 ms/op 1.0735 ms/op 1.01
BLS verifyMultipleSignatures - same message - 32 - blst 1.6552 ms/op 1.7201 ms/op 0.96
BLS verifyMultipleSignatures - same message - 64 - blst 2.5492 ms/op 2.6058 ms/op 0.98
BLS verifyMultipleSignatures - same message - 128 - blst 4.1736 ms/op 4.3757 ms/op 0.95
BLS aggregatePubkeys 32 - blst 17.787 us/op 19.372 us/op 0.92
BLS aggregatePubkeys 128 - blst 63.237 us/op 69.043 us/op 0.92
getSlashingsAndExits - default max 42.633 us/op 69.297 us/op 0.62
getSlashingsAndExits - 2k 330.60 us/op 348.11 us/op 0.95
isKnown best case - 1 super set check 409.00 ns/op 201.00 ns/op 2.03
isKnown normal case - 2 super set checks 396.00 ns/op 196.00 ns/op 2.02
isKnown worse case - 16 super set checks 397.00 ns/op 197.00 ns/op 2.02
validate api signedAggregateAndProof - struct 1.4888 ms/op 1.5933 ms/op 0.93
validate gossip signedAggregateAndProof - struct 1.5927 ms/op 1.4571 ms/op 1.09
batch validate gossip attestation - vc 640000 - chunk 32 108.54 us/op 126.79 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 64 92.467 us/op 107.63 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 128 88.506 us/op 106.94 us/op 0.83
batch validate gossip attestation - vc 640000 - chunk 256 82.140 us/op 95.609 us/op 0.86
bytes32 toHexString 506.00 ns/op 357.00 ns/op 1.42
bytes32 Buffer.toString(hex) 390.00 ns/op 251.00 ns/op 1.55
bytes32 Buffer.toString(hex) from Uint8Array 465.00 ns/op 333.00 ns/op 1.40
bytes32 Buffer.toString(hex) + 0x 401.00 ns/op 254.00 ns/op 1.58
Return object 10000 times 0.22970 ns/op 0.23690 ns/op 0.97
Throw Error 10000 times 3.1875 us/op 4.0922 us/op 0.78
toHex 93.872 ns/op 148.25 ns/op 0.63
Buffer.from 88.090 ns/op 128.43 ns/op 0.69
shared Buffer 60.000 ns/op 81.618 ns/op 0.74
fastMsgIdFn sha256 / 200 bytes 1.6980 us/op 1.8720 us/op 0.91
fastMsgIdFn h32 xxhash / 200 bytes 371.00 ns/op 188.00 ns/op 1.97
fastMsgIdFn h64 xxhash / 200 bytes 419.00 ns/op 255.00 ns/op 1.64
fastMsgIdFn sha256 / 1000 bytes 4.8570 us/op 6.0080 us/op 0.81
fastMsgIdFn h32 xxhash / 1000 bytes 468.00 ns/op 285.00 ns/op 1.64
fastMsgIdFn h64 xxhash / 1000 bytes 474.00 ns/op 297.00 ns/op 1.60
fastMsgIdFn sha256 / 10000 bytes 40.290 us/op 52.543 us/op 0.77
fastMsgIdFn h32 xxhash / 10000 bytes 1.4330 us/op 1.4010 us/op 1.02
fastMsgIdFn h64 xxhash / 10000 bytes 1.0680 us/op 916.00 ns/op 1.17
send data - 1000 256B messages 12.884 ms/op 13.686 ms/op 0.94
send data - 1000 512B messages 13.229 ms/op 15.698 ms/op 0.84
send data - 1000 1024B messages 19.262 ms/op 22.461 ms/op 0.86
send data - 1000 1200B messages 16.592 ms/op 22.387 ms/op 0.74
send data - 1000 2048B messages 15.496 ms/op 21.188 ms/op 0.73
send data - 1000 4096B messages 21.170 ms/op 26.082 ms/op 0.81
send data - 1000 16384B messages 90.683 ms/op 97.391 ms/op 0.93
send data - 1000 65536B messages 170.74 ms/op 260.39 ms/op 0.66
enrSubnets - fastDeserialize 64 bits 988.00 ns/op 859.00 ns/op 1.15
enrSubnets - ssz BitVector 64 bits 598.00 ns/op 318.00 ns/op 1.88
enrSubnets - fastDeserialize 4 bits 303.00 ns/op 125.00 ns/op 2.42
enrSubnets - ssz BitVector 4 bits 486.00 ns/op 321.00 ns/op 1.51
prioritizePeers score -10:0 att 32-0.1 sync 2-0 193.28 us/op 236.26 us/op 0.82
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 222.58 us/op 265.46 us/op 0.84
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 420.89 us/op 405.99 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 574.90 us/op 732.13 us/op 0.79
prioritizePeers score 0:0 att 64-1 sync 4-1 733.34 us/op 838.28 us/op 0.87
array of 16000 items push then shift 1.1917 us/op 1.5617 us/op 0.76
LinkedList of 16000 items push then shift 7.4240 ns/op 7.1530 ns/op 1.04
array of 16000 items push then pop 62.615 ns/op 73.832 ns/op 0.85
LinkedList of 16000 items push then pop 6.0330 ns/op 7.0740 ns/op 0.85
array of 24000 items push then shift 1.7571 us/op 2.3128 us/op 0.76
LinkedList of 24000 items push then shift 6.9880 ns/op 7.1830 ns/op 0.97
array of 24000 items push then pop 88.232 ns/op 102.28 ns/op 0.86
LinkedList of 24000 items push then pop 6.0540 ns/op 6.9370 ns/op 0.87
intersect bitArray bitLen 8 4.6170 ns/op 5.5870 ns/op 0.83
intersect array and set length 8 28.100 ns/op 33.568 ns/op 0.84
intersect bitArray bitLen 128 24.916 ns/op 28.198 ns/op 0.88
intersect array and set length 128 475.44 ns/op 539.99 ns/op 0.88
bitArray.getTrueBitIndexes() bitLen 128 1.1500 us/op 1.2130 us/op 0.95
bitArray.getTrueBitIndexes() bitLen 248 1.8950 us/op 1.8970 us/op 1.00
bitArray.getTrueBitIndexes() bitLen 512 4.3800 us/op 3.8130 us/op 1.15
Full columns - reconstruct all 6 blobs 260.73 us/op 271.39 us/op 0.96
Full columns - reconstruct half of the blobs out of 6 105.46 us/op 110.19 us/op 0.96
Full columns - reconstruct single blob out of 6 57.529 us/op 43.817 us/op 1.31
Half columns - reconstruct all 6 blobs 235.23 ms/op 263.23 ms/op 0.89
Half columns - reconstruct half of the blobs out of 6 117.67 ms/op 141.13 ms/op 0.83
Half columns - reconstruct single blob out of 6 44.587 ms/op 48.744 ms/op 0.91
Full columns - reconstruct all 10 blobs 420.64 us/op 415.61 us/op 1.01
Full columns - reconstruct half of the blobs out of 10 153.16 us/op 266.07 us/op 0.58
Full columns - reconstruct single blob out of 10 43.378 us/op 50.215 us/op 0.86
Half columns - reconstruct all 10 blobs 388.64 ms/op 516.07 ms/op 0.75
Half columns - reconstruct half of the blobs out of 10 196.18 ms/op 290.53 ms/op 0.68
Half columns - reconstruct single blob out of 10 43.694 ms/op 50.246 ms/op 0.87
Full columns - reconstruct all 20 blobs 609.55 us/op 975.99 us/op 0.62
Full columns - reconstruct half of the blobs out of 20 274.82 us/op 425.93 us/op 0.65
Full columns - reconstruct single blob out of 20 35.302 us/op 34.114 us/op 1.03
Half columns - reconstruct all 20 blobs 772.11 ms/op 899.18 ms/op 0.86
Half columns - reconstruct half of the blobs out of 20 468.80 ms/op 441.68 ms/op 1.06
Half columns - reconstruct single blob out of 20 44.056 ms/op 50.105 ms/op 0.88
Set add up to 64 items then delete first 2.0076 us/op 2.0250 us/op 0.99
OrderedSet add up to 64 items then delete first 2.8765 us/op 3.0225 us/op 0.95
Set add up to 64 items then delete last 1.9018 us/op 2.2677 us/op 0.84
OrderedSet add up to 64 items then delete last 2.9016 us/op 3.2937 us/op 0.88
Set add up to 64 items then delete middle 1.8827 us/op 2.3003 us/op 0.82
OrderedSet add up to 64 items then delete middle 4.2866 us/op 4.8336 us/op 0.89
Set add up to 128 items then delete first 3.7617 us/op 4.8456 us/op 0.78
OrderedSet add up to 128 items then delete first 5.5463 us/op 7.2549 us/op 0.76
Set add up to 128 items then delete last 3.4761 us/op 4.5659 us/op 0.76
OrderedSet add up to 128 items then delete last 5.2171 us/op 6.6285 us/op 0.79
Set add up to 128 items then delete middle 3.4628 us/op 4.5068 us/op 0.77
OrderedSet add up to 128 items then delete middle 10.908 us/op 12.870 us/op 0.85
Set add up to 256 items then delete first 7.0649 us/op 9.6946 us/op 0.73
OrderedSet add up to 256 items then delete first 11.017 us/op 15.088 us/op 0.73
Set add up to 256 items then delete last 6.8745 us/op 9.2541 us/op 0.74
OrderedSet add up to 256 items then delete last 10.384 us/op 13.859 us/op 0.75
Set add up to 256 items then delete middle 6.8951 us/op 9.6650 us/op 0.71
OrderedSet add up to 256 items then delete middle 33.128 us/op 39.829 us/op 0.83
pass gossip attestations to forkchoice per slot 2.1244 ms/op 2.5198 ms/op 0.84
forkChoice updateHead vc 100000 bc 64 eq 0 362.98 us/op 492.42 us/op 0.74
forkChoice updateHead vc 600000 bc 64 eq 0 2.1743 ms/op 3.0877 ms/op 0.70
forkChoice updateHead vc 1000000 bc 64 eq 0 3.6214 ms/op 4.9475 ms/op 0.73
forkChoice updateHead vc 600000 bc 320 eq 0 2.1731 ms/op 2.9923 ms/op 0.73
forkChoice updateHead vc 600000 bc 1200 eq 0 2.2002 ms/op 3.0046 ms/op 0.73
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9744 ms/op 3.3507 ms/op 0.89
forkChoice updateHead vc 600000 bc 64 eq 1000 3.2762 ms/op 3.3547 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 10000 3.3300 ms/op 3.4792 ms/op 0.96
forkChoice updateHead vc 600000 bc 64 eq 300000 7.4928 ms/op 8.9154 ms/op 0.84
computeDeltas 1400000 validators 0% inactive 13.283 ms/op 14.241 ms/op 0.93
computeDeltas 1400000 validators 10% inactive 12.642 ms/op 13.344 ms/op 0.95
computeDeltas 1400000 validators 20% inactive 11.798 ms/op 12.962 ms/op 0.91
computeDeltas 1400000 validators 50% inactive 8.1688 ms/op 9.8545 ms/op 0.83
computeDeltas 2100000 validators 0% inactive 19.276 ms/op 21.775 ms/op 0.89
computeDeltas 2100000 validators 10% inactive 19.141 ms/op 20.251 ms/op 0.95
computeDeltas 2100000 validators 20% inactive 17.590 ms/op 18.874 ms/op 0.93
computeDeltas 2100000 validators 50% inactive 12.255 ms/op 14.795 ms/op 0.83
altair processAttestation - 250000 vs - 7PWei normalcase 1.5705 ms/op 2.0167 ms/op 0.78
altair processAttestation - 250000 vs - 7PWei worstcase 2.2419 ms/op 2.7494 ms/op 0.82
altair processAttestation - setStatus - 1/6 committees join 102.05 us/op 113.64 us/op 0.90
altair processAttestation - setStatus - 1/3 committees join 170.95 us/op 224.08 us/op 0.76
altair processAttestation - setStatus - 1/2 committees join 256.18 us/op 320.52 us/op 0.80
altair processAttestation - setStatus - 2/3 committees join 333.89 us/op 409.43 us/op 0.82
altair processAttestation - setStatus - 4/5 committees join 455.74 us/op 565.12 us/op 0.81
altair processAttestation - setStatus - 100% committees join 563.59 us/op 669.68 us/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase 2.7575 ms/op 4.3891 ms/op 0.63
altair processBlock - 250000 vs - 7PWei normalcase hashState 14.180 ms/op 18.244 ms/op 0.78
altair processBlock - 250000 vs - 7PWei worstcase 22.662 ms/op 24.578 ms/op 0.92
altair processBlock - 250000 vs - 7PWei worstcase hashState 56.558 ms/op 58.535 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5829 ms/op 1.5462 ms/op 1.02
phase0 processBlock - 250000 vs - 7PWei worstcase 20.635 ms/op 21.649 ms/op 0.95
altair processEth1Data - 250000 vs - 7PWei normalcase 297.12 us/op 369.92 us/op 0.80
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 3.2820 us/op 7.3980 us/op 0.44
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 33.922 us/op 54.094 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 9.2790 us/op 15.137 us/op 0.61
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 6.5180 us/op 12.667 us/op 0.51
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 152.17 us/op 217.84 us/op 0.70
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3417 ms/op 1.9230 ms/op 0.70
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.7699 ms/op 2.5474 ms/op 0.69
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.7662 ms/op 2.4503 ms/op 0.72
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.4398 ms/op 4.6613 ms/op 0.74
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0205 ms/op 2.8418 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.9899 ms/op 6.0140 ms/op 0.66
Tree 40 250000 create 331.55 ms/op 383.89 ms/op 0.86
Tree 40 250000 get(125000) 102.69 ns/op 124.38 ns/op 0.83
Tree 40 250000 set(125000) 1.0522 us/op 1.2566 us/op 0.84
Tree 40 250000 toArray() 9.3072 ms/op 18.009 ms/op 0.52
Tree 40 250000 iterate all - toArray() + loop 9.4140 ms/op 17.859 ms/op 0.53
Tree 40 250000 iterate all - get(i) 34.006 ms/op 48.516 ms/op 0.70
Array 250000 create 1.9967 ms/op 2.8881 ms/op 0.69
Array 250000 clone - spread 610.46 us/op 867.20 us/op 0.70
Array 250000 get(125000) 0.49900 ns/op 0.43300 ns/op 1.15
Array 250000 set(125000) 0.48800 ns/op 0.35600 ns/op 1.37
Array 250000 iterate all - loop 54.475 us/op 63.203 us/op 0.86
phase0 afterProcessEpoch - 250000 vs - 7PWei 36.770 ms/op 43.216 ms/op 0.85
Array.fill - length 1000000 1.9240 ms/op 3.0353 ms/op 0.63
Array push - length 1000000 6.8302 ms/op 12.442 ms/op 0.55
Array.get 0.19456 ns/op 0.22235 ns/op 0.88
Uint8Array.get 0.19831 ns/op 0.22427 ns/op 0.88
phase0 beforeProcessEpoch - 250000 vs - 7PWei 10.139 ms/op 15.046 ms/op 0.67
altair processEpoch - mainnet_e81889 240.09 ms/op 265.30 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 13.593 ms/op 18.076 ms/op 0.75
mainnet_e81889 - altair processJustificationAndFinalization 4.4600 us/op 5.3250 us/op 0.84
mainnet_e81889 - altair processInactivityUpdates 3.0251 ms/op 3.8346 ms/op 0.79
mainnet_e81889 - altair processRewardsAndPenalties 17.900 ms/op 18.529 ms/op 0.97
mainnet_e81889 - altair processRegistryUpdates 766.00 ns/op 623.00 ns/op 1.23
mainnet_e81889 - altair processSlashings 363.00 ns/op 162.00 ns/op 2.24
mainnet_e81889 - altair processEth1DataReset 385.00 ns/op 165.00 ns/op 2.33
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2613 ms/op 7.4776 ms/op 0.17
mainnet_e81889 - altair processSlashingsReset 922.00 ns/op 776.00 ns/op 1.19
mainnet_e81889 - altair processRandaoMixesReset 1.4810 us/op 1.0850 us/op 1.36
mainnet_e81889 - altair processHistoricalRootsUpdate 365.00 ns/op 165.00 ns/op 2.21
mainnet_e81889 - altair processParticipationFlagUpdates 656.00 ns/op 496.00 ns/op 1.32
mainnet_e81889 - altair processSyncCommitteeUpdates 328.00 ns/op 132.00 ns/op 2.48
mainnet_e81889 - altair afterProcessEpoch 38.687 ms/op 44.610 ms/op 0.87
capella processEpoch - mainnet_e217614 748.05 ms/op 890.74 ms/op 0.84
mainnet_e217614 - capella beforeProcessEpoch 55.796 ms/op 67.212 ms/op 0.83
mainnet_e217614 - capella processJustificationAndFinalization 5.7300 us/op 6.2220 us/op 0.92
mainnet_e217614 - capella processInactivityUpdates 9.8585 ms/op 19.181 ms/op 0.51
mainnet_e217614 - capella processRewardsAndPenalties 94.557 ms/op 109.82 ms/op 0.86
mainnet_e217614 - capella processRegistryUpdates 4.8080 us/op 5.8600 us/op 0.82
mainnet_e217614 - capella processSlashings 357.00 ns/op 191.00 ns/op 1.87
mainnet_e217614 - capella processEth1DataReset 459.00 ns/op 195.00 ns/op 2.35
mainnet_e217614 - capella processEffectiveBalanceUpdates 15.921 ms/op 18.877 ms/op 0.84
mainnet_e217614 - capella processSlashingsReset 1.1150 us/op 800.00 ns/op 1.39
mainnet_e217614 - capella processRandaoMixesReset 1.2240 us/op 1.1700 us/op 1.05
mainnet_e217614 - capella processHistoricalRootsUpdate 354.00 ns/op 165.00 ns/op 2.15
mainnet_e217614 - capella processParticipationFlagUpdates 857.00 ns/op 500.00 ns/op 1.71
mainnet_e217614 - capella afterProcessEpoch 103.36 ms/op 118.08 ms/op 0.88
phase0 processEpoch - mainnet_e58758 231.38 ms/op 288.24 ms/op 0.80
mainnet_e58758 - phase0 beforeProcessEpoch 37.409 ms/op 64.883 ms/op 0.58
mainnet_e58758 - phase0 processJustificationAndFinalization 4.8310 us/op 5.8830 us/op 0.82
mainnet_e58758 - phase0 processRewardsAndPenalties 14.488 ms/op 20.534 ms/op 0.71
mainnet_e58758 - phase0 processRegistryUpdates 2.4390 us/op 2.8270 us/op 0.86
mainnet_e58758 - phase0 processSlashings 427.00 ns/op 194.00 ns/op 2.20
mainnet_e58758 - phase0 processEth1DataReset 360.00 ns/op 163.00 ns/op 2.21
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 753.65 us/op 961.42 us/op 0.78
mainnet_e58758 - phase0 processSlashingsReset 1.0880 us/op 1.1400 us/op 0.95
mainnet_e58758 - phase0 processRandaoMixesReset 1.2660 us/op 1.2980 us/op 0.98
mainnet_e58758 - phase0 processHistoricalRootsUpdate 383.00 ns/op 164.00 ns/op 2.34
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.1410 us/op 1.0520 us/op 1.08
mainnet_e58758 - phase0 afterProcessEpoch 32.663 ms/op 36.869 ms/op 0.89
phase0 processEffectiveBalanceUpdates - 250000 normalcase 895.11 us/op 2.6588 ms/op 0.34
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.1408 ms/op 2.1420 ms/op 0.53
altair processInactivityUpdates - 250000 normalcase 9.5845 ms/op 18.269 ms/op 0.52
altair processInactivityUpdates - 250000 worstcase 9.5070 ms/op 17.990 ms/op 0.53
phase0 processRegistryUpdates - 250000 normalcase 2.3170 us/op 5.8150 us/op 0.40
phase0 processRegistryUpdates - 250000 badcase_full_deposits 233.51 us/op 342.41 us/op 0.68
phase0 processRegistryUpdates - 250000 worstcase 0.5 59.291 ms/op 93.100 ms/op 0.64
altair processRewardsAndPenalties - 250000 normalcase 13.095 ms/op 19.458 ms/op 0.67
altair processRewardsAndPenalties - 250000 worstcase 12.688 ms/op 17.254 ms/op 0.74
phase0 getAttestationDeltas - 250000 normalcase 4.5020 ms/op 7.3294 ms/op 0.61
phase0 getAttestationDeltas - 250000 worstcase 4.8748 ms/op 7.4401 ms/op 0.66
phase0 processSlashings - 250000 worstcase 89.422 us/op 135.65 us/op 0.66
altair processSyncCommitteeUpdates - 250000 9.8017 ms/op 14.608 ms/op 0.67
BeaconState.hashTreeRoot - No change 410.00 ns/op 330.00 ns/op 1.24
BeaconState.hashTreeRoot - 1 full validator 70.917 us/op 107.49 us/op 0.66
BeaconState.hashTreeRoot - 32 full validator 915.96 us/op 1.8284 ms/op 0.50
BeaconState.hashTreeRoot - 512 full validator 6.9528 ms/op 13.345 ms/op 0.52
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 83.124 us/op 153.63 us/op 0.54
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.4192 ms/op 2.8369 ms/op 0.50
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 15.854 ms/op 26.839 ms/op 0.59
BeaconState.hashTreeRoot - 1 balances 83.268 us/op 105.19 us/op 0.79
BeaconState.hashTreeRoot - 32 balances 814.15 us/op 934.28 us/op 0.87
BeaconState.hashTreeRoot - 512 balances 5.0072 ms/op 7.6371 ms/op 0.66
BeaconState.hashTreeRoot - 250000 balances 133.94 ms/op 175.98 ms/op 0.76
aggregationBits - 2048 els - zipIndexesInBitList 19.990 us/op 24.914 us/op 0.80
regular array get 100000 times 22.670 us/op 25.534 us/op 0.89
wrappedArray get 100000 times 22.419 us/op 25.543 us/op 0.88
arrayWithProxy get 100000 times 11.317 ms/op 14.087 ms/op 0.80
ssz.Root.equals 21.422 ns/op 24.394 ns/op 0.88
byteArrayEquals 20.892 ns/op 23.929 ns/op 0.87
Buffer.compare 8.7000 ns/op 10.343 ns/op 0.84
processSlot - 1 slots 8.3490 us/op 15.916 us/op 0.52
processSlot - 32 slots 2.0465 ms/op 2.8492 ms/op 0.72
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.3155 ms/op 8.7437 ms/op 0.26
getCommitteeAssignments - req 1 vs - 250000 vc 1.5832 ms/op 1.9535 ms/op 0.81
getCommitteeAssignments - req 100 vs - 250000 vc 3.2381 ms/op 3.7774 ms/op 0.86
getCommitteeAssignments - req 1000 vs - 250000 vc 3.4754 ms/op 4.0063 ms/op 0.87
findModifiedValidators - 10000 modified validators 535.42 ms/op 942.85 ms/op 0.57
findModifiedValidators - 1000 modified validators 404.44 ms/op 639.98 ms/op 0.63
findModifiedValidators - 100 modified validators 261.56 ms/op 308.26 ms/op 0.85
findModifiedValidators - 10 modified validators 148.66 ms/op 337.63 ms/op 0.44
findModifiedValidators - 1 modified validators 117.50 ms/op 298.96 ms/op 0.39
findModifiedValidators - no difference 139.39 ms/op 262.88 ms/op 0.53
migrate state 1500000 validators, 3400 modified, 2000 new 993.87 ms/op 1.1069 s/op 0.90
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 5.7700 ns/op 4.2700 ns/op 1.35
state getBlockRootAtSlot - 250000 vs - 7PWei 493.78 ns/op 928.76 ns/op 0.53
computeProposerIndex 100000 validators 1.2797 ms/op 1.6781 ms/op 0.76
getNextSyncCommitteeIndices 1000 validators 90.342 ms/op 138.66 ms/op 0.65
getNextSyncCommitteeIndices 10000 validators 90.208 ms/op 140.46 ms/op 0.64
getNextSyncCommitteeIndices 100000 validators 90.404 ms/op 147.10 ms/op 0.61
computeProposers - vc 250000 545.60 us/op 684.62 us/op 0.80
computeEpochShuffling - vc 250000 37.212 ms/op 43.790 ms/op 0.85
getNextSyncCommittee - vc 250000 9.0429 ms/op 12.186 ms/op 0.74
nodejs block root to RootHex using toHex 99.893 ns/op 148.88 ns/op 0.67
nodejs block root to RootHex using toRootHex 65.349 ns/op 86.634 ns/op 0.75
nodejs fromHex(blob) 427.33 us/op 509.73 us/op 0.84
nodejs fromHexInto(blob) 669.08 us/op 750.67 us/op 0.89
nodejs block root to RootHex using the deprecated toHexString 526.24 ns/op 579.10 ns/op 0.91
browser block root to RootHex using toHex 252.76 ns/op 319.94 ns/op 0.79
browser block root to RootHex using toRootHex 135.26 ns/op 161.31 ns/op 0.84
browser fromHex(blob) 1.1061 ms/op 1.4185 ms/op 0.78
browser fromHexInto(blob) 646.61 us/op 751.93 us/op 0.86
browser block root to RootHex using the deprecated toHexString 358.04 ns/op 463.94 ns/op 0.77

by benchmarkbot/action

@jtraglia
Copy link
Contributor

jtraglia commented Feb 3, 2026

Hey @nazarhussain, we chatted about running FCR tests at the meeting today.

This is how you can generate these tests:

  1. Clone Mikhail's fork/branch with FCR
git clone git@github.com:mkalinin/eth2.0-specs.git -b fast-conf-rule
  1. Generate the tests
cd eth2.0-specs
make reftests runner=fast_confirmation

This will write the tests to ../consensus-spec-tests.

Note: There is currently a failing test with Gloas, which sort of breaks test generation. So you could generate the reference tests for a specific fork instead, something like the following. After Mikhail fixes the issue, you can use the command above.

make reftests runner=fast_confirmation fork=fulu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants