Skip to content

Commit

Permalink
Add multiarch docker build to CI (#3698)
Browse files Browse the repository at this point in the history
* Add multiarch docker build to CI

* Update docker build CI
  • Loading branch information
wemeetagain authored Feb 8, 2022
1 parent 3dc5915 commit 37a6b2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,16 @@ jobs:
needs: npm
steps:
- uses: actions/checkout@v2
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: docker build --tag chainsafe/lodestar:next --build-arg VERSION=${{ needs.npm.outputs.version }} .
- run: docker push chainsafe/lodestar:next
- run: docker buildx build --push --tag chainsafe/lodestar:next --platform linux/amd64,linux/arm64 --build-arg VERSION=${{ needs.npm.outputs.version }} .
- run: docker run chainsafe/lodestar:next --help
14 changes: 8 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: scripts/await-release.sh ${{ needs.tag.outputs.tag }} 900
# https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- run: docker build --tag chainsafe/lodestar:latest --build-arg VERSION=${{ needs.tag.outputs.tag }} .
- run: docker tag chainsafe/lodestar:latest chainsafe/lodestar:${{ needs.tag.outputs.tag }}
- run: |
docker tag chainsafe/lodestar:latest chainsafe/lodestar:${{ needs.tag.outputs.tag }}
docker push chainsafe/lodestar:latest
docker push chainsafe/lodestar:${{ needs.tag.outputs.tag }}
- run: docker buildx build --push --tag chainsafe/lodestar:latest --tag chainsafe/lodestar:${{ needs.tag.outputs.tag }} --platform linux/amd64,linux/arm64 --build-arg VERSION=${{ needs.tag.outputs.tag }} .
- run: docker run chainsafe/lodestar:latest --help

1 comment on commit 37a6b2f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for some benchmarks.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold.

Benchmark suite Current: 37a6b2f Previous: 3dc5915 Ratio
altair processAttestation - updateEpochParticipants - 1/2 committees join 64.952 ms/op 19.838 ms/op 3.27
Full benchmark results
Benchmark suite Current: 37a6b2f Previous: 3dc5915 Ratio
BeaconState.hashTreeRoot - No change 726.00 ns/op 541.00 ns/op 1.34
BeaconState.hashTreeRoot - 1 full validator 152.13 us/op 126.09 us/op 1.21
BeaconState.hashTreeRoot - 32 full validator 2.2798 ms/op 1.7375 ms/op 1.31
BeaconState.hashTreeRoot - 512 full validator 31.699 ms/op 24.391 ms/op 1.30
BeaconState.hashTreeRoot - 1 validator.effectiveBalance 163.86 us/op 125.11 us/op 1.31
BeaconState.hashTreeRoot - 32 validator.effectiveBalance 2.5816 ms/op 2.0270 ms/op 1.27
BeaconState.hashTreeRoot - 512 validator.effectiveBalance 35.296 ms/op 26.232 ms/op 1.35
BeaconState.hashTreeRoot - 1 balances 108.93 us/op 90.117 us/op 1.21
BeaconState.hashTreeRoot - 32 balances 965.46 us/op 729.33 us/op 1.32
BeaconState.hashTreeRoot - 512 balances 9.1212 ms/op 7.3807 ms/op 1.24
BeaconState.hashTreeRoot - 250000 balances 161.40 ms/op 126.27 ms/op 1.28
processSlot - 1 slots 54.246 us/op 41.008 us/op 1.32
processSlot - 32 slots 3.5110 ms/op 2.5388 ms/op 1.38
getCommitteeAssignments - req 1 vs - 250000 vc 6.4242 ms/op 4.6712 ms/op 1.38
getCommitteeAssignments - req 100 vs - 250000 vc 9.0015 ms/op 6.4459 ms/op 1.40
getCommitteeAssignments - req 1000 vs - 250000 vc 9.5171 ms/op 6.9012 ms/op 1.38
computeProposers - vc 250000 25.175 ms/op 17.823 ms/op 1.41
computeEpochShuffling - vc 250000 222.68 ms/op 162.47 ms/op 1.37
getNextSyncCommittee - vc 250000 412.12 ms/op 291.25 ms/op 1.42
altair processAttestation - 250000 vs - 7PWei normalcase 49.873 ms/op 37.896 ms/op 1.32
altair processAttestation - 250000 vs - 7PWei worstcase 41.528 ms/op 32.747 ms/op 1.27
altair processAttestation - setStatus - 1/6 committees join 13.587 ms/op 10.076 ms/op 1.35
altair processAttestation - setStatus - 1/3 committees join 29.775 ms/op 21.158 ms/op 1.41
altair processAttestation - setStatus - 1/2 committees join 42.389 ms/op 33.574 ms/op 1.26
altair processAttestation - setStatus - 2/3 committees join 58.772 ms/op 43.006 ms/op 1.37
altair processAttestation - setStatus - 4/5 committees join 69.119 ms/op 51.680 ms/op 1.34
altair processAttestation - setStatus - 100% committees join 92.320 ms/op 65.929 ms/op 1.40
altair processAttestation - updateEpochParticipants - 1/6 committees join 15.328 ms/op 11.431 ms/op 1.34
altair processAttestation - updateEpochParticipants - 1/3 committees join 31.354 ms/op 24.074 ms/op 1.30
altair processAttestation - updateEpochParticipants - 1/2 committees join 64.952 ms/op 19.838 ms/op 3.27
altair processAttestation - updateEpochParticipants - 2/3 committees join 23.099 ms/op 23.779 ms/op 0.97
altair processAttestation - updateEpochParticipants - 4/5 committees join 24.702 ms/op 21.589 ms/op 1.14
altair processAttestation - updateEpochParticipants - 100% committees join 27.374 ms/op 22.912 ms/op 1.19
altair processAttestation - updateAllStatus 22.683 ms/op 20.620 ms/op 1.10
altair processBlock - 250000 vs - 7PWei normalcase 38.349 ms/op 28.936 ms/op 1.33
altair processBlock - 250000 vs - 7PWei worstcase 126.61 ms/op 94.352 ms/op 1.34
altair processEpoch - mainnet_e81889 1.2608 s/op 989.26 ms/op 1.27
mainnet_e81889 - altair beforeProcessEpoch 309.80 ms/op 331.93 ms/op 0.93
mainnet_e81889 - altair processJustificationAndFinalization 64.576 us/op 96.298 us/op 0.67
mainnet_e81889 - altair processInactivityUpdates 21.422 ms/op 17.435 ms/op 1.23
mainnet_e81889 - altair processRewardsAndPenalties 325.57 ms/op 217.04 ms/op 1.50
mainnet_e81889 - altair processRegistryUpdates 10.731 us/op 9.8890 us/op 1.09
mainnet_e81889 - altair processSlashings 3.1790 us/op 1.8980 us/op 1.67
mainnet_e81889 - altair processEth1DataReset 2.8720 us/op 2.2570 us/op 1.27
mainnet_e81889 - altair processEffectiveBalanceUpdates 7.9752 ms/op 7.4211 ms/op 1.07
mainnet_e81889 - altair processSlashingsReset 18.682 us/op 15.961 us/op 1.17
mainnet_e81889 - altair processRandaoMixesReset 21.270 us/op 20.363 us/op 1.04
mainnet_e81889 - altair processHistoricalRootsUpdate 3.7890 us/op 2.6090 us/op 1.45
mainnet_e81889 - altair processParticipationFlagUpdates 99.010 ms/op 68.052 ms/op 1.45
mainnet_e81889 - altair processSyncCommitteeUpdates 2.5000 us/op 2.1930 us/op 1.14
mainnet_e81889 - altair afterProcessEpoch 267.66 ms/op 212.59 ms/op 1.26
altair processInactivityUpdates - 250000 normalcase 82.291 ms/op 62.650 ms/op 1.31
altair processInactivityUpdates - 250000 worstcase 99.682 ms/op 75.314 ms/op 1.32
altair processParticipationFlagUpdates - 250000 anycase 67.572 ms/op 58.536 ms/op 1.15
altair processRewardsAndPenalties - 250000 normalcase 258.94 ms/op 209.81 ms/op 1.23
altair processRewardsAndPenalties - 250000 worstcase 257.80 ms/op 196.20 ms/op 1.31
altair processSyncCommitteeUpdates - 250000 427.23 ms/op 340.94 ms/op 1.25
Tree 40 250000 create 869.15 ms/op 758.20 ms/op 1.15
Tree 40 250000 get(125000) 398.47 ns/op 318.44 ns/op 1.25
Tree 40 250000 set(125000) 2.6868 us/op 1.7484 us/op 1.54
Tree 40 250000 toArray() 53.091 ms/op 42.158 ms/op 1.26
Tree 40 250000 iterate all - toArray() + loop 44.820 ms/op 35.982 ms/op 1.25
Tree 40 250000 iterate all - get(i) 141.18 ms/op 117.25 ms/op 1.20
MutableVector 250000 create 29.907 ms/op 21.188 ms/op 1.41
MutableVector 250000 get(125000) 15.704 ns/op 12.456 ns/op 1.26
MutableVector 250000 set(125000) 617.64 ns/op 464.16 ns/op 1.33
MutableVector 250000 toArray() 10.507 ms/op 17.610 ms/op 0.60
MutableVector 250000 iterate all - toArray() + loop 10.694 ms/op 8.8861 ms/op 1.20
MutableVector 250000 iterate all - get(i) 4.5236 ms/op 3.3207 ms/op 1.36
Array 250000 create 6.7900 ms/op 4.7043 ms/op 1.44
Array 250000 clone - spread 2.6295 ms/op 1.7376 ms/op 1.51
Array 250000 get(125000) 1.3140 ns/op 0.87800 ns/op 1.50
Array 250000 set(125000) 1.3050 ns/op 0.88200 ns/op 1.48
Array 250000 iterate all - loop 201.31 us/op 167.91 us/op 1.20
effectiveBalanceIncrements clone Uint8Array 300000 91.093 us/op 54.761 us/op 1.66
effectiveBalanceIncrements clone MutableVector 300000 855.00 ns/op 515.00 ns/op 1.66
effectiveBalanceIncrements rw all Uint8Array 300000 362.35 us/op 301.82 us/op 1.20
effectiveBalanceIncrements rw all MutableVector 300000 220.63 ms/op 149.64 ms/op 1.47
aggregationBits - 2048 els - readonlyValues 225.06 us/op 170.51 us/op 1.32
aggregationBits - 2048 els - zipIndexesInBitList 42.074 us/op 30.793 us/op 1.37
regular array get 100000 times 80.971 us/op 67.417 us/op 1.20
wrappedArray get 100000 times 81.032 us/op 67.438 us/op 1.20
arrayWithProxy get 100000 times 33.861 ms/op 28.389 ms/op 1.19
ssz.Root.equals 1.4020 us/op 1.0600 us/op 1.32
ssz.Root.equals with valueOf() 1.6850 us/op 1.2220 us/op 1.38
byteArrayEquals with valueOf() 1.6230 us/op 1.2030 us/op 1.35
phase0 processBlock - 250000 vs - 7PWei normalcase 9.4367 ms/op 7.3910 ms/op 1.28
phase0 processBlock - 250000 vs - 7PWei worstcase 88.095 ms/op 70.506 ms/op 1.25
phase0 afterProcessEpoch - 250000 vs - 7PWei 257.77 ms/op 202.05 ms/op 1.28
phase0 beforeProcessEpoch - 250000 vs - 7PWei 684.95 ms/op 532.71 ms/op 1.29
phase0 processEpoch - mainnet_e58758 1.0403 s/op 756.58 ms/op 1.37
mainnet_e58758 - phase0 beforeProcessEpoch 495.36 ms/op 438.23 ms/op 1.13
mainnet_e58758 - phase0 processJustificationAndFinalization 62.522 us/op 66.707 us/op 0.94
mainnet_e58758 - phase0 processRewardsAndPenalties 156.95 ms/op 146.86 ms/op 1.07
mainnet_e58758 - phase0 processRegistryUpdates 40.949 us/op 55.765 us/op 0.73
mainnet_e58758 - phase0 processSlashings 3.4690 us/op 2.2680 us/op 1.53
mainnet_e58758 - phase0 processEth1DataReset 2.9860 us/op 2.0310 us/op 1.47
mainnet_e58758 - phase0 processEffectiveBalanceUpdates 6.5638 ms/op 5.9114 ms/op 1.11
mainnet_e58758 - phase0 processSlashingsReset 13.408 us/op 14.205 us/op 0.94
mainnet_e58758 - phase0 processRandaoMixesReset 15.111 us/op 22.450 us/op 0.67
mainnet_e58758 - phase0 processHistoricalRootsUpdate 4.0090 us/op 2.6020 us/op 1.54
mainnet_e58758 - phase0 processParticipationRecordUpdates 13.272 us/op 16.024 us/op 0.83
mainnet_e58758 - phase0 afterProcessEpoch 222.01 ms/op 173.05 ms/op 1.28
phase0 processEffectiveBalanceUpdates - 250000 normalcase 7.5806 ms/op 5.9046 ms/op 1.28
phase0 processEffectiveBalanceUpdates - 250000 worstcase 0.5 8.0645 ms/op 7.2346 ms/op 1.11
phase0 processRegistryUpdates - 250000 normalcase 47.901 us/op 66.033 us/op 0.73
phase0 processRegistryUpdates - 250000 badcase_full_deposits 3.3233 ms/op 2.9341 ms/op 1.13
phase0 processRegistryUpdates - 250000 worstcase 0.5 2.1576 s/op 1.6176 s/op 1.33
phase0 getAttestationDeltas - 250000 normalcase 102.02 ms/op 69.172 ms/op 1.47
phase0 getAttestationDeltas - 250000 worstcase 94.181 ms/op 70.211 ms/op 1.34
phase0 processSlashings - 250000 worstcase 38.249 ms/op 31.418 ms/op 1.22
shuffle list - 16384 els 15.225 ms/op 12.594 ms/op 1.21
shuffle list - 250000 els 218.59 ms/op 181.39 ms/op 1.21
getEffectiveBalanceIncrementsZeroInactive - 250000 vs - 7PWei 509.47 us/op 426.37 us/op 1.19
pass gossip attestations to forkchoice per slot 21.635 ms/op 18.421 ms/op 1.17
computeDeltas 4.2559 ms/op 3.1874 ms/op 1.34
computeProposerBoostScoreFromBalances 603.28 us/op 502.85 us/op 1.20
getPubkeys - index2pubkey - req 1000 vs - 250000 vc 2.8464 ms/op 1.9341 ms/op 1.47
getPubkeys - validatorsArr - req 1000 vs - 250000 vc 886.75 us/op 666.65 us/op 1.33
BLS verify - blst-native 2.2265 ms/op 1.8594 ms/op 1.20
BLS verifyMultipleSignatures 3 - blst-native 4.5524 ms/op 3.8044 ms/op 1.20
BLS verifyMultipleSignatures 8 - blst-native 9.8358 ms/op 8.2040 ms/op 1.20
BLS verifyMultipleSignatures 32 - blst-native 35.774 ms/op 29.793 ms/op 1.20
BLS aggregatePubkeys 32 - blst-native 47.094 us/op 40.015 us/op 1.18
BLS aggregatePubkeys 128 - blst-native 184.24 us/op 153.63 us/op 1.20
getAttestationsForBlock 80.960 ms/op 58.971 ms/op 1.37
CheckpointStateCache - add get delete 23.259 us/op 17.608 us/op 1.32
validate gossip signedAggregateAndProof - struct 5.3469 ms/op 4.4559 ms/op 1.20
validate gossip signedAggregateAndProof - treeBacked 5.2879 ms/op 4.3966 ms/op 1.20
validate gossip attestation - struct 2.5180 ms/op 2.0828 ms/op 1.21
validate gossip attestation - treeBacked 2.5198 ms/op 2.1134 ms/op 1.19
pickEth1Vote - no votes 12.823 ms/op 8.3453 ms/op 1.54
pickEth1Vote - max votes 63.962 ms/op 48.656 ms/op 1.31
pickEth1Vote - Eth1Data hashTreeRoot value x2048 30.257 ms/op 24.574 ms/op 1.23
pickEth1Vote - Eth1Data hashTreeRoot tree x2048 11.408 ms/op 9.1726 ms/op 1.24
pickEth1Vote - Eth1Data fastSerialize value x2048 6.8131 ms/op 4.9258 ms/op 1.38
pickEth1Vote - Eth1Data fastSerialize tree x2048 29.370 ms/op 23.008 ms/op 1.28
bytes32 toHexString 2.2740 us/op 1.5890 us/op 1.43
bytes32 Buffer.toString(hex) 898.00 ns/op 715.00 ns/op 1.26
bytes32 Buffer.toString(hex) from Uint8Array 1.1220 us/op 941.00 ns/op 1.19
bytes32 Buffer.toString(hex) + 0x 911.00 ns/op 730.00 ns/op 1.25
Object access 1 prop 0.44500 ns/op 0.31000 ns/op 1.44
Map access 1 prop 0.37100 ns/op 0.28000 ns/op 1.32
Object get x1000 21.965 ns/op 18.048 ns/op 1.22
Map get x1000 1.1840 ns/op 0.96500 ns/op 1.23
Object set x1000 134.57 ns/op 104.26 ns/op 1.29
Map set x1000 80.647 ns/op 59.357 ns/op 1.36
Return object 10000 times 0.44540 ns/op 0.37000 ns/op 1.20
Throw Error 10000 times 6.9768 us/op 5.8062 us/op 1.20
enrSubnets - fastDeserialize 64 bits 1.5810 us/op 1.1860 us/op 1.33
enrSubnets - ssz BitVector 64 bits 19.791 us/op 16.542 us/op 1.20
enrSubnets - fastDeserialize 4 bits 585.00 ns/op 413.00 ns/op 1.42
enrSubnets - ssz BitVector 4 bits 3.5750 us/op 2.9200 us/op 1.22
RateTracker 1000000 limit, 1 obj count per request 219.52 ns/op 173.08 ns/op 1.27
RateTracker 1000000 limit, 2 obj count per request 165.63 ns/op 129.17 ns/op 1.28
RateTracker 1000000 limit, 4 obj count per request 136.33 ns/op 105.68 ns/op 1.29
RateTracker 1000000 limit, 8 obj count per request 123.37 ns/op 94.651 ns/op 1.30
RateTracker with prune 4.9970 us/op 3.4620 us/op 1.44

Please sign in to comment.