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

Integrate execution engine #3262

Merged
merged 7 commits into from
Sep 28, 2021
Merged

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Sep 27, 2021

Motivation

Part of #3076

Integrate moving parts added in previous PRs with BeaconNode modules.

Description

  • Add merge block POW data to onBlock handler
  • Add execution payload block hash to ProtoBlock
  • Send notifyForkchoiceUpdate on forkchoice events
  • Verify executePayload in verifyBlock
  • Call notifyConsensusValidated on verifyBlock
  • Use ExecutionEngineHttp in BeaconNode
  • Add execution cli options

Closes #3263

@codecov
Copy link

codecov bot commented Sep 27, 2021

Codecov Report

Merging #3262 (5f8e98e) into master (69ea94e) will decrease coverage by 4.48%.
The diff coverage is n/a.

❗ Current head 5f8e98e differs from pull request most recent head e29ce68. Consider uploading reports for the commit e29ce68 to get more accurate results

@@            Coverage Diff             @@
##           master    #3262      +/-   ##
==========================================
- Coverage   38.63%   34.15%   -4.49%     
==========================================
  Files         302      262      -40     
  Lines        7586     7036     -550     
  Branches     1108     1078      -30     
==========================================
- Hits         2931     2403     -528     
+ Misses       4522     4514       -8     
+ Partials      133      119      -14     

@github-actions
Copy link
Contributor

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 5f8e98e Previous: 69ea94e Ratio
BeaconState.hashTreeRoot - No change 737.00 ns/op 729.00 ns/op 1.01
BeaconState.hashTreeRoot - 1 full validator 92.259 us/op 91.527 us/op 1.01
BeaconState.hashTreeRoot - 32 full validator 1.3244 ms/op 1.3664 ms/op 0.97
BeaconState.hashTreeRoot - 512 full validator 16.411 ms/op 17.621 ms/op 0.93
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 97.983 us/op 90.623 us/op 1.08
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.3878 ms/op 1.4722 ms/op 0.94
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 19.842 ms/op 19.247 ms/op 1.03
BeaconState.hashTreeRoot - 1 balances 68.851 us/op 63.411 us/op 1.09
BeaconState.hashTreeRoot - 32 balances 589.84 us/op 556.49 us/op 1.06
BeaconState.hashTreeRoot - 512 balances 5.6808 ms/op 5.2130 ms/op 1.09
BeaconState.hashTreeRoot - 250000 balances 111.95 ms/op 98.743 ms/op 1.13
processSlot - 1 slots 56.076 us/op 54.906 us/op 1.02
processSlot - 32 slots 2.6780 ms/op 2.5991 ms/op 1.03
getCommitteeAssignments - req 1 vs - 250000 vc 5.0181 ms/op 4.7155 ms/op 1.06
getCommitteeAssignments - req 100 vs - 250000 vc 6.8581 ms/op 7.0706 ms/op 0.97
getCommitteeAssignments - req 1000 vs - 250000 vc 7.4955 ms/op 7.2716 ms/op 1.03
computeProposers - vc 250000 24.747 ms/op 23.654 ms/op 1.05
computeEpochShuffling - vc 250000 203.82 ms/op 187.38 ms/op 1.09
getNextSyncCommittee - vc 250000 402.74 ms/op 377.27 ms/op 1.07
altair processBlock - 250000 vs - 7PWei normalcase 91.884 ms/op 87.835 ms/op 1.05
altair processBlock - 250000 vs - 7PWei worstcase 243.38 ms/op 232.53 ms/op 1.05
altair processEpoch - pyrmont_e62330 475.54 ms/op 460.00 ms/op 1.03
pyrmont_e62330 - altair beforeProcessEpoch 164.62 ms/op 158.70 ms/op 1.04
pyrmont_e62330 - altair processJustificationAndFinalization 140.28 us/op 121.26 us/op 1.16
pyrmont_e62330 - altair processInactivityUpdates 8.4921 ms/op 8.0532 ms/op 1.05
pyrmont_e62330 - altair processRewardsAndPenalties 55.291 ms/op 54.178 ms/op 1.02
pyrmont_e62330 - altair processRegistryUpdates 24.681 us/op 29.241 us/op 0.84
pyrmont_e62330 - altair processSlashings 6.7020 us/op 6.9450 us/op 0.97
pyrmont_e62330 - altair processEth1DataReset 6.2920 us/op 7.0020 us/op 0.90
pyrmont_e62330 - altair processEffectiveBalanceUpdates 6.3033 ms/op 5.8279 ms/op 1.08
pyrmont_e62330 - altair processSlashingsReset 36.507 us/op 36.071 us/op 1.01
pyrmont_e62330 - altair processRandaoMixesReset 48.798 us/op 48.221 us/op 1.01
pyrmont_e62330 - altair processHistoricalRootsUpdate 8.4150 us/op 8.3180 us/op 1.01
pyrmont_e62330 - altair processParticipationFlagUpdates 46.974 ms/op 41.590 ms/op 1.13
pyrmont_e62330 - altair processSyncCommitteeUpdates 5.0930 us/op 5.5060 us/op 0.92
pyrmont_e62330 - altair afterProcessEpoch 141.98 ms/op 110.50 ms/op 1.28
altair processInactivityUpdates - 250000 normalcase 71.995 ms/op 67.038 ms/op 1.07
altair processInactivityUpdates - 250000 worstcase 65.003 ms/op 67.471 ms/op 0.96
altair processParticipationFlagUpdates - 250000 anycase 91.798 ms/op 100.34 ms/op 0.91
altair processRewardsAndPenalties - 250000 normalcase 120.55 ms/op 124.28 ms/op 0.97
altair processRewardsAndPenalties - 250000 worstcase 131.31 ms/op 127.66 ms/op 1.03
altair processSyncCommitteeUpdates - 250000 422.55 ms/op 398.71 ms/op 1.06
Tree 40 250000 create 527.07 ms/op 492.71 ms/op 1.07
Tree 40 250000 get(125000) 259.40 ns/op 254.03 ns/op 1.02
Tree 40 250000 set(125000) 1.6628 us/op 1.5445 us/op 1.08
Tree 40 250000 toArray() 43.684 ms/op 38.555 ms/op 1.13
Tree 40 250000 iterate all - toArray() + loop 42.923 ms/op 40.054 ms/op 1.07
Tree 40 250000 iterate all - get(i) 111.60 ms/op 108.51 ms/op 1.03
MutableVector 250000 create 22.966 ms/op 22.274 ms/op 1.03
MutableVector 250000 get(125000) 13.881 ns/op 19.305 ns/op 0.72
MutableVector 250000 set(125000) 528.85 ns/op 524.23 ns/op 1.01
MutableVector 250000 toArray() 7.9513 ms/op 7.8818 ms/op 1.01
MutableVector 250000 iterate all - toArray() + loop 8.1271 ms/op 9.1275 ms/op 0.89
MutableVector 250000 iterate all - get(i) 3.6863 ms/op 3.6147 ms/op 1.02
Array 250000 create 5.5688 ms/op 5.0224 ms/op 1.11
Array 250000 clone - spread 1.6330 ms/op 1.8887 ms/op 0.86
Array 250000 get(125000) 0.80800 ns/op 0.87700 ns/op 0.92
Array 250000 set(125000) 0.81900 ns/op 0.85300 ns/op 0.96
Array 250000 iterate all - loop 135.88 us/op 124.96 us/op 1.09
aggregationBits - 2048 els - readonlyValues 223.52 us/op 227.69 us/op 0.98
aggregationBits - 2048 els - zipIndexesInBitList 37.322 us/op 43.852 us/op 0.85
ssz.Root.equals 1.2860 us/op 1.3860 us/op 0.93
ssz.Root.equals with valueOf() 1.4870 us/op 1.4870 us/op 1.00
byteArrayEquals with valueOf() 1.5160 us/op 1.5310 us/op 0.99
phase0 processBlock - 250000 vs - 7PWei normalcase 14.552 ms/op 13.758 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei worstcase 91.005 ms/op 90.951 ms/op 1.00
phase0 afterProcessEpoch - 250000 vs - 7PWei 222.14 ms/op 205.45 ms/op 1.08
phase0 beforeProcessEpoch - 250000 vs - 7PWei 704.78 ms/op 653.60 ms/op 1.08
phase0 processEpoch - mainnet_e58758 922.36 ms/op 906.01 ms/op 1.02
mainnet_e58758 - phase0 beforeProcessEpoch 558.06 ms/op 541.89 ms/op 1.03
mainnet_e58758 - phase0 processJustificationAndFinalization 150.76 us/op 143.73 us/op 1.05
mainnet_e58758 - phase0 processRewardsAndPenalties 82.830 ms/op 79.901 ms/op 1.04
mainnet_e58758 - phase0 processRegistryUpdates 101.86 us/op 101.45 us/op 1.00
mainnet_e58758 - phase0 processSlashings 6.6320 us/op 7.0840 us/op 0.94
mainnet_e58758 - phase0 processEth1DataReset 5.4170 us/op 6.1280 us/op 0.88
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 9.5533 ms/op 9.1853 ms/op 1.04
mainnet_e58758 - phase0 processSlashingsReset 35.345 us/op 37.439 us/op 0.94
mainnet_e58758 - phase0 processRandaoMixesReset 43.183 us/op 52.336 us/op 0.83
mainnet_e58758 - phase0 processHistoricalRootsUpdate 8.3050 us/op 8.6770 us/op 0.96
mainnet_e58758 - phase0 processParticipationRecordUpdates 32.715 us/op 31.299 us/op 1.05
mainnet_e58758 - phase0 afterProcessEpoch 189.06 ms/op 180.91 ms/op 1.05
phase0 processEffectiveBalanceUpdates - 250000 normalcase 11.258 ms/op 10.908 ms/op 1.03
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 1.7287 s/op 1.6573 s/op 1.04
phase0 processRegistryUpdates - 250000 normalcase 102.35 us/op 103.33 us/op 0.99
phase0 processRegistryUpdates - 250000 badcase_full_deposits 4.3132 ms/op 4.1082 ms/op 1.05
phase0 processRegistryUpdates - 250000 worstcase 0.5 2.1060 s/op 2.2595 s/op 0.93
phase0 getAttestationDeltas - 250000 normalcase 35.622 ms/op 36.392 ms/op 0.98
phase0 getAttestationDeltas - 250000 worstcase 35.165 ms/op 36.548 ms/op 0.96
phase0 processSlashings - 250000 worstcase 30.997 ms/op 34.440 ms/op 0.90
shuffle list - 16384 els 13.385 ms/op 12.523 ms/op 1.07
shuffle list - 250000 els 182.93 ms/op 181.54 ms/op 1.01
getEffectiveBalances - 250000 vs - 7PWei 10.673 ms/op 9.9914 ms/op 1.07
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.5458 ms/op 2.5069 ms/op 1.02
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 1.0560 ms/op 930.87 us/op 1.13
BLS verify - blst-native 2.1265 ms/op 2.0375 ms/op 1.04
BLS verifyMultipleSignatures 3 - blst-native 4.3525 ms/op 3.9408 ms/op 1.10
BLS verifyMultipleSignatures 8 - blst-native 9.4217 ms/op 8.7894 ms/op 1.07
BLS verifyMultipleSignatures 32 - blst-native 34.102 ms/op 31.626 ms/op 1.08
BLS aggregatePubkeys 32 - blst-native 47.069 us/op 42.712 us/op 1.10
BLS aggregatePubkeys 128 - blst-native 177.01 us/op 166.47 us/op 1.06
getAttestationsForBlock 82.308 ms/op 78.614 ms/op 1.05
CheckpointStateCache - add get delete 16.859 us/op 15.914 us/op 1.06
validate gossip signedAggregateAndProof - struct 4.9110 ms/op 4.6217 ms/op 1.06
validate gossip signedAggregateAndProof - treeBacked 5.0753 ms/op 4.7004 ms/op 1.08
validate gossip attestation - struct 2.3929 ms/op 2.2391 ms/op 1.07
validate gossip attestation - treeBacked 2.3886 ms/op 2.2780 ms/op 1.05

by benchmarkbot/action

@wemeetagain wemeetagain merged commit 1fdb7c1 into master Sep 28, 2021
@wemeetagain wemeetagain deleted the dapplion/integrate-execution-engine branch September 28, 2021 05:09
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.

Integrate execution engine in BeaconNode
2 participants