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

chore: more log on updateHeadState() #6997

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Conversation

twoeths
Copy link
Contributor

@twoeths twoeths commented Aug 2, 2024

Motivation

@nflaig found this log but but state root gives no information on which block caused the issue

consensus-1  | Aug-01 22:08:23.895[chain]            warn: Head state not available, triggering regen stateRoot=0x8363987c4209e3486db33b858353057ccc876e11edfa815bcca3dce7be0af2b9
consensus-1  | Aug-01 22:08:23.896[chain]           error: Error on head state regen - REGEN_ERROR_NO_SEED_STATE
consensus-1  | Error: REGEN_ERROR_NO_SEED_STATE
consensus-1  |     at StateRegenerator.getState (file:///usr/app/packages/beacon-node/src/chain/regen/regen.ts:186:13)
consensus-1  |     at QueuedStateRegenerator.updateHeadState (file:///usr/app/packages/beacon-node/src/chain/regen/queued.ts:187:18)
consensus-1  |     at BeaconChain.importBlock (file:///usr/app/packages/beacon-node/src/chain/blocks/importBlock.ts:244:16)
consensus-1  |     at BeaconChain.processBlocks (file:///usr/app/packages/beacon-node/src/chain/blocks/index.ts:101:7)
consensus-1  |     at JobItemQueue.runJob (file:///usr/app/packages/beacon-node/src/util/queue/itemQueue.ts:101:22)

note that this flow is critical for the beacon node to proceed

Description

  • add more log to the updateHeadState() function
  • also fix dontTransferCache option when regen head state

@twoeths twoeths requested a review from a team as a code owner August 2, 2024 02:14
Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 6.25000% with 15 lines in your changes missing coverage. Please review.

Project coverage is 49.09%. Comparing base (be03ef1) to head (2187536).

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #6997      +/-   ##
============================================
- Coverage     49.10%   49.09%   -0.02%     
============================================
  Files           577      577              
  Lines         37336    37345       +9     
  Branches       2139     2139              
============================================
  Hits          18334    18334              
- Misses        18963    18972       +9     
  Partials         39       39              

Copy link
Contributor

github-actions bot commented Aug 2, 2024

Performance Report

✔️ no performance regression detected

🚀🚀 Significant benchmark improvement detected

Benchmark suite Current: b60c620 Previous: be03ef1 Ratio
BeaconState.hashTreeRoot - No change 262.00 ns/op 791.00 ns/op 0.33
Full benchmark results
Benchmark suite Current: b60c620 Previous: be03ef1 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 1.7693 ms/op 1.9112 ms/op 0.93
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 45.022 us/op 38.236 us/op 1.18
BLS verify - blst 735.91 us/op 860.87 us/op 0.85
BLS verifyMultipleSignatures 3 - blst 1.1246 ms/op 1.2817 ms/op 0.88
BLS verifyMultipleSignatures 8 - blst 1.5935 ms/op 2.1041 ms/op 0.76
BLS verifyMultipleSignatures 32 - blst 4.6708 ms/op 4.4789 ms/op 1.04
BLS verifyMultipleSignatures 64 - blst 8.7580 ms/op 8.2773 ms/op 1.06
BLS verifyMultipleSignatures 128 - blst 16.725 ms/op 16.008 ms/op 1.04
BLS deserializing 10000 signatures 654.44 ms/op 600.88 ms/op 1.09
BLS deserializing 100000 signatures 6.4906 s/op 6.0766 s/op 1.07
BLS verifyMultipleSignatures - same message - 3 - blst 845.25 us/op 933.15 us/op 0.91
BLS verifyMultipleSignatures - same message - 8 - blst 958.98 us/op 1.1058 ms/op 0.87
BLS verifyMultipleSignatures - same message - 32 - blst 1.6526 ms/op 1.6908 ms/op 0.98
BLS verifyMultipleSignatures - same message - 64 - blst 2.4386 ms/op 2.5242 ms/op 0.97
BLS verifyMultipleSignatures - same message - 128 - blst 4.0674 ms/op 4.1290 ms/op 0.99
BLS aggregatePubkeys 32 - blst 19.062 us/op 17.720 us/op 1.08
BLS aggregatePubkeys 128 - blst 68.007 us/op 62.264 us/op 1.09
notSeenSlots=1 numMissedVotes=1 numBadVotes=10 52.635 ms/op 70.519 ms/op 0.75
notSeenSlots=1 numMissedVotes=0 numBadVotes=4 46.799 ms/op 41.301 ms/op 1.13
notSeenSlots=2 numMissedVotes=1 numBadVotes=10 31.145 ms/op 29.546 ms/op 1.05
getSlashingsAndExits - default max 81.389 us/op 81.598 us/op 1.00
getSlashingsAndExits - 2k 294.00 us/op 268.96 us/op 1.09
proposeBlockBody type=full, size=empty 5.4909 ms/op 4.7872 ms/op 1.15
isKnown best case - 1 super set check 273.00 ns/op 477.00 ns/op 0.57
isKnown normal case - 2 super set checks 259.00 ns/op 452.00 ns/op 0.57
isKnown worse case - 16 super set checks 260.00 ns/op 456.00 ns/op 0.57
InMemoryCheckpointStateCache - add get delete 5.9770 us/op 4.3810 us/op 1.36
validate api signedAggregateAndProof - struct 1.3112 ms/op 1.9668 ms/op 0.67
validate gossip signedAggregateAndProof - struct 1.3099 ms/op 2.0134 ms/op 0.65
validate gossip attestation - vc 640000 837.79 us/op 971.37 us/op 0.86
batch validate gossip attestation - vc 640000 - chunk 32 119.84 us/op 128.82 us/op 0.93
batch validate gossip attestation - vc 640000 - chunk 64 104.37 us/op 113.24 us/op 0.92
batch validate gossip attestation - vc 640000 - chunk 128 102.41 us/op 101.80 us/op 1.01
batch validate gossip attestation - vc 640000 - chunk 256 98.419 us/op 102.70 us/op 0.96
pickEth1Vote - no votes 976.13 us/op 874.86 us/op 1.12
pickEth1Vote - max votes 7.4952 ms/op 9.4627 ms/op 0.79
pickEth1Vote - Eth1Data hashTreeRoot value x2048 15.497 ms/op 17.292 ms/op 0.90
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 17.006 ms/op 20.372 ms/op 0.83
pickEth1Vote - Eth1Data fastSerialize value x2048 474.32 us/op 478.44 us/op 0.99
pickEth1Vote - Eth1Data fastSerialize tree x2048 5.0883 ms/op 4.0933 ms/op 1.24
bytes32 toHexString 413.00 ns/op 674.00 ns/op 0.61
bytes32 Buffer.toString(hex) 239.00 ns/op 445.00 ns/op 0.54
bytes32 Buffer.toString(hex) from Uint8Array 355.00 ns/op 591.00 ns/op 0.60
bytes32 Buffer.toString(hex) + 0x 244.00 ns/op 443.00 ns/op 0.55
Object access 1 prop 0.13800 ns/op 0.32900 ns/op 0.42
Map access 1 prop 0.12700 ns/op 0.30700 ns/op 0.41
Object get x1000 5.5510 ns/op 4.9830 ns/op 1.11
Map get x1000 6.3330 ns/op 5.6920 ns/op 1.11
Object set x1000 31.315 ns/op 24.162 ns/op 1.30
Map set x1000 20.990 ns/op 19.604 ns/op 1.07
Return object 10000 times 0.28100 ns/op 0.29490 ns/op 0.95
Throw Error 10000 times 3.2456 us/op 2.6821 us/op 1.21
fastMsgIdFn sha256 / 200 bytes 2.1260 us/op 2.0210 us/op 1.05
fastMsgIdFn h32 xxhash / 200 bytes 218.00 ns/op 440.00 ns/op 0.50
fastMsgIdFn h64 xxhash / 200 bytes 265.00 ns/op 471.00 ns/op 0.56
fastMsgIdFn sha256 / 1000 bytes 6.9830 us/op 5.9390 us/op 1.18
fastMsgIdFn h32 xxhash / 1000 bytes 343.00 ns/op 572.00 ns/op 0.60
fastMsgIdFn h64 xxhash / 1000 bytes 333.00 ns/op 534.00 ns/op 0.62
fastMsgIdFn sha256 / 10000 bytes 62.091 us/op 49.308 us/op 1.26
fastMsgIdFn h32 xxhash / 10000 bytes 1.8100 us/op 1.9940 us/op 0.91
fastMsgIdFn h64 xxhash / 10000 bytes 1.2010 us/op 1.3420 us/op 0.89
send data - 1000 256B messages 11.232 ms/op 10.383 ms/op 1.08
send data - 1000 512B messages 15.640 ms/op 14.535 ms/op 1.08
send data - 1000 1024B messages 25.877 ms/op 23.384 ms/op 1.11
send data - 1000 1200B messages 26.110 ms/op 25.356 ms/op 1.03
send data - 1000 2048B messages 31.013 ms/op 29.886 ms/op 1.04
send data - 1000 4096B messages 30.113 ms/op 26.916 ms/op 1.12
send data - 1000 16384B messages 69.843 ms/op 65.703 ms/op 1.06
send data - 1000 65536B messages 200.71 ms/op 253.41 ms/op 0.79
enrSubnets - fastDeserialize 64 bits 996.00 ns/op 1.3210 us/op 0.75
enrSubnets - ssz BitVector 64 bits 329.00 ns/op 630.00 ns/op 0.52
enrSubnets - fastDeserialize 4 bits 139.00 ns/op 388.00 ns/op 0.36
enrSubnets - ssz BitVector 4 bits 341.00 ns/op 584.00 ns/op 0.58
prioritizePeers score -10:0 att 32-0.1 sync 2-0 138.74 us/op 121.10 us/op 1.15
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 136.88 us/op 167.83 us/op 0.82
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 233.05 us/op 257.16 us/op 0.91
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 392.46 us/op 378.70 us/op 1.04
prioritizePeers score 0:0 att 64-1 sync 4-1 551.10 us/op 504.49 us/op 1.09
array of 16000 items push then shift 1.6075 us/op 1.2660 us/op 1.27
LinkedList of 16000 items push then shift 6.9670 ns/op 8.3880 ns/op 0.83
array of 16000 items push then pop 99.786 ns/op 116.83 ns/op 0.85
LinkedList of 16000 items push then pop 6.8860 ns/op 6.7730 ns/op 1.02
array of 24000 items push then shift 2.3828 us/op 1.9145 us/op 1.24
LinkedList of 24000 items push then shift 6.9350 ns/op 7.6810 ns/op 0.90
array of 24000 items push then pop 132.17 ns/op 155.93 ns/op 0.85
LinkedList of 24000 items push then pop 6.8260 ns/op 6.3040 ns/op 1.08
intersect bitArray bitLen 8 6.4860 ns/op 5.3520 ns/op 1.21
intersect array and set length 8 43.861 ns/op 38.535 ns/op 1.14
intersect bitArray bitLen 128 29.300 ns/op 26.733 ns/op 1.10
intersect array and set length 128 653.60 ns/op 585.32 ns/op 1.12
bitArray.getTrueBitIndexes() bitLen 128 1.7310 us/op 1.6850 us/op 1.03
bitArray.getTrueBitIndexes() bitLen 248 2.9930 us/op 2.3430 us/op 1.28
bitArray.getTrueBitIndexes() bitLen 512 6.5320 us/op 3.8990 us/op 1.68
Buffer.concat 32 items 905.00 ns/op 1.0190 us/op 0.89
Uint8Array.set 32 items 1.5500 us/op 1.8410 us/op 0.84
Buffer.copy 1.6670 us/op 2.2170 us/op 0.75
Uint8Array.set - with subarray 2.4950 us/op 2.4760 us/op 1.01
Uint8Array.set - without subarray 1.5290 us/op 1.8650 us/op 0.82
getUint32 - dataview 235.00 ns/op 402.00 ns/op 0.58
getUint32 - manual 152.00 ns/op 331.00 ns/op 0.46
Set add up to 64 items then delete first 2.1870 us/op 1.7919 us/op 1.22
OrderedSet add up to 64 items then delete first 3.2727 us/op 2.8891 us/op 1.13
Set add up to 64 items then delete last 2.4552 us/op 2.1335 us/op 1.15
OrderedSet add up to 64 items then delete last 3.6882 us/op 3.2477 us/op 1.14
Set add up to 64 items then delete middle 2.4832 us/op 2.0957 us/op 1.18
OrderedSet add up to 64 items then delete middle 5.2299 us/op 4.5147 us/op 1.16
Set add up to 128 items then delete first 5.1472 us/op 3.9160 us/op 1.31
OrderedSet add up to 128 items then delete first 7.8926 us/op 6.2348 us/op 1.27
Set add up to 128 items then delete last 4.9372 us/op 3.9983 us/op 1.23
OrderedSet add up to 128 items then delete last 7.2766 us/op 6.0925 us/op 1.19
Set add up to 128 items then delete middle 4.8579 us/op 3.8514 us/op 1.26
OrderedSet add up to 128 items then delete middle 13.649 us/op 13.111 us/op 1.04
Set add up to 256 items then delete first 10.415 us/op 9.2773 us/op 1.12
OrderedSet add up to 256 items then delete first 16.559 us/op 15.285 us/op 1.08
Set add up to 256 items then delete last 9.7538 us/op 9.8813 us/op 0.99
OrderedSet add up to 256 items then delete last 14.452 us/op 15.066 us/op 0.96
Set add up to 256 items then delete middle 9.6773 us/op 8.4788 us/op 1.14
OrderedSet add up to 256 items then delete middle 41.171 us/op 38.378 us/op 1.07
transfer serialized Status (84 B) 1.3490 us/op 1.5830 us/op 0.85
copy serialized Status (84 B) 1.1060 us/op 1.4020 us/op 0.79
transfer serialized SignedVoluntaryExit (112 B) 1.5020 us/op 1.5730 us/op 0.95
copy serialized SignedVoluntaryExit (112 B) 1.1720 us/op 1.3630 us/op 0.86
transfer serialized ProposerSlashing (416 B) 2.3460 us/op 2.4390 us/op 0.96
copy serialized ProposerSlashing (416 B) 1.9150 us/op 2.6460 us/op 0.72
transfer serialized Attestation (485 B) 2.1240 us/op 2.7110 us/op 0.78
copy serialized Attestation (485 B) 1.7680 us/op 2.2710 us/op 0.78
transfer serialized AttesterSlashing (33232 B) 2.5770 us/op 2.2060 us/op 1.17
copy serialized AttesterSlashing (33232 B) 5.3080 us/op 6.4530 us/op 0.82
transfer serialized Small SignedBeaconBlock (128000 B) 2.9170 us/op 2.8140 us/op 1.04
copy serialized Small SignedBeaconBlock (128000 B) 14.838 us/op 16.351 us/op 0.91
transfer serialized Avg SignedBeaconBlock (200000 B) 3.5020 us/op 3.0420 us/op 1.15
copy serialized Avg SignedBeaconBlock (200000 B) 22.320 us/op 27.094 us/op 0.82
transfer serialized BlobsSidecar (524380 B) 3.2290 us/op 3.6800 us/op 0.88
copy serialized BlobsSidecar (524380 B) 82.105 us/op 77.416 us/op 1.06
transfer serialized Big SignedBeaconBlock (1000000 B) 3.1340 us/op 4.0770 us/op 0.77
copy serialized Big SignedBeaconBlock (1000000 B) 323.23 us/op 128.91 us/op 2.51
pass gossip attestations to forkchoice per slot 3.1368 ms/op 2.9331 ms/op 1.07
forkChoice updateHead vc 100000 bc 64 eq 0 491.01 us/op 410.24 us/op 1.20
forkChoice updateHead vc 600000 bc 64 eq 0 2.9812 ms/op 2.5553 ms/op 1.17
forkChoice updateHead vc 1000000 bc 64 eq 0 6.2164 ms/op 4.3439 ms/op 1.43
forkChoice updateHead vc 600000 bc 320 eq 0 2.9932 ms/op 2.4975 ms/op 1.20
forkChoice updateHead vc 600000 bc 1200 eq 0 3.0144 ms/op 2.7642 ms/op 1.09
forkChoice updateHead vc 600000 bc 7200 eq 0 3.5755 ms/op 3.6084 ms/op 0.99
forkChoice updateHead vc 600000 bc 64 eq 1000 10.579 ms/op 10.045 ms/op 1.05
forkChoice updateHead vc 600000 bc 64 eq 10000 10.587 ms/op 9.7452 ms/op 1.09
forkChoice updateHead vc 600000 bc 64 eq 300000 14.687 ms/op 14.238 ms/op 1.03
computeDeltas 500000 validators 300 proto nodes 3.4182 ms/op 3.1219 ms/op 1.09
computeDeltas 500000 validators 1200 proto nodes 3.4212 ms/op 3.0313 ms/op 1.13
computeDeltas 500000 validators 7200 proto nodes 3.3873 ms/op 3.0399 ms/op 1.11
computeDeltas 750000 validators 300 proto nodes 5.0514 ms/op 4.4662 ms/op 1.13
computeDeltas 750000 validators 1200 proto nodes 5.1114 ms/op 4.4255 ms/op 1.15
computeDeltas 750000 validators 7200 proto nodes 5.0053 ms/op 4.7582 ms/op 1.05
computeDeltas 1400000 validators 300 proto nodes 9.4881 ms/op 8.9096 ms/op 1.06
computeDeltas 1400000 validators 1200 proto nodes 9.3926 ms/op 9.0633 ms/op 1.04
computeDeltas 1400000 validators 7200 proto nodes 9.4826 ms/op 8.9834 ms/op 1.06
computeDeltas 2100000 validators 300 proto nodes 14.196 ms/op 13.520 ms/op 1.05
computeDeltas 2100000 validators 1200 proto nodes 14.286 ms/op 12.629 ms/op 1.13
computeDeltas 2100000 validators 7200 proto nodes 14.234 ms/op 12.276 ms/op 1.16
altair processAttestation - 250000 vs - 7PWei normalcase 1.5741 ms/op 1.4418 ms/op 1.09
altair processAttestation - 250000 vs - 7PWei worstcase 2.4169 ms/op 2.1548 ms/op 1.12
altair processAttestation - setStatus - 1/6 committees join 85.195 us/op 63.502 us/op 1.34
altair processAttestation - setStatus - 1/3 committees join 170.73 us/op 129.91 us/op 1.31
altair processAttestation - setStatus - 1/2 committees join 239.26 us/op 178.22 us/op 1.34
altair processAttestation - setStatus - 2/3 committees join 313.35 us/op 269.45 us/op 1.16
altair processAttestation - setStatus - 4/5 committees join 457.20 us/op 384.15 us/op 1.19
altair processAttestation - setStatus - 100% committees join 543.85 us/op 490.44 us/op 1.11
altair processBlock - 250000 vs - 7PWei normalcase 4.1420 ms/op 4.2366 ms/op 0.98
altair processBlock - 250000 vs - 7PWei normalcase hashState 25.021 ms/op 26.182 ms/op 0.96
altair processBlock - 250000 vs - 7PWei worstcase 33.558 ms/op 34.698 ms/op 0.97
altair processBlock - 250000 vs - 7PWei worstcase hashState 73.120 ms/op 66.701 ms/op 1.10
phase0 processBlock - 250000 vs - 7PWei normalcase 1.5824 ms/op 1.4605 ms/op 1.08
phase0 processBlock - 250000 vs - 7PWei worstcase 20.602 ms/op 22.094 ms/op 0.93
altair processEth1Data - 250000 vs - 7PWei normalcase 301.42 us/op 242.13 us/op 1.24
getExpectedWithdrawals 250000 eb:1,eth1:1,we:0,wn:0,smpl:15 5.0240 us/op 4.7430 us/op 1.06
getExpectedWithdrawals 250000 eb:0.95,eth1:0.1,we:0.05,wn:0,smpl:219 16.990 us/op 18.980 us/op 0.90
getExpectedWithdrawals 250000 eb:0.95,eth1:0.3,we:0.05,wn:0,smpl:42 6.7670 us/op 6.8930 us/op 0.98
getExpectedWithdrawals 250000 eb:0.95,eth1:0.7,we:0.05,wn:0,smpl:18 5.4450 us/op 6.2520 us/op 0.87
getExpectedWithdrawals 250000 eb:0.1,eth1:0.1,we:0,wn:0,smpl:1020 73.765 us/op 84.343 us/op 0.87
getExpectedWithdrawals 250000 eb:0.03,eth1:0.03,we:0,wn:0,smpl:11777 680.56 us/op 844.80 us/op 0.81
getExpectedWithdrawals 250000 eb:0.01,eth1:0.01,we:0,wn:0,smpl:16384 904.43 us/op 840.52 us/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,smpl:16384 843.00 us/op 657.04 us/op 1.28
getExpectedWithdrawals 250000 eb:0,eth1:0,we:0,wn:0,nocache,smpl:16384 2.4200 ms/op 2.2332 ms/op 1.08
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,smpl:16384 1.4920 ms/op 1.2620 ms/op 1.18
getExpectedWithdrawals 250000 eb:0,eth1:1,we:0,wn:0,nocache,smpl:16384 3.5207 ms/op 2.9314 ms/op 1.20
Tree 40 250000 create 224.55 ms/op 188.45 ms/op 1.19
Tree 40 250000 get(125000) 138.57 ns/op 115.90 ns/op 1.20
Tree 40 250000 set(125000) 646.14 ns/op 516.98 ns/op 1.25
Tree 40 250000 toArray() 15.225 ms/op 12.871 ms/op 1.18
Tree 40 250000 iterate all - toArray() + loop 15.548 ms/op 13.321 ms/op 1.17
Tree 40 250000 iterate all - get(i) 49.610 ms/op 42.194 ms/op 1.18
MutableVector 250000 create 7.7036 ms/op 9.6972 ms/op 0.79
MutableVector 250000 get(125000) 6.7160 ns/op 5.7000 ns/op 1.18
MutableVector 250000 set(125000) 190.18 ns/op 170.25 ns/op 1.12
MutableVector 250000 toArray() 3.1938 ms/op 2.9667 ms/op 1.08
MutableVector 250000 iterate all - toArray() + loop 3.3323 ms/op 2.8193 ms/op 1.18
MutableVector 250000 iterate all - get(i) 1.5190 ms/op 1.4145 ms/op 1.07
Array 250000 create 2.8268 ms/op 2.3505 ms/op 1.20
Array 250000 clone - spread 1.4266 ms/op 1.3271 ms/op 1.07
Array 250000 get(125000) 0.39900 ns/op 0.56800 ns/op 0.70
Array 250000 set(125000) 0.41900 ns/op 0.57900 ns/op 0.72
Array 250000 iterate all - loop 103.17 us/op 77.334 us/op 1.33
effectiveBalanceIncrements clone Uint8Array 300000 28.653 us/op 14.923 us/op 1.92
effectiveBalanceIncrements clone MutableVector 300000 122.00 ns/op 302.00 ns/op 0.40
effectiveBalanceIncrements rw all Uint8Array 300000 193.68 us/op 166.59 us/op 1.16
effectiveBalanceIncrements rw all MutableVector 300000 63.224 ms/op 58.562 ms/op 1.08
phase0 afterProcessEpoch - 250000 vs - 7PWei 84.621 ms/op 76.487 ms/op 1.11
Array.fill - length 1000000 3.6043 ms/op 2.6332 ms/op 1.37
Array push - length 1000000 16.126 ms/op 14.883 ms/op 1.08
Array.get 0.26616 ns/op 0.25318 ns/op 1.05
Uint8Array.get 0.42240 ns/op 0.33191 ns/op 1.27
phase0 beforeProcessEpoch - 250000 vs - 7PWei 14.636 ms/op 15.073 ms/op 0.97
altair processEpoch - mainnet_e81889 304.56 ms/op 335.48 ms/op 0.91
mainnet_e81889 - altair beforeProcessEpoch 16.422 ms/op 17.405 ms/op 0.94
mainnet_e81889 - altair processJustificationAndFinalization 11.455 us/op 11.365 us/op 1.01
mainnet_e81889 - altair processInactivityUpdates 4.9797 ms/op 4.0336 ms/op 1.23
mainnet_e81889 - altair processRewardsAndPenalties 36.246 ms/op 49.126 ms/op 0.74
mainnet_e81889 - altair processRegistryUpdates 1.6930 us/op 2.2570 us/op 0.75
mainnet_e81889 - altair processSlashings 373.00 ns/op 722.00 ns/op 0.52
mainnet_e81889 - altair processEth1DataReset 277.00 ns/op 717.00 ns/op 0.39
mainnet_e81889 - altair processEffectiveBalanceUpdates 1.0319 ms/op 827.43 us/op 1.25
mainnet_e81889 - altair processSlashingsReset 2.5250 us/op 2.8200 us/op 0.90
mainnet_e81889 - altair processRandaoMixesReset 3.3800 us/op 5.7880 us/op 0.58
mainnet_e81889 - altair processHistoricalRootsUpdate 628.00 ns/op 1.0090 us/op 0.62
mainnet_e81889 - altair processParticipationFlagUpdates 1.8570 us/op 1.8580 us/op 1.00
mainnet_e81889 - altair processSyncCommitteeUpdates 384.00 ns/op 799.00 ns/op 0.48
mainnet_e81889 - altair afterProcessEpoch 88.048 ms/op 76.944 ms/op 1.14
capella processEpoch - mainnet_e217614 1.2659 s/op 1.1468 s/op 1.10
mainnet_e217614 - capella beforeProcessEpoch 69.492 ms/op 86.581 ms/op 0.80
mainnet_e217614 - capella processJustificationAndFinalization 15.531 us/op 29.738 us/op 0.52
mainnet_e217614 - capella processInactivityUpdates 15.683 ms/op 18.913 ms/op 0.83
mainnet_e217614 - capella processRewardsAndPenalties 215.01 ms/op 285.23 ms/op 0.75
mainnet_e217614 - capella processRegistryUpdates 11.927 us/op 20.025 us/op 0.60
mainnet_e217614 - capella processSlashings 369.00 ns/op 1.4030 us/op 0.26
mainnet_e217614 - capella processEth1DataReset 279.00 ns/op 1.0830 us/op 0.26
mainnet_e217614 - capella processEffectiveBalanceUpdates 6.5088 ms/op 12.935 ms/op 0.50
mainnet_e217614 - capella processSlashingsReset 3.5290 us/op 8.6730 us/op 0.41
mainnet_e217614 - capella processRandaoMixesReset 4.2610 us/op 7.6720 us/op 0.56
mainnet_e217614 - capella processHistoricalRootsUpdate 317.00 ns/op 1.1510 us/op 0.28
mainnet_e217614 - capella processParticipationFlagUpdates 3.4220 us/op 4.9800 us/op 0.69
mainnet_e217614 - capella afterProcessEpoch 256.39 ms/op 242.34 ms/op 1.06
phase0 processEpoch - mainnet_e58758 377.80 ms/op 435.00 ms/op 0.87
mainnet_e58758 - phase0 beforeProcessEpoch 73.596 ms/op 74.343 ms/op 0.99
mainnet_e58758 - phase0 processJustificationAndFinalization 14.709 us/op 13.421 us/op 1.10
mainnet_e58758 - phase0 processRewardsAndPenalties 29.910 ms/op 32.750 ms/op 0.91
mainnet_e58758 - phase0 processRegistryUpdates 7.1400 us/op 6.8390 us/op 1.04
mainnet_e58758 - phase0 processSlashings 317.00 ns/op 767.00 ns/op 0.41
mainnet_e58758 - phase0 processEth1DataReset 256.00 ns/op 712.00 ns/op 0.36
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.1152 ms/op 806.31 us/op 1.38
mainnet_e58758 - phase0 processSlashingsReset 3.0330 us/op 1.7220 us/op 1.76
mainnet_e58758 - phase0 processRandaoMixesReset 3.7350 us/op 3.8600 us/op 0.97
mainnet_e58758 - phase0 processHistoricalRootsUpdate 297.00 ns/op 797.00 ns/op 0.37
mainnet_e58758 - phase0 processParticipationRecordUpdates 2.3850 us/op 4.6490 us/op 0.51
mainnet_e58758 - phase0 afterProcessEpoch 77.331 ms/op 71.779 ms/op 1.08
phase0 processEffectiveBalanceUpdates - 250000 normalcase 1.1880 ms/op 833.59 us/op 1.43
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.9964 ms/op 1.8331 ms/op 1.09
altair processInactivityUpdates - 250000 normalcase 13.552 ms/op 14.558 ms/op 0.93
altair processInactivityUpdates - 250000 worstcase 14.013 ms/op 20.404 ms/op 0.69
phase0 processRegistryUpdates - 250000 normalcase 6.3520 us/op 13.392 us/op 0.47
phase0 processRegistryUpdates - 250000 badcase_full_deposits 249.60 us/op 360.88 us/op 0.69
phase0 processRegistryUpdates - 250000 worstcase 0.5 100.65 ms/op 114.33 ms/op 0.88
altair processRewardsAndPenalties - 250000 normalcase 37.814 ms/op 46.633 ms/op 0.81
altair processRewardsAndPenalties - 250000 worstcase 38.301 ms/op 43.938 ms/op 0.87
phase0 getAttestationDeltas - 250000 normalcase 7.2318 ms/op 5.8539 ms/op 1.24
phase0 getAttestationDeltas - 250000 worstcase 7.5197 ms/op 5.9968 ms/op 1.25
phase0 processSlashings - 250000 worstcase 74.511 us/op 88.787 us/op 0.84
altair processSyncCommitteeUpdates - 250000 116.43 ms/op 124.65 ms/op 0.93
BeaconState.hashTreeRoot - No change 262.00 ns/op 791.00 ns/op 0.33
BeaconState.hashTreeRoot - 1 full validator 132.14 us/op 119.19 us/op 1.11
BeaconState.hashTreeRoot - 32 full validator 995.15 us/op 1.2384 ms/op 0.80
BeaconState.hashTreeRoot - 512 full validator 11.344 ms/op 14.802 ms/op 0.77
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 135.52 us/op 188.06 us/op 0.72
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.8969 ms/op 3.1846 ms/op 0.60
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 23.834 ms/op 43.559 ms/op 0.55
BeaconState.hashTreeRoot - 1 balances 98.856 us/op 155.21 us/op 0.64
BeaconState.hashTreeRoot - 32 balances 951.33 us/op 1.6697 ms/op 0.57
BeaconState.hashTreeRoot - 512 balances 9.3816 ms/op 15.444 ms/op 0.61
BeaconState.hashTreeRoot - 250000 balances 165.88 ms/op 218.51 ms/op 0.76
aggregationBits - 2048 els - zipIndexesInBitList 22.526 us/op 19.513 us/op 1.15
byteArrayEquals 32 52.373 ns/op 45.808 ns/op 1.14
Buffer.compare 32 16.959 ns/op 15.743 ns/op 1.08
byteArrayEquals 1024 1.5499 us/op 1.3716 us/op 1.13
Buffer.compare 1024 24.096 ns/op 24.014 ns/op 1.00
byteArrayEquals 16384 24.692 us/op 20.729 us/op 1.19
Buffer.compare 16384 199.74 ns/op 196.16 ns/op 1.02
byteArrayEquals 123687377 181.56 ms/op 151.80 ms/op 1.20
Buffer.compare 123687377 6.0439 ms/op 4.1386 ms/op 1.46
byteArrayEquals 32 - diff last byte 49.761 ns/op 42.186 ns/op 1.18
Buffer.compare 32 - diff last byte 16.200 ns/op 15.868 ns/op 1.02
byteArrayEquals 1024 - diff last byte 1.5002 us/op 1.2732 us/op 1.18
Buffer.compare 1024 - diff last byte 23.632 ns/op 23.347 ns/op 1.01
byteArrayEquals 16384 - diff last byte 23.939 us/op 20.005 us/op 1.20
Buffer.compare 16384 - diff last byte 182.64 ns/op 297.32 ns/op 0.61
byteArrayEquals 123687377 - diff last byte 184.89 ms/op 149.08 ms/op 1.24
Buffer.compare 123687377 - diff last byte 6.7722 ms/op 5.8442 ms/op 1.16
byteArrayEquals 32 - random bytes 5.1680 ns/op 4.7450 ns/op 1.09
Buffer.compare 32 - random bytes 17.198 ns/op 15.297 ns/op 1.12
byteArrayEquals 1024 - random bytes 5.1360 ns/op 4.8300 ns/op 1.06
Buffer.compare 1024 - random bytes 17.155 ns/op 15.430 ns/op 1.11
byteArrayEquals 16384 - random bytes 5.1680 ns/op 4.9530 ns/op 1.04
Buffer.compare 16384 - random bytes 17.539 ns/op 15.277 ns/op 1.15
byteArrayEquals 123687377 - random bytes 6.4300 ns/op 7.6900 ns/op 0.84
Buffer.compare 123687377 - random bytes 18.270 ns/op 18.510 ns/op 0.99
regular array get 100000 times 43.648 us/op 31.326 us/op 1.39
wrappedArray get 100000 times 37.871 us/op 31.350 us/op 1.21
arrayWithProxy get 100000 times 13.164 ms/op 10.708 ms/op 1.23
ssz.Root.equals 45.529 ns/op 43.061 ns/op 1.06
byteArrayEquals 44.937 ns/op 41.681 ns/op 1.08
Buffer.compare 10.325 ns/op 9.1640 ns/op 1.13
shuffle list - 16384 els 6.2649 ms/op 5.5169 ms/op 1.14
shuffle list - 250000 els 91.658 ms/op 81.718 ms/op 1.12
processSlot - 1 slots 13.833 us/op 10.361 us/op 1.34
processSlot - 32 slots 2.9718 ms/op 2.3906 ms/op 1.24
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 35.259 ms/op 33.110 ms/op 1.06
getCommitteeAssignments - req 1 vs - 250000 vc 2.1175 ms/op 1.8055 ms/op 1.17
getCommitteeAssignments - req 100 vs - 250000 vc 4.0838 ms/op 3.5497 ms/op 1.15
getCommitteeAssignments - req 1000 vs - 250000 vc 4.3592 ms/op 3.8117 ms/op 1.14
findModifiedValidators - 10000 modified validators 276.88 ms/op 243.19 ms/op 1.14
findModifiedValidators - 1000 modified validators 183.43 ms/op 157.25 ms/op 1.17
findModifiedValidators - 100 modified validators 188.98 ms/op 142.77 ms/op 1.32
findModifiedValidators - 10 modified validators 169.25 ms/op 135.97 ms/op 1.24
findModifiedValidators - 1 modified validators 183.54 ms/op 133.85 ms/op 1.37
findModifiedValidators - no difference 168.53 ms/op 168.06 ms/op 1.00
compare ViewDUs 3.0052 s/op 3.3893 s/op 0.89
compare each validator Uint8Array 1.6150 s/op 1.7073 s/op 0.95
compare ViewDU to Uint8Array 992.90 ms/op 926.70 ms/op 1.07
migrate state 1000000 validators, 24 modified, 0 new 566.91 ms/op 661.39 ms/op 0.86
migrate state 1000000 validators, 1700 modified, 1000 new 816.44 ms/op 839.20 ms/op 0.97
migrate state 1000000 validators, 3400 modified, 2000 new 1.0181 s/op 1.0660 s/op 0.96
migrate state 1500000 validators, 24 modified, 0 new 593.96 ms/op 642.89 ms/op 0.92
migrate state 1500000 validators, 1700 modified, 1000 new 804.86 ms/op 926.43 ms/op 0.87
migrate state 1500000 validators, 3400 modified, 2000 new 1.0401 s/op 1.0628 s/op 0.98
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 4.4500 ns/op 7.0100 ns/op 0.63
state getBlockRootAtSlot - 250000 vs - 7PWei 878.45 ns/op 522.48 ns/op 1.68
computeProposers - vc 250000 7.3496 ms/op 6.3386 ms/op 1.16
computeEpochShuffling - vc 250000 91.600 ms/op 83.484 ms/op 1.10
getNextSyncCommittee - vc 250000 111.83 ms/op 103.93 ms/op 1.08
computeSigningRoot for AttestationData 19.214 us/op 20.258 us/op 0.95
hash AttestationData serialized data then Buffer.toString(base64) 1.4736 us/op 1.2536 us/op 1.18
toHexString serialized data 876.70 ns/op 993.27 ns/op 0.88
Buffer.toString(base64) 175.19 ns/op 146.42 ns/op 1.20

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 156e434 into unstable Aug 2, 2024
21 checks passed
@wemeetagain wemeetagain deleted the te/set_head_state_log branch August 2, 2024 13:19
@wemeetagain
Copy link
Member

🎉 This PR is included in v1.21.0 🎉

philknows pushed a commit that referenced this pull request Sep 3, 2024
* chore: more log on updateHeadState()

* chore: also log maybeHeadStateRoot

* fix: dontTransferCache option when regen head state
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