Skip to content

refactor: block proposal cleanup#8155

Merged
wemeetagain merged 22 commits into
unstablefrom
cayman/block-proposal
Aug 15, 2025
Merged

refactor: block proposal cleanup#8155
wemeetagain merged 22 commits into
unstablefrom
cayman/block-proposal

Conversation

@wemeetagain

@wemeetagain wemeetagain commented Aug 8, 2025

Copy link
Copy Markdown
Member

Motivation

Description

Our block production and publishing data flow was messy. The data types and utility functions are jumbled, duplicate functions, differences from spec functions, etc. To that end, this refactors things that touch this proposal data flow.

  • Tweak the fork-agnostic BlockContents type to also include pre-deneb BeaconBlock
    • this allows us to remove BlockOrContents variables and types
  • Remove Contents (It isn't actually needed)
  • Collect all produced* caches into blockProductionCache
  • make blinded block reconstruction more typesafe
  • Separate blobs+proofs sanity validation from cells+proof sanity validation
  • Delete duplicated BlobsBundle type
  • Remove duplicate spec function computeDataColumnSidecars in favor of getDataColumnSidecars* functions
  • Refactor computeBlobSidecars into getBlobSidecars from the spec

@wemeetagain wemeetagain requested a review from a team as a code owner August 8, 2025 16:10
Comment thread packages/beacon-node/src/util/blobs.ts Outdated
Comment thread packages/types/src/deneb/types.ts
@wemeetagain

wemeetagain commented Aug 11, 2025

Copy link
Copy Markdown
Member Author

Before I refactor this branch, want to get some consensus on changes to keep:

  • Change Contents to DAContents (this is the most egregiously-named type)
  • Update BlockContents fork-agnostic type to be BeaconBlock for pre-deneb forks (essentially BlockContents = BlockContents | BeaconBlock<PreDeneb>) (this helps a lot with smoothing out types)
  • The changes to the cached proposal data (in produceBlockBody)
  • splitting of sanity verification of EL-produced blob proofs + blobs and EL-produced cell proofs + cells

Base automatically changed from peerDAS to unstable August 11, 2025 18:02
@wemeetagain wemeetagain force-pushed the cayman/block-proposal branch from 02ee071 to 778004c Compare August 11, 2025 21:57
@github-actions

github-actions Bot commented Aug 11, 2025

Copy link
Copy Markdown
Contributor

Performance Report

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: 540eaf0 Previous: 7d02789 Ratio
BLS verify - blst 792.80 us/op 3.2647 ms/op 0.24
BLS verifyMultipleSignatures 3 - blst 1.1819 ms/op 4.1363 ms/op 0.29
BLS verifyMultipleSignatures 8 - blst 1.6280 ms/op 7.1086 ms/op 0.23
BLS deserializing 100000 signatures 6.6987 s/op 23.225 s/op 0.29
BLS verifyMultipleSignatures - same message - 8 - blst 988.01 us/op 3.0259 ms/op 0.33
BLS verifyMultipleSignatures - same message - 64 - blst 2.4726 ms/op 11.076 ms/op 0.22
BLS verifyMultipleSignatures - same message - 128 - blst 4.1861 ms/op 13.657 ms/op 0.31
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 44.579 ms/op 162.21 ms/op 0.27
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.698 ms/op 136.36 ms/op 0.31
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 33.767 ms/op 146.85 ms/op 0.23
getSlashingsAndExits - default max 69.551 us/op 390.07 us/op 0.18
getSlashingsAndExits - 2k 275.71 us/op 879.83 us/op 0.31
isKnown best case - 1 super set check 205.00 ns/op 678.00 ns/op 0.30
isKnown worse case - 16 super set checks 202.00 ns/op 661.00 ns/op 0.31
batch validate gossip attestation - vc 640000 - chunk 32 113.10 us/op 432.19 us/op 0.26
batch validate gossip attestation - vc 640000 - chunk 64 98.750 us/op 484.77 us/op 0.20
batch validate gossip attestation - vc 640000 - chunk 128 91.681 us/op 500.55 us/op 0.18
batch validate gossip attestation - vc 640000 - chunk 256 91.200 us/op 382.62 us/op 0.24
pickEth1Vote - no votes 959.62 us/op 4.3123 ms/op 0.22
pickEth1Vote - max votes 5.2038 ms/op 29.669 ms/op 0.18
bytes32 Buffer.toString(hex) 244.00 ns/op 948.00 ns/op 0.26
bytes32 Buffer.toString(hex) from Uint8Array 343.00 ns/op 1.4090 us/op 0.24
bytes32 Buffer.toString(hex) + 0x 247.00 ns/op 920.00 ns/op 0.27
Object get x1000 5.8440 ns/op 18.424 ns/op 0.32
Map get x1000 6.3400 ns/op 27.730 ns/op 0.23
Object set x1000 27.443 ns/op 113.86 ns/op 0.24
Map set x1000 19.665 ns/op 77.064 ns/op 0.26
toHex 134.10 ns/op 603.71 ns/op 0.22
Buffer.from 118.99 ns/op 448.79 ns/op 0.27
shared Buffer 83.471 ns/op 352.87 ns/op 0.24
fastMsgIdFn sha256 / 200 bytes 2.1290 us/op 8.9520 us/op 0.24
fastMsgIdFn h32 xxhash / 200 bytes 203.00 ns/op 800.00 ns/op 0.25
fastMsgIdFn h64 xxhash / 200 bytes 257.00 ns/op 1.7060 us/op 0.15
fastMsgIdFn sha256 / 1000 bytes 6.9950 us/op 29.438 us/op 0.24
fastMsgIdFn h32 xxhash / 1000 bytes 328.00 ns/op 1.3160 us/op 0.25
fastMsgIdFn h64 xxhash / 1000 bytes 326.00 ns/op 1.2450 us/op 0.26
fastMsgIdFn h32 xxhash / 10000 bytes 1.7880 us/op 6.7360 us/op 0.27
fastMsgIdFn h64 xxhash / 10000 bytes 1.1910 us/op 4.0390 us/op 0.29
send data - 1000 256B messages 15.902 ms/op 62.951 ms/op 0.25
send data - 1000 512B messages 19.208 ms/op 67.695 ms/op 0.28
send data - 1000 1200B messages 20.901 ms/op 69.416 ms/op 0.30
send data - 1000 2048B messages 21.779 ms/op 69.349 ms/op 0.31
send data - 1000 65536B messages 107.09 ms/op 323.85 ms/op 0.33
enrSubnets - fastDeserialize 64 bits 861.00 ns/op 3.1640 us/op 0.27
enrSubnets - ssz BitVector 64 bits 318.00 ns/op 1.0410 us/op 0.31
enrSubnets - fastDeserialize 4 bits 130.00 ns/op 446.00 ns/op 0.29
prioritizePeers score -10:0 att 32-0.1 sync 2-0 118.84 us/op 448.56 us/op 0.26
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 139.19 us/op 529.18 us/op 0.26
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 196.69 us/op 795.80 us/op 0.25
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 365.73 us/op 1.6652 ms/op 0.22
prioritizePeers score 0:0 att 64-1 sync 4-1 443.99 us/op 1.8253 ms/op 0.24
Buffer.concat 32 items 610.00 ns/op 3.3010 us/op 0.18
Uint8Array.set 32 items 936.00 ns/op 3.6800 us/op 0.25
Buffer.copy 2.0330 us/op 8.8190 us/op 0.23
Uint8Array.set - with subarray 1.5650 us/op 5.2360 us/op 0.30
Uint8Array.set - without subarray 817.00 ns/op 3.3300 us/op 0.25
getUint32 - dataview 196.00 ns/op 876.00 ns/op 0.22
getUint32 - manual 120.00 ns/op 492.00 ns/op 0.24
Set add up to 64 items then delete first 2.2348 us/op 11.771 us/op 0.19
OrderedSet add up to 64 items then delete first 3.1911 us/op 19.060 us/op 0.17
Set add up to 64 items then delete last 2.5116 us/op 12.621 us/op 0.20
OrderedSet add up to 64 items then delete last 3.6109 us/op 23.858 us/op 0.15
Set add up to 64 items then delete middle 2.4566 us/op 13.882 us/op 0.18
OrderedSet add up to 64 items then delete middle 5.0349 us/op 28.910 us/op 0.17
Set add up to 128 items then delete first 4.9498 us/op 29.144 us/op 0.17
OrderedSet add up to 128 items then delete first 7.8047 us/op 46.784 us/op 0.17
Set add up to 128 items then delete last 4.8217 us/op 33.091 us/op 0.15
OrderedSet add up to 128 items then delete last 7.1955 us/op 45.854 us/op 0.16
Set add up to 128 items then delete middle 4.7519 us/op 34.210 us/op 0.14
OrderedSet add up to 128 items then delete middle 13.423 us/op 81.357 us/op 0.16
Set add up to 256 items then delete first 10.023 us/op 58.208 us/op 0.17
OrderedSet add up to 256 items then delete first 15.822 us/op 84.787 us/op 0.19
Set add up to 256 items then delete last 9.5683 us/op 46.652 us/op 0.21
OrderedSet add up to 256 items then delete last 14.826 us/op 76.954 us/op 0.19
Set add up to 256 items then delete middle 9.5107 us/op 58.372 us/op 0.16
OrderedSet add up to 256 items then delete middle 40.293 us/op 204.95 us/op 0.20
pass gossip attestations to forkchoice per slot 2.7804 ms/op 12.499 ms/op 0.22
forkChoice updateHead vc 100000 bc 64 eq 0 453.84 us/op 2.0332 ms/op 0.22
forkChoice updateHead vc 600000 bc 64 eq 0 2.9639 ms/op 12.008 ms/op 0.25
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7475 ms/op 19.527 ms/op 0.24
forkChoice updateHead vc 600000 bc 320 eq 0 2.7474 ms/op 11.938 ms/op 0.23
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8228 ms/op 12.211 ms/op 0.23
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4920 ms/op 12.993 ms/op 0.27
forkChoice updateHead vc 600000 bc 64 eq 10000 10.410 ms/op 32.373 ms/op 0.32
forkChoice updateHead vc 600000 bc 64 eq 300000 13.485 ms/op 84.656 ms/op 0.16
computeDeltas 500000 validators 300 proto nodes 3.8165 ms/op 16.249 ms/op 0.23
computeDeltas 500000 validators 1200 proto nodes 3.8353 ms/op 14.719 ms/op 0.26
computeDeltas 500000 validators 7200 proto nodes 3.8379 ms/op 15.597 ms/op 0.25
computeDeltas 750000 validators 300 proto nodes 5.7403 ms/op 23.282 ms/op 0.25
computeDeltas 750000 validators 1200 proto nodes 5.6700 ms/op 22.883 ms/op 0.25
computeDeltas 750000 validators 7200 proto nodes 5.6935 ms/op 23.119 ms/op 0.25
computeDeltas 1400000 validators 300 proto nodes 10.626 ms/op 38.398 ms/op 0.28
computeDeltas 1400000 validators 1200 proto nodes 10.713 ms/op 40.938 ms/op 0.26
computeDeltas 1400000 validators 7200 proto nodes 10.525 ms/op 48.592 ms/op 0.22
computeDeltas 2100000 validators 300 proto nodes 16.633 ms/op 69.429 ms/op 0.24
computeDeltas 2100000 validators 1200 proto nodes 16.633 ms/op 70.116 ms/op 0.24
computeDeltas 2100000 validators 7200 proto nodes 16.954 ms/op 74.520 ms/op 0.23
altair processAttestation - 250000 vs - 7PWei normalcase 2.1016 ms/op 8.2856 ms/op 0.25
altair processAttestation - 250000 vs - 7PWei worstcase 3.2111 ms/op 13.643 ms/op 0.24
altair processAttestation - setStatus - 1/6 committees join 126.08 us/op 738.70 us/op 0.17
altair processAttestation - setStatus - 1/3 committees join 254.18 us/op 1.0360 ms/op 0.25
altair processAttestation - setStatus - 1/2 committees join 350.78 us/op 1.4458 ms/op 0.24
altair processAttestation - setStatus - 2/3 committees join 461.99 us/op 1.8195 ms/op 0.25
altair processAttestation - setStatus - 4/5 committees join 631.81 us/op 2.6069 ms/op 0.24
altair processAttestation - setStatus - 100% committees join 778.26 us/op 3.2127 ms/op 0.24
altair processBlock - 250000 vs - 7PWei normalcase 6.2254 ms/op 20.618 ms/op 0.30
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.278 ms/op 118.14 ms/op 0.26
altair processBlock - 250000 vs - 7PWei worstcase 37.908 ms/op 158.08 ms/op 0.24
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.369 ms/op 246.64 ms/op 0.31
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.1270 us/op 24.308 us/op 0.29
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.179 ms/op 169.93 ms/op 0.25
Array.fill - length 1000000 3.4719 ms/op 14.408 ms/op 0.24
Array push - length 1000000 13.093 ms/op 45.023 ms/op 0.29
Array.get 0.28341 ns/op 1.2489 ns/op 0.23
Uint8Array.get 0.43436 ns/op 1.4298 ns/op 0.30
phase0 getAttestationDeltas - 250000 normalcase 7.0980 ms/op 25.884 ms/op 0.27
cached computeShuffledIndex 2000000 validators 36.680 s/op 110.89 s/op 0.33
computeProposers - vc 250000 624.88 us/op 2.2435 ms/op 0.28
computeEpochShuffling - vc 250000 41.986 ms/op 179.26 ms/op 0.23
getNextSyncCommittee - vc 250000 10.694 ms/op 46.604 ms/op 0.23
computeSigningRoot for AttestationData 20.582 us/op 112.54 us/op 0.18
hash AttestationData serialized data then Buffer.toString(base64) 1.6080 us/op 6.2235 us/op 0.26
toHexString serialized data 1.1257 us/op 7.9813 us/op 0.14
Buffer.toString(base64) 157.37 ns/op 487.27 ns/op 0.32
nodejs block root to RootHex using toRootHex 84.568 ns/op 279.88 ns/op 0.30
browser block root to RootHex using toHex 183.49 ns/op 772.31 ns/op 0.24
browser block root to RootHex using toRootHex 164.43 ns/op 752.49 ns/op 0.22
Full benchmark results
Benchmark suite Current: 540eaf0 Previous: 7d02789 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 924.01 us/op 3.7418 ms/op 0.25
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 34.281 us/op 86.679 us/op 0.40
BLS verify - blst 792.80 us/op 3.2647 ms/op 0.24
BLS verifyMultipleSignatures 3 - blst 1.1819 ms/op 4.1363 ms/op 0.29
BLS verifyMultipleSignatures 8 - blst 1.6280 ms/op 7.1086 ms/op 0.23
BLS verifyMultipleSignatures 32 - blst 4.8548 ms/op 9.2845 ms/op 0.52
BLS verifyMultipleSignatures 64 - blst 8.9916 ms/op 19.959 ms/op 0.45
BLS verifyMultipleSignatures 128 - blst 17.141 ms/op 48.626 ms/op 0.35
BLS deserializing 10000 signatures 678.75 ms/op 1.6994 s/op 0.40
BLS deserializing 100000 signatures 6.6987 s/op 23.225 s/op 0.29
BLS verifyMultipleSignatures - same message - 3 - blst 747.22 us/op 1.7912 ms/op 0.42
BLS verifyMultipleSignatures - same message - 8 - blst 988.01 us/op 3.0259 ms/op 0.33
BLS verifyMultipleSignatures - same message - 32 - blst 1.6097 ms/op 4.5004 ms/op 0.36
BLS verifyMultipleSignatures - same message - 64 - blst 2.4726 ms/op 11.076 ms/op 0.22
BLS verifyMultipleSignatures - same message - 128 - blst 4.1861 ms/op 13.657 ms/op 0.31
BLS aggregatePubkeys 32 - blst 18.799 us/op 56.247 us/op 0.33
BLS aggregatePubkeys 128 - blst 68.741 us/op 204.87 us/op 0.34
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 44.579 ms/op 162.21 ms/op 0.27
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 42.698 ms/op 136.36 ms/op 0.31
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 33.767 ms/op 146.85 ms/op 0.23
getSlashingsAndExits - default max 69.551 us/op 390.07 us/op 0.18
getSlashingsAndExits - 2k 275.71 us/op 879.83 us/op 0.31
proposeBlockBody type=full, size=empty 5.2706 ms/op 13.109 ms/op 0.40
isKnown best case - 1 super set check 205.00 ns/op 678.00 ns/op 0.30
isKnown normal case - 2 super set checks 200.00 ns/op 551.00 ns/op 0.36
isKnown worse case - 16 super set checks 202.00 ns/op 661.00 ns/op 0.31
InMemoryCheckpointStateCache - add get delete 2.3310 us/op 3.6240 us/op 0.64
validate api signedAggregateAndProof - struct 1.3272 ms/op 2.4614 ms/op 0.54
validate gossip signedAggregateAndProof - struct 1.5541 ms/op 4.3763 ms/op 0.36
batch validate gossip attestation - vc 640000 - chunk 32 113.10 us/op 432.19 us/op 0.26
batch validate gossip attestation - vc 640000 - chunk 64 98.750 us/op 484.77 us/op 0.20
batch validate gossip attestation - vc 640000 - chunk 128 91.681 us/op 500.55 us/op 0.18
batch validate gossip attestation - vc 640000 - chunk 256 91.200 us/op 382.62 us/op 0.24
pickEth1Vote - no votes 959.62 us/op 4.3123 ms/op 0.22
pickEth1Vote - max votes 5.2038 ms/op 29.669 ms/op 0.18
pickEth1Vote - Eth1Data hashTreeRoot value x2048 10.487 ms/op 38.335 ms/op 0.27
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 15.914 ms/op 65.546 ms/op 0.24
pickEth1Vote - Eth1Data fastSerialize value x2048 455.57 us/op 2.2677 ms/op 0.20
pickEth1Vote - Eth1Data fastSerialize tree x2048 3.7371 ms/op 12.722 ms/op 0.29
bytes32 toHexString 364.00 ns/op 862.00 ns/op 0.42
bytes32 Buffer.toString(hex) 244.00 ns/op 948.00 ns/op 0.26
bytes32 Buffer.toString(hex) from Uint8Array 343.00 ns/op 1.4090 us/op 0.24
bytes32 Buffer.toString(hex) + 0x 247.00 ns/op 920.00 ns/op 0.27
Object access 1 prop 0.12500 ns/op 0.37000 ns/op 0.34
Map access 1 prop 0.13200 ns/op 0.29400 ns/op 0.45
Object get x1000 5.8440 ns/op 18.424 ns/op 0.32
Map get x1000 6.3400 ns/op 27.730 ns/op 0.23
Object set x1000 27.443 ns/op 113.86 ns/op 0.24
Map set x1000 19.665 ns/op 77.064 ns/op 0.26
Return object 10000 times 0.27950 ns/op 1.1079 ns/op 0.25
Throw Error 10000 times 4.0477 us/op 19.132 us/op 0.21
toHex 134.10 ns/op 603.71 ns/op 0.22
Buffer.from 118.99 ns/op 448.79 ns/op 0.27
shared Buffer 83.471 ns/op 352.87 ns/op 0.24
fastMsgIdFn sha256 / 200 bytes 2.1290 us/op 8.9520 us/op 0.24
fastMsgIdFn h32 xxhash / 200 bytes 203.00 ns/op 800.00 ns/op 0.25
fastMsgIdFn h64 xxhash / 200 bytes 257.00 ns/op 1.7060 us/op 0.15
fastMsgIdFn sha256 / 1000 bytes 6.9950 us/op 29.438 us/op 0.24
fastMsgIdFn h32 xxhash / 1000 bytes 328.00 ns/op 1.3160 us/op 0.25
fastMsgIdFn h64 xxhash / 1000 bytes 326.00 ns/op 1.2450 us/op 0.26
fastMsgIdFn sha256 / 10000 bytes 62.318 us/op 168.83 us/op 0.37
fastMsgIdFn h32 xxhash / 10000 bytes 1.7880 us/op 6.7360 us/op 0.27
fastMsgIdFn h64 xxhash / 10000 bytes 1.1910 us/op 4.0390 us/op 0.29
send data - 1000 256B messages 15.902 ms/op 62.951 ms/op 0.25
send data - 1000 512B messages 19.208 ms/op 67.695 ms/op 0.28
send data - 1000 1024B messages 26.533 ms/op 45.917 ms/op 0.58
send data - 1000 1200B messages 20.901 ms/op 69.416 ms/op 0.30
send data - 1000 2048B messages 21.779 ms/op 69.349 ms/op 0.31
send data - 1000 4096B messages 28.189 ms/op 82.864 ms/op 0.34
send data - 1000 16384B messages 45.219 ms/op 117.17 ms/op 0.39
send data - 1000 65536B messages 107.09 ms/op 323.85 ms/op 0.33
enrSubnets - fastDeserialize 64 bits 861.00 ns/op 3.1640 us/op 0.27
enrSubnets - ssz BitVector 64 bits 318.00 ns/op 1.0410 us/op 0.31
enrSubnets - fastDeserialize 4 bits 130.00 ns/op 446.00 ns/op 0.29
enrSubnets - ssz BitVector 4 bits 327.00 ns/op 519.00 ns/op 0.63
prioritizePeers score -10:0 att 32-0.1 sync 2-0 118.84 us/op 448.56 us/op 0.26
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 139.19 us/op 529.18 us/op 0.26
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 196.69 us/op 795.80 us/op 0.25
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 365.73 us/op 1.6652 ms/op 0.22
prioritizePeers score 0:0 att 64-1 sync 4-1 443.99 us/op 1.8253 ms/op 0.24
array of 16000 items push then shift 1.5504 us/op 6.0844 us/op 0.25
LinkedList of 16000 items push then shift 6.7760 ns/op 29.005 ns/op 0.23
array of 16000 items push then pop 73.008 ns/op 287.93 ns/op 0.25
LinkedList of 16000 items push then pop 6.6860 ns/op 25.680 ns/op 0.26
array of 24000 items push then shift 2.2905 us/op 5.9881 us/op 0.38
LinkedList of 24000 items push then shift 6.7550 ns/op 24.771 ns/op 0.27
array of 24000 items push then pop 96.982 ns/op 263.39 ns/op 0.37
LinkedList of 24000 items push then pop 6.6240 ns/op 37.965 ns/op 0.17
intersect bitArray bitLen 8 6.4640 ns/op 19.123 ns/op 0.34
intersect array and set length 8 41.603 ns/op 125.00 ns/op 0.33
intersect bitArray bitLen 128 29.824 ns/op 60.359 ns/op 0.49
intersect array and set length 128 732.46 ns/op 1.2532 us/op 0.58
bitArray.getTrueBitIndexes() bitLen 128 987.00 ns/op 2.5400 us/op 0.39
bitArray.getTrueBitIndexes() bitLen 248 1.7350 us/op 3.5080 us/op 0.49
bitArray.getTrueBitIndexes() bitLen 512 3.5970 us/op 7.5450 us/op 0.48
Buffer.concat 32 items 610.00 ns/op 3.3010 us/op 0.18
Uint8Array.set 32 items 936.00 ns/op 3.6800 us/op 0.25
Buffer.copy 2.0330 us/op 8.8190 us/op 0.23
Uint8Array.set - with subarray 1.5650 us/op 5.2360 us/op 0.30
Uint8Array.set - without subarray 817.00 ns/op 3.3300 us/op 0.25
getUint32 - dataview 196.00 ns/op 876.00 ns/op 0.22
getUint32 - manual 120.00 ns/op 492.00 ns/op 0.24
Set add up to 64 items then delete first 2.2348 us/op 11.771 us/op 0.19
OrderedSet add up to 64 items then delete first 3.1911 us/op 19.060 us/op 0.17
Set add up to 64 items then delete last 2.5116 us/op 12.621 us/op 0.20
OrderedSet add up to 64 items then delete last 3.6109 us/op 23.858 us/op 0.15
Set add up to 64 items then delete middle 2.4566 us/op 13.882 us/op 0.18
OrderedSet add up to 64 items then delete middle 5.0349 us/op 28.910 us/op 0.17
Set add up to 128 items then delete first 4.9498 us/op 29.144 us/op 0.17
OrderedSet add up to 128 items then delete first 7.8047 us/op 46.784 us/op 0.17
Set add up to 128 items then delete last 4.8217 us/op 33.091 us/op 0.15
OrderedSet add up to 128 items then delete last 7.1955 us/op 45.854 us/op 0.16
Set add up to 128 items then delete middle 4.7519 us/op 34.210 us/op 0.14
OrderedSet add up to 128 items then delete middle 13.423 us/op 81.357 us/op 0.16
Set add up to 256 items then delete first 10.023 us/op 58.208 us/op 0.17
OrderedSet add up to 256 items then delete first 15.822 us/op 84.787 us/op 0.19
Set add up to 256 items then delete last 9.5683 us/op 46.652 us/op 0.21
OrderedSet add up to 256 items then delete last 14.826 us/op 76.954 us/op 0.19
Set add up to 256 items then delete middle 9.5107 us/op 58.372 us/op 0.16
OrderedSet add up to 256 items then delete middle 40.293 us/op 204.95 us/op 0.20
transfer serialized Status (84 B) 2.0870 us/op 10.148 us/op 0.21
copy serialized Status (84 B) 1.0650 us/op 5.6430 us/op 0.19
transfer serialized SignedVoluntaryExit (112 B) 2.1060 us/op 10.045 us/op 0.21
copy serialized SignedVoluntaryExit (112 B) 1.0730 us/op 5.5050 us/op 0.19
transfer serialized ProposerSlashing (416 B) 2.1540 us/op 8.4080 us/op 0.26
copy serialized ProposerSlashing (416 B) 1.2140 us/op 4.2620 us/op 0.28
transfer serialized Attestation (485 B) 2.1440 us/op 4.5160 us/op 0.47
copy serialized Attestation (485 B) 1.1300 us/op 2.0480 us/op 0.55
transfer serialized AttesterSlashing (33232 B) 2.1750 us/op 4.2760 us/op 0.51
copy serialized AttesterSlashing (33232 B) 2.9590 us/op 6.7970 us/op 0.44
transfer serialized Small SignedBeaconBlock (128000 B) 2.6140 us/op 11.509 us/op 0.23
copy serialized Small SignedBeaconBlock (128000 B) 8.5970 us/op 33.497 us/op 0.26
transfer serialized Avg SignedBeaconBlock (200000 B) 2.9330 us/op 14.429 us/op 0.20
copy serialized Avg SignedBeaconBlock (200000 B) 12.365 us/op 52.220 us/op 0.24
transfer serialized BlobsSidecar (524380 B) 2.9740 us/op 17.223 us/op 0.17
copy serialized BlobsSidecar (524380 B) 136.37 us/op 130.71 us/op 1.04
transfer serialized Big SignedBeaconBlock (1000000 B) 3.0520 us/op 17.641 us/op 0.17
copy serialized Big SignedBeaconBlock (1000000 B) 193.75 us/op 215.66 us/op 0.90
pass gossip attestations to forkchoice per slot 2.7804 ms/op 12.499 ms/op 0.22
forkChoice updateHead vc 100000 bc 64 eq 0 453.84 us/op 2.0332 ms/op 0.22
forkChoice updateHead vc 600000 bc 64 eq 0 2.9639 ms/op 12.008 ms/op 0.25
forkChoice updateHead vc 1000000 bc 64 eq 0 4.7475 ms/op 19.527 ms/op 0.24
forkChoice updateHead vc 600000 bc 320 eq 0 2.7474 ms/op 11.938 ms/op 0.23
forkChoice updateHead vc 600000 bc 1200 eq 0 2.8228 ms/op 12.211 ms/op 0.23
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4920 ms/op 12.993 ms/op 0.27
forkChoice updateHead vc 600000 bc 64 eq 1000 10.133 ms/op 24.976 ms/op 0.41
forkChoice updateHead vc 600000 bc 64 eq 10000 10.410 ms/op 32.373 ms/op 0.32
forkChoice updateHead vc 600000 bc 64 eq 300000 13.485 ms/op 84.656 ms/op 0.16
computeDeltas 500000 validators 300 proto nodes 3.8165 ms/op 16.249 ms/op 0.23
computeDeltas 500000 validators 1200 proto nodes 3.8353 ms/op 14.719 ms/op 0.26
computeDeltas 500000 validators 7200 proto nodes 3.8379 ms/op 15.597 ms/op 0.25
computeDeltas 750000 validators 300 proto nodes 5.7403 ms/op 23.282 ms/op 0.25
computeDeltas 750000 validators 1200 proto nodes 5.6700 ms/op 22.883 ms/op 0.25
computeDeltas 750000 validators 7200 proto nodes 5.6935 ms/op 23.119 ms/op 0.25
computeDeltas 1400000 validators 300 proto nodes 10.626 ms/op 38.398 ms/op 0.28
computeDeltas 1400000 validators 1200 proto nodes 10.713 ms/op 40.938 ms/op 0.26
computeDeltas 1400000 validators 7200 proto nodes 10.525 ms/op 48.592 ms/op 0.22
computeDeltas 2100000 validators 300 proto nodes 16.633 ms/op 69.429 ms/op 0.24
computeDeltas 2100000 validators 1200 proto nodes 16.633 ms/op 70.116 ms/op 0.24
computeDeltas 2100000 validators 7200 proto nodes 16.954 ms/op 74.520 ms/op 0.23
altair processAttestation - 250000 vs - 7PWei normalcase 2.1016 ms/op 8.2856 ms/op 0.25
altair processAttestation - 250000 vs - 7PWei worstcase 3.2111 ms/op 13.643 ms/op 0.24
altair processAttestation - setStatus - 1/6 committees join 126.08 us/op 738.70 us/op 0.17
altair processAttestation - setStatus - 1/3 committees join 254.18 us/op 1.0360 ms/op 0.25
altair processAttestation - setStatus - 1/2 committees join 350.78 us/op 1.4458 ms/op 0.24
altair processAttestation - setStatus - 2/3 committees join 461.99 us/op 1.8195 ms/op 0.25
altair processAttestation - setStatus - 4/5 committees join 631.81 us/op 2.6069 ms/op 0.24
altair processAttestation - setStatus - 100% committees join 778.26 us/op 3.2127 ms/op 0.24
altair processBlock - 250000 vs - 7PWei normalcase 6.2254 ms/op 20.618 ms/op 0.30
altair processBlock - 250000 vs - 7PWei normalcase hashState 30.278 ms/op 118.14 ms/op 0.26
altair processBlock - 250000 vs - 7PWei worstcase 37.908 ms/op 158.08 ms/op 0.24
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.369 ms/op 246.64 ms/op 0.31
phase0 processBlock - 250000 vs - 7PWei normalcase 1.6786 ms/op 3.6853 ms/op 0.46
phase0 processBlock - 250000 vs - 7PWei worstcase 22.947 ms/op 60.079 ms/op 0.38
altair processEth1Data - 250000 vs - 7PWei normalcase 408.80 us/op 1.1161 ms/op 0.37
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 7.1270 us/op 24.308 us/op 0.29
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 51.477 us/op 94.485 us/op 0.54
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 14.456 us/op 22.892 us/op 0.63
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 9.2550 us/op 15.105 us/op 0.61
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 225.78 us/op 220.99 us/op 1.02
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.9044 ms/op 5.6157 ms/op 0.34
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 2.4968 ms/op 7.3702 ms/op 0.34
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.5272 ms/op 5.9525 ms/op 0.42
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.4540 ms/op 12.722 ms/op 0.43
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.4388 ms/op 6.1184 ms/op 0.40
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 5.0000 ms/op 12.452 ms/op 0.40
Tree 40 250000 create 460.91 ms/op 1.4232 s/op 0.32
Tree 40 250000 get(125000) 145.53 ns/op 575.36 ns/op 0.25
Tree 40 250000 set(125000) 1.7174 us/op 6.9838 us/op 0.25
Tree 40 250000 toArray() 22.625 ms/op 59.490 ms/op 0.38
Tree 40 250000 iterate all - toArray() + loop 19.302 ms/op 85.353 ms/op 0.23
Tree 40 250000 iterate all - get(i) 57.537 ms/op 240.99 ms/op 0.24
Array 250000 create 2.4787 ms/op 9.2548 ms/op 0.27
Array 250000 clone - spread 818.10 us/op 8.0071 ms/op 0.10
Array 250000 get(125000) 0.42400 ns/op 1.9870 ns/op 0.21
Array 250000 set(125000) 0.44200 ns/op 2.0440 ns/op 0.22
Array 250000 iterate all - loop 112.20 us/op 408.76 us/op 0.27
phase0 afterProcessEpoch - 250000 vs - 7PWei 42.179 ms/op 169.93 ms/op 0.25
Array.fill - length 1000000 3.4719 ms/op 14.408 ms/op 0.24
Array push - length 1000000 13.093 ms/op 45.023 ms/op 0.29
Array.get 0.28341 ns/op 1.2489 ns/op 0.23
Uint8Array.get 0.43436 ns/op 1.4298 ns/op 0.30
phase0 beforeProcessEpoch - 250000 vs - 7PWei 16.397 ms/op 31.804 ms/op 0.52
altair processEpoch - mainnet_e81889 253.99 ms/op 680.87 ms/op 0.37
mainnet_e81889 - altair beforeProcessEpoch 20.895 ms/op 35.634 ms/op 0.59
mainnet_e81889 - altair processJustificationAndFinalization 5.6700 us/op 12.426 us/op 0.46
mainnet_e81889 - altair processInactivityUpdates 4.2692 ms/op 12.293 ms/op 0.35
mainnet_e81889 - altair processRewardsAndPenalties 37.203 ms/op 97.113 ms/op 0.38
mainnet_e81889 - altair processRegistryUpdates 934.00 ns/op 2.7330 us/op 0.34
mainnet_e81889 - altair processSlashings 192.00 ns/op 526.00 ns/op 0.37
mainnet_e81889 - altair processEth1DataReset 185.00 ns/op 698.00 ns/op 0.27
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.2339 ms/op 4.7456 ms/op 0.26
mainnet_e81889 - altair processSlashingsReset 906.00 ns/op 3.3430 us/op 0.27
mainnet_e81889 - altair processRandaoMixesReset 1.1350 us/op 4.8000 us/op 0.24
mainnet_e81889 - altair processHistoricalRootsUpdate 184.00 ns/op 689.00 ns/op 0.27
mainnet_e81889 - altair processParticipationFlagUpdates 521.00 ns/op 2.0360 us/op 0.26
mainnet_e81889 - altair processSyncCommitteeUpdates 147.00 ns/op 534.00 ns/op 0.28
mainnet_e81889 - altair afterProcessEpoch 44.397 ms/op 172.72 ms/op 0.26
capella processEpoch - mainnet_e217614 1.0480 s/op 1.6537 s/op 0.63
mainnet_e217614 - capella beforeProcessEpoch 64.286 ms/op 106.09 ms/op 0.61
mainnet_e217614 - capella processJustificationAndFinalization 5.4560 us/op 9.5690 us/op 0.57
mainnet_e217614 - capella processInactivityUpdates 14.515 ms/op 23.320 ms/op 0.62
mainnet_e217614 - capella processRewardsAndPenalties 175.78 ms/op 254.40 ms/op 0.69
mainnet_e217614 - capella processRegistryUpdates 6.6560 us/op 8.4300 us/op 0.79
mainnet_e217614 - capella processSlashings 188.00 ns/op 473.00 ns/op 0.40
mainnet_e217614 - capella processEth1DataReset 186.00 ns/op 272.00 ns/op 0.68
mainnet_e217614 - capella processEffectiveBalanceUpdates 6.7156 ms/op 7.6340 ms/op 0.88
mainnet_e217614 - capella processSlashingsReset 883.00 ns/op 1.1680 us/op 0.76
mainnet_e217614 - capella processRandaoMixesReset 1.1710 us/op 1.7480 us/op 0.67
mainnet_e217614 - capella processHistoricalRootsUpdate 187.00 ns/op 241.00 ns/op 0.78
mainnet_e217614 - capella processParticipationFlagUpdates 536.00 ns/op 693.00 ns/op 0.77
mainnet_e217614 - capella afterProcessEpoch 116.86 ms/op 205.82 ms/op 0.57
phase0 processEpoch - mainnet_e58758 271.01 ms/op 511.18 ms/op 0.53
mainnet_e58758 - phase0 beforeProcessEpoch 68.898 ms/op 110.56 ms/op 0.62
mainnet_e58758 - phase0 processJustificationAndFinalization 5.5200 us/op 12.467 us/op 0.44
mainnet_e58758 - phase0 processRewardsAndPenalties 36.105 ms/op 69.823 ms/op 0.52
mainnet_e58758 - phase0 processRegistryUpdates 3.2610 us/op 4.1390 us/op 0.79
mainnet_e58758 - phase0 processSlashings 186.00 ns/op 230.00 ns/op 0.81
mainnet_e58758 - phase0 processEth1DataReset 179.00 ns/op 331.00 ns/op 0.54
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1826 ms/op 4.6802 ms/op 0.25
mainnet_e58758 - phase0 processSlashingsReset 902.00 ns/op 1.9920 us/op 0.45
mainnet_e58758 - phase0 processRandaoMixesReset 1.1630 us/op 2.3420 us/op 0.50
mainnet_e58758 - phase0 processHistoricalRootsUpdate 183.00 ns/op 475.00 ns/op 0.39
mainnet_e58758 - phase0 processParticipationRecordUpdates 881.00 ns/op 2.3480 us/op 0.38
mainnet_e58758 - phase0 afterProcessEpoch 35.328 ms/op 60.024 ms/op 0.59
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.2827 ms/op 3.4061 ms/op 0.38
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 2.1108 ms/op 4.6406 ms/op 0.45
altair processInactivityUpdates - 250000 normalcase 16.301 ms/op 31.930 ms/op 0.51
altair processInactivityUpdates - 250000 worstcase 16.807 ms/op 26.815 ms/op 0.63
phase0 processRegistryUpdates - 250000 normalcase 6.2760 us/op 14.284 us/op 0.44
phase0 processRegistryUpdates - 250000 badcase_full_deposits 215.80 us/op 298.51 us/op 0.72
phase0 processRegistryUpdates - 250000 worstcase 0.5 102.14 ms/op 207.34 ms/op 0.49
altair processRewardsAndPenalties - 250000 normalcase 29.365 ms/op 38.527 ms/op 0.76
altair processRewardsAndPenalties - 250000 worstcase 27.381 ms/op 40.104 ms/op 0.68
phase0 getAttestationDeltas - 250000 normalcase 7.0980 ms/op 25.884 ms/op 0.27
phase0 getAttestationDeltas - 250000 worstcase 5.8400 ms/op 8.8795 ms/op 0.66
phase0 processSlashings - 250000 worstcase 78.997 us/op 89.998 us/op 0.88
altair processSyncCommitteeUpdates - 250000 10.952 ms/op 13.195 ms/op 0.83
BeaconState.hashTreeRoot - No change 222.00 ns/op 246.00 ns/op 0.90
BeaconState.hashTreeRoot - 1 full validator 97.268 us/op 119.78 us/op 0.81
BeaconState.hashTreeRoot - 32 full validator 771.75 us/op 2.0522 ms/op 0.38
BeaconState.hashTreeRoot - 512 full validator 8.9551 ms/op 13.370 ms/op 0.67
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 88.695 us/op 239.53 us/op 0.37
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6461 ms/op 4.0322 ms/op 0.41
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 22.515 ms/op 35.643 ms/op 0.63
BeaconState.hashTreeRoot - 1 balances 83.279 us/op 160.59 us/op 0.52
BeaconState.hashTreeRoot - 32 balances 801.66 us/op 1.7059 ms/op 0.47
BeaconState.hashTreeRoot - 512 balances 7.7936 ms/op 14.046 ms/op 0.55
BeaconState.hashTreeRoot - 250000 balances 146.53 ms/op 197.42 ms/op 0.74
aggregationBits - 2048 els - zipIndexesInBitList 21.855 us/op 25.298 us/op 0.86
byteArrayEquals 32 55.148 ns/op 69.301 ns/op 0.80
Buffer.compare 32 17.620 ns/op 20.446 ns/op 0.86
byteArrayEquals 1024 1.6174 us/op 1.8226 us/op 0.89
Buffer.compare 1024 25.962 ns/op 30.290 ns/op 0.86
byteArrayEquals 16384 25.741 us/op 31.284 us/op 0.82
Buffer.compare 16384 207.57 ns/op 308.80 ns/op 0.67
byteArrayEquals 123687377 189.54 ms/op 325.97 ms/op 0.58
Buffer.compare 123687377 6.1277 ms/op 7.0256 ms/op 0.87
byteArrayEquals 32 - diff last byte 52.059 ns/op 87.454 ns/op 0.60
Buffer.compare 32 - diff last byte 17.042 ns/op 27.216 ns/op 0.63
byteArrayEquals 1024 - diff last byte 1.5727 us/op 1.9911 us/op 0.79
Buffer.compare 1024 - diff last byte 25.908 ns/op 32.054 ns/op 0.81
byteArrayEquals 16384 - diff last byte 25.057 us/op 31.390 us/op 0.80
Buffer.compare 16384 - diff last byte 199.89 ns/op 246.48 ns/op 0.81
byteArrayEquals 123687377 - diff last byte 194.36 ms/op 285.00 ms/op 0.68
Buffer.compare 123687377 - diff last byte 7.1839 ms/op 7.8382 ms/op 0.92
byteArrayEquals 32 - random bytes 5.2410 ns/op 7.8100 ns/op 0.67
Buffer.compare 32 - random bytes 17.560 ns/op 24.929 ns/op 0.70
byteArrayEquals 1024 - random bytes 5.2510 ns/op 7.9430 ns/op 0.66
Buffer.compare 1024 - random bytes 17.549 ns/op 32.699 ns/op 0.54
byteArrayEquals 16384 - random bytes 5.2480 ns/op 8.8450 ns/op 0.59
Buffer.compare 16384 - random bytes 17.572 ns/op 25.616 ns/op 0.69
byteArrayEquals 123687377 - random bytes 6.5600 ns/op 7.4800 ns/op 0.88
Buffer.compare 123687377 - random bytes 18.760 ns/op 24.950 ns/op 0.75
regular array get 100000 times 33.168 us/op 37.839 us/op 0.88
wrappedArray get 100000 times 33.170 us/op 42.374 us/op 0.78
arrayWithProxy get 100000 times 12.777 ms/op 15.478 ms/op 0.83
ssz.Root.equals 46.500 ns/op 56.703 ns/op 0.82
byteArrayEquals 45.566 ns/op 76.930 ns/op 0.59
Buffer.compare 10.509 ns/op 12.636 ns/op 0.83
processSlot - 1 slots 10.427 us/op 12.329 us/op 0.85
processSlot - 32 slots 2.0227 ms/op 4.3941 ms/op 0.46
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.8801 ms/op 3.4643 ms/op 0.83
getCommitteeAssignments - req 1 vs - 250000 vc 2.1086 ms/op 2.3717 ms/op 0.89
getCommitteeAssignments - req 100 vs - 250000 vc 4.0675 ms/op 5.0163 ms/op 0.81
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3263 ms/op 5.7572 ms/op 0.75
findModifiedValidators - 10000 modified validators 746.95 ms/op 956.95 ms/op 0.78
findModifiedValidators - 1000 modified validators 761.17 ms/op 822.68 ms/op 0.93
findModifiedValidators - 100 modified validators 267.54 ms/op 446.43 ms/op 0.60
findModifiedValidators - 10 modified validators 187.45 ms/op 408.01 ms/op 0.46
findModifiedValidators - 1 modified validators 166.03 ms/op 274.23 ms/op 0.61
findModifiedValidators - no difference 143.03 ms/op 169.74 ms/op 0.84
compare ViewDUs 6.0127 s/op 10.270 s/op 0.59
compare each validator Uint8Array 1.5127 s/op 2.1419 s/op 0.71
compare ViewDU to Uint8Array 1.1257 s/op 1.4981 s/op 0.75
migrate state 1000000 validators, 24 modified, 0 new 846.71 ms/op 1.5591 s/op 0.54
migrate state 1000000 validators, 1700 modified, 1000 new 1.1072 s/op 2.3939 s/op 0.46
migrate state 1000000 validators, 3400 modified, 2000 new 1.1646 s/op 1.4475 s/op 0.80
migrate state 1500000 validators, 24 modified, 0 new 777.76 ms/op 875.23 ms/op 0.89
migrate state 1500000 validators, 1700 modified, 1000 new 981.58 ms/op 1.0456 s/op 0.94
migrate state 1500000 validators, 3400 modified, 2000 new 1.2615 s/op 1.2577 s/op 1.00
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.3100 ns/op 5.3300 ns/op 0.81
state getBlockRootAtSlot - 250000 vs - 7PWei 676.12 ns/op 589.04 ns/op 1.15
naive computeProposerIndex 100000 validators 53.357 ms/op 54.202 ms/op 0.98
computeProposerIndex 100000 validators 1.5561 ms/op 1.6712 ms/op 0.93
naiveGetNextSyncCommitteeIndices 1000 validators 7.9636 s/op 8.9883 s/op 0.89
getNextSyncCommitteeIndices 1000 validators 115.38 ms/op 149.88 ms/op 0.77
naiveGetNextSyncCommitteeIndices 10000 validators 7.8884 s/op 9.3097 s/op 0.85
getNextSyncCommitteeIndices 10000 validators 112.65 ms/op 130.82 ms/op 0.86
naiveGetNextSyncCommitteeIndices 100000 validators 7.1453 s/op 10.610 s/op 0.67
getNextSyncCommitteeIndices 100000 validators 111.90 ms/op 184.16 ms/op 0.61
naive computeShuffledIndex 100000 validators 24.336 s/op 34.809 s/op 0.70
cached computeShuffledIndex 100000 validators 567.08 ms/op 680.41 ms/op 0.83
naive computeShuffledIndex 2000000 validators 468.01 s/op 1047.7 s/op 0.45
cached computeShuffledIndex 2000000 validators 36.680 s/op 110.89 s/op 0.33
computeProposers - vc 250000 624.88 us/op 2.2435 ms/op 0.28
computeEpochShuffling - vc 250000 41.986 ms/op 179.26 ms/op 0.23
getNextSyncCommittee - vc 250000 10.694 ms/op 46.604 ms/op 0.23
computeSigningRoot for AttestationData 20.582 us/op 112.54 us/op 0.18
hash AttestationData serialized data then Buffer.toString(base64) 1.6080 us/op 6.2235 us/op 0.26
toHexString serialized data 1.1257 us/op 7.9813 us/op 0.14
Buffer.toString(base64) 157.37 ns/op 487.27 ns/op 0.32
nodejs block root to RootHex using toHex 147.36 ns/op 378.21 ns/op 0.39
nodejs block root to RootHex using toRootHex 84.568 ns/op 279.88 ns/op 0.30
browser block root to RootHex using the deprecated toHexString 213.97 ns/op 603.58 ns/op 0.35
browser block root to RootHex using toHex 183.49 ns/op 772.31 ns/op 0.24
browser block root to RootHex using toRootHex 164.43 ns/op 752.49 ns/op 0.22

by benchmarkbot/action

Comment thread packages/types/src/fulu/sszTypes.ts Outdated
@wemeetagain wemeetagain changed the title refactor: block proposal refactor: block proposal cleanup Aug 13, 2025
Comment thread packages/validator/src/services/block.ts Outdated
Comment thread packages/api/src/beacon/routes/beacon/block.ts Outdated
Comment thread packages/types/src/deneb/sszTypes.ts Outdated
Comment thread packages/beacon-node/src/api/impl/beacon/blocks/index.ts Outdated
Comment thread packages/beacon-node/src/chain/chain.ts Outdated
Comment thread packages/beacon-node/src/chain/produceBlock/validateBlobsAndKzgCommitments.ts Outdated
Comment thread packages/validator/src/services/block.ts Outdated
Comment thread packages/state-transition/src/util/blindedBlock.ts Outdated
Co-authored-by: Nico Flaig <nflaig@protonmail.com>
@codecov

codecov Bot commented Aug 14, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 48.68914% with 137 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.19%. Comparing base (0c7dfe2) to head (d944135).
⚠️ Report is 4 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #8155      +/-   ##
============================================
- Coverage     54.23%   54.19%   -0.04%     
============================================
  Files           844      844              
  Lines         63482    63509      +27     
  Branches       4796     4795       -1     
============================================
- Hits          34428    34420       -8     
- Misses        28979    29013      +34     
- Partials         75       76       +1     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


let blockForImport: BlockInput, blobSidecars: deneb.BlobSidecars, dataColumnSidecars: fulu.DataColumnSidecars;

if (isDenebBlockContents(signedBlockContents)) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

considering deneb and fulu block contents are not quite the same, not sure I like this but I guess it's not the worst either

Comment thread packages/beacon-node/src/chain/chain.ts Outdated
Comment thread packages/state-transition/src/util/blindedBlock.ts Outdated
Comment thread packages/state-transition/src/util/blindedBlock.ts Outdated
const signedBlindedBlockOrBlockContents = blockContentsWrapper.executionPayloadBlinded
? {signedBlock}
: {signedBlock, ...blockContentsWrapper.blockContents};
delete (signedBlindedBlockOrBlockContents as {block?: BeaconBlock}).block; // remove block if present

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

well this is not great but BlockProposingService is a bit of a mess already, need to think about refactoring that at some point

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.

Yeah this file is bad...

nflaig
nflaig previously approved these changes Aug 14, 2025

@nflaig nflaig left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - overall removed more nasty stuff than it added 😅

@wemeetagain wemeetagain merged commit ece3887 into unstable Aug 15, 2025
39 of 45 checks passed
@wemeetagain wemeetagain deleted the cayman/block-proposal branch August 15, 2025 11:31
@wemeetagain

Copy link
Copy Markdown
Member Author

🎉 This PR is included in v1.34.0 🎉

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants