Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: placeholder PR for electra #6352

Draft
wants to merge 46 commits into
base: unstable
Choose a base branch
from
Draft

feat: placeholder PR for electra #6352

wants to merge 46 commits into from

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Jan 24, 2024

Copy link

codecov bot commented Jan 25, 2024

Codecov Report

Attention: Patch coverage is 73.20526% with 265 lines in your changes are missing coverage. Please review.

Project coverage is 61.87%. Comparing base (8c55820) to head (488d853).
Report is 11 commits behind head on unstable.

Current head 488d853 differs from pull request most recent head 6573be5

Please upload reports for the commit 6573be5 to get more accurate results.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6352      +/-   ##
============================================
- Coverage     61.88%   61.87%   -0.02%     
============================================
  Files           562      559       -3     
  Lines         59309    58842     -467     
  Branches       1916     1847      -69     
============================================
- Hits          36703    36408     -295     
+ Misses        22563    22397     -166     
+ Partials         43       37       -6     

Copy link
Contributor

github-actions bot commented Jan 25, 2024

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: d7f00de Previous: 7e14c5e Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 870.39 us/op 873.54 us/op 1.00
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 57.746 us/op 58.731 us/op 0.98
BLS verify - blst-native 1.1433 ms/op 1.1187 ms/op 1.02
BLS verifyMultipleSignatures 3 - blst-native 2.3309 ms/op 2.1561 ms/op 1.08
BLS verifyMultipleSignatures 8 - blst-native 4.9813 ms/op 4.7059 ms/op 1.06
BLS verifyMultipleSignatures 32 - blst-native 18.091 ms/op 17.272 ms/op 1.05
BLS verifyMultipleSignatures 64 - blst-native 33.674 ms/op 33.233 ms/op 1.01
BLS verifyMultipleSignatures 128 - blst-native 68.639 ms/op 65.550 ms/op 1.05
BLS deserializing 10000 signatures 805.93 ms/op 784.99 ms/op 1.03
BLS deserializing 100000 signatures 8.0559 s/op 7.7250 s/op 1.04
BLS verifyMultipleSignatures - same message - 3 - blst-native 1.1647 ms/op 1.0874 ms/op 1.07
BLS verifyMultipleSignatures - same message - 8 - blst-native 1.2885 ms/op 1.2461 ms/op 1.03
BLS verifyMultipleSignatures - same message - 32 - blst-native 2.1282 ms/op 1.9502 ms/op 1.09
BLS verifyMultipleSignatures - same message - 64 - blst-native 3.0450 ms/op 2.9095 ms/op 1.05
BLS verifyMultipleSignatures - same message - 128 - blst-native 4.8944 ms/op 4.7989 ms/op 1.02
BLS aggregatePubkeys 32 - blst-native 24.733 us/op 24.258 us/op 1.02
BLS aggregatePubkeys 128 - blst-native 94.735 us/op 92.793 us/op 1.02
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 46.199 ms/op 41.192 ms/op 1.12
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 38.972 ms/op 39.233 ms/op 0.99
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 21.272 ms/op 21.291 ms/op 1.00
getSlashingsAndExits - default max 154.88 us/op 169.10 us/op 0.92
getSlashingsAndExits - 2k 378.49 us/op 339.15 us/op 1.12
proposeBlockBody type=full, size=empty 6.0842 ms/op 3.6205 ms/op 1.68
isKnown best case - 1 super set check 214.00 ns/op 294.00 ns/op 0.73
isKnown normal case - 2 super set checks 214.00 ns/op 307.00 ns/op 0.70
isKnown worse case - 16 super set checks 215.00 ns/op 305.00 ns/op 0.70
InMemoryCheckpointStateCache - add get delete 4.4910 us/op 3.8270 us/op 1.17
updateUnfinalizedPubkeys - updating 10 pubkeys 831.28 us/op
updateUnfinalizedPubkeys - updating 100 pubkeys 6.5434 ms/op
updateUnfinalizedPubkeys - updating 1000 pubkeys 86.967 ms/op
validate api signedAggregateAndProof - struct 2.0438 ms/op 2.0722 ms/op 0.99
validate gossip signedAggregateAndProof - struct 2.1838 ms/op 1.9862 ms/op 1.10
validate gossip attestation - vc 640000 1.1621 ms/op 1.1123 ms/op 1.04
batch validate gossip attestation - vc 640000 - chunk 32 144.44 us/op 136.35 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 64 131.41 us/op 120.82 us/op 1.09
batch validate gossip attestation - vc 640000 - chunk 128 127.48 us/op 120.35 us/op 1.06
batch validate gossip attestation - vc 640000 - chunk 256 129.30 us/op 117.21 us/op 1.10
pickEth1Vote - no votes 971.88 us/op 856.81 us/op 1.13
pickEth1Vote - max votes 13.135 ms/op 11.793 ms/op 1.11
pickEth1Vote - Eth1Data hashTreeRoot value x2048 21.670 ms/op 19.279 ms/op 1.12
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 28.858 ms/op 28.998 ms/op 1.00
pickEth1Vote - Eth1Data fastSerialize value x2048 543.01 us/op 385.02 us/op 1.41
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.6011 ms/op 8.4114 ms/op 0.67
bytes32 toHexString 376.00 ns/op 441.00 ns/op 0.85
bytes32 Buffer.toString(hex) 217.00 ns/op 299.00 ns/op 0.73
bytes32 Buffer.toString(hex) from Uint8Array 445.00 ns/op 398.00 ns/op 1.12
bytes32 Buffer.toString(hex) + 0x 214.00 ns/op 299.00 ns/op 0.72
Object access 1 prop 0.17000 ns/op 0.18700 ns/op 0.91
Map access 1 prop 0.11400 ns/op 0.18400 ns/op 0.62
Object get x1000 5.0430 ns/op 4.9290 ns/op 1.02
Map get x1000 0.77900 ns/op 0.70500 ns/op 1.10
Object set x1000 43.540 ns/op 27.425 ns/op 1.59
Map set x1000 25.877 ns/op 16.911 ns/op 1.53
Return object 10000 times 0.22070 ns/op 0.21300 ns/op 1.04
Throw Error 10000 times 2.7255 us/op 2.5426 us/op 1.07
fastMsgIdFn sha256 / 200 bytes 1.9260 us/op 1.9050 us/op 1.01
fastMsgIdFn h32 xxhash / 200 bytes 271.00 ns/op 292.00 ns/op 0.93
fastMsgIdFn h64 xxhash / 200 bytes 289.00 ns/op 331.00 ns/op 0.87
fastMsgIdFn sha256 / 1000 bytes 6.1720 us/op 5.9290 us/op 1.04
fastMsgIdFn h32 xxhash / 1000 bytes 388.00 ns/op 486.00 ns/op 0.80
fastMsgIdFn h64 xxhash / 1000 bytes 362.00 ns/op 435.00 ns/op 0.83
fastMsgIdFn sha256 / 10000 bytes 53.835 us/op 50.380 us/op 1.07
fastMsgIdFn h32 xxhash / 10000 bytes 1.8980 us/op 1.7850 us/op 1.06
fastMsgIdFn h64 xxhash / 10000 bytes 1.2680 us/op 1.2270 us/op 1.03
send data - 1000 256B messages 13.694 ms/op 10.929 ms/op 1.25
send data - 1000 512B messages 19.547 ms/op 14.496 ms/op 1.35
send data - 1000 1024B messages 26.537 ms/op 25.392 ms/op 1.05
send data - 1000 1200B messages 29.864 ms/op 27.930 ms/op 1.07
send data - 1000 2048B messages 39.615 ms/op 36.673 ms/op 1.08
send data - 1000 4096B messages 36.181 ms/op 34.208 ms/op 1.06
send data - 1000 16384B messages 80.795 ms/op 87.969 ms/op 0.92
send data - 1000 65536B messages 325.80 ms/op 281.17 ms/op 1.16
enrSubnets - fastDeserialize 64 bits 1.0850 us/op 959.00 ns/op 1.13
enrSubnets - ssz BitVector 64 bits 427.00 ns/op 417.00 ns/op 1.02
enrSubnets - fastDeserialize 4 bits 171.00 ns/op 200.00 ns/op 0.85
enrSubnets - ssz BitVector 4 bits 389.00 ns/op 416.00 ns/op 0.94
prioritizePeers score -10:0 att 32-0.1 sync 2-0 151.45 us/op 153.64 us/op 0.99
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 194.03 us/op 173.05 us/op 1.12
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 256.36 us/op 247.41 us/op 1.04
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 395.28 us/op 347.30 us/op 1.14
prioritizePeers score 0:0 att 64-1 sync 4-1 486.60 us/op 422.53 us/op 1.15
array of 16000 items push then shift 1.3554 us/op 1.2117 us/op 1.12
LinkedList of 16000 items push then shift 6.9140 ns/op 6.5770 ns/op 1.05
array of 16000 items push then pop 80.337 ns/op 77.757 ns/op 1.03
LinkedList of 16000 items push then pop 5.7080 ns/op 5.5250 ns/op 1.03
array of 24000 items push then shift 1.9365 us/op 1.7605 us/op 1.10
LinkedList of 24000 items push then shift 6.0310 ns/op 6.1420 ns/op 0.98
array of 24000 items push then pop 88.708 ns/op 91.505 ns/op 0.97
LinkedList of 24000 items push then pop 5.8490 ns/op 5.4260 ns/op 1.08
intersect bitArray bitLen 8 4.8520 ns/op 4.3830 ns/op 1.11
intersect array and set length 8 50.107 ns/op 45.989 ns/op 1.09
intersect bitArray bitLen 128 30.030 ns/op 27.768 ns/op 1.08
intersect array and set length 128 699.72 ns/op 643.30 ns/op 1.09
bitArray.getTrueBitIndexes() bitLen 128 1.1570 us/op 1.2200 us/op 0.95
bitArray.getTrueBitIndexes() bitLen 248 1.9290 us/op 1.9400 us/op 0.99
bitArray.getTrueBitIndexes() bitLen 512 3.6130 us/op 3.7240 us/op 0.97
Buffer.concat 32 items 748.00 ns/op 805.00 ns/op 0.93
Uint8Array.set 32 items 1.2360 us/op 1.6170 us/op 0.76
Set add up to 64 items then delete first 1.7765 us/op 1.6459 us/op 1.08
OrderedSet add up to 64 items then delete first 2.7190 us/op 2.4947 us/op 1.09
Set add up to 64 items then delete last 2.0680 us/op 1.8652 us/op 1.11
OrderedSet add up to 64 items then delete last 3.2105 us/op 2.7791 us/op 1.16
Set add up to 64 items then delete middle 2.1304 us/op 1.8947 us/op 1.12
OrderedSet add up to 64 items then delete middle 4.5388 us/op 4.3105 us/op 1.05
Set add up to 128 items then delete first 4.0485 us/op 3.9062 us/op 1.04
OrderedSet add up to 128 items then delete first 6.0507 us/op 5.8677 us/op 1.03
Set add up to 128 items then delete last 3.9439 us/op 3.5692 us/op 1.10
OrderedSet add up to 128 items then delete last 6.2374 us/op 5.3623 us/op 1.16
Set add up to 128 items then delete middle 3.9049 us/op 3.5945 us/op 1.09
OrderedSet add up to 128 items then delete middle 11.145 us/op 10.116 us/op 1.10
Set add up to 256 items then delete first 7.7807 us/op 7.2939 us/op 1.07
OrderedSet add up to 256 items then delete first 12.042 us/op 11.832 us/op 1.02
Set add up to 256 items then delete last 7.6555 us/op 7.1076 us/op 1.08
OrderedSet add up to 256 items then delete last 12.241 us/op 10.907 us/op 1.12
Set add up to 256 items then delete middle 7.6345 us/op 7.0594 us/op 1.08
OrderedSet add up to 256 items then delete middle 31.925 us/op 29.878 us/op 1.07
transfer serialized Status (84 B) 1.2200 us/op 1.2340 us/op 0.99
copy serialized Status (84 B) 967.00 ns/op 999.00 ns/op 0.97
transfer serialized SignedVoluntaryExit (112 B) 1.2800 us/op 1.3090 us/op 0.98
copy serialized SignedVoluntaryExit (112 B) 986.00 ns/op 1.0300 us/op 0.96
transfer serialized ProposerSlashing (416 B) 1.4760 us/op 1.3920 us/op 1.06
copy serialized ProposerSlashing (416 B) 1.3470 us/op 1.2170 us/op 1.11
transfer serialized Attestation (485 B) 1.5350 us/op 1.3790 us/op 1.11
copy serialized Attestation (485 B) 1.3610 us/op 1.2860 us/op 1.06
transfer serialized AttesterSlashing (33232 B) 2.1480 us/op 1.6310 us/op 1.32
copy serialized AttesterSlashing (33232 B) 4.6230 us/op 4.3170 us/op 1.07
transfer serialized Small SignedBeaconBlock (128000 B) 2.3040 us/op 1.7520 us/op 1.32
copy serialized Small SignedBeaconBlock (128000 B) 14.762 us/op 11.499 us/op 1.28
transfer serialized Avg SignedBeaconBlock (200000 B) 1.9510 us/op 1.8770 us/op 1.04
copy serialized Avg SignedBeaconBlock (200000 B) 12.578 us/op 17.409 us/op 0.72
transfer serialized BlobsSidecar (524380 B) 2.5270 us/op 2.1370 us/op 1.18
copy serialized BlobsSidecar (524380 B) 70.344 us/op 117.21 us/op 0.60
transfer serialized Big SignedBeaconBlock (1000000 B) 2.6590 us/op 2.3440 us/op 1.13
copy serialized Big SignedBeaconBlock (1000000 B) 165.88 us/op 136.18 us/op 1.22
pass gossip attestations to forkchoice per slot 2.9047 ms/op 2.6435 ms/op 1.10
forkChoice updateHead vc 100000 bc 64 eq 0 466.78 us/op 490.16 us/op 0.95
forkChoice updateHead vc 600000 bc 64 eq 0 2.7344 ms/op 2.8541 ms/op 0.96
forkChoice updateHead vc 1000000 bc 64 eq 0 4.3159 ms/op 4.2822 ms/op 1.01
forkChoice updateHead vc 600000 bc 320 eq 0 2.6165 ms/op 2.7889 ms/op 0.94
forkChoice updateHead vc 600000 bc 1200 eq 0 2.6872 ms/op 2.6510 ms/op 1.01
forkChoice updateHead vc 600000 bc 7200 eq 0 3.4350 ms/op 3.4208 ms/op 1.00
forkChoice updateHead vc 600000 bc 64 eq 1000 10.248 ms/op 9.2127 ms/op 1.11
forkChoice updateHead vc 600000 bc 64 eq 10000 9.4574 ms/op 9.1788 ms/op 1.03
forkChoice updateHead vc 600000 bc 64 eq 300000 11.914 ms/op 12.252 ms/op 0.97
computeDeltas 500000 validators 300 proto nodes 3.0945 ms/op 3.0425 ms/op 1.02
computeDeltas 500000 validators 1200 proto nodes 3.0651 ms/op 2.8757 ms/op 1.07
computeDeltas 500000 validators 7200 proto nodes 3.0245 ms/op 3.0012 ms/op 1.01
computeDeltas 750000 validators 300 proto nodes 4.7085 ms/op 4.6664 ms/op 1.01
computeDeltas 750000 validators 1200 proto nodes 4.6895 ms/op 4.8602 ms/op 0.96
computeDeltas 750000 validators 7200 proto nodes 4.7051 ms/op 4.8245 ms/op 0.98
computeDeltas 1400000 validators 300 proto nodes 8.8172 ms/op 8.9129 ms/op 0.99
computeDeltas 1400000 validators 1200 proto nodes 8.4837 ms/op 8.9463 ms/op 0.95
computeDeltas 1400000 validators 7200 proto nodes 8.4750 ms/op 9.0902 ms/op 0.93
computeDeltas 2100000 validators 300 proto nodes 12.781 ms/op 14.429 ms/op 0.89
computeDeltas 2100000 validators 1200 proto nodes 13.618 ms/op 15.251 ms/op 0.89
computeDeltas 2100000 validators 7200 proto nodes 13.765 ms/op 15.438 ms/op 0.89
altair processAttestation - 250000 vs - 7PWei normalcase 1.6145 ms/op 2.6114 ms/op 0.62
altair processAttestation - 250000 vs - 7PWei worstcase 2.9794 ms/op 3.3661 ms/op 0.89
altair processAttestation - setStatus - 1/6 committees join 79.649 us/op 111.46 us/op 0.71
altair processAttestation - setStatus - 1/3 committees join 154.65 us/op 203.86 us/op 0.76
altair processAttestation - setStatus - 1/2 committees join 209.67 us/op 283.29 us/op 0.74
altair processAttestation - setStatus - 2/3 committees join 278.47 us/op 381.92 us/op 0.73
altair processAttestation - setStatus - 4/5 committees join 432.71 us/op 508.69 us/op 0.85
altair processAttestation - setStatus - 100% committees join 476.13 us/op 636.13 us/op 0.75
altair processBlock - 250000 vs - 7PWei normalcase 4.9435 ms/op 9.2448 ms/op 0.53
altair processBlock - 250000 vs - 7PWei normalcase hashState 24.487 ms/op 29.889 ms/op 0.82
altair processBlock - 250000 vs - 7PWei worstcase 28.483 ms/op 30.352 ms/op 0.94
altair processBlock - 250000 vs - 7PWei worstcase hashState 75.252 ms/op 89.251 ms/op 0.84
phase0 processBlock - 250000 vs - 7PWei normalcase 2.0525 ms/op 2.2205 ms/op 0.92
phase0 processBlock - 250000 vs - 7PWei worstcase 26.020 ms/op 28.175 ms/op 0.92
altair processEth1Data - 250000 vs - 7PWei normalcase 305.04 us/op 488.33 us/op 0.62
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 10.310 us/op 11.503 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 65.336 us/op 56.814 us/op 1.15
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 18.527 us/op 19.274 us/op 0.96
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 13.308 us/op 11.961 us/op 1.11
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 220.72 us/op 163.29 us/op 1.35
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 1.4186 ms/op 736.20 us/op 1.93
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 1.6215 ms/op 1.0354 ms/op 1.57
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 2.4441 ms/op 1.7785 ms/op 1.37
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 5.0653 ms/op 3.1086 ms/op 1.63
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 2.3175 ms/op 1.7274 ms/op 1.34
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 4.6000 ms/op 3.5486 ms/op 1.30
Tree 40 250000 create 202.10 ms/op 179.67 ms/op 1.12
Tree 40 250000 get(125000) 121.88 ns/op 101.25 ns/op 1.20
Tree 40 250000 set(125000) 910.26 ns/op 537.89 ns/op 1.69
Tree 40 250000 toArray() 19.231 ms/op 12.691 ms/op 1.52
Tree 40 250000 iterate all - toArray() + loop 20.583 ms/op 14.413 ms/op 1.43
Tree 40 250000 iterate all - get(i) 52.340 ms/op 40.560 ms/op 1.29
MutableVector 250000 create 11.023 ms/op 11.262 ms/op 0.98
MutableVector 250000 get(125000) 6.1220 ns/op 5.5600 ns/op 1.10
MutableVector 250000 set(125000) 207.71 ns/op 206.35 ns/op 1.01
MutableVector 250000 toArray() 3.3421 ms/op 3.2897 ms/op 1.02
MutableVector 250000 iterate all - toArray() + loop 3.2572 ms/op 3.5001 ms/op 0.93
MutableVector 250000 iterate all - get(i) 1.4536 ms/op 1.3703 ms/op 1.06
Array 250000 create 2.7703 ms/op 3.9684 ms/op 0.70
Array 250000 clone - spread 1.1661 ms/op 1.2427 ms/op 0.94
Array 250000 get(125000) 0.93500 ns/op 1.0170 ns/op 0.92
Array 250000 set(125000) 1.2390 ns/op 1.2200 ns/op 1.02
Array 250000 iterate all - loop 163.63 us/op 158.32 us/op 1.03
effectiveBalanceIncrements clone Uint8Array 300000 14.643 us/op 13.751 us/op 1.06
effectiveBalanceIncrements clone MutableVector 300000 299.00 ns/op 366.00 ns/op 0.82
effectiveBalanceIncrements rw all Uint8Array 300000 192.64 us/op 189.10 us/op 1.02
effectiveBalanceIncrements rw all MutableVector 300000 119.62 ms/op 72.181 ms/op 1.66
phase0 afterProcessEpoch - 250000 vs - 7PWei 79.363 ms/op 76.398 ms/op 1.04
phase0 beforeProcessEpoch - 250000 vs - 7PWei 52.912 ms/op 40.371 ms/op 1.31
altair processEpoch - mainnet_e81889 414.20 ms/op 380.54 ms/op 1.09
mainnet_e81889 - altair beforeProcessEpoch 59.865 ms/op 58.703 ms/op 1.02
mainnet_e81889 - altair processJustificationAndFinalization 12.543 us/op 18.429 us/op 0.68
mainnet_e81889 - altair processInactivityUpdates 4.8919 ms/op 6.7996 ms/op 0.72
mainnet_e81889 - altair processRewardsAndPenalties 50.521 ms/op 53.816 ms/op 0.94
mainnet_e81889 - altair processRegistryUpdates 2.4270 us/op 2.2640 us/op 1.07
mainnet_e81889 - altair processSlashings 359.00 ns/op 542.00 ns/op 0.66
mainnet_e81889 - altair processEth1DataReset 395.00 ns/op 568.00 ns/op 0.70
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.1219 ms/op 1.6969 ms/op 0.66
mainnet_e81889 - altair processSlashingsReset 5.7070 us/op 2.1880 us/op 2.61
mainnet_e81889 - altair processRandaoMixesReset 7.9920 us/op 2.8320 us/op 2.82
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0800 us/op 643.00 ns/op 1.68
mainnet_e81889 - altair processParticipationFlagUpdates 2.3450 us/op 1.1590 us/op 2.02
mainnet_e81889 - altair processSyncCommitteeUpdates 929.00 ns/op 605.00 ns/op 1.54
mainnet_e81889 - altair afterProcessEpoch 86.460 ms/op 76.616 ms/op 1.13
capella processEpoch - mainnet_e217614 1.6235 s/op 1.2831 s/op 1.27
mainnet_e217614 - capella beforeProcessEpoch 278.45 ms/op 254.45 ms/op 1.09
mainnet_e217614 - capella processJustificationAndFinalization 19.495 us/op 13.770 us/op 1.42
mainnet_e217614 - capella processInactivityUpdates 18.878 ms/op 15.364 ms/op 1.23
mainnet_e217614 - capella processRewardsAndPenalties 243.63 ms/op 247.53 ms/op 0.98
mainnet_e217614 - capella processRegistryUpdates 21.524 us/op 18.936 us/op 1.14
mainnet_e217614 - capella processSlashings 606.00 ns/op 568.00 ns/op 1.07
mainnet_e217614 - capella processEth1DataReset 482.00 ns/op 675.00 ns/op 0.71
mainnet_e217614 - capella processEffectiveBalanceUpdates 3.4994 ms/op 4.4452 ms/op 0.79
mainnet_e217614 - capella processSlashingsReset 3.6290 us/op 1.3040 us/op 2.78
mainnet_e217614 - capella processRandaoMixesReset 5.5210 us/op 3.3450 us/op 1.65
mainnet_e217614 - capella processHistoricalRootsUpdate 573.00 ns/op 876.00 ns/op 0.65
mainnet_e217614 - capella processParticipationFlagUpdates 1.8760 us/op 1.4130 us/op 1.33
mainnet_e217614 - capella afterProcessEpoch 238.68 ms/op 208.11 ms/op 1.15
phase0 processEpoch - mainnet_e58758 446.69 ms/op 406.74 ms/op 1.10
mainnet_e58758 - phase0 beforeProcessEpoch 116.94 ms/op 104.06 ms/op 1.12
mainnet_e58758 - phase0 processJustificationAndFinalization 17.961 us/op 14.572 us/op 1.23
mainnet_e58758 - phase0 processRewardsAndPenalties 37.620 ms/op 21.634 ms/op 1.74
mainnet_e58758 - phase0 processRegistryUpdates 10.377 us/op 11.293 us/op 0.92
mainnet_e58758 - phase0 processSlashings 1.1980 us/op 650.00 ns/op 1.84
mainnet_e58758 - phase0 processEth1DataReset 369.00 ns/op 512.00 ns/op 0.72
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.2958 ms/op 1.4512 ms/op 0.89
mainnet_e58758 - phase0 processSlashingsReset 2.4290 us/op 2.7620 us/op 0.88
mainnet_e58758 - phase0 processRandaoMixesReset 2.9960 us/op 3.0440 us/op 0.98
mainnet_e58758 - phase0 processHistoricalRootsUpdate 361.00 ns/op 552.00 ns/op 0.65
mainnet_e58758 - phase0 processParticipationRecordUpdates 3.0480 us/op 4.0140 us/op 0.76
mainnet_e58758 - phase0 afterProcessEpoch 68.327 ms/op 66.942 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1394 ms/op 936.59 us/op 1.22
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.2041 ms/op 1.3594 ms/op 0.89
altair processInactivityUpdates - 250000 normalcase 13.017 ms/op 12.659 ms/op 1.03
altair processInactivityUpdates - 250000 worstcase 11.809 ms/op 13.508 ms/op 0.87
phase0 processRegistryUpdates - 250000 normalcase 6.6850 us/op 9.8310 us/op 0.68
phase0 processRegistryUpdates - 250000 badcase_full_deposits 506.60 us/op 447.73 us/op 1.13
phase0 processRegistryUpdates - 250000 worstcase 0.5 120.08 ms/op 113.34 ms/op 1.06
altair processRewardsAndPenalties - 250000 normalcase 42.553 ms/op 52.905 ms/op 0.80
altair processRewardsAndPenalties - 250000 worstcase 42.508 ms/op 48.479 ms/op 0.88
phase0 getAttestationDeltas - 250000 normalcase 5.7679 ms/op 7.9237 ms/op 0.73
phase0 getAttestationDeltas - 250000 worstcase 5.8475 ms/op 5.7340 ms/op 1.02
phase0 processSlashings - 250000 worstcase 83.484 us/op 82.533 us/op 1.01
altair processSyncCommitteeUpdates - 250000 108.00 ms/op 117.00 ms/op 0.92
BeaconState.hashTreeRoot - No change 262.00 ns/op 619.00 ns/op 0.42
BeaconState.hashTreeRoot - 1 full validator 107.22 us/op 95.426 us/op 1.12
BeaconState.hashTreeRoot - 32 full validator 1.1779 ms/op 1.0149 ms/op 1.16
BeaconState.hashTreeRoot - 512 full validator 14.071 ms/op 9.5161 ms/op 1.48
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 122.54 us/op 111.70 us/op 1.10
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.6189 ms/op 1.4793 ms/op 1.09
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 20.049 ms/op 17.906 ms/op 1.12
BeaconState.hashTreeRoot - 1 balances 90.690 us/op 79.928 us/op 1.13
BeaconState.hashTreeRoot - 32 balances 854.82 us/op 719.31 us/op 1.19
BeaconState.hashTreeRoot - 512 balances 7.9688 ms/op 7.5738 ms/op 1.05
BeaconState.hashTreeRoot - 250000 balances 152.87 ms/op 160.95 ms/op 0.95
aggregationBits - 2048 els - zipIndexesInBitList 21.717 us/op 22.654 us/op 0.96
byteArrayEquals 32 62.600 ns/op 61.585 ns/op 1.02
Buffer.compare 32 35.258 ns/op 34.969 ns/op 1.01
byteArrayEquals 1024 1.6554 us/op 1.6382 us/op 1.01
Buffer.compare 1024 41.805 ns/op 40.733 ns/op 1.03
byteArrayEquals 16384 27.648 us/op 26.244 us/op 1.05
Buffer.compare 16384 215.52 ns/op 235.24 ns/op 0.92
byteArrayEquals 123687377 199.04 ms/op 209.94 ms/op 0.95
Buffer.compare 123687377 5.3971 ms/op 4.3075 ms/op 1.25
byteArrayEquals 32 - diff last byte 57.747 ns/op 62.101 ns/op 0.93
Buffer.compare 32 - diff last byte 34.324 ns/op 40.175 ns/op 0.85
byteArrayEquals 1024 - diff last byte 1.5882 us/op 1.7480 us/op 0.91
Buffer.compare 1024 - diff last byte 41.915 ns/op 46.325 ns/op 0.90
byteArrayEquals 16384 - diff last byte 25.307 us/op 25.188 us/op 1.00
Buffer.compare 16384 - diff last byte 193.59 ns/op 236.05 ns/op 0.82
byteArrayEquals 123687377 - diff last byte 209.46 ms/op 205.26 ms/op 1.02
Buffer.compare 123687377 - diff last byte 5.3009 ms/op 3.9800 ms/op 1.33
byteArrayEquals 32 - random bytes 5.3260 ns/op 4.4670 ns/op 1.19
Buffer.compare 32 - random bytes 43.856 ns/op 38.820 ns/op 1.13
byteArrayEquals 1024 - random bytes 4.4190 ns/op 4.3940 ns/op 1.01
Buffer.compare 1024 - random bytes 35.929 ns/op 36.682 ns/op 0.98
byteArrayEquals 16384 - random bytes 4.4640 ns/op 4.3860 ns/op 1.02
Buffer.compare 16384 - random bytes 35.538 ns/op 35.689 ns/op 1.00
byteArrayEquals 123687377 - random bytes 6.8500 ns/op 7.6400 ns/op 0.90
Buffer.compare 123687377 - random bytes 41.620 ns/op 43.100 ns/op 0.97
regular array get 100000 times 41.983 us/op 40.838 us/op 1.03
wrappedArray get 100000 times 48.069 us/op 40.802 us/op 1.18
arrayWithProxy get 100000 times 10.371 ms/op 10.678 ms/op 0.97
ssz.Root.equals 55.192 ns/op 53.703 ns/op 1.03
byteArrayEquals 55.338 ns/op 53.253 ns/op 1.04
Buffer.compare 10.193 ns/op 9.3080 ns/op 1.10
shuffle list - 16384 els 5.9908 ms/op 5.7961 ms/op 1.03
shuffle list - 250000 els 86.898 ms/op 85.237 ms/op 1.02
processSlot - 1 slots 14.810 us/op 10.794 us/op 1.37
processSlot - 32 slots 3.3866 ms/op 2.1223 ms/op 1.60
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 45.840 ms/op 47.970 ms/op 0.96
getCommitteeAssignments - req 1 vs - 250000 vc 2.4253 ms/op 2.2997 ms/op 1.05
getCommitteeAssignments - req 100 vs - 250000 vc 3.5732 ms/op 3.4237 ms/op 1.04
getCommitteeAssignments - req 1000 vs - 250000 vc 3.9249 ms/op 3.6979 ms/op 1.06
findModifiedValidators - 10000 modified validators 306.71 ms/op 294.24 ms/op 1.04
findModifiedValidators - 1000 modified validators 167.90 ms/op 151.50 ms/op 1.11
findModifiedValidators - 100 modified validators 146.11 ms/op 151.32 ms/op 0.97
findModifiedValidators - 10 modified validators 140.17 ms/op 153.42 ms/op 0.91
findModifiedValidators - 1 modified validators 148.22 ms/op 151.46 ms/op 0.98
findModifiedValidators - no difference 155.49 ms/op 154.74 ms/op 1.00
compare ViewDUs 3.4551 s/op 3.4550 s/op 1.00
compare each validator Uint8Array 1.4985 s/op 1.6904 s/op 0.89
compare ViewDU to Uint8Array 870.17 ms/op 1.0533 s/op 0.83
migrate state 1000000 validators, 24 modified, 0 new 661.45 ms/op 636.73 ms/op 1.04
migrate state 1000000 validators, 1700 modified, 1000 new 1.1087 s/op 1.0736 s/op 1.03
migrate state 1000000 validators, 3400 modified, 2000 new 1.3136 s/op 1.4273 s/op 0.92
migrate state 1500000 validators, 24 modified, 0 new 550.28 ms/op 662.20 ms/op 0.83
migrate state 1500000 validators, 1700 modified, 1000 new 912.51 ms/op 1.2059 s/op 0.76
migrate state 1500000 validators, 3400 modified, 2000 new 1.3536 s/op 1.4860 s/op 0.91
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 3.5400 ns/op 4.9300 ns/op 0.72
state getBlockRootAtSlot - 250000 vs - 7PWei 637.62 ns/op 1.0004 us/op 0.64
computeProposers - vc 250000 7.0609 ms/op 7.2342 ms/op 0.98
computeEpochShuffling - vc 250000 87.380 ms/op 85.133 ms/op 1.03
getNextSyncCommittee - vc 250000 99.753 ms/op 116.66 ms/op 0.86
computeSigningRoot for AttestationData 20.019 us/op 24.705 us/op 0.81
hash AttestationData serialized data then Buffer.toString(base64) 1.2955 us/op 1.2708 us/op 1.02
toHexString serialized data 804.75 ns/op 779.87 ns/op 1.03
Buffer.toString(base64) 167.95 ns/op 165.02 ns/op 1.02

by benchmarkbot/action

g11tech and others added 6 commits May 4, 2024 23:40
add types stub and epoch config

fix types
* Add immutable in the dependencies

* Initial change to pubkeyCache

* Added todos

* Moved unfinalized cache to epochCache

* Move populating finalized cache to afterProcessEpoch

* Specify unfinalized cache during state cloning

* Move from unfinalized to finalized cache in afterProcessEpoch

* Confused myself

* Clean up

* Change logic

* Fix cloning issue

* Clean up redundant code

* Add CarryoverData in epochCtx.createFromState

* Fix typo

* Update usage of pubkeyCache

* Update pubkeyCache usage

* Fix lint

* Fix lint

* Add 6110 to ChainConfig

* Add 6110 to BeaconPreset

* Define 6110 fork and container

* Add V6110 api to execution engine

* Update test

* Add depositReceiptsRoot to process_execution_payload

* State transitioning to EIP6110

* State transitioning to EIP6110

* Light client change in EIP-6110

* Update tests

* produceBlock

* Refactor processDeposit to match the spec

* Implement processDepositReceipt

* Implement 6110 fork guard for pubkeyCache

* Handle changes in eth1 deposit

* Update eth1 deposit test

* Fix typo

* Lint

* Remove embarassing comments

* Address comments

* Modify applyDeposit signature

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/pubkeyCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Remove old code

* Rename fields in epochCache and immutableData

* Remove CarryoverData

* Move isAfter6110 from var to method

* Fix cyclic import

* Fix operations spec runner

* Fix for spec test

* Fix spec test

* state.depositReceiptsStartIndex to BigInt

* getDeposit requires cached state

* default depositReceiptsStartIndex value in genesis

* Fix pubkeyCache bug

* newUnfinalizedPubkeyIndexMap in createCachedBeaconState

* Lint

* Pass epochCache instead of pubkey2IndexFn in apis

* Address comments

* Add unit test on pubkey cache cloning

* Add unfinalizedPubkeyCacheSize to metrics

* Add unfinalizedPubkeyCacheSize to metrics

* Clean up code

* Add besu to el-interop

* Add 6110 genesis file

* Template for sim test

* Add unit test for getEth1DepositCount

* Update sim test

* Update besudocker

* Finish beacon api calls in sim test

* Update epochCache.createFromState()

* Fix bug unfinalized validators are not finalized

* Add sim test to run a few blocks

* Lint

* Merge branch 'unstable' into 611

* Add more check to sim test

* Update besu docker image instruction

* Update sim test with correct tx

* Address comment + cleanup

* Clean up code

* Properly handle promise rejection

* Lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update comments

* Accept type undefined in ExecutionPayloadBodyRpc

* Update comment and semantic

* Remove if statement when adding finalized validator

* Comment on repeated insert on finalized cache

* rename createFromState

* Add comment on getPubkey()

* Stash change to reduce diffs

* Stash change to reduce diffs

* Lint

* addFinalizedPubkey on finalized checkpoint

* Update comment

* Use OrderedMap for unfinalized cache

* Pull out logic of deleting pubkeys for batch op

* Add updateUnfinalizedPubkeys in regen

* Update updateUnfinalizedPubkeys logic

* Add comment

* Add metrics for state context caches

* Address comment

* Address comment

* Deprecate eth1Data polling when condition is reached

* Fix conflicts

* Fix sim test

* Lint

* Fix type

* Fix test

* Fix test

* Lint

* Update packages/light-client/src/spec/utils.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Fix spec test

* Address comments

* Improve cache logic on checkpoint finalized

* Update sim test according to new cache logic

* Update comment

* Lint

* Finalized pubkey cache only update once per checkpoint

* Add perf test for updateUnfinalizedPubkeys

* Add perf test for updateUnfinalizedPubkeys

* Tweak params for perf test

* Freeze besu docker image version for 6110

* Add benchmark result

* Use Map instead of OrderedMap. Update benchmark

* Minor optimization

* Minor optimization

* Add memory test for immutable.js

* Update test

* Reduce code duplication

* Lint

* Remove try/catch in updateUnfinalizedPubkeys

* Introduce EpochCache metric

* Add historicalValidatorLengths

* Polish code

* Migrate state-transition unit tests to vitest

* Fix calculation of pivot index

* `historicalValidatorLengths` only activate post 6110

* Update sim test

* Lint

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Improve readability on historicalValidatorLengths

* Update types

* Fix calculation

* Add eth1data poll todo

* Add epochCache.getValidatorCountAtEpoch

* Add todo

* Add getStateIterator for state cache

* Partial commit

* Update perf test

* updateUnfinalizedPubkeys directly modify states from regen

* Update sim test. Lint

* Add todo

* some improvements and a fix for effectiveBalanceIncrements fork safeness

* rename eip6110 to elctra

* fix electra-interop.test.ts

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: gajinder <develop@g11tech.io>

lint and tsc

small cleanup

fix rebase issue
* feat: implement execution layer exits eip 7002

* lint and tsc fix

* apply feedback

* improve comment
* Update spec-test version

* Skip electra
* Add types

* Update unit test

* lint

* Address comments

* Address comments

* Lint

* Update packages/beacon-node/src/util/sszBytes.ts

Co-authored-by: tuyennhv <tuyen@chainsafe.io>

* Add isElectraAttestation

* Update unit test

* Update unit test

* chore: add comments for sszBytes.ts

---------

Co-authored-by: tuyennhv <tuyen@chainsafe.io>
Co-authored-by: Tuyen Nguyen <vutuyen2636@gmail.com>
g11tech and others added 14 commits May 5, 2024 00:17
* chore: fix the rebase build

* fix test
* feat: upgrade 7002 exits to withdrawal request

* fix types

* fix types and references

* further fix the types references and get build passing

* update the process ops fn but needs to be extended by maxeb
* feat: implement EIP-6110 (#6042)

* Add immutable in the dependencies

* Initial change to pubkeyCache

* Added todos

* Moved unfinalized cache to epochCache

* Move populating finalized cache to afterProcessEpoch

* Specify unfinalized cache during state cloning

* Move from unfinalized to finalized cache in afterProcessEpoch

* Confused myself

* Clean up

* Change logic

* Fix cloning issue

* Clean up redundant code

* Add CarryoverData in epochCtx.createFromState

* Fix typo

* Update usage of pubkeyCache

* Update pubkeyCache usage

* Fix lint

* Fix lint

* Add 6110 to ChainConfig

* Add 6110 to BeaconPreset

* Define 6110 fork and container

* Add V6110 api to execution engine

* Update test

* Add depositReceiptsRoot to process_execution_payload

* State transitioning to EIP6110

* State transitioning to EIP6110

* Light client change in EIP-6110

* Update tests

* produceBlock

* Refactor processDeposit to match the spec

* Implement processDepositReceipt

* Implement 6110 fork guard for pubkeyCache

* Handle changes in eth1 deposit

* Update eth1 deposit test

* Fix typo

* Lint

* Remove embarassing comments

* Address comments

* Modify applyDeposit signature

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/pubkeyCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Remove old code

* Rename fields in epochCache and immutableData

* Remove CarryoverData

* Move isAfter6110 from var to method

* Fix cyclic import

* Fix operations spec runner

* Fix for spec test

* Fix spec test

* state.depositReceiptsStartIndex to BigInt

* getDeposit requires cached state

* default depositReceiptsStartIndex value in genesis

* Fix pubkeyCache bug

* newUnfinalizedPubkeyIndexMap in createCachedBeaconState

* Lint

* Pass epochCache instead of pubkey2IndexFn in apis

* Address comments

* Add unit test on pubkey cache cloning

* Add unfinalizedPubkeyCacheSize to metrics

* Add unfinalizedPubkeyCacheSize to metrics

* Clean up code

* Add besu to el-interop

* Add 6110 genesis file

* Template for sim test

* Add unit test for getEth1DepositCount

* Update sim test

* Update besudocker

* Finish beacon api calls in sim test

* Update epochCache.createFromState()

* Fix bug unfinalized validators are not finalized

* Add sim test to run a few blocks

* Lint

* Merge branch 'unstable' into 611

* Add more check to sim test

* Update besu docker image instruction

* Update sim test with correct tx

* Address comment + cleanup

* Clean up code

* Properly handle promise rejection

* Lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update comments

* Accept type undefined in ExecutionPayloadBodyRpc

* Update comment and semantic

* Remove if statement when adding finalized validator

* Comment on repeated insert on finalized cache

* rename createFromState

* Add comment on getPubkey()

* Stash change to reduce diffs

* Stash change to reduce diffs

* Lint

* addFinalizedPubkey on finalized checkpoint

* Update comment

* Use OrderedMap for unfinalized cache

* Pull out logic of deleting pubkeys for batch op

* Add updateUnfinalizedPubkeys in regen

* Update updateUnfinalizedPubkeys logic

* Add comment

* Add metrics for state context caches

* Address comment

* Address comment

* Deprecate eth1Data polling when condition is reached

* Fix conflicts

* Fix sim test

* Lint

* Fix type

* Fix test

* Fix test

* Lint

* Update packages/light-client/src/spec/utils.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Fix spec test

* Address comments

* Improve cache logic on checkpoint finalized

* Update sim test according to new cache logic

* Update comment

* Lint

* Finalized pubkey cache only update once per checkpoint

* Add perf test for updateUnfinalizedPubkeys

* Add perf test for updateUnfinalizedPubkeys

* Tweak params for perf test

* Freeze besu docker image version for 6110

* Add benchmark result

* Use Map instead of OrderedMap. Update benchmark

* Minor optimization

* Minor optimization

* Add memory test for immutable.js

* Update test

* Reduce code duplication

* Lint

* Remove try/catch in updateUnfinalizedPubkeys

* Introduce EpochCache metric

* Add historicalValidatorLengths

* Polish code

* Migrate state-transition unit tests to vitest

* Fix calculation of pivot index

* `historicalValidatorLengths` only activate post 6110

* Update sim test

* Lint

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Improve readability on historicalValidatorLengths

* Update types

* Fix calculation

* Add eth1data poll todo

* Add epochCache.getValidatorCountAtEpoch

* Add todo

* Add getStateIterator for state cache

* Partial commit

* Update perf test

* updateUnfinalizedPubkeys directly modify states from regen

* Update sim test. Lint

* Add todo

* some improvements and a fix for effectiveBalanceIncrements fork safeness

* rename eip6110 to elctra

* fix electra-interop.test.ts

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: gajinder <develop@g11tech.io>

lint and tsc

small cleanup

fix rebase issue

* feat: implement EIP-6110 (#6042)

* Add immutable in the dependencies

* Initial change to pubkeyCache

* Added todos

* Moved unfinalized cache to epochCache

* Move populating finalized cache to afterProcessEpoch

* Specify unfinalized cache during state cloning

* Move from unfinalized to finalized cache in afterProcessEpoch

* Confused myself

* Clean up

* Change logic

* Fix cloning issue

* Clean up redundant code

* Add CarryoverData in epochCtx.createFromState

* Fix typo

* Update usage of pubkeyCache

* Update pubkeyCache usage

* Fix lint

* Fix lint

* Add 6110 to ChainConfig

* Add 6110 to BeaconPreset

* Define 6110 fork and container

* Add V6110 api to execution engine

* Update test

* Add depositReceiptsRoot to process_execution_payload

* State transitioning to EIP6110

* State transitioning to EIP6110

* Light client change in EIP-6110

* Update tests

* produceBlock

* Refactor processDeposit to match the spec

* Implement processDepositReceipt

* Implement 6110 fork guard for pubkeyCache

* Handle changes in eth1 deposit

* Update eth1 deposit test

* Fix typo

* Lint

* Remove embarassing comments

* Address comments

* Modify applyDeposit signature

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update packages/state-transition/src/cache/pubkeyCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Remove old code

* Rename fields in epochCache and immutableData

* Remove CarryoverData

* Move isAfter6110 from var to method

* Fix cyclic import

* Fix operations spec runner

* Fix for spec test

* Fix spec test

* state.depositReceiptsStartIndex to BigInt

* getDeposit requires cached state

* default depositReceiptsStartIndex value in genesis

* Fix pubkeyCache bug

* newUnfinalizedPubkeyIndexMap in createCachedBeaconState

* Lint

* Pass epochCache instead of pubkey2IndexFn in apis

* Address comments

* Add unit test on pubkey cache cloning

* Add unfinalizedPubkeyCacheSize to metrics

* Add unfinalizedPubkeyCacheSize to metrics

* Clean up code

* Add besu to el-interop

* Add 6110 genesis file

* Template for sim test

* Add unit test for getEth1DepositCount

* Update sim test

* Update besudocker

* Finish beacon api calls in sim test

* Update epochCache.createFromState()

* Fix bug unfinalized validators are not finalized

* Add sim test to run a few blocks

* Lint

* Merge branch 'unstable' into 611

* Add more check to sim test

* Update besu docker image instruction

* Update sim test with correct tx

* Address comment + cleanup

* Clean up code

* Properly handle promise rejection

* Lint

* Update packages/beacon-node/src/execution/engine/types.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Update comments

* Accept type undefined in ExecutionPayloadBodyRpc

* Update comment and semantic

* Remove if statement when adding finalized validator

* Comment on repeated insert on finalized cache

* rename createFromState

* Add comment on getPubkey()

* Stash change to reduce diffs

* Stash change to reduce diffs

* Lint

* addFinalizedPubkey on finalized checkpoint

* Update comment

* Use OrderedMap for unfinalized cache

* Pull out logic of deleting pubkeys for batch op

* Add updateUnfinalizedPubkeys in regen

* Update updateUnfinalizedPubkeys logic

* Add comment

* Add metrics for state context caches

* Address comment

* Address comment

* Deprecate eth1Data polling when condition is reached

* Fix conflicts

* Fix sim test

* Lint

* Fix type

* Fix test

* Fix test

* Lint

* Update packages/light-client/src/spec/utils.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Fix spec test

* Address comments

* Improve cache logic on checkpoint finalized

* Update sim test according to new cache logic

* Update comment

* Lint

* Finalized pubkey cache only update once per checkpoint

* Add perf test for updateUnfinalizedPubkeys

* Add perf test for updateUnfinalizedPubkeys

* Tweak params for perf test

* Freeze besu docker image version for 6110

* Add benchmark result

* Use Map instead of OrderedMap. Update benchmark

* Minor optimization

* Minor optimization

* Add memory test for immutable.js

* Update test

* Reduce code duplication

* Lint

* Remove try/catch in updateUnfinalizedPubkeys

* Introduce EpochCache metric

* Add historicalValidatorLengths

* Polish code

* Migrate state-transition unit tests to vitest

* Fix calculation of pivot index

* `historicalValidatorLengths` only activate post 6110

* Update sim test

* Lint

* Update packages/state-transition/src/cache/epochCache.ts

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>

* Improve readability on historicalValidatorLengths

* Update types

* Fix calculation

* Add eth1data poll todo

* Add epochCache.getValidatorCountAtEpoch

* Add todo

* Add getStateIterator for state cache

* Partial commit

* Update perf test

* updateUnfinalizedPubkeys directly modify states from regen

* Update sim test. Lint

* Add todo

* some improvements and a fix for effectiveBalanceIncrements fork safeness

* rename eip6110 to elctra

* fix electra-interop.test.ts

---------

Co-authored-by: Lion - dapplion <35266934+dapplion@users.noreply.github.com>
Co-authored-by: gajinder <develop@g11tech.io>

lint and tsc

small cleanup

* Add presets

* Update config

* Add necessary containers

* Update presets

* Update config

* Add todo comments

* Update constants and params

* Impl new process withdrawal

* Add withdrawaRequests to payload

* Add processConsolidation

* Add process withdraw request

* Update deposit and withdrawal flow

* epoch processing

* Implement churn limits

* Lint

* lint

* Update state-transition utils

* processExecutionLayerWithdrawRequest

* processConsolidation

* queueExcessActiveBalance

* isValidDepositSignature

* Add jsdoc and timer for new processEpoch functions

* Lint

* Update maxEB

* update voluntary exit

* Fix config

* Update initiateValidatorExit

* Remove churn limit in processRegistryUpdates

* Fix conflict

* Add MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD

* Reflect latest spec changes

* rebase fixes, fixes, improvements and cleanup

lint

* Upgrade ssz version

* Use sliceFrom()

* cleanup as per specs feedback

subarry

* simplify

* fix withdrawals

* remove slice

* fix the slashing quotient determination in slashvalidator

---------

Co-authored-by: harkamal <gajinder@g11.in>
* Process attestations in block

* Fix check-types

* Address comments
* initial commit

* lint

* Add getAttestingIndices and update getIndexedAttestation

* Update gossip validation

* Update attestation gossip validation

* aggregateAndProof validation

* clean up

* Validator

* Misc

* Fix the build erros

* feat: get attestations for electra block (#6732)

* feat: getAttestationsForBlock() for electra

* chore: fix lint

* fix: MAX_ATTESTATIONS_PER_GROUP_ELECTRA and address PR comments

* chore: unit test aggregateConsolidation

* Fix rebase mistake

* Address my own comment :)

---------

Co-authored-by: Navie Chan <naviechan@gmail.com>

* Fix check-types

* Address comments

---------

Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
Co-authored-by: tuyennhv <tuyen@chainsafe.io>
* feat: attestationPool to group by slot by data root by committee index for electra

* fix: gossip validation and assert.notNull() util

* fix: remove light-client stats.html

* fix: lint and check-types
* Rename receipt to request

* Remove stats.html
* initial commit

* Update gossip validation

* Update attestation gossip validation

* aggregateAndProof validation

* Extend spec runner to be more flexible

* Add missing state attributes for electra

* Fix ss data types for electra spec

* Make the spec runner more flexible

* Fix the bug in process attestation

* Update the sepc test version

* clean up

* Misc

* Fix the build erros

* feat: get attestations for electra block (#6732)

* feat: getAttestationsForBlock() for electra

* chore: fix lint

* fix: MAX_ATTESTATIONS_PER_GROUP_ELECTRA and address PR comments

* chore: unit test aggregateConsolidation

* Fix rebase mistake

* Address my own comment :)

---------

Co-authored-by: Navie Chan <naviechan@gmail.com>

* Fix check-types

* Address comments

* Fix the build erros

* Extend spec runner to be more flexible

* Add missing state attributes for electra

* Fix ss data types for electra spec

* Make the spec runner more flexible

* Fix the bug in process attestation

* Update the sepc test version

* Fix rebase issue

* Update committee index count check

---------

Co-authored-by: NC <adrninistrator1@protonmail.com>
Co-authored-by: Navie Chan <naviechan@gmail.com>
Co-authored-by: tuyennhv <tuyen@chainsafe.io>
fix: get signature for SignedAggregateAndProof based on fork
nazarhussain and others added 26 commits May 11, 2024 01:01
* Fix attester slashing specs for electra

* Remove unused import

* Add code comment

* Update the expression

* Update the fork check
* chore: fix types and lint

* fx

* type and lint fix
* process pending deposit from eth1

* Fix the genesis params

* fix

* Fix

* clean up

---------

Co-authored-by: Nazar Hussain <nazarhussain@gmail.com>
* chore: update EffectiveBalanceIncrements type

* chore: remove now irrelevant tests
* fix: electra fork transition

* fix: merge issue

* chore: remove unwanted change
Use mutable validator object
* fix: remove epochCache.balances and invalid MAX_EFFECTIVE_BALANCE check

* fix: update rewardsAndPenalties balance updates

* docs: add comment to check epochTransitionCache
Fix publishing att with non-zero comm index
* fix attestation duty validation

* Update packages/validator/src/services/validatorStore.ts

Co-authored-by: twoeths <tuyen@chainsafe.io>

* Update packages/validator/src/services/validatorStore.ts

---------

Co-authored-by: twoeths <tuyen@chainsafe.io>
Co-authored-by: Cayman <caymannava@gmail.com>
* fix: align BeaconBlockBody and BlindedBeaconBlockBody

* Remove type hacks in test

---------

Co-authored-by: Nico Flaig <nflaig@protonmail.com>
* test: improve ssz tests consistency

* chore: address comments
* fix: get seen AttData key from SignedAggregateAndProof electra

* chore: revert the naming change to COMMITTEE_BITS_SIZE and add comment

* fix: add toBase64() util
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.

None yet

8 participants