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

Add and heartbeat to engine exchangeTransitionConfigurationV1 method #4411

Merged
merged 1 commit into from
Aug 14, 2022

Conversation

g11tech
Copy link
Contributor

@g11tech g11tech commented Aug 14, 2022

Motivation
Engine expects every now and then a call to exchange transition config otherwise it warns the users as

WARN [08-14|10:16:25.522] Post-merge network, but no beacon client seen. Please launch one to follow the chain! 
WARN [08-14|10:16:55.526] Post-merge network, but no beacon client seen. Please launch one to follow the chain! 

even if the requests are going at the engine endpoint

Add and heartbeat to engine exchangeTransitionConfigurationV1 method to notify and match merge params with the EL.

On this PR, the EL stops complaining about the CL not being connected, manually tested and verified. (and gives this warning once lodestar is stopped, so as to confirm it saw CL connection/heartbeat:

WARN [08-14|10:27:25.603] Previously seen beacon client is offline. Please ensure it is operational to follow the chain!

Closes #4364

@g11tech g11tech requested a review from a team as a code owner August 14, 2022 10:23
@g11tech g11tech mentioned this pull request Aug 14, 2022
22 tasks
@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: fe03f4f Previous: 20edb58 Ratio
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.3281 ms/op 2.3467 ms/op 0.99
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 80.026 us/op 82.711 us/op 0.97
BLS verify - blst-native 1.8533 ms/op 2.7172 ms/op 0.68
BLS verifyMultipleSignatures 3 - blst-native 3.8012 ms/op 5.5908 ms/op 0.68
BLS verifyMultipleSignatures 8 - blst-native 8.1725 ms/op 11.947 ms/op 0.68
BLS verifyMultipleSignatures 32 - blst-native 29.640 ms/op 43.367 ms/op 0.68
BLS aggregatePubkeys 32 - blst-native 40.936 us/op 59.241 us/op 0.69
BLS aggregatePubkeys 128 - blst-native 157.15 us/op 230.22 us/op 0.68
getAttestationsForBlock 175.74 ms/op 174.90 ms/op 1.00
isKnown best case - 1 super set check 441.00 ns/op 512.00 ns/op 0.86
isKnown normal case - 2 super set checks 419.00 ns/op 477.00 ns/op 0.88
isKnown worse case - 16 super set checks 429.00 ns/op 456.00 ns/op 0.94
CheckpointStateCache - add get delete 9.4250 us/op 9.4510 us/op 1.00
validate gossip signedAggregateAndProof - struct 4.2717 ms/op 5.7184 ms/op 0.75
validate gossip attestation - struct 2.0350 ms/op 2.6761 ms/op 0.76
altair verifyImport mainnet_s3766816:31 4.6056 s/op 5.7110 s/op 0.81
pickEth1Vote - no votes 2.1545 ms/op 2.2622 ms/op 0.95
pickEth1Vote - max votes 25.323 ms/op 23.302 ms/op 1.09
pickEth1Vote - Eth1Data hashTreeRoot value x2048 11.574 ms/op 15.513 ms/op 0.75
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 24.636 ms/op 19.848 ms/op 1.24
pickEth1Vote - Eth1Data fastSerialize value x2048 1.7601 ms/op 1.5506 ms/op 1.14
pickEth1Vote - Eth1Data fastSerialize tree x2048 13.702 ms/op 12.698 ms/op 1.08
bytes32 toHexString 1.1060 us/op 1.0490 us/op 1.05
bytes32 Buffer.toString(hex) 729.00 ns/op 733.00 ns/op 0.99
bytes32 Buffer.toString(hex) from Uint8Array 891.00 ns/op 935.00 ns/op 0.95
bytes32 Buffer.toString(hex) + 0x 713.00 ns/op 739.00 ns/op 0.96
Object access 1 prop 0.36300 ns/op 0.35200 ns/op 1.03
Map access 1 prop 0.29000 ns/op 0.31100 ns/op 0.93
Object get x1000 17.333 ns/op 15.060 ns/op 1.15
Map get x1000 1.0160 ns/op 1.0330 ns/op 0.98
Object set x1000 116.69 ns/op 105.15 ns/op 1.11
Map set x1000 70.369 ns/op 76.358 ns/op 0.92
Return object 10000 times 0.37550 ns/op 0.41510 ns/op 0.90
Throw Error 10000 times 5.8760 us/op 6.9526 us/op 0.85
enrSubnets - fastDeserialize 64 bits 2.7410 us/op 2.8940 us/op 0.95
enrSubnets - ssz BitVector 64 bits 891.00 ns/op 839.00 ns/op 1.06
enrSubnets - fastDeserialize 4 bits 407.00 ns/op 410.00 ns/op 0.99
enrSubnets - ssz BitVector 4 bits 881.00 ns/op 803.00 ns/op 1.10
prioritizePeers score -10:0 att 32-0.1 sync 2-0 93.897 us/op 104.70 us/op 0.90
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 133.67 us/op 156.42 us/op 0.85
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 252.24 us/op 260.90 us/op 0.97
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 391.51 us/op 575.94 us/op 0.68
prioritizePeers score 0:0 att 64-1 sync 4-1 460.86 us/op 624.34 us/op 0.74
RateTracker 1000000 limit, 1 obj count per request 199.32 ns/op 209.58 ns/op 0.95
RateTracker 1000000 limit, 2 obj count per request 154.73 ns/op 141.01 ns/op 1.10
RateTracker 1000000 limit, 4 obj count per request 132.36 ns/op 129.81 ns/op 1.02
RateTracker 1000000 limit, 8 obj count per request 121.21 ns/op 107.99 ns/op 1.12
RateTracker with prune 4.5750 us/op 4.3000 us/op 1.06
array of 16000 items push then shift 3.1707 us/op 5.1064 us/op 0.62
LinkedList of 16000 items push then shift 26.354 ns/op 32.528 ns/op 0.81
array of 16000 items push then pop 232.40 ns/op 222.69 ns/op 1.04
LinkedList of 16000 items push then pop 22.037 ns/op 25.470 ns/op 0.87
array of 24000 items push then shift 4.5729 us/op 7.9289 us/op 0.58
LinkedList of 24000 items push then shift 28.078 ns/op 30.659 ns/op 0.92
array of 24000 items push then pop 213.45 ns/op 220.28 ns/op 0.97
LinkedList of 24000 items push then pop 22.111 ns/op 24.862 ns/op 0.89
intersect bitArray bitLen 8 11.629 ns/op 14.840 ns/op 0.78
intersect array and set length 8 171.96 ns/op 170.04 ns/op 1.01
intersect bitArray bitLen 128 72.145 ns/op 66.997 ns/op 1.08
intersect array and set length 128 2.2781 us/op 2.1784 us/op 1.05
Buffer.concat 32 items 1.9030 ns/op 2.1060 ns/op 0.90
pass gossip attestations to forkchoice per slot 2.9805 ms/op 3.5148 ms/op 0.85
computeDeltas 3.4811 ms/op 4.1671 ms/op 0.84
computeProposerBoostScoreFromBalances 908.08 us/op 843.08 us/op 1.08
altair processAttestation - 250000 vs - 7PWei normalcase 4.5076 ms/op 4.5696 ms/op 0.99
altair processAttestation - 250000 vs - 7PWei worstcase 6.4809 ms/op 6.7974 ms/op 0.95
altair processAttestation - setStatus - 1/6 committees join 211.85 us/op 259.93 us/op 0.82
altair processAttestation - setStatus - 1/3 committees join 404.32 us/op 484.11 us/op 0.84
altair processAttestation - setStatus - 1/2 committees join 563.91 us/op 747.34 us/op 0.75
altair processAttestation - setStatus - 2/3 committees join 720.06 us/op 845.13 us/op 0.85
altair processAttestation - setStatus - 4/5 committees join 1.0175 ms/op 1.1639 ms/op 0.87
altair processAttestation - setStatus - 100% committees join 1.2012 ms/op 1.4362 ms/op 0.84
altair processBlock - 250000 vs - 7PWei normalcase 33.219 ms/op 33.667 ms/op 0.99
altair processBlock - 250000 vs - 7PWei normalcase hashState 40.868 ms/op 47.271 ms/op 0.86
altair processBlock - 250000 vs - 7PWei worstcase 90.705 ms/op 107.27 ms/op 0.85
altair processBlock - 250000 vs - 7PWei worstcase hashState 94.801 ms/op 137.55 ms/op 0.69
phase0 processBlock - 250000 vs - 7PWei normalcase 4.1403 ms/op 4.0910 ms/op 1.01
phase0 processBlock - 250000 vs - 7PWei worstcase 47.439 ms/op 63.603 ms/op 0.75
altair processEth1Data - 250000 vs - 7PWei normalcase 1.5030 ms/op 1.6777 ms/op 0.90
Tree 40 250000 create 840.73 ms/op 906.10 ms/op 0.93
Tree 40 250000 get(125000) 287.92 ns/op 323.71 ns/op 0.89
Tree 40 250000 set(125000) 2.2913 us/op 2.7891 us/op 0.82
Tree 40 250000 toArray() 34.253 ms/op 35.241 ms/op 0.97
Tree 40 250000 iterate all - toArray() + loop 34.588 ms/op 35.713 ms/op 0.97
Tree 40 250000 iterate all - get(i) 113.00 ms/op 141.43 ms/op 0.80
MutableVector 250000 create 22.705 ms/op 28.254 ms/op 0.80
MutableVector 250000 get(125000) 13.306 ns/op 14.856 ns/op 0.90
MutableVector 250000 set(125000) 626.32 ns/op 665.90 ns/op 0.94
MutableVector 250000 toArray() 7.1992 ms/op 6.4591 ms/op 1.11
MutableVector 250000 iterate all - toArray() + loop 7.3098 ms/op 6.2435 ms/op 1.17
MutableVector 250000 iterate all - get(i) 3.6389 ms/op 3.3053 ms/op 1.10
Array 250000 create 6.4597 ms/op 5.9278 ms/op 1.09
Array 250000 clone - spread 2.5930 ms/op 2.5752 ms/op 1.01
Array 250000 get(125000) 1.1180 ns/op 1.1180 ns/op 1.00
Array 250000 set(125000) 1.1120 ns/op 1.1820 ns/op 0.94
Array 250000 iterate all - loop 167.87 us/op 134.59 us/op 1.25
effectiveBalanceIncrements clone Uint8Array 300000 91.605 us/op 88.708 us/op 1.03
effectiveBalanceIncrements clone MutableVector 300000 716.00 ns/op 763.00 ns/op 0.94
effectiveBalanceIncrements rw all Uint8Array 300000 254.17 us/op 279.53 us/op 0.91
effectiveBalanceIncrements rw all MutableVector 300000 172.35 ms/op 196.14 ms/op 0.88
phase0 afterProcessEpoch - 250000 vs - 7PWei 199.16 ms/op 205.63 ms/op 0.97
phase0 beforeProcessEpoch - 250000 vs - 7PWei 148.42 ms/op 153.05 ms/op 0.97
altair processEpoch - mainnet_e81889 721.74 ms/op 772.34 ms/op 0.93
mainnet_e81889 - altair beforeProcessEpoch 211.00 ms/op 215.34 ms/op 0.98
mainnet_e81889 - altair processJustificationAndFinalization 23.205 us/op 71.825 us/op 0.32
mainnet_e81889 - altair processInactivityUpdates 10.676 ms/op 11.927 ms/op 0.90
mainnet_e81889 - altair processRewardsAndPenalties 191.42 ms/op 204.54 ms/op 0.94
mainnet_e81889 - altair processRegistryUpdates 4.4820 us/op 14.676 us/op 0.31
mainnet_e81889 - altair processSlashings 1.0530 us/op 3.7790 us/op 0.28
mainnet_e81889 - altair processEth1DataReset 912.00 ns/op 4.2520 us/op 0.21
mainnet_e81889 - altair processEffectiveBalanceUpdates 3.4274 ms/op 2.7424 ms/op 1.25
mainnet_e81889 - altair processSlashingsReset 6.2390 us/op 33.699 us/op 0.19
mainnet_e81889 - altair processRandaoMixesReset 6.2270 us/op 29.162 us/op 0.21
mainnet_e81889 - altair processHistoricalRootsUpdate 1.0250 us/op 5.0800 us/op 0.20
mainnet_e81889 - altair processParticipationFlagUpdates 3.4630 us/op 17.300 us/op 0.20
mainnet_e81889 - altair processSyncCommitteeUpdates 872.00 ns/op 4.5930 us/op 0.19
mainnet_e81889 - altair afterProcessEpoch 186.49 ms/op 196.75 ms/op 0.95
phase0 processEpoch - mainnet_e58758 694.50 ms/op 770.65 ms/op 0.90
mainnet_e58758 - phase0 beforeProcessEpoch 288.21 ms/op 336.91 ms/op 0.86
mainnet_e58758 - phase0 processJustificationAndFinalization 23.613 us/op 65.100 us/op 0.36
mainnet_e58758 - phase0 processRewardsAndPenalties 155.31 ms/op 167.14 ms/op 0.93
mainnet_e58758 - phase0 processRegistryUpdates 12.080 us/op 36.669 us/op 0.33
mainnet_e58758 - phase0 processSlashings 871.00 ns/op 3.9490 us/op 0.22
mainnet_e58758 - phase0 processEth1DataReset 1.1030 us/op 3.5910 us/op 0.31
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 1.8660 ms/op 2.4801 ms/op 0.75
mainnet_e58758 - phase0 processSlashingsReset 5.6860 us/op 15.792 us/op 0.36
mainnet_e58758 - phase0 processRandaoMixesReset 7.5870 us/op 23.302 us/op 0.33
mainnet_e58758 - phase0 processHistoricalRootsUpdate 1.0800 us/op 4.1010 us/op 0.26
mainnet_e58758 - phase0 processParticipationRecordUpdates 5.3670 us/op 23.517 us/op 0.23
mainnet_e58758 - phase0 afterProcessEpoch 151.51 ms/op 171.25 ms/op 0.88
phase0 processEffectiveBalanceUpdates - 250000 normalcase 2.6022 ms/op 2.5467 ms/op 1.02
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.0392 ms/op 3.1456 ms/op 0.97
altair processInactivityUpdates - 250000 normalcase 66.679 ms/op 77.124 ms/op 0.86
altair processInactivityUpdates - 250000 worstcase 65.999 ms/op 71.929 ms/op 0.92
phase0 processRegistryUpdates - 250000 normalcase 9.0300 us/op 34.994 us/op 0.26
phase0 processRegistryUpdates - 250000 badcase_full_deposits 432.43 us/op 492.35 us/op 0.88
phase0 processRegistryUpdates - 250000 worstcase 0.5 281.50 ms/op 301.34 ms/op 0.93
altair processRewardsAndPenalties - 250000 normalcase 158.55 ms/op 175.54 ms/op 0.90
altair processRewardsAndPenalties - 250000 worstcase 162.67 ms/op 171.64 ms/op 0.95
phase0 getAttestationDeltas - 250000 normalcase 13.461 ms/op 12.754 ms/op 1.06
phase0 getAttestationDeltas - 250000 worstcase 13.432 ms/op 14.376 ms/op 0.93
phase0 processSlashings - 250000 worstcase 6.1890 ms/op 6.4962 ms/op 0.95
altair processSyncCommitteeUpdates - 250000 279.28 ms/op 328.10 ms/op 0.85
BeaconState.hashTreeRoot - No change 463.00 ns/op 576.00 ns/op 0.80
BeaconState.hashTreeRoot - 1 full validator 61.451 us/op 73.681 us/op 0.83
BeaconState.hashTreeRoot - 32 full validator 703.48 us/op 830.66 us/op 0.85
BeaconState.hashTreeRoot - 512 full validator 7.6614 ms/op 12.295 ms/op 0.62
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 78.515 us/op 108.91 us/op 0.72
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3151 ms/op 1.5353 ms/op 0.86
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.185 ms/op 19.724 ms/op 0.92
BeaconState.hashTreeRoot - 1 balances 56.386 us/op 74.699 us/op 0.75
BeaconState.hashTreeRoot - 32 balances 623.27 us/op 802.65 us/op 0.78
BeaconState.hashTreeRoot - 512 balances 6.1374 ms/op 7.5099 ms/op 0.82
BeaconState.hashTreeRoot - 250000 balances 101.12 ms/op 111.21 ms/op 0.91
aggregationBits - 2048 els - zipIndexesInBitList 29.153 us/op 27.226 us/op 1.07
regular array get 100000 times 67.435 us/op 52.717 us/op 1.28
wrappedArray get 100000 times 67.439 us/op 53.800 us/op 1.25
arrayWithProxy get 100000 times 29.580 ms/op 37.607 ms/op 0.79
ssz.Root.equals 568.00 ns/op 642.00 ns/op 0.88
byteArrayEquals 479.00 ns/op 547.00 ns/op 0.88
shuffle list - 16384 els 11.249 ms/op 11.888 ms/op 0.95
shuffle list - 250000 els 166.00 ms/op 173.51 ms/op 0.96
processSlot - 1 slots 12.820 us/op 16.497 us/op 0.78
processSlot - 32 slots 1.9300 ms/op 2.2653 ms/op 0.85
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 340.71 us/op 611.64 us/op 0.56
getCommitteeAssignments - req 1 vs - 250000 vc 5.2819 ms/op 5.6983 ms/op 0.93
getCommitteeAssignments - req 100 vs - 250000 vc 7.3399 ms/op 8.1420 ms/op 0.90
getCommitteeAssignments - req 1000 vs - 250000 vc 7.8458 ms/op 8.3962 ms/op 0.93
RootCache.getBlockRootAtSlot - 250000 vs - 7PWei 10.950 ns/op 9.4100 ns/op 1.16
state getBlockRootAtSlot - 250000 vs - 7PWei 1.2282 us/op 1.0608 us/op 1.16
computeProposers - vc 250000 16.617 ms/op 17.940 ms/op 0.93
computeEpochShuffling - vc 250000 178.38 ms/op 170.00 ms/op 1.05
getNextSyncCommittee - vc 250000 280.27 ms/op 298.55 ms/op 0.94

by benchmarkbot/action

@g11tech g11tech enabled auto-merge (squash) August 14, 2022 11:20
@g11tech g11tech merged commit 1778fc4 into unstable Aug 14, 2022
@g11tech g11tech deleted the g11tech/exchange-transition-hb branch August 14, 2022 12:24
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.

Add engine_exchangeTransitionConfigurationV1
2 participants