Skip to content

feat: implement EIP 7688#9390

Draft
wemeetagain wants to merge 4 commits into
unstablefrom
eip-7688
Draft

feat: implement EIP 7688#9390
wemeetagain wants to merge 4 commits into
unstablefrom
eip-7688

Conversation

@wemeetagain
Copy link
Copy Markdown
Member

Copy link
Copy Markdown
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 implements support for the Gloas fork (EIP-7688) by transitioning core consensus structures like BeaconState and BeaconBlockBody to progressive SSZ types. Key changes include updating dependencies to @chainsafe/ssz v1.6.0, implementing Gloas-specific light client proof logic, and establishing P2P size limits for progressive gossip objects. Review feedback identifies a potential vulnerability where getGossipSSZMaxSize lacks explicit limits for attestations and points out a performance regression in the participation flag update logic due to O(N) array allocations. Further suggestions include using Gloas-native default headers in the light client server and simplifying fork-specific witness validation logic to ensure consistency and efficiency.

Comment on lines +143 to +162
export function getGossipSSZMaxSize(topic: GossipTopic, maxPayloadSize: number, sszType?: CompositeTypeAny): number {
const {fork} = topic.boundary;
// Gloas progressive containers have broad theoretical SSZ max sizes; use the preset p2p bounds instead.
switch (topic.type) {
case GossipType.beacon_block:
return isForkPostGloas(fork) ? MAX_SIGNED_BEACON_BLOCK_SIZE : maxPayloadSize;
case GossipType.beacon_aggregate_and_proof:
return isForkPostGloas(fork) ? MAX_SIGNED_AGGREGATE_AND_PROOF_SIZE : (sszType ?? getGossipSSZType(topic)).maxSize;
case GossipType.attester_slashing:
return isForkPostGloas(fork) ? MAX_ATTESTER_SLASHING_SIZE : (sszType ?? getGossipSSZType(topic)).maxSize;
case GossipType.data_column_sidecar:
return isForkPostGloas(fork) ? MAX_DATA_COLUMN_SIDECAR_SIZE : (sszType ?? getGossipSSZType(topic)).maxSize;
case GossipType.execution_payload:
return maxPayloadSize;
case GossipType.execution_payload_bid:
return MAX_SIGNED_EXECUTION_PAYLOAD_BID_SIZE;
default:
return (sszType ?? getGossipSSZType(topic)).maxSize;
}
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The getGossipSSZMaxSize function is missing explicit P2P size limits for several progressive types in Gloas, most notably GossipType.attestation. Since ssz.gloas.Attestation is a ProgressiveContainerType, its theoretical maxSize is extremely large. Failing to cap it at the P2P preset limit (MAX_ATTESTATION_SIZE or similar) could expose the node to memory exhaustion attacks via oversized gossip messages.

// Assign the hightest fork's default value because it can always be typecasted down to correct fork
finalizedHeader: sszTypesFor(highestFork(forkPostAltair)).LightClientHeader.defaultValue(),
// Assign the highest pre-Gloas light-client header because post-Gloas light-client updates are skipped for now.
finalizedHeader: ssz.electra.LightClientHeader.defaultValue(),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The finalizedHeader is hardcoded to ssz.electra.LightClientHeader.defaultValue(). While the comment mentions that post-Gloas updates are skipped for now, this PR introduces Gloas light-client header support and upgrades. It would be more consistent and forward-compatible to use the highest fork's default value or explicitly handle Gloas if the server is intended to support it eventually.

Suggested change
finalizedHeader: ssz.electra.LightClientHeader.defaultValue(),
finalizedHeader: ssz.gloas.LightClientHeader.defaultValue(),

Comment on lines +659 to 671
if (
isForkPostGloas(attestedFork) &&
(syncCommitteeWitness.currentSyncCommitteeBranch === undefined ||
syncCommitteeWitness.nextSyncCommitteeBranch === undefined)
) {
throw Error("Expected post-Gloas sync committee branches");
}
if (!isForkPostGloas(attestedFork) && isForkPostElectra(attestedFork) && numWitness !== NUM_WITNESS_ELECTRA) {
throw Error(`Expected ${NUM_WITNESS_ELECTRA} witnesses in post-Electra numWitness=${numWitness}`);
}
if (!isForkPostElectra(attestedFork) && numWitness !== NUM_WITNESS) {
if (!isForkPostGloas(attestedFork) && !isForkPostElectra(attestedFork) && numWitness !== NUM_WITNESS) {
throw Error(`Expected ${NUM_WITNESS} witnesses in pre-Electra numWitness=${numWitness}`);
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The logic for validating numWitness and sync committee branches can be simplified using else if blocks to avoid redundant fork checks. Additionally, for Gloas, since explicit branches are used, numWitness (the length of the legacy witness array) should be verified to be 0 to ensure consistency with the generator logic in proofs.ts.

    if (isForkPostGloas(attestedFork)) {
      if (
        syncCommitteeWitness.currentSyncCommitteeBranch === undefined ||
        syncCommitteeWitness.nextSyncCommitteeBranch === undefined
      ) {
        throw Error("Expected post-Gloas sync committee branches");
      }
      if (numWitness !== 0) {
        throw Error(`Expected 0 witnesses in post-Gloas numWitness=${numWitness}`);
      }
    } else if (isForkPostElectra(attestedFork)) {
      if (numWitness !== NUM_WITNESS_ELECTRA) {
        throw Error(`Expected ${NUM_WITNESS_ELECTRA} witnesses in post-Electra numWitness=${numWitness}`);
      }
    } else if (numWitness !== NUM_WITNESS) {
      throw Error(`Expected ${NUM_WITNESS} witnesses in pre-Electra numWitness=${numWitness}`);
    }

Comment on lines +37 to +39
state.currentEpochParticipation = ssz.gloas.EpochParticipation.toViewDU(
new Array<number>(state.currentEpochParticipation.length).fill(0)
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using new Array<number>(...).fill(0) followed by toViewDU results in an O(N) memory allocation and a full re-merkleization of the participation list every epoch. For large validator sets (e.g., 1M+), this is a significant performance regression compared to the Altair implementation which uses zeroNode to create a zeroed tree in O(1) or O(log N). If ProgressiveListBasicType supports it, consider using a zero-tree initialization. At minimum, using new Uint8Array(state.currentEpochParticipation.length) would be more memory-efficient than a standard array.

Suggested change
state.currentEpochParticipation = ssz.gloas.EpochParticipation.toViewDU(
new Array<number>(state.currentEpochParticipation.length).fill(0)
);
state.currentEpochParticipation = ssz.gloas.EpochParticipation.toViewDU(
new Uint8Array(state.currentEpochParticipation.length)
);

@wemeetagain wemeetagain changed the title feat: EIP 7688 feat: implement EIP 7688 May 20, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 34435ad Previous: 6c85077 Ratio
Full columns - reconstruct all 20 blobs 497.88 us/op 1.5226 ms/op 0.33
Full benchmark results
Benchmark suite Current: 34435ad Previous: 6c85077 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 907.51 us/op 1.3166 ms/op 0.69
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 39.043 us/op 42.333 us/op 0.92
BLS verify - blst 713.11 us/op 711.16 us/op 1.00
BLS verifyMultipleSignatures 3 - blst 1.3474 ms/op 1.3581 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst 2.1451 ms/op 2.1719 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst 6.7335 ms/op 6.9628 ms/op 0.97
BLS verifyMultipleSignatures 64 - blst 13.046 ms/op 13.266 ms/op 0.98
BLS verifyMultipleSignatures 128 - blst 25.447 ms/op 25.831 ms/op 0.99
BLS deserializing 10000 signatures 633.27 ms/op 636.33 ms/op 1.00
BLS deserializing 100000 signatures 6.3344 s/op 6.3870 s/op 0.99
BLS verifyMultipleSignatures - same message - 3 - blst 810.73 us/op 807.79 us/op 1.00
BLS verifyMultipleSignatures - same message - 8 - blst 921.97 us/op 894.05 us/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst 1.5307 ms/op 1.5540 ms/op 0.99
BLS verifyMultipleSignatures - same message - 64 - blst 2.3948 ms/op 2.4420 ms/op 0.98
BLS verifyMultipleSignatures - same message - 128 - blst 3.9774 ms/op 4.0683 ms/op 0.98
BLS aggregatePubkeys 32 - blst 17.518 us/op 17.498 us/op 1.00
BLS aggregatePubkeys 128 - blst 62.282 us/op 62.765 us/op 0.99
getSlashingsAndExits - default max 45.216 us/op 47.536 us/op 0.95
getSlashingsAndExits - 2k 328.39 us/op 359.26 us/op 0.91
proposeBlockBody type=full, size=empty 698.73 us/op 692.53 us/op 1.01
isKnown best case - 1 super set check 166.00 ns/op 171.00 ns/op 0.97
isKnown normal case - 2 super set checks 170.00 ns/op 163.00 ns/op 1.04
isKnown worse case - 16 super set checks 164.00 ns/op 162.00 ns/op 1.01
validate api signedAggregateAndProof - struct 1.5092 ms/op 1.5158 ms/op 1.00
validate gossip signedAggregateAndProof - struct 1.5040 ms/op 1.5113 ms/op 1.00
batch validate gossip attestation - vc 640000 - chunk 32 105.45 us/op 106.25 us/op 0.99
batch validate gossip attestation - vc 640000 - chunk 64 93.737 us/op 92.170 us/op 1.02
batch validate gossip attestation - vc 640000 - chunk 128 86.524 us/op 86.859 us/op 1.00
batch validate gossip attestation - vc 640000 - chunk 256 84.011 us/op 83.187 us/op 1.01
bytes32 toHexString 287.00 ns/op 285.00 ns/op 1.01
bytes32 Buffer.toString(hex) 169.00 ns/op 172.00 ns/op 0.98
bytes32 Buffer.toString(hex) from Uint8Array 226.00 ns/op 243.00 ns/op 0.93
bytes32 Buffer.toString(hex) + 0x 168.00 ns/op 172.00 ns/op 0.98
Return object 10000 times 0.21320 ns/op 0.21170 ns/op 1.01
Throw Error 10000 times 3.3894 us/op 3.2678 us/op 1.04
toHex 90.901 ns/op 101.58 ns/op 0.89
Buffer.from 81.347 ns/op 88.361 ns/op 0.92
shared Buffer 55.052 ns/op 61.700 ns/op 0.89
fastMsgIdFn sha256 / 200 bytes 1.4730 us/op 1.4730 us/op 1.00
fastMsgIdFn h32 xxhash / 200 bytes 157.00 ns/op 153.00 ns/op 1.03
fastMsgIdFn h64 xxhash / 200 bytes 202.00 ns/op 211.00 ns/op 0.96
fastMsgIdFn sha256 / 1000 bytes 4.7660 us/op 4.7170 us/op 1.01
fastMsgIdFn h32 xxhash / 1000 bytes 248.00 ns/op 244.00 ns/op 1.02
fastMsgIdFn h64 xxhash / 1000 bytes 254.00 ns/op 257.00 ns/op 0.99
fastMsgIdFn sha256 / 10000 bytes 42.246 us/op 41.582 us/op 1.02
fastMsgIdFn h32 xxhash / 10000 bytes 1.2590 us/op 1.2760 us/op 0.99
fastMsgIdFn h64 xxhash / 10000 bytes 809.00 ns/op 832.00 ns/op 0.97
send data - 1000 256B messages 4.1641 ms/op 4.1467 ms/op 1.00
send data - 1000 512B messages 4.3192 ms/op 4.2348 ms/op 1.02
send data - 1000 1024B messages 4.5274 ms/op 4.5559 ms/op 0.99
send data - 1000 1200B messages 4.6591 ms/op 4.6847 ms/op 0.99
send data - 1000 2048B messages 4.9453 ms/op 4.6401 ms/op 1.07
send data - 1000 4096B messages 5.6456 ms/op 5.5728 ms/op 1.01
send data - 1000 16384B messages 30.571 ms/op 19.935 ms/op 1.53
send data - 1000 65536B messages 184.10 ms/op 232.01 ms/op 0.79
enrSubnets - fastDeserialize 64 bits 755.00 ns/op 751.00 ns/op 1.01
enrSubnets - ssz BitVector 64 bits 276.00 ns/op 262.00 ns/op 1.05
enrSubnets - fastDeserialize 4 bits 106.00 ns/op 103.00 ns/op 1.03
enrSubnets - ssz BitVector 4 bits 276.00 ns/op 261.00 ns/op 1.06
prioritizePeers score -10:0 att 32-0.1 sync 2-0 206.65 us/op 208.44 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 235.56 us/op 234.34 us/op 1.01
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 341.50 us/op 361.49 us/op 0.94
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 615.21 us/op 603.29 us/op 1.02
prioritizePeers score 0:0 att 64-1 sync 4-1 695.62 us/op 700.91 us/op 0.99
array of 16000 items push then shift 1.3125 us/op 1.2996 us/op 1.01
LinkedList of 16000 items push then shift 7.2790 ns/op 6.8030 ns/op 1.07
array of 16000 items push then pop 74.292 ns/op 66.277 ns/op 1.12
LinkedList of 16000 items push then pop 6.1050 ns/op 5.9170 ns/op 1.03
array of 24000 items push then shift 2.1535 us/op 1.9304 us/op 1.12
LinkedList of 24000 items push then shift 6.9580 ns/op 6.5630 ns/op 1.06
array of 24000 items push then pop 104.23 ns/op 92.432 ns/op 1.13
LinkedList of 24000 items push then pop 6.0680 ns/op 5.9790 ns/op 1.01
intersect bitArray bitLen 8 4.7800 ns/op 4.7380 ns/op 1.01
intersect array and set length 8 29.530 ns/op 29.330 ns/op 1.01
intersect bitArray bitLen 128 24.146 ns/op 24.440 ns/op 0.99
intersect array and set length 128 500.10 ns/op 494.96 ns/op 1.01
bitArray.getTrueBitIndexes() bitLen 128 923.00 ns/op 1.0510 us/op 0.88
bitArray.getTrueBitIndexes() bitLen 248 1.6920 us/op 1.7710 us/op 0.96
bitArray.getTrueBitIndexes() bitLen 512 3.5970 us/op 3.5990 us/op 1.00
Full columns - reconstruct all 6 blobs 128.26 us/op 167.31 us/op 0.77
Full columns - reconstruct half of the blobs out of 6 120.81 us/op 97.485 us/op 1.24
Full columns - reconstruct single blob out of 6 34.216 us/op 35.435 us/op 0.97
Half columns - reconstruct all 6 blobs 392.28 ms/op 377.07 ms/op 1.04
Half columns - reconstruct half of the blobs out of 6 196.55 ms/op 192.52 ms/op 1.02
Half columns - reconstruct single blob out of 6 69.908 ms/op 66.868 ms/op 1.05
Full columns - reconstruct all 10 blobs 211.97 us/op 193.46 us/op 1.10
Full columns - reconstruct half of the blobs out of 10 110.22 us/op 111.90 us/op 0.99
Full columns - reconstruct single blob out of 10 34.592 us/op 32.103 us/op 1.08
Half columns - reconstruct all 10 blobs 648.66 ms/op 678.12 ms/op 0.96
Half columns - reconstruct half of the blobs out of 10 326.36 ms/op 338.76 ms/op 0.96
Half columns - reconstruct single blob out of 10 70.247 ms/op 72.393 ms/op 0.97
Full columns - reconstruct all 20 blobs 497.88 us/op 1.5226 ms/op 0.33
Full columns - reconstruct half of the blobs out of 20 210.29 us/op 214.09 us/op 0.98
Full columns - reconstruct single blob out of 20 32.147 us/op 33.486 us/op 0.96
Half columns - reconstruct all 20 blobs 1.2942 s/op 1.3028 s/op 0.99
Half columns - reconstruct half of the blobs out of 20 646.10 ms/op 648.52 ms/op 1.00
Half columns - reconstruct single blob out of 20 69.720 ms/op 69.243 ms/op 1.01
Set add up to 64 items then delete first 2.1983 us/op 2.7689 us/op 0.79
OrderedSet add up to 64 items then delete first 3.4546 us/op 3.5728 us/op 0.97
Set add up to 64 items then delete last 2.4524 us/op 2.4902 us/op 0.98
OrderedSet add up to 64 items then delete last 3.4069 us/op 3.3930 us/op 1.00
Set add up to 64 items then delete middle 2.2168 us/op 2.1874 us/op 1.01
OrderedSet add up to 64 items then delete middle 4.8331 us/op 4.8976 us/op 0.99
Set add up to 128 items then delete first 4.2400 us/op 4.4085 us/op 0.96
OrderedSet add up to 128 items then delete first 6.5235 us/op 6.7932 us/op 0.96
Set add up to 128 items then delete last 3.8841 us/op 4.1837 us/op 0.93
OrderedSet add up to 128 items then delete last 5.7511 us/op 5.8703 us/op 0.98
Set add up to 128 items then delete middle 3.8673 us/op 3.9395 us/op 0.98
OrderedSet add up to 128 items then delete middle 11.620 us/op 12.008 us/op 0.97
Set add up to 256 items then delete first 7.8825 us/op 8.0746 us/op 0.98
OrderedSet add up to 256 items then delete first 12.121 us/op 12.612 us/op 0.96
Set add up to 256 items then delete last 7.6351 us/op 7.8338 us/op 0.97
OrderedSet add up to 256 items then delete last 11.607 us/op 11.780 us/op 0.99
Set add up to 256 items then delete middle 7.6216 us/op 7.8055 us/op 0.98
OrderedSet add up to 256 items then delete middle 34.641 us/op 36.215 us/op 0.96
pass gossip attestations to forkchoice per slot 2.5258 ms/op 2.6267 ms/op 0.96
forkChoice updateHead vc 100000 bc 64 eq 0 419.95 us/op 417.24 us/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 0 2.4577 ms/op 2.4301 ms/op 1.01
forkChoice updateHead vc 1000000 bc 64 eq 0 4.1433 ms/op 4.1039 ms/op 1.01
forkChoice updateHead vc 600000 bc 320 eq 0 2.5205 ms/op 2.4726 ms/op 1.02
forkChoice updateHead vc 600000 bc 1200 eq 0 2.5816 ms/op 2.5552 ms/op 1.01
forkChoice updateHead vc 600000 bc 7200 eq 0 2.8475 ms/op 2.9114 ms/op 0.98
forkChoice updateHead vc 600000 bc 64 eq 1000 3.3373 ms/op 3.0449 ms/op 1.10
forkChoice updateHead vc 600000 bc 64 eq 10000 3.1966 ms/op 3.1539 ms/op 1.01
forkChoice updateHead vc 600000 bc 64 eq 300000 7.1293 ms/op 7.0715 ms/op 1.01
computeDeltas 1400000 validators 0% inactive 12.764 ms/op 13.987 ms/op 0.91
computeDeltas 1400000 validators 10% inactive 11.917 ms/op 13.231 ms/op 0.90
computeDeltas 1400000 validators 20% inactive 11.162 ms/op 12.047 ms/op 0.93
computeDeltas 1400000 validators 50% inactive 8.3859 ms/op 8.9844 ms/op 0.93
computeDeltas 2100000 validators 0% inactive 19.311 ms/op 21.088 ms/op 0.92
computeDeltas 2100000 validators 10% inactive 18.487 ms/op 19.747 ms/op 0.94
computeDeltas 2100000 validators 20% inactive 16.471 ms/op 18.409 ms/op 0.89
computeDeltas 2100000 validators 50% inactive 9.7581 ms/op 13.624 ms/op 0.72
altair processAttestation - 250000 vs - 7PWei normalcase 1.7140 ms/op 1.6824 ms/op 1.02
altair processAttestation - 250000 vs - 7PWei worstcase 2.8234 ms/op 2.4472 ms/op 1.15
altair processAttestation - setStatus - 1/6 committees join 105.81 us/op 103.00 us/op 1.03
altair processAttestation - setStatus - 1/3 committees join 202.15 us/op 210.03 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 284.41 us/op 299.83 us/op 0.95
altair processAttestation - setStatus - 2/3 committees join 373.08 us/op 379.87 us/op 0.98
altair processAttestation - setStatus - 4/5 committees join 510.93 us/op 510.79 us/op 1.00
altair processAttestation - setStatus - 100% committees join 605.13 us/op 598.49 us/op 1.01
altair processBlock - 250000 vs - 7PWei normalcase 2.9406 ms/op 2.8368 ms/op 1.04
altair processBlock - 250000 vs - 7PWei normalcase hashState 11.889 ms/op 11.494 ms/op 1.03
altair processBlock - 250000 vs - 7PWei worstcase 22.738 ms/op 20.026 ms/op 1.14
altair processBlock - 250000 vs - 7PWei worstcase hashState 42.275 ms/op 43.768 ms/op 0.97
phase0 processBlock - 250000 vs - 7PWei normalcase 1.3795 ms/op 1.2916 ms/op 1.07
phase0 processBlock - 250000 vs - 7PWei worstcase 17.477 ms/op 17.320 ms/op 1.01
altair processEth1Data - 250000 vs - 7PWei normalcase 293.02 us/op 294.50 us/op 0.99
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:16 4.8410 us/op 3.4640 us/op 1.40
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:220 20.203 us/op 20.881 us/op 0.97
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:43 5.7570 us/op 6.1150 us/op 0.94
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:19 4.7140 us/op 3.7350 us/op 1.26
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1021 91.481 us/op 92.792 us/op 0.99
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11778 1.3697 ms/op 1.4351 ms/op 0.95
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8363 ms/op 1.8783 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8359 ms/op 1.8735 ms/op 0.98
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.5819 ms/op 3.7199 ms/op 0.96
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.0838 ms/op 2.1064 ms/op 0.99
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.0331 ms/op 3.9765 ms/op 1.01
Tree 40 250000 create 323.77 ms/op 328.76 ms/op 0.98
Tree 40 250000 get(125000) 95.625 ns/op 94.799 ns/op 1.01
Tree 40 250000 set(125000) 1.0188 us/op 1.0318 us/op 0.99
Tree 40 250000 toArray() 13.435 ms/op 10.088 ms/op 1.33
Tree 40 250000 iterate all - toArray() + loop 9.9785 ms/op 9.8982 ms/op 1.01
Tree 40 250000 iterate all - get(i) 41.731 ms/op 38.560 ms/op 1.08
Array 250000 create 2.0883 ms/op 2.1680 ms/op 0.96
Array 250000 clone - spread 645.61 us/op 682.40 us/op 0.95
Array 250000 get(125000) 0.30200 ns/op 0.29600 ns/op 1.02
Array 250000 set(125000) 0.29900 ns/op 0.30500 ns/op 0.98
Array 250000 iterate all - loop 57.232 us/op 58.182 us/op 0.98
phase0 afterProcessEpoch - 250000 vs - 7PWei 52.001 ms/op 62.602 ms/op 0.83
Array.fill - length 1000000 2.2309 ms/op 2.3278 ms/op 0.96
Array push - length 1000000 8.2318 ms/op 8.9185 ms/op 0.92
Array.get 0.20848 ns/op 0.20692 ns/op 1.01
Uint8Array.get 0.23932 ns/op 0.25511 ns/op 0.94
phase0 beforeProcessEpoch - 250000 vs - 7PWei 17.977 ms/op 13.992 ms/op 1.28
altair processEpoch - mainnet_e81889 260.13 ms/op 260.89 ms/op 1.00
mainnet_e81889 - altair beforeProcessEpoch 20.622 ms/op 13.478 ms/op 1.53
mainnet_e81889 - altair processJustificationAndFinalization 6.3300 us/op 5.5350 us/op 1.14
mainnet_e81889 - altair processInactivityUpdates 3.4674 ms/op 3.5020 ms/op 0.99
mainnet_e81889 - altair processRewardsAndPenalties 19.795 ms/op 19.541 ms/op 1.01
mainnet_e81889 - altair processRegistryUpdates 535.00 ns/op 521.00 ns/op 1.03
mainnet_e81889 - altair processSlashings 133.00 ns/op 131.00 ns/op 1.02
mainnet_e81889 - altair processEth1DataReset 128.00 ns/op 126.00 ns/op 1.02
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.7250 ms/op 1.7641 ms/op 0.98
mainnet_e81889 - altair processSlashingsReset 680.00 ns/op 703.00 ns/op 0.97
mainnet_e81889 - altair processRandaoMixesReset 1.2810 us/op 1.1610 us/op 1.10
mainnet_e81889 - altair processHistoricalRootsUpdate 132.00 ns/op 129.00 ns/op 1.02
mainnet_e81889 - altair processParticipationFlagUpdates 424.00 ns/op 444.00 ns/op 0.95
mainnet_e81889 - altair processSyncCommitteeUpdates 104.00 ns/op 105.00 ns/op 0.99
mainnet_e81889 - altair afterProcessEpoch 42.466 ms/op 40.484 ms/op 1.05
capella processEpoch - mainnet_e217614 803.15 ms/op 896.44 ms/op 0.90
mainnet_e217614 - capella beforeProcessEpoch 55.521 ms/op 57.859 ms/op 0.96
mainnet_e217614 - capella processJustificationAndFinalization 6.0480 us/op 5.7200 us/op 1.06
mainnet_e217614 - capella processInactivityUpdates 14.534 ms/op 14.391 ms/op 1.01
mainnet_e217614 - capella processRewardsAndPenalties 90.648 ms/op 100.77 ms/op 0.90
mainnet_e217614 - capella processRegistryUpdates 4.5730 us/op 4.5930 us/op 1.00
mainnet_e217614 - capella processSlashings 132.00 ns/op 134.00 ns/op 0.99
mainnet_e217614 - capella processEth1DataReset 133.00 ns/op 130.00 ns/op 1.02
mainnet_e217614 - capella processEffectiveBalanceUpdates 9.3508 ms/op 15.987 ms/op 0.58
mainnet_e217614 - capella processSlashingsReset 667.00 ns/op 698.00 ns/op 0.96
mainnet_e217614 - capella processRandaoMixesReset 1.2140 us/op 1.2880 us/op 0.94
mainnet_e217614 - capella processHistoricalRootsUpdate 127.00 ns/op 133.00 ns/op 0.95
mainnet_e217614 - capella processParticipationFlagUpdates 423.00 ns/op 438.00 ns/op 0.97
mainnet_e217614 - capella afterProcessEpoch 110.07 ms/op 109.54 ms/op 1.00
phase0 processEpoch - mainnet_e58758 311.25 ms/op 285.91 ms/op 1.09
mainnet_e58758 - phase0 beforeProcessEpoch 57.978 ms/op 55.317 ms/op 1.05
mainnet_e58758 - phase0 processJustificationAndFinalization 6.1610 us/op 5.5030 us/op 1.12
mainnet_e58758 - phase0 processRewardsAndPenalties 16.182 ms/op 15.420 ms/op 1.05
mainnet_e58758 - phase0 processRegistryUpdates 2.2610 us/op 2.2880 us/op 0.99
mainnet_e58758 - phase0 processSlashings 133.00 ns/op 389.00 ns/op 0.34
mainnet_e58758 - phase0 processEth1DataReset 127.00 ns/op 132.00 ns/op 0.96
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 823.47 us/op 846.65 us/op 0.97
mainnet_e58758 - phase0 processSlashingsReset 863.00 ns/op 1.1100 us/op 0.78
mainnet_e58758 - phase0 processRandaoMixesReset 1.2020 us/op 1.5700 us/op 0.77
mainnet_e58758 - phase0 processHistoricalRootsUpdate 132.00 ns/op 134.00 ns/op 0.99
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.0990 us/op 1.3460 us/op 0.82
mainnet_e58758 - phase0 afterProcessEpoch 33.926 ms/op 35.047 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0199 ms/op 1.2484 ms/op 0.82
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5771 ms/op 1.6070 ms/op 0.98
altair processInactivityUpdates - 250000 normalcase 10.761 ms/op 10.943 ms/op 0.98
altair processInactivityUpdates - 250000 worstcase 10.654 ms/op 10.775 ms/op 0.99
phase0 processRegistryUpdates - 250000 normalcase 2.2770 us/op 2.2420 us/op 1.02
phase0 processRegistryUpdates - 250000 badcase_full_deposits 146.73 us/op 154.18 us/op 0.95
phase0 processRegistryUpdates - 250000 worstcase 0.5 63.315 ms/op 63.253 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 15.745 ms/op 15.051 ms/op 1.05
altair processRewardsAndPenalties - 250000 worstcase 14.295 ms/op 13.986 ms/op 1.02
phase0 getAttestationDeltas - 250000 normalcase 14.771 ms/op 5.4072 ms/op 2.73
phase0 getAttestationDeltas - 250000 worstcase 5.5149 ms/op 5.4884 ms/op 1.00
phase0 processSlashings - 250000 worstcase 62.864 us/op 60.186 us/op 1.04
altair processSyncCommitteeUpdates - 250000 10.223 ms/op 10.255 ms/op 1.00
BeaconState.hashTreeRoot - No change 169.00 ns/op 178.00 ns/op 0.95
BeaconState.hashTreeRoot - 1 full validator 62.313 us/op 74.601 us/op 0.84
BeaconState.hashTreeRoot - 32 full validator 843.61 us/op 820.90 us/op 1.03
BeaconState.hashTreeRoot - 512 full validator 7.1869 ms/op 6.7983 ms/op 1.06
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 94.500 us/op 76.535 us/op 1.23
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.1378 ms/op 1.3131 ms/op 0.87
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 13.800 ms/op 14.181 ms/op 0.97
BeaconState.hashTreeRoot - 1 balances 59.505 us/op 67.310 us/op 0.88
BeaconState.hashTreeRoot - 32 balances 654.49 us/op 672.14 us/op 0.97
BeaconState.hashTreeRoot - 512 balances 4.8567 ms/op 5.5378 ms/op 0.88
BeaconState.hashTreeRoot - 250000 balances 103.40 ms/op 130.64 ms/op 0.79
aggregationBits - 2048 els - zipIndexesInBitList 19.357 us/op 19.977 us/op 0.97
regular array get 100000 times 22.769 us/op 22.903 us/op 0.99
wrappedArray get 100000 times 22.632 us/op 22.970 us/op 0.99
arrayWithProxy get 100000 times 14.679 ms/op 10.271 ms/op 1.43
ssz.Root.equals 21.429 ns/op 21.575 ns/op 0.99
byteArrayEquals 21.232 ns/op 21.390 ns/op 0.99
Buffer.compare 8.8000 ns/op 8.8850 ns/op 0.99
processSlot - 1 slots 8.2080 us/op 8.2300 us/op 1.00
processSlot - 32 slots 1.6425 ms/op 1.8109 ms/op 0.91
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 3.3884 ms/op 3.1413 ms/op 1.08
getCommitteeAssignments - req 1 vs - 250000 vc 1.6557 ms/op 1.6794 ms/op 0.99
getCommitteeAssignments - req 100 vs - 250000 vc 3.4142 ms/op 3.4233 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 3.6735 ms/op 3.6877 ms/op 1.00
findModifiedValidators - 10000 modified validators 762.00 ms/op 765.77 ms/op 1.00
findModifiedValidators - 1000 modified validators 476.32 ms/op 486.94 ms/op 0.98
findModifiedValidators - 100 modified validators 252.74 ms/op 298.54 ms/op 0.85
findModifiedValidators - 10 modified validators 158.44 ms/op 175.95 ms/op 0.90
findModifiedValidators - 1 modified validators 174.52 ms/op 187.54 ms/op 0.93
findModifiedValidators - no difference 197.85 ms/op 191.01 ms/op 1.04
migrate state 1500000 validators, 3400 modified, 2000 new 2.9733 s/op 2.7784 s/op 1.07
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.7700 ns/op 3.7400 ns/op 1.01
state getBlockRootAtSlot - 250000 vs - 7PWei 347.09 ns/op 279.08 ns/op 1.24
computeProposerIndex 100000 validators 1.3740 ms/op 1.3263 ms/op 1.04
getNextSyncCommitteeIndices 1000 validators 2.8892 ms/op 2.8801 ms/op 1.00
getNextSyncCommitteeIndices 10000 validators 25.838 ms/op 25.414 ms/op 1.02
getNextSyncCommitteeIndices 100000 validators 86.852 ms/op 87.248 ms/op 1.00
computeProposers - vc 250000 555.06 us/op 545.46 us/op 1.02
computeEpochShuffling - vc 250000 39.138 ms/op 39.257 ms/op 1.00
getNextSyncCommittee - vc 250000 9.4838 ms/op 9.4190 ms/op 1.01
nodejs block root to RootHex using toHex 92.656 ns/op 97.349 ns/op 0.95
nodejs block root to RootHex using toRootHex 55.416 ns/op 60.717 ns/op 0.91
nodejs fromHex(blob) 817.86 us/op 768.49 us/op 1.06
nodejs fromHexInto(blob) 637.45 us/op 636.33 us/op 1.00
nodejs block root to RootHex using the deprecated toHexString 378.61 ns/op 548.86 ns/op 0.69
nodejs byteArrayEquals 32 bytes (block root) 26.331 ns/op 25.977 ns/op 1.01
nodejs byteArrayEquals 48 bytes (pubkey) 37.953 ns/op 37.579 ns/op 1.01
nodejs byteArrayEquals 96 bytes (signature) 36.111 ns/op 36.741 ns/op 0.98
nodejs byteArrayEquals 1024 bytes 44.094 ns/op 44.702 ns/op 0.99
nodejs byteArrayEquals 131072 bytes (blob) 1.7818 us/op 1.7526 us/op 1.02
browser block root to RootHex using toHex 145.88 ns/op 145.03 ns/op 1.01
browser block root to RootHex using toRootHex 129.90 ns/op 130.92 ns/op 0.99
browser fromHex(blob) 1.7503 ms/op 1.5678 ms/op 1.12
browser fromHexInto(blob) 635.63 us/op 645.98 us/op 0.98
browser block root to RootHex using the deprecated toHexString 341.12 ns/op 373.25 ns/op 0.91
browser byteArrayEquals 32 bytes (block root) 28.063 ns/op 28.278 ns/op 0.99
browser byteArrayEquals 48 bytes (pubkey) 39.662 ns/op 39.769 ns/op 1.00
browser byteArrayEquals 96 bytes (signature) 73.071 ns/op 74.276 ns/op 0.98
browser byteArrayEquals 1024 bytes 745.33 ns/op 760.09 ns/op 0.98
browser byteArrayEquals 131072 bytes (blob) 94.029 us/op 95.781 us/op 0.98

by benchmarkbot/action

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.

1 participant