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

Support gnosis beacon chain with --network gnosis #4137

Merged
merged 3 commits into from
Jun 9, 2022

Conversation

dapplion
Copy link
Contributor

@dapplion dapplion commented Jun 9, 2022

Motivation

Support Gnosis beacon chain with a new preset and config

Description

Gnosis beacon chain has changed some preset values that we don't expected to be changed. Thus requires #4136 to auto-load a specific preset at runtime for the config to be compatible.

Note: Any programmatic use of Lodestar libraries still require setting LODESTAR_PRESET=gnosis to work properly.

@dapplion dapplion requested a review from a team as a code owner June 9, 2022 16:40
@dapplion dapplion changed the title Dapplion/gnosis support Support gnosis beacon chain with --network gnosis Jun 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 9, 2022

Performance Report

✔️ no performance regression detected

Full benchmark results
Benchmark suite Current: 5b50b00 Previous: 8535830 Ratio
altair processAttestation - 250000 vs - 7PWei normalcase 3.9835 ms/op 4.2223 ms/op 0.94
altair processAttestation - 250000 vs - 7PWei worstcase 7.1092 ms/op 6.9226 ms/op 1.03
altair processAttestation - setStatus - 1/6 committees join 230.92 us/op 237.54 us/op 0.97
altair processAttestation - setStatus - 1/3 committees join 446.02 us/op 462.74 us/op 0.96
altair processAttestation - setStatus - 1/2 committees join 618.18 us/op 657.02 us/op 0.94
altair processAttestation - setStatus - 2/3 committees join 808.41 us/op 843.60 us/op 0.96
altair processAttestation - setStatus - 4/5 committees join 1.1094 ms/op 1.1480 ms/op 0.97
altair processAttestation - setStatus - 100% committees join 1.3209 ms/op 1.3556 ms/op 0.97
altair processBlock - 250000 vs - 7PWei normalcase 31.861 ms/op 30.421 ms/op 1.05
altair processBlock - 250000 vs - 7PWei normalcase hashState 38.649 ms/op 39.122 ms/op 0.99
altair processBlock - 250000 vs - 7PWei worstcase 93.611 ms/op 91.435 ms/op 1.02
altair processBlock - 250000 vs - 7PWei worstcase hashState 116.71 ms/op 110.11 ms/op 1.06
phase0 processBlock - 250000 vs - 7PWei normalcase 4.0215 ms/op 4.1217 ms/op 0.98
phase0 processBlock - 250000 vs - 7PWei worstcase 54.642 ms/op 54.396 ms/op 1.00
altair processEth1Data - 250000 vs - 7PWei normalcase 793.46 us/op 818.94 us/op 0.97
Tree 40 250000 create 849.65 ms/op 909.14 ms/op 0.93
Tree 40 250000 get(125000) 344.52 ns/op 355.27 ns/op 0.97
Tree 40 250000 set(125000) 2.8031 us/op 2.6921 us/op 1.04
Tree 40 250000 toArray() 36.609 ms/op 36.860 ms/op 0.99
Tree 40 250000 iterate all - toArray() + loop 36.997 ms/op 37.307 ms/op 0.99
Tree 40 250000 iterate all - get(i) 133.83 ms/op 133.82 ms/op 1.00
MutableVector 250000 create 18.189 ms/op 21.528 ms/op 0.84
MutableVector 250000 get(125000) 18.300 ns/op 15.778 ns/op 1.16
MutableVector 250000 set(125000) 717.02 ns/op 728.17 ns/op 0.98
MutableVector 250000 toArray() 8.4556 ms/op 8.3313 ms/op 1.01
MutableVector 250000 iterate all - toArray() + loop 8.6072 ms/op 8.7345 ms/op 0.99
MutableVector 250000 iterate all - get(i) 3.9382 ms/op 4.1578 ms/op 0.95
Array 250000 create 7.3638 ms/op 7.6044 ms/op 0.97
Array 250000 clone - spread 4.0736 ms/op 4.3316 ms/op 0.94
Array 250000 get(125000) 1.7790 ns/op 1.8180 ns/op 0.98
Array 250000 set(125000) 1.7910 ns/op 1.8970 ns/op 0.94
Array 250000 iterate all - loop 203.13 us/op 202.06 us/op 1.01
effectiveBalanceIncrements clone Uint8Array 300000 170.16 us/op 111.69 us/op 1.52
effectiveBalanceIncrements clone MutableVector 300000 771.00 ns/op 1.4110 us/op 0.55
effectiveBalanceIncrements rw all Uint8Array 300000 303.14 us/op 306.21 us/op 0.99
effectiveBalanceIncrements rw all MutableVector 300000 180.38 ms/op 241.25 ms/op 0.75
phase0 afterProcessEpoch - 250000 vs - 7PWei 228.23 ms/op 221.09 ms/op 1.03
phase0 beforeProcessEpoch - 250000 vs - 7PWei 74.785 ms/op 120.67 ms/op 0.62
altair processEpoch - mainnet_e81889 626.17 ms/op 662.54 ms/op 0.95
mainnet_e81889 - altair beforeProcessEpoch 108.53 ms/op 191.09 ms/op 0.57
mainnet_e81889 - altair processJustificationAndFinalization 37.366 us/op 36.186 us/op 1.03
mainnet_e81889 - altair processInactivityUpdates 12.494 ms/op 13.016 ms/op 0.96
mainnet_e81889 - altair processRewardsAndPenalties 172.29 ms/op 97.466 ms/op 1.77
mainnet_e81889 - altair processRegistryUpdates 6.8490 us/op 7.6980 us/op 0.89
mainnet_e81889 - altair processSlashings 1.5650 us/op 2.2070 us/op 0.71
mainnet_e81889 - altair processEth1DataReset 1.8880 us/op 2.2230 us/op 0.85
mainnet_e81889 - altair processEffectiveBalanceUpdates 2.8954 ms/op 2.8959 ms/op 1.00
mainnet_e81889 - altair processSlashingsReset 12.518 us/op 15.217 us/op 0.82
mainnet_e81889 - altair processRandaoMixesReset 11.703 us/op 14.274 us/op 0.82
mainnet_e81889 - altair processHistoricalRootsUpdate 1.9070 us/op 1.9530 us/op 0.98
mainnet_e81889 - altair processParticipationFlagUpdates 6.0140 us/op 8.6640 us/op 0.69
mainnet_e81889 - altair processSyncCommitteeUpdates 1.8760 us/op 1.7060 us/op 1.10
mainnet_e81889 - altair afterProcessEpoch 227.49 ms/op 231.53 ms/op 0.98
phase0 processEpoch - mainnet_e58758 588.05 ms/op 601.06 ms/op 0.98
mainnet_e58758 - phase0 beforeProcessEpoch 210.81 ms/op 220.88 ms/op 0.95
mainnet_e58758 - phase0 processJustificationAndFinalization 38.447 us/op 39.576 us/op 0.97
mainnet_e58758 - phase0 processRewardsAndPenalties 88.992 ms/op 83.649 ms/op 1.06
mainnet_e58758 - phase0 processRegistryUpdates 20.299 us/op 19.106 us/op 1.06
mainnet_e58758 - phase0 processSlashings 1.5450 us/op 1.7520 us/op 0.88
mainnet_e58758 - phase0 processEth1DataReset 1.7430 us/op 2.2900 us/op 0.76
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 2.3795 ms/op 2.5166 ms/op 0.95
mainnet_e58758 - phase0 processSlashingsReset 9.3290 us/op 9.4770 us/op 0.98
mainnet_e58758 - phase0 processRandaoMixesReset 13.130 us/op 14.093 us/op 0.93
mainnet_e58758 - phase0 processHistoricalRootsUpdate 2.4400 us/op 2.0710 us/op 1.18
mainnet_e58758 - phase0 processParticipationRecordUpdates 10.472 us/op 12.710 us/op 0.82
mainnet_e58758 - phase0 afterProcessEpoch 190.49 ms/op 192.37 ms/op 0.99
phase0 processEffectiveBalanceUpdates - 250000 normalcase 3.4966 ms/op 3.6042 ms/op 0.97
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 3.8125 ms/op 3.6394 ms/op 1.05
altair processInactivityUpdates - 250000 normalcase 30.275 ms/op 30.461 ms/op 0.99
altair processInactivityUpdates - 250000 worstcase 30.115 ms/op 35.722 ms/op 0.84
phase0 processRegistryUpdates - 250000 normalcase 14.195 us/op 14.885 us/op 0.95
phase0 processRegistryUpdates - 250000 badcase_full_deposits 500.55 us/op 506.16 us/op 0.99
phase0 processRegistryUpdates - 250000 worstcase 0.5 245.80 ms/op 247.03 ms/op 1.00
altair processRewardsAndPenalties - 250000 normalcase 105.77 ms/op 88.795 ms/op 1.19
altair processRewardsAndPenalties - 250000 worstcase 143.48 ms/op 108.07 ms/op 1.33
phase0 getAttestationDeltas - 250000 normalcase 14.321 ms/op 16.159 ms/op 0.89
phase0 getAttestationDeltas - 250000 worstcase 14.233 ms/op 16.295 ms/op 0.87
phase0 processSlashings - 250000 worstcase 6.4633 ms/op 6.2869 ms/op 1.03
altair processSyncCommitteeUpdates - 250000 326.58 ms/op 332.96 ms/op 0.98
BeaconState.hashTreeRoot - No change 671.00 ns/op 694.00 ns/op 0.97
BeaconState.hashTreeRoot - 1 full validator 77.169 us/op 77.439 us/op 1.00
BeaconState.hashTreeRoot - 32 full validator 760.53 us/op 776.52 us/op 0.98
BeaconState.hashTreeRoot - 512 full validator 7.7952 ms/op 7.4712 ms/op 1.04
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 91.290 us/op 183.92 us/op 0.50
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 1.2646 ms/op 1.3957 ms/op 0.91
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 18.685 ms/op 18.555 ms/op 1.01
BeaconState.hashTreeRoot - 1 balances 70.830 us/op 70.321 us/op 1.01
BeaconState.hashTreeRoot - 32 balances 748.91 us/op 622.69 us/op 1.20
BeaconState.hashTreeRoot - 512 balances 5.9535 ms/op 6.0706 ms/op 0.98
BeaconState.hashTreeRoot - 250000 balances 101.60 ms/op 102.61 ms/op 0.99
aggregationBits - 2048 els - zipIndexesInBitList 38.107 us/op 41.248 us/op 0.92
regular array get 100000 times 80.814 us/op 81.133 us/op 1.00
wrappedArray get 100000 times 80.880 us/op 81.103 us/op 1.00
arrayWithProxy get 100000 times 35.570 ms/op 35.618 ms/op 1.00
ssz.Root.equals 591.00 ns/op 638.00 ns/op 0.93
byteArrayEquals 603.00 ns/op 599.00 ns/op 1.01
shuffle list - 16384 els 13.269 ms/op 13.366 ms/op 0.99
shuffle list - 250000 els 194.34 ms/op 196.47 ms/op 0.99
processSlot - 1 slots 14.284 us/op 16.722 us/op 0.85
processSlot - 32 slots 2.1217 ms/op 2.0834 ms/op 1.02
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 488.72 us/op 470.29 us/op 1.04
getCommitteeAssignments - req 1 vs - 250000 vc 6.3622 ms/op 6.3415 ms/op 1.00
getCommitteeAssignments - req 100 vs - 250000 vc 8.7594 ms/op 8.7971 ms/op 1.00
getCommitteeAssignments - req 1000 vs - 250000 vc 9.3829 ms/op 9.4702 ms/op 0.99
computeProposers - vc 250000 20.883 ms/op 21.447 ms/op 0.97
computeEpochShuffling - vc 250000 198.74 ms/op 198.39 ms/op 1.00
getNextSyncCommittee - vc 250000 317.89 ms/op 316.46 ms/op 1.00
pass gossip attestations to forkchoice per slot 5.9670 ms/op 3.8054 ms/op 1.57
computeDeltas 3.8501 ms/op 4.0455 ms/op 0.95
computeProposerBoostScoreFromBalances 1.1003 ms/op 1.0871 ms/op 1.01
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.3423 ms/op 2.4639 ms/op 0.95
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 89.366 us/op 86.684 us/op 1.03
BLS verify - blst-native 2.2068 ms/op 2.2313 ms/op 0.99
BLS verifyMultipleSignatures 3 - blst-native 4.4868 ms/op 4.5535 ms/op 0.99
BLS verifyMultipleSignatures 8 - blst-native 9.7470 ms/op 9.8416 ms/op 0.99
BLS verifyMultipleSignatures 32 - blst-native 35.193 ms/op 35.654 ms/op 0.99
BLS aggregatePubkeys 32 - blst-native 47.058 us/op 47.243 us/op 1.00
BLS aggregatePubkeys 128 - blst-native 184.49 us/op 184.84 us/op 1.00
getAttestationsForBlock 78.868 ms/op 81.360 ms/op 0.97
isKnown best case - 1 super set check 521.00 ns/op 541.00 ns/op 0.96
isKnown normal case - 2 super set checks 511.00 ns/op 526.00 ns/op 0.97
isKnown worse case - 16 super set checks 503.00 ns/op 522.00 ns/op 0.96
CheckpointStateCache - add get delete 12.473 us/op 12.752 us/op 0.98
validate gossip signedAggregateAndProof - struct 5.0294 ms/op 5.1164 ms/op 0.98
validate gossip attestation - struct 2.3998 ms/op 2.4336 ms/op 0.99
altair verifyImport mainnet_s3766816:31 7.3083 s/op 7.3663 s/op 0.99
pickEth1Vote - no votes 2.4821 ms/op 2.5224 ms/op 0.98
pickEth1Vote - max votes 27.103 ms/op 28.389 ms/op 0.95
pickEth1Vote - Eth1Data hashTreeRoot value x2048 13.601 ms/op 14.574 ms/op 0.93
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 22.663 ms/op 24.546 ms/op 0.92
pickEth1Vote - Eth1Data fastSerialize value x2048 1.7601 ms/op 1.8469 ms/op 0.95
pickEth1Vote - Eth1Data fastSerialize tree x2048 19.425 ms/op 21.488 ms/op 0.90
bytes32 toHexString 1.2030 us/op 1.3500 us/op 0.89
bytes32 Buffer.toString(hex) 800.00 ns/op 830.00 ns/op 0.96
bytes32 Buffer.toString(hex) from Uint8Array 1.1220 us/op 1.1570 us/op 0.97
bytes32 Buffer.toString(hex) + 0x 831.00 ns/op 840.00 ns/op 0.99
Object access 1 prop 0.44200 ns/op 0.46200 ns/op 0.96
Map access 1 prop 0.34900 ns/op 0.34600 ns/op 1.01
Object get x1000 21.046 ns/op 21.829 ns/op 0.96
Map get x1000 1.1660 ns/op 1.1650 ns/op 1.00
Object set x1000 130.90 ns/op 144.50 ns/op 0.91
Map set x1000 80.298 ns/op 88.853 ns/op 0.90
Return object 10000 times 0.44420 ns/op 0.44220 ns/op 1.00
Throw Error 10000 times 7.0425 us/op 7.1821 us/op 0.98
enrSubnets - fastDeserialize 64 bits 3.0360 us/op 3.3940 us/op 0.89
enrSubnets - ssz BitVector 64 bits 861.00 ns/op 923.00 ns/op 0.93
enrSubnets - fastDeserialize 4 bits 442.00 ns/op 478.00 ns/op 0.92
enrSubnets - ssz BitVector 4 bits 859.00 ns/op 910.00 ns/op 0.94
prioritizePeers score -10:0 att 32-0.1 sync 2-0 108.16 us/op 115.67 us/op 0.94
prioritizePeers score 0:0 att 32-0.25 sync 2-0.25 142.99 us/op 146.24 us/op 0.98
prioritizePeers score 0:0 att 32-0.5 sync 2-0.5 247.71 us/op 261.20 us/op 0.95
prioritizePeers score 0:0 att 64-0.75 sync 4-0.75 541.97 us/op 562.55 us/op 0.96
prioritizePeers score 0:0 att 64-1 sync 4-1 545.31 us/op 552.34 us/op 0.99
RateTracker 1000000 limit, 1 obj count per request 215.64 ns/op 248.59 ns/op 0.87
RateTracker 1000000 limit, 2 obj count per request 165.68 ns/op 189.24 ns/op 0.88
RateTracker 1000000 limit, 4 obj count per request 136.98 ns/op 161.38 ns/op 0.85
RateTracker 1000000 limit, 8 obj count per request 125.99 ns/op 147.38 ns/op 0.85
RateTracker with prune 4.9690 us/op 5.6130 us/op 0.89
array of 16000 items push then shift 3.7543 us/op 3.7719 us/op 1.00
LinkedList of 16000 items push then shift 27.643 ns/op 28.806 ns/op 0.96
array of 16000 items push then pop 268.68 ns/op 297.71 ns/op 0.90
LinkedList of 16000 items push then pop 23.351 ns/op 24.468 ns/op 0.95
array of 24000 items push then shift 5.3680 us/op 5.3909 us/op 1.00
LinkedList of 24000 items push then shift 27.859 ns/op 29.981 ns/op 0.93
array of 24000 items push then pop 224.01 ns/op 234.83 ns/op 0.95
LinkedList of 24000 items push then pop 23.442 ns/op 24.479 ns/op 0.96
intersect bitArray bitLen 8 13.995 ns/op 13.866 ns/op 1.01
intersect array and set length 8 189.99 ns/op 207.40 ns/op 0.92
intersect bitArray bitLen 128 74.461 ns/op 86.568 ns/op 0.86
intersect array and set length 128 2.6111 us/op 2.7634 us/op 0.94

by benchmarkbot/action

@dapplion dapplion force-pushed the dapplion/gnosis-support branch from 68d5c52 to 79bc10b Compare June 9, 2022 18:03
Copy link
Contributor

@g11tech g11tech left a comment

Choose a reason for hiding this comment

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

LGTM!

@wemeetagain wemeetagain merged commit 6dd408b into unstable Jun 9, 2022
@wemeetagain wemeetagain deleted the dapplion/gnosis-support branch June 9, 2022 20:14
wemeetagain pushed a commit that referenced this pull request Jun 17, 2022
* Support gnosis beacon chain with --network gnosis

* Fix tests

* Fix export
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