Skip to content

Conversation

@ensi321
Copy link
Contributor

@ensi321 ensi321 commented Apr 19, 2025

Relevant spec ethereum/consensus-specs#4277 and ethereum/beacon-APIs#529

Implement EIP-7892 as laid out in v1.6.0-alpha.0 for fusaka devnet-0. Any open spec PR which is not within the scope of devnet-0 will be implemented in a follow up PR

@ensi321 ensi321 changed the title feat: impelment BPO EIP-7892 feat: implement BPO EIP-7892 Apr 19, 2025
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

this kinda conflicts with #7774 but I think can simplify changes in this PR a lot

@nflaig
Copy link
Member

nflaig commented May 4, 2025

changes seems pretty isolated, I think it's better to target unstable branch instead and rebase/merge changes into peerDAS

@ensi321 ensi321 changed the base branch from peerDAS to unstable May 9, 2025 01:17
@ensi321 ensi321 changed the base branch from unstable to peerDAS May 9, 2025 01:19
@ensi321 ensi321 changed the base branch from peerDAS to unstable May 9, 2025 01:23
@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2025

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 2d3773b Previous: d4a1f16 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 833.52 us/op 1.0590 ms/op 0.79
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 30.898 us/op 38.672 us/op 0.80
BLS verify - blst 917.46 us/op 927.94 us/op 0.99
BLS verifyMultipleSignatures 3 - blst 1.3201 ms/op 1.7694 ms/op 0.75
BLS verifyMultipleSignatures 8 - blst 2.0697 ms/op 2.0664 ms/op 1.00
BLS verifyMultipleSignatures 32 - blst 4.6142 ms/op 6.0262 ms/op 0.77
BLS verifyMultipleSignatures 64 - blst 8.8338 ms/op 11.493 ms/op 0.77
BLS verifyMultipleSignatures 128 - blst 16.959 ms/op 19.364 ms/op 0.88
BLS deserializing 10000 signatures 653.61 ms/op 785.14 ms/op 0.83
BLS deserializing 100000 signatures 6.3900 s/op 7.3921 s/op 0.86
BLS verifyMultipleSignatures - same message - 3 - blst 980.61 us/op 980.97 us/op 1.00
BLS verifyMultipleSignatures - same message - 8 - blst 1.0676 ms/op 1.0821 ms/op 0.99
BLS verifyMultipleSignatures - same message - 32 - blst 1.6862 ms/op 1.8443 ms/op 0.91
BLS verifyMultipleSignatures - same message - 64 - blst 2.4752 ms/op 2.7617 ms/op 0.90
BLS verifyMultipleSignatures - same message - 128 - blst 4.2651 ms/op 4.6483 ms/op 0.92
BLS aggregatePubkeys 32 - blst 18.001 us/op 20.890 us/op 0.86
BLS aggregatePubkeys 128 - blst 63.542 us/op 74.236 us/op 0.86
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 50.477 ms/op 54.274 ms/op 0.93
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 57.569 ms/op 52.659 ms/op 1.09
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 42.096 ms/op 45.960 ms/op 0.92
getSlashingsAndExits - default max 95.076 us/op 78.736 us/op 1.21
getSlashingsAndExits - 2k 319.85 us/op 368.60 us/op 0.87
proposeBlockBody type=full, size=empty 5.1950 ms/op 6.6811 ms/op 0.78
isKnown best case - 1 super set check 401.00 ns/op 212.00 ns/op 1.89
isKnown normal case - 2 super set checks 399.00 ns/op 210.00 ns/op 1.90
isKnown worse case - 16 super set checks 403.00 ns/op 212.00 ns/op 1.90
InMemoryCheckpointStateCache - add get delete 2.4500 us/op 2.7140 us/op 0.90
validate api signedAggregateAndProof - struct 1.4708 ms/op 1.4182 ms/op 1.04
validate gossip signedAggregateAndProof - struct 1.4734 ms/op 1.6126 ms/op 0.91
batch validate gossip attestation - vc 640000 - chunk 32 110.96 us/op 119.73 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 64 96.068 us/op 106.33 us/op 0.90
batch validate gossip attestation - vc 640000 - chunk 128 87.588 us/op 100.47 us/op 0.87
batch validate gossip attestation - vc 640000 - chunk 256 89.321 us/op 105.78 us/op 0.84
pickEth1Vote - no votes 798.76 us/op 1.0200 ms/op 0.78
pickEth1Vote - max votes 5.2666 ms/op 7.9916 ms/op 0.66
pickEth1Vote - Eth1Data hashTreeRoot value x2048 9.9860 ms/op 13.144 ms/op 0.76
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 20.874 ms/op 18.734 ms/op 1.11
pickEth1Vote - Eth1Data fastSerialize value x2048 439.89 us/op 478.37 us/op 0.92
pickEth1Vote - Eth1Data fastSerialize tree x2048 2.6736 ms/op 2.2791 ms/op 1.17
bytes32 toHexString 526.00 ns/op 386.00 ns/op 1.36
bytes32 Buffer.toString(hex) 414.00 ns/op 274.00 ns/op 1.51
bytes32 Buffer.toString(hex) from Uint8Array 507.00 ns/op 364.00 ns/op 1.39
bytes32 Buffer.toString(hex) + 0x 423.00 ns/op 292.00 ns/op 1.45
Object access 1 prop 0.31300 ns/op 0.15700 ns/op 1.99
Map access 1 prop 0.31900 ns/op 0.15500 ns/op 2.06
Object get x1000 5.1540 ns/op 6.0100 ns/op 0.86
Map get x1000 5.5920 ns/op 6.5740 ns/op 0.85
Object set x1000 20.926 ns/op 30.654 ns/op 0.68
Map set x1000 17.176 ns/op 20.693 ns/op 0.83
Return object 10000 times 0.28920 ns/op 0.30220 ns/op 0.96
Throw Error 10000 times 3.5317 us/op 4.5230 us/op 0.78
toHex 105.91 ns/op 166.68 ns/op 0.64
Buffer.from 94.895 ns/op 147.08 ns/op 0.65
shared Buffer 61.804 ns/op 91.663 ns/op 0.67
fastMsgIdFn sha256 / 200 bytes 1.8840 us/op 2.4420 us/op 0.77
fastMsgIdFn h32 xxhash / 200 bytes 378.00 ns/op 243.00 ns/op 1.56
fastMsgIdFn h64 xxhash / 200 bytes 438.00 ns/op 328.00 ns/op 1.34
fastMsgIdFn sha256 / 1000 bytes 5.6400 us/op 7.7840 us/op 0.72
fastMsgIdFn h32 xxhash / 1000 bytes 501.00 ns/op 352.00 ns/op 1.42
fastMsgIdFn h64 xxhash / 1000 bytes 502.00 ns/op 389.00 ns/op 1.29
fastMsgIdFn sha256 / 10000 bytes 47.336 us/op 66.821 us/op 0.71
fastMsgIdFn h32 xxhash / 10000 bytes 1.8590 us/op 1.8610 us/op 1.00
fastMsgIdFn h64 xxhash / 10000 bytes 1.3100 us/op 1.2380 us/op 1.06
send data - 1000 256B messages 12.876 ms/op 13.347 ms/op 0.96
send data - 1000 512B messages 16.095 ms/op 18.821 ms/op 0.86
send data - 1000 1024B messages 23.743 ms/op 27.147 ms/op 0.87
send data - 1000 1200B messages 18.272 ms/op 23.373 ms/op 0.78
send data - 1000 2048B messages 20.326 ms/op 23.011 ms/op 0.88
send data - 1000 4096B messages 24.090 ms/op 26.714 ms/op 0.90
send data - 1000 16384B messages 62.865 ms/op 57.676 ms/op 1.09
send data - 1000 65536B messages 283.87 ms/op 239.49 ms/op 1.19
enrSubnets - fastDeserialize 64 bits 1.0230 us/op 956.00 ns/op 1.07
enrSubnets - ssz BitVector 64 bits 489.00 ns/op 347.00 ns/op 1.41
enrSubnets - fastDeserialize 4 bits 311.00 ns/op 154.00 ns/op 2.02
enrSubnets - ssz BitVector 4 bits 494.00 ns/op 345.00 ns/op 1.43
prioritizePeers score -10:0 att 32-0.1 sync 2-0 101.22 us/op 129.75 us/op 0.78
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 124.40 us/op 145.26 us/op 0.86
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 181.41 us/op 207.75 us/op 0.87
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 325.84 us/op 388.43 us/op 0.84
prioritizePeers score 0:0 att 64-1 sync 4-1 385.88 us/op 476.70 us/op 0.81
array of 16000 items push then shift 1.3085 us/op 1.6785 us/op 0.78
LinkedList of 16000 items push then shift 6.3330 ns/op 7.6870 ns/op 0.82
array of 16000 items push then pop 63.685 ns/op 82.785 ns/op 0.77
LinkedList of 16000 items push then pop 6.2580 ns/op 7.2910 ns/op 0.86
array of 24000 items push then shift 1.9316 us/op 2.5313 us/op 0.76
LinkedList of 24000 items push then shift 6.3650 ns/op 7.4840 ns/op 0.85
array of 24000 items push then pop 87.892 ns/op 109.94 ns/op 0.80
LinkedList of 24000 items push then pop 6.2280 ns/op 7.2690 ns/op 0.86
intersect bitArray bitLen 8 5.4550 ns/op 6.7780 ns/op 0.80
intersect array and set length 8 32.690 ns/op 39.922 ns/op 0.82
intersect bitArray bitLen 128 27.043 ns/op 31.488 ns/op 0.86
intersect array and set length 128 610.21 ns/op 654.29 ns/op 0.93
bitArray.getTrueBitIndexes() bitLen 128 1.1820 us/op 1.0300 us/op 1.15
bitArray.getTrueBitIndexes() bitLen 248 2.0560 us/op 1.8140 us/op 1.13
bitArray.getTrueBitIndexes() bitLen 512 3.7400 us/op 3.6950 us/op 1.01
Buffer.concat 32 items 1.0400 us/op 691.00 ns/op 1.51
Uint8Array.set 32 items 1.2470 us/op 1.4040 us/op 0.89
Buffer.copy 2.1660 us/op 2.0510 us/op 1.06
Uint8Array.set - with subarray 1.7800 us/op 2.0080 us/op 0.89
Uint8Array.set - without subarray 1.0480 us/op 1.7310 us/op 0.61
getUint32 - dataview 398.00 ns/op 213.00 ns/op 1.87
getUint32 - manual 328.00 ns/op 135.00 ns/op 2.43
Set add up to 64 items then delete first 1.8312 us/op 2.3175 us/op 0.79
OrderedSet add up to 64 items then delete first 2.8352 us/op 3.7129 us/op 0.76
Set add up to 64 items then delete last 2.0667 us/op 2.4612 us/op 0.84
OrderedSet add up to 64 items then delete last 3.1069 us/op 3.8740 us/op 0.80
Set add up to 64 items then delete middle 2.0691 us/op 2.6660 us/op 0.78
OrderedSet add up to 64 items then delete middle 4.7412 us/op 5.6857 us/op 0.83
Set add up to 128 items then delete first 4.2353 us/op 5.6587 us/op 0.75
OrderedSet add up to 128 items then delete first 6.6167 us/op 8.2483 us/op 0.80
Set add up to 128 items then delete last 3.9755 us/op 6.0416 us/op 0.66
OrderedSet add up to 128 items then delete last 6.4047 us/op 8.1392 us/op 0.79
Set add up to 128 items then delete middle 4.0471 us/op 5.7006 us/op 0.71
OrderedSet add up to 128 items then delete middle 13.696 us/op 14.946 us/op 0.92
Set add up to 256 items then delete first 8.1320 us/op 11.911 us/op 0.68
OrderedSet add up to 256 items then delete first 13.410 us/op 17.459 us/op 0.77
Set add up to 256 items then delete last 7.8355 us/op 10.773 us/op 0.73
OrderedSet add up to 256 items then delete last 12.223 us/op 14.974 us/op 0.82
Set add up to 256 items then delete middle 7.9025 us/op 9.9985 us/op 0.79
OrderedSet add up to 256 items then delete middle 37.473 us/op 43.633 us/op 0.86
transfer serialized Status (84 B) 2.1430 us/op 2.3830 us/op 0.90
copy serialized Status (84 B) 1.7070 us/op 1.2970 us/op 1.32
transfer serialized SignedVoluntaryExit (112 B) 2.3390 us/op 2.3660 us/op 0.99
copy serialized SignedVoluntaryExit (112 B) 1.6250 us/op 1.3170 us/op 1.23
transfer serialized ProposerSlashing (416 B) 2.6180 us/op 2.4440 us/op 1.07
copy serialized ProposerSlashing (416 B) 1.9690 us/op 1.3730 us/op 1.43
transfer serialized Attestation (485 B) 2.7380 us/op 2.4340 us/op 1.12
copy serialized Attestation (485 B) 1.6600 us/op 1.3290 us/op 1.25
transfer serialized AttesterSlashing (33232 B) 2.6430 us/op 2.4830 us/op 1.06
copy serialized AttesterSlashing (33232 B) 5.4850 us/op 3.6680 us/op 1.50
transfer serialized Small SignedBeaconBlock (128000 B) 2.9560 us/op 3.3470 us/op 0.88
copy serialized Small SignedBeaconBlock (128000 B) 14.677 us/op 9.8140 us/op 1.50
transfer serialized Avg SignedBeaconBlock (200000 B) 3.1660 us/op 3.6200 us/op 0.87
copy serialized Avg SignedBeaconBlock (200000 B) 21.440 us/op 16.034 us/op 1.34
transfer serialized BlobsSidecar (524380 B) 4.3440 us/op 3.7910 us/op 1.15
copy serialized BlobsSidecar (524380 B) 67.437 us/op 88.366 us/op 0.76
transfer serialized Big SignedBeaconBlock (1000000 B) 4.5320 us/op 4.0040 us/op 1.13
copy serialized Big SignedBeaconBlock (1000000 B) 125.47 us/op 155.05 us/op 0.81
pass gossip attestations to forkchoice per slot 2.4189 ms/op 2.8103 ms/op 0.86
forkChoice updateHead vc 100000 bc 64 eq 0 364.58 us/op 470.61 us/op 0.77
forkChoice updateHead vc 600000 bc 64 eq 0 2.5890 ms/op 2.9107 ms/op 0.89
forkChoice updateHead vc 1000000 bc 64 eq 0 4.0253 ms/op 4.9174 ms/op 0.82
forkChoice updateHead vc 600000 bc 320 eq 0 2.4592 ms/op 2.9223 ms/op 0.84
forkChoice updateHead vc 600000 bc 1200 eq 0 2.2272 ms/op 2.9124 ms/op 0.76
forkChoice updateHead vc 600000 bc 7200 eq 0 2.9264 ms/op 3.2019 ms/op 0.91
forkChoice updateHead vc 600000 bc 64 eq 1000 9.7818 ms/op 10.668 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 10000 9.7515 ms/op 10.633 ms/op 0.92
forkChoice updateHead vc 600000 bc 64 eq 300000 11.835 ms/op 13.604 ms/op 0.87
computeDeltas 500000 validators 300 proto nodes 3.2144 ms/op 4.0276 ms/op 0.80
computeDeltas 500000 validators 1200 proto nodes 3.2380 ms/op 4.0311 ms/op 0.80
computeDeltas 500000 validators 7200 proto nodes 3.2305 ms/op 4.3442 ms/op 0.74
computeDeltas 750000 validators 300 proto nodes 4.8362 ms/op 6.8432 ms/op 0.71
computeDeltas 750000 validators 1200 proto nodes 4.7673 ms/op 6.8048 ms/op 0.70
computeDeltas 750000 validators 7200 proto nodes 4.8347 ms/op 6.9824 ms/op 0.69
computeDeltas 1400000 validators 300 proto nodes 9.1953 ms/op 13.072 ms/op 0.70
computeDeltas 1400000 validators 1200 proto nodes 8.8637 ms/op 13.982 ms/op 0.63
computeDeltas 1400000 validators 7200 proto nodes 8.9193 ms/op 13.835 ms/op 0.64
computeDeltas 2100000 validators 300 proto nodes 12.978 ms/op 21.441 ms/op 0.61
computeDeltas 2100000 validators 1200 proto nodes 12.631 ms/op 21.343 ms/op 0.59
computeDeltas 2100000 validators 7200 proto nodes 13.080 ms/op 20.483 ms/op 0.64
altair processAttestation - 250000 vs - 7PWei normalcase 2.2087 ms/op 3.5839 ms/op 0.62
altair processAttestation - 250000 vs - 7PWei worstcase 2.6940 ms/op 3.6306 ms/op 0.74
altair processAttestation - setStatus - 1/6 committees join 105.96 us/op 174.10 us/op 0.61
altair processAttestation - setStatus - 1/3 committees join 226.24 us/op 326.66 us/op 0.69
altair processAttestation - setStatus - 1/2 committees join 294.62 us/op 437.17 us/op 0.67
altair processAttestation - setStatus - 2/3 committees join 390.10 us/op 593.05 us/op 0.66
altair processAttestation - setStatus - 4/5 committees join 531.59 us/op 812.17 us/op 0.65
altair processAttestation - setStatus - 100% committees join 629.08 us/op 910.96 us/op 0.69
altair processBlock - 250000 vs - 7PWei normalcase 4.5002 ms/op 5.4792 ms/op 0.82
altair processBlock - 250000 vs - 7PWei normalcase hashState 34.052 ms/op 36.594 ms/op 0.93
altair processBlock - 250000 vs - 7PWei worstcase 38.481 ms/op 44.469 ms/op 0.87
altair processBlock - 250000 vs - 7PWei worstcase hashState 82.037 ms/op 85.154 ms/op 0.96
phase0 processBlock - 250000 vs - 7PWei normalcase 1.8202 ms/op 1.9211 ms/op 0.95
phase0 processBlock - 250000 vs - 7PWei worstcase 26.088 ms/op 30.309 ms/op 0.86
altair processEth1Data - 250000 vs - 7PWei normalcase 284.51 us/op 407.76 us/op 0.70
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 6.6330 us/op 6.5650 us/op 1.01
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 35.244 us/op 59.111 us/op 0.60
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 9.4580 us/op 16.888 us/op 0.56
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.7070 us/op 7.7860 us/op 0.73
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 149.17 us/op 203.01 us/op 0.73
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.3565 ms/op 2.3939 ms/op 0.57
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.8733 ms/op 2.4825 ms/op 0.75
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 1.8247 ms/op 2.9465 ms/op 0.62
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 3.8210 ms/op 5.3469 ms/op 0.71
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.8915 ms/op 2.8788 ms/op 0.66
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.8714 ms/op 5.5973 ms/op 0.69
Tree 40 250000 create 389.45 ms/op 507.92 ms/op 0.77
Tree 40 250000 get(125000) 106.15 ns/op 159.14 ns/op 0.67
Tree 40 250000 set(125000) 1.4748 us/op 2.0386 us/op 0.72
Tree 40 250000 toArray() 15.933 ms/op 23.043 ms/op 0.69
Tree 40 250000 iterate all - toArray() + loop 12.300 ms/op 23.085 ms/op 0.53
Tree 40 250000 iterate all - get(i) 47.737 ms/op 66.868 ms/op 0.71
Array 250000 create 2.0636 ms/op 3.0998 ms/op 0.67
Array 250000 clone - spread 675.44 us/op 1.8218 ms/op 0.37
Array 250000 get(125000) 0.58500 ns/op 0.47200 ns/op 1.24
Array 250000 set(125000) 0.59700 ns/op 0.50100 ns/op 1.19
Array 250000 iterate all - loop 78.092 us/op 86.276 us/op 0.91
phase0 afterProcessEpoch - 250000 vs - 7PWei 40.372 ms/op 48.539 ms/op 0.83
Array.fill - length 1000000 2.4819 ms/op 6.1151 ms/op 0.41
Array push - length 1000000 9.9671 ms/op 20.383 ms/op 0.49
Array.get 0.26771 ns/op 0.31801 ns/op 0.84
Uint8Array.get 0.33474 ns/op 0.47946 ns/op 0.70
phase0 beforeProcessEpoch - 250000 vs - 7PWei 21.708 ms/op 19.599 ms/op 1.11
altair processEpoch - mainnet_e81889 279.57 ms/op 306.39 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 17.131 ms/op 25.458 ms/op 0.67
mainnet_e81889 - altair processJustificationAndFinalization 6.1650 us/op 6.2570 us/op 0.99
mainnet_e81889 - altair processInactivityUpdates 3.6563 ms/op 4.8453 ms/op 0.75
mainnet_e81889 - altair processRewardsAndPenalties 42.016 ms/op 43.750 ms/op 0.96
mainnet_e81889 - altair processRegistryUpdates 906.00 ns/op 863.00 ns/op 1.05
mainnet_e81889 - altair processSlashings 393.00 ns/op 225.00 ns/op 1.75
mainnet_e81889 - altair processEth1DataReset 469.00 ns/op 206.00 ns/op 2.28
mainnet_e81889 - altair processEffectiveBalanceUpdates 962.40 us/op 1.4690 ms/op 0.66
mainnet_e81889 - altair processSlashingsReset 1.1250 us/op 1.1020 us/op 1.02
mainnet_e81889 - altair processRandaoMixesReset 1.4440 us/op 1.2950 us/op 1.12
mainnet_e81889 - altair processHistoricalRootsUpdate 407.00 ns/op 215.00 ns/op 1.89
mainnet_e81889 - altair processParticipationFlagUpdates 757.00 ns/op 568.00 ns/op 1.33
mainnet_e81889 - altair processSyncCommitteeUpdates 366.00 ns/op 164.00 ns/op 2.23
mainnet_e81889 - altair afterProcessEpoch 41.630 ms/op 51.841 ms/op 0.80
capella processEpoch - mainnet_e217614 1.0712 s/op 1.0265 s/op 1.04
mainnet_e217614 - capella beforeProcessEpoch 58.623 ms/op 67.667 ms/op 0.87
mainnet_e217614 - capella processJustificationAndFinalization 4.5800 us/op 6.0830 us/op 0.75
mainnet_e217614 - capella processInactivityUpdates 11.521 ms/op 16.082 ms/op 0.72
mainnet_e217614 - capella processRewardsAndPenalties 200.54 ms/op 193.67 ms/op 1.04
mainnet_e217614 - capella processRegistryUpdates 6.9470 us/op 7.5740 us/op 0.92
mainnet_e217614 - capella processSlashings 397.00 ns/op 198.00 ns/op 2.01
mainnet_e217614 - capella processEth1DataReset 395.00 ns/op 201.00 ns/op 1.97
mainnet_e217614 - capella processEffectiveBalanceUpdates 12.350 ms/op 4.5439 ms/op 2.72
mainnet_e217614 - capella processSlashingsReset 997.00 ns/op 1.0980 us/op 0.91
mainnet_e217614 - capella processRandaoMixesReset 1.4880 us/op 1.5080 us/op 0.99
mainnet_e217614 - capella processHistoricalRootsUpdate 435.00 ns/op 223.00 ns/op 1.95
mainnet_e217614 - capella processParticipationFlagUpdates 760.00 ns/op 585.00 ns/op 1.30
mainnet_e217614 - capella afterProcessEpoch 109.39 ms/op 124.12 ms/op 0.88
phase0 processEpoch - mainnet_e58758 308.79 ms/op 323.36 ms/op 0.95
mainnet_e58758 - phase0 beforeProcessEpoch 85.303 ms/op 84.590 ms/op 1.01
mainnet_e58758 - phase0 processJustificationAndFinalization 5.9670 us/op 7.0160 us/op 0.85
mainnet_e58758 - phase0 processRewardsAndPenalties 42.185 ms/op 41.253 ms/op 1.02
mainnet_e58758 - phase0 processRegistryUpdates 4.0400 us/op 3.6860 us/op 1.10
mainnet_e58758 - phase0 processSlashings 444.00 ns/op 192.00 ns/op 2.31
mainnet_e58758 - phase0 processEth1DataReset 409.00 ns/op 196.00 ns/op 2.09
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 3.0531 ms/op 1.2679 ms/op 2.41
mainnet_e58758 - phase0 processSlashingsReset 1.2440 us/op 970.00 ns/op 1.28
mainnet_e58758 - phase0 processRandaoMixesReset 1.5950 us/op 1.2930 us/op 1.23
mainnet_e58758 - phase0 processHistoricalRootsUpdate 413.00 ns/op 201.00 ns/op 2.05
mainnet_e58758 - phase0 processParticipationRecordUpdates 1.3090 us/op 978.00 ns/op 1.34
mainnet_e58758 - phase0 afterProcessEpoch 34.612 ms/op 38.042 ms/op 0.91
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.0390 ms/op 1.3752 ms/op 0.76
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.5664 ms/op 1.9351 ms/op 0.81
altair processInactivityUpdates - 250000 normalcase 18.685 ms/op 19.303 ms/op 0.97
altair processInactivityUpdates - 250000 worstcase 20.767 ms/op 21.729 ms/op 0.96
phase0 processRegistryUpdates - 250000 normalcase 6.9120 us/op 5.3540 us/op 1.29
phase0 processRegistryUpdates - 250000 badcase_full_deposits 325.89 us/op 297.75 us/op 1.09
phase0 processRegistryUpdates - 250000 worstcase 0.5 117.89 ms/op 111.10 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 27.674 ms/op 29.866 ms/op 0.93
altair processRewardsAndPenalties - 250000 worstcase 27.643 ms/op 26.889 ms/op 1.03
phase0 getAttestationDeltas - 250000 normalcase 6.8271 ms/op 6.9669 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 6.9469 ms/op 6.8709 ms/op 1.01
phase0 processSlashings - 250000 worstcase 100.49 us/op 95.821 us/op 1.05
altair processSyncCommitteeUpdates - 250000 11.549 ms/op 10.912 ms/op 1.06
BeaconState.hashTreeRoot - No change 532.00 ns/op 270.00 ns/op 1.97
BeaconState.hashTreeRoot - 1 full validator 87.663 us/op 85.475 us/op 1.03
BeaconState.hashTreeRoot - 32 full validator 897.95 us/op 913.29 us/op 0.98
BeaconState.hashTreeRoot - 512 full validator 13.051 ms/op 12.161 ms/op 1.07
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 110.77 us/op 126.10 us/op 0.88
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6345 ms/op 2.2595 ms/op 0.72
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.517 ms/op 29.456 ms/op 0.80
BeaconState.hashTreeRoot - 1 balances 85.773 us/op 91.577 us/op 0.94
BeaconState.hashTreeRoot - 32 balances 582.01 us/op 1.2669 ms/op 0.46
BeaconState.hashTreeRoot - 512 balances 7.3976 ms/op 9.3565 ms/op 0.79
BeaconState.hashTreeRoot - 250000 balances 148.92 ms/op 214.03 ms/op 0.70
aggregationBits - 2048 els - zipIndexesInBitList 21.794 us/op 21.375 us/op 1.02
byteArrayEquals 32 50.350 ns/op 53.399 ns/op 0.94
Buffer.compare 32 16.088 ns/op 17.642 ns/op 0.91
byteArrayEquals 1024 1.3216 us/op 1.5741 us/op 0.84
Buffer.compare 1024 24.873 ns/op 25.470 ns/op 0.98
byteArrayEquals 16384 20.841 us/op 25.105 us/op 0.83
Buffer.compare 16384 200.08 ns/op 203.95 ns/op 0.98
byteArrayEquals 123687377 157.70 ms/op 193.01 ms/op 0.82
Buffer.compare 123687377 6.2940 ms/op 6.8940 ms/op 0.91
byteArrayEquals 32 - diff last byte 46.371 ns/op 53.650 ns/op 0.86
Buffer.compare 32 - diff last byte 15.383 ns/op 17.442 ns/op 0.88
byteArrayEquals 1024 - diff last byte 1.2417 us/op 1.6166 us/op 0.77
Buffer.compare 1024 - diff last byte 21.888 ns/op 25.879 ns/op 0.85
byteArrayEquals 16384 - diff last byte 19.645 us/op 25.760 us/op 0.76
Buffer.compare 16384 - diff last byte 168.77 ns/op 200.14 ns/op 0.84
byteArrayEquals 123687377 - diff last byte 151.57 ms/op 201.23 ms/op 0.75
Buffer.compare 123687377 - diff last byte 4.6480 ms/op 9.1838 ms/op 0.51
byteArrayEquals 32 - random bytes 4.9750 ns/op 5.4940 ns/op 0.91
Buffer.compare 32 - random bytes 16.753 ns/op 18.901 ns/op 0.89
byteArrayEquals 1024 - random bytes 5.0130 ns/op 5.4900 ns/op 0.91
Buffer.compare 1024 - random bytes 16.484 ns/op 19.825 ns/op 0.83
byteArrayEquals 16384 - random bytes 4.9860 ns/op 5.6550 ns/op 0.88
Buffer.compare 16384 - random bytes 25.281 ns/op 19.468 ns/op 1.30
byteArrayEquals 123687377 - random bytes 9.5000 ns/op 6.7900 ns/op 1.40
Buffer.compare 123687377 - random bytes 19.440 ns/op 20.130 ns/op 0.97
regular array get 100000 times 31.383 us/op 35.688 us/op 0.88
wrappedArray get 100000 times 31.303 us/op 34.156 us/op 0.92
arrayWithProxy get 100000 times 9.5769 ms/op 13.213 ms/op 0.72
ssz.Root.equals 44.698 ns/op 49.027 ns/op 0.91
byteArrayEquals 40.757 ns/op 47.933 ns/op 0.85
Buffer.compare 9.1780 ns/op 11.329 ns/op 0.81
processSlot - 1 slots 9.1290 us/op 10.802 us/op 0.85
processSlot - 32 slots 2.1623 ms/op 2.1525 ms/op 1.00
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 2.2392 ms/op 3.6421 ms/op 0.61
getCommitteeAssignments - req 1 vs - 250000 vc 1.8270 ms/op 2.2184 ms/op 0.82
getCommitteeAssignments - req 100 vs - 250000 vc 3.6009 ms/op 4.3890 ms/op 0.82
getCommitteeAssignments - req 1000 vs - 250000 vc 3.8782 ms/op 4.7033 ms/op 0.82
findModifiedValidators - 10000 modified validators 829.10 ms/op 863.83 ms/op 0.96
findModifiedValidators - 1000 modified validators 708.65 ms/op 782.61 ms/op 0.91
findModifiedValidators - 100 modified validators 244.87 ms/op 289.62 ms/op 0.85
findModifiedValidators - 10 modified validators 158.45 ms/op 150.34 ms/op 1.05
findModifiedValidators - 1 modified validators 132.71 ms/op 150.37 ms/op 0.88
findModifiedValidators - no difference 163.28 ms/op 173.82 ms/op 0.94
compare ViewDUs 6.5103 s/op 6.5508 s/op 0.99
compare each validator Uint8Array 1.6906 s/op 1.5839 s/op 1.07
compare ViewDU to Uint8Array 1.1470 s/op 1.2174 s/op 0.94
migrate state 1000000 validators, 24 modified, 0 new 1.0092 s/op 939.70 ms/op 1.07
migrate state 1000000 validators, 1700 modified, 1000 new 1.2442 s/op 1.2625 s/op 0.99
migrate state 1000000 validators, 3400 modified, 2000 new 1.1679 s/op 1.3863 s/op 0.84
migrate state 1500000 validators, 24 modified, 0 new 891.20 ms/op 909.49 ms/op 0.98
migrate state 1500000 validators, 1700 modified, 1000 new 1.2626 s/op 1.2074 s/op 1.05
migrate state 1500000 validators, 3400 modified, 2000 new 1.2338 s/op 1.2984 s/op 0.95
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 6.2400 ns/op 4.6500 ns/op 1.34
state getBlockRootAtSlot - 250000 vs - 7PWei 663.05 ns/op 864.51 ns/op 0.77
naive computeProposerIndex 100000 validators 51.384 ms/op 54.758 ms/op 0.94
computeProposerIndex 100000 validators 1.3554 ms/op 1.6027 ms/op 0.85
naiveGetNextSyncCommitteeIndices 1000 validators 6.8072 s/op 7.2934 s/op 0.93
getNextSyncCommitteeIndices 1000 validators 100.41 ms/op 112.71 ms/op 0.89
naiveGetNextSyncCommitteeIndices 10000 validators 6.2215 s/op 8.5940 s/op 0.72
getNextSyncCommitteeIndices 10000 validators 97.670 ms/op 126.36 ms/op 0.77
naiveGetNextSyncCommitteeIndices 100000 validators 6.1892 s/op 7.3672 s/op 0.84
getNextSyncCommitteeIndices 100000 validators 98.263 ms/op 112.40 ms/op 0.87
naive computeShuffledIndex 100000 validators 20.912 s/op 21.210 s/op 0.99
cached computeShuffledIndex 100000 validators 496.38 ms/op 541.96 ms/op 0.92
naive computeShuffledIndex 2000000 validators 416.59 s/op 514.86 s/op 0.81
cached computeShuffledIndex 2000000 validators 14.668 s/op 42.134 s/op 0.35
computeProposers - vc 250000 545.63 us/op 653.86 us/op 0.83
computeEpochShuffling - vc 250000 38.524 ms/op 43.889 ms/op 0.88
getNextSyncCommittee - vc 250000 9.5787 ms/op 11.781 ms/op 0.81
computeSigningRoot for AttestationData 17.124 us/op 24.172 us/op 0.71
hash AttestationData serialized data then Buffer.toString(base64) 1.1966 us/op 1.6564 us/op 0.72
toHexString serialized data 1.0175 us/op 1.3183 us/op 0.77
Buffer.toString(base64) 111.68 ns/op 181.00 ns/op 0.62
nodejs block root to RootHex using toHex 111.18 ns/op 161.94 ns/op 0.69
nodejs block root to RootHex using toRootHex 73.590 ns/op 103.09 ns/op 0.71
browser block root to RootHex using the deprecated toHexString 258.35 ns/op 238.95 ns/op 1.08
browser block root to RootHex using toHex 156.32 ns/op 189.16 ns/op 0.83
browser block root to RootHex using toRootHex 148.73 ns/op 167.28 ns/op 0.89

by benchmarkbot/action

@codecov
Copy link

codecov bot commented May 13, 2025

Codecov Report

Attention: Patch coverage is 73.00000% with 27 lines in your changes missing coverage. Please review.

Project coverage is 55.82%. Comparing base (3adfdb7) to head (5371e1e).
Report is 3 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #7729      +/-   ##
============================================
+ Coverage     55.78%   55.82%   +0.04%     
============================================
  Files           823      823              
  Lines         58093    58157      +64     
  Branches       4470     4498      +28     
============================================
+ Hits          32406    32466      +60     
- Misses        25620    25624       +4     
  Partials         67       67              
🚀 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.

@ensi321 ensi321 marked this pull request as ready for review May 14, 2025 07:45
@ensi321 ensi321 requested a review from a team as a code owner May 14, 2025 07:45
getMaxBlobsPerBlock(fork: ForkName): number;
getMaxBlobsPerBlock(epoch: Epoch): number;
/** Get max request blob sidecars by hard-fork */
getMaxRequestBlobSidecars(fork: ForkName): number;
Copy link
Member

@nflaig nflaig May 16, 2025

Choose a reason for hiding this comment

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

might also wanna update getMaxRequestBlobSidecars but it might be removed soon and we might be fine just calculating it where we need it

Copy link
Member

Choose a reason for hiding this comment

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

maybe we get rid of this function altogether and always calculate the value as proposed in ethereum/consensus-specs#4322

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we get rid of this function altogether and always calculate the value as proposed in ethereum/consensus-specs#4322

This change will likely be in devnet 1. Will follow up in another PR

Copy link
Member

Choose a reason for hiding this comment

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

This change will likely be in devnet 1. Will follow up in another PR

In devnet-0 the req/resp limits will be wrong then, we should consider doing this already for that devnet, can do it in a separate PR though to keep diff minimal here and focus on blob schedule changes

Copy link
Contributor Author

Choose a reason for hiding this comment

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

might also wanna update getMaxRequestBlobSidecars but it might be removed soon and we might be fine just calculating it where we need it

As pointed out here #7729 (comment) , devnet-0 is still using MAX_BLOBS_PER_BLOCK_ELECTRA and MAX_BLOBS_PER_BLOCK for electra and deneb.

Can hold off making this change until devnet-1

Copy link
Member

Choose a reason for hiding this comment

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

But still, we need to update those values for fulu and later, otherwise we keep using the electra values, I don't think it's a big deal though

MAX_BLOB_COMMITMENTS_PER_BLOCK: denebForkRelevant,
KZG_COMMITMENT_INCLUSION_PROOF_DEPTH: denebForkRelevant,
MAX_BLOBS_PER_BLOCK: denebForkRelevant,
BLOB_SCHEDULE: denebForkRelevant,
Copy link
Member

@nflaig nflaig May 20, 2025

Choose a reason for hiding this comment

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

this will be problematic, if a beacon node does not yet have BLOB_SCHEDULE or didn't backport deneb/electra values then it won't be able to interop with lodestar vc which is really bad since Obol uses it as primary vc

I think we need to add this as fuluForkRelevant for now, we lose some checks on deneb/electra values but that should be fine, might make it stricter once we know majority/all bns implemented this, or earliest in the backport PR when we remove previous constants

Copy link
Member

Choose a reason for hiding this comment

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

updated in f3a0367, I don't see any other solution

nflaig
nflaig previously approved these changes May 20, 2025
Copy link
Member

@nflaig nflaig left a comment

Choose a reason for hiding this comment

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

LGTM

@ensi321
Copy link
Contributor Author

ensi321 commented May 21, 2025

Just realized back port blob schedule to Deneb and Electra is not part of fusaka devnet-0 but devnet-1.

Updated to reflect this.

Copy link
Member

@matthewkeil matthewkeil left a comment

Choose a reason for hiding this comment

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

LGTM!! 🚀

@nflaig nflaig merged commit 011a0c4 into unstable May 21, 2025
20 checks passed
@nflaig nflaig deleted the nc/BPO branch May 21, 2025 10:27
ensi321 pushed a commit that referenced this pull request May 22, 2025
**Motivation**

Follow up to #7729, we need to
configure blob schedule for each network. This will become relevant once
we fully backport blob schedule to deneb and electra.

**Description**

Add blob schedule to each network config
nflaig added a commit that referenced this pull request May 27, 2025
…ms (#7859)

**Motivation**

Follow up to #7729, we need to
handle blob schedule separately from generic string comparison of
values, otherwise what we compare are shallow stringified arrays. It
does not validate the object properties and on length mismatch we just
get the following error

```
✖ Error: Local and remote configs are different
BLOB_SCHEDULE different value: [object object] != [object object],[object object]
```

**Description**

Add special handling for blob schedule when asserting equal params
- deserialize and sort blob schedules
- compare length of local and remote blob schedule
- then check each entry by comparing `EPOCH` and `MAX_BLOBS_PER_BLOCK`
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.31.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.

5 participants