Skip to content

Commit

Permalink
Release Candidate hotfix: dev -> main (#4333)
Browse files Browse the repository at this point in the history
* Rebase dev branch to current main branch (#4318)

* add openssl compatibility on m2 chips using darwin (#4302)

Adds support for OpenSSL on MacOS Ventura using m2 chips.

* [dumpdb] ensure each cross link is dumped (#4311)

* bump libp2p to version 0.24.0 and update its dependencies and relevant tests (#4315)

* Removed legacy syncing peer provider. (#4260)

* Removed legacy syncing peer provider.

* Fix localnet.

* Fix migrate version.

* Rebased on main.

* Fix formatting.

* Remove blockchain dependency from engine. (#4310)

* Consensus doesn't require anymore `Node` as a circular dependency.

* Rebased upon main.

* Removed engine beacon chain dependency.

* Fixed nil error.

* Fixed error.

* bump libp2p to version 0.24.0 and update its dependencies and relevant tests

* fix format, remove wrongly added configs

* add back wrongly deleted comment

* fix travis go checker

Co-authored-by: Konstantin <[email protected]>
Co-authored-by: “GheisMohammadi” <“[email protected]”>

* bump libp2p to version 0.24.0 and update its dependencies and relevant tests (#4315)

* Removed legacy syncing peer provider. (#4260)

* Removed legacy syncing peer provider.

* Fix localnet.

* Fix migrate version.

* Rebased on main.

* Fix formatting.

* Remove blockchain dependency from engine. (#4310)

* Consensus doesn't require anymore `Node` as a circular dependency.

* Rebased upon main.

* Removed engine beacon chain dependency.

* Fixed nil error.

* Fixed error.

* bump libp2p to version 0.24.0 and update its dependencies and relevant tests

* fix format, remove wrongly added configs

* add back wrongly deleted comment

* fix travis go checker

Co-authored-by: Konstantin <[email protected]>
Co-authored-by: “GheisMohammadi” <“[email protected]”>

* Fix for consensus stuck. (#4307)

* Added check for block validity.

* Starts new view change if block invalid.

* Revert "Starts new view change if block invalid."

This reverts commit e889fa5.

* staged dns sync v1.0 (#4316)

* staged dns sync v1.0

* enabled stream downloader for localnet

* fix code review issues

* remove extra lock

Co-authored-by: “GheisMohammadi” <“[email protected]”>

* add description for closing client and change randomize process to ma… (#4276)

* add description for closing client and change randomize process to make sure only online nodes are added to sync config

* fix sync test

* fix legacy limitNumPeers test

* add WaitForEachPeerToConnect to node configs to make parallel peer connection optional

Co-authored-by: “GheisMohammadi” <“[email protected]”>

* Small fixes and code cleanup for network stack.  (#4320)

* staged dns sync v1.0

* enabled stream downloader for localnet

* fix code review issues

* remove extra lock

* staged dns sync v1.0

* Fixed, code clean up and other.

* Fixed, code clean up and other.

* Fixed, code clean up and other.

* Fix config.

Co-authored-by: “GheisMohammadi” <“[email protected]”>

* Fix not disable cache in archival mode (#4322)

* Feature registry (#4324)

* Registry for services.

* Test.

* Reverted comment.

* Fix.

* Slash fix (#4284)

* Implementation of new slashing rate calculation

* Write tests for then new slashing rate calculation

* Add engine.applySlashing tests

* fix #4059

Co-authored-by: Alex Brezas <[email protected]>
Co-authored-by: Dimitris Lamprinos <[email protected]>

* Bump github.com/aws/aws-sdk-go from 1.30.1 to 1.33.0 (#4325) (#4328)

Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.30.1 to 1.33.0.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/v1.33.0/CHANGELOG.md)
- [Commits](aws/aws-sdk-go@v1.30.1...v1.33.0)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump github.com/btcsuite/btcd from 0.21.0-beta to 0.23.2 (#4327) (#4329)

Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.21.0-beta to 0.23.2.
- [Release notes](https://github.com/btcsuite/btcd/releases)
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES)
- [Commits](btcsuite/btcd@v0.21.0-beta...v0.23.2)

---
updated-dependencies:
- dependency-name: github.com/btcsuite/btcd
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix epoch chain initialization issue (#4331)

* Fix getting epoch number. (#4279)

* feat: update dockerfile with some enhacement (#4250)

* feat: update dockerfile with some enhancement

* [docker] fix: update golang version

Co-authored-by: MaxMustermann2 <[email protected]>

* [build] github action update (#4336)

* [ops] update github action files

* [ops] add debug message in github action

* [ops] fix GPG action variable

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [ops] fix macos-12 build

* [cmd] update year version (#4334)

* chore(build): upgrade golang to 1.19 (#4335)

* chore(build): upgrade golang to 1.19

* chore(build): run `go mod tidy`

* chore(build): run `goimports -w -e ${file}`

* chore(build): revert github ci changes

* chore(build): pin golang version to 1.19.5

* chore(build): fix protoc version on gen files

* chore(build): fix protoc-gen-go to v1.26.0 (#4337)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Max <[email protected]>
Co-authored-by: Gheis <[email protected]>
Co-authored-by: Konstantin <[email protected]>
Co-authored-by: “GheisMohammadi” <“[email protected]”>
Co-authored-by: Danny Willis <[email protected]>
Co-authored-by: PeekPI <[email protected]>
Co-authored-by: Alex Brezas <[email protected]>
Co-authored-by: Dimitris Lamprinos <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Gheis Mohammadi <[email protected]>
Co-authored-by: Jason Yi <[email protected]>
Co-authored-by: Soph <[email protected]>
  • Loading branch information
13 people authored Jan 12, 2023
1 parent 7ab8be3 commit a32a175
Show file tree
Hide file tree
Showing 49 changed files with 431 additions and 230 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*
!scripts/docker
42 changes: 21 additions & 21 deletions .github/workflows/ci-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
jobs:
check:
name: Per-check for current tag
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
continue-on-error: false
outputs:
tag_annotated: ${{ steps.check-tag-annotated.outputs.tag_annotated }}

steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
Expand All @@ -42,40 +42,40 @@ jobs:
if: needs.check.outputs.tag_annotated == 'true'
strategy:
matrix:
os: [ubuntu-18.04, macos-10.15, [self-hosted, linux, ARM64]]
os: [ubuntu-22.04, macos-12, [self-hosted, linux, ARM64]]

steps:
- name: Import GPG key
if: join(matrix.os, '-') != 'self-hosted-linux-ARM64'
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}

- name: Set up Go 1.14
uses: actions/setup-go@v2
with:
go-version: 1.14.14

- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/mcl
path: mcl

- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/bls
path: bls

- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
fetch-depth: 0

- name: Set up Go go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'harmony/go.mod'

- name: Get latest version and release
run: |
VERSION=$(git tag -l --sort=-v:refname | head -n 1 | tr -d v)
Expand All @@ -85,7 +85,7 @@ jobs:
working-directory: harmony

- name: Build harmony binary and packages for Linux
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-22.04'
run: |
make linux_static
make deb
Expand All @@ -104,7 +104,7 @@ jobs:
working-directory: harmony

- name: Build harmony binary and packages for MacOS
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-12'
run: |
brew install bash
sudo rm -f /usr/local/opt/openssl
Expand All @@ -126,12 +126,12 @@ jobs:
docker-build:
name: Build and push harmony docker image
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'

steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
Expand Down Expand Up @@ -177,18 +177,18 @@ jobs:
release-page:
name: Sign binary and create and publish release page
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'

steps:
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}

- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.event.inputs.tag }}
Expand Down
44 changes: 24 additions & 20 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ on:
jobs:
check:
name: Per-check for current tag
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
continue-on-error: false
outputs:
tag_annotated: ${{ steps.check-tag-annotated.outputs.tag_annotated }}

steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
Expand All @@ -40,40 +40,40 @@ jobs:
if: needs.check.outputs.tag_annotated == 'true'
strategy:
matrix:
os: [ubuntu-18.04, macos-12, [self-hosted, linux, ARM64]]
os: [ubuntu-22.04, macos-12, [self-hosted, linux, ARM64]]

steps:
- name: Import GPG key
if: join(matrix.os, '-') != 'self-hosted-linux-ARM64'
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}

- name: Set up Go 1.18
uses: actions/setup-go@v2
with:
go-version: 1.18.4

- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/mcl
path: mcl

- name: Checkout dependence repo
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: harmony-one/bls
path: bls

- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
fetch-depth: 0

- name: Set up Go with go.mod
uses: actions/setup-go@v3
with:
go-version-file: 'harmony/go.mod'

- name: Get latest version and release
run: |
VERSION=$(git tag -l --sort=-v:refname | head -n 1 | tr -d v)
Expand All @@ -83,7 +83,7 @@ jobs:
working-directory: harmony

- name: Build harmony binary and packages for Linux
if: matrix.os == 'ubuntu-18.04'
if: matrix.os == 'ubuntu-22.04'
run: |
make linux_static
make deb
Expand All @@ -107,6 +107,10 @@ jobs:
brew install bash
sudo rm -f /usr/local/opt/openssl
sudo ln -sf /usr/local/opt/[email protected] /usr/local/opt/openssl
# hack for older chip (macos)
sudo mkdir -p /opt/homebrew/opt
sudo ln -sf /usr/local/opt/[email protected] /opt/homebrew/opt/[email protected]
sudo ln -sf /usr/local/opt/gmp /opt/homebrew/opt/gmp
make
cd ./bin && mkdir ./lib && mv ./*.dylib ./lib && rm -f ./bootnode
gpg --detach-sign harmony
Expand All @@ -124,12 +128,12 @@ jobs:
docker-build:
name: Build and push harmony docker image
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'

steps:
- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
Expand Down Expand Up @@ -175,18 +179,18 @@ jobs:
release-page:
name: Sign binary and create and publish release page
needs: [check, build]
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
if: needs.check.outputs.tag_annotated == 'true'

steps:
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v3
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PRIVATE_KEY_PASS }}

- name: Checkout harmony core code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
path: harmony
ref: ${{ github.ref }}
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ os: linux
dist: bionic
language: go
go:
- 1.18
- 1.19.5
go_import_path: github.com/harmony-one/harmony
cache:
directories:
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:18.04

ARG TARGETARCH
ARG GOLANG_VERSION="1.18"
ARG GOLANG_VERSION="1.19"

SHELL ["/bin/bash", "-c"]

Expand Down Expand Up @@ -79,7 +79,7 @@ ARG KS3=f4267bb5a2f0e65b8f5792bb6992597fac2b35ebfac9885ce0f4152c451ca31a
RUN hmy keys import-private-key ${KS1} && \
hmy keys import-private-key ${KS2} && \
hmy keys import-private-key ${KS3} && \
hmy keys generate-bls-key > keys.json
hmy keys generate-bls-key > keys.json

RUN jq '.["encrypted-private-key-path"]' -r keys.json > /root/keypath && cp keys.json /root && \
echo "export BLS_KEY_PATH=$(cat /root/keypath)" >> /root/.bashrc && \
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RPMBUILD=$(HOME)/rpmbuild
DEBBUILD=$(HOME)/debbuild
SHELL := bash

.PHONY: all help libs exe race trace-pointer debug debug-kill test test-go test-api test-api-attach linux_static deb_init deb_build deb debpub_dev debpub_prod rpm_init rpm_build rpm rpmpub_dev rpmpub_prod clean distclean
.PHONY: all help libs exe race trace-pointer debug debug-kill test test-go test-api test-api-attach linux_static deb_init deb_build deb debpub_dev debpub_prod rpm_init rpm_build rpm rpmpub_dev rpmpub_prod clean distclean docker

all: libs
bash ./scripts/go_executable_build.sh -S
Expand Down Expand Up @@ -157,3 +157,6 @@ go-vet:

go-test:
go test -vet=all -race ./...

docker:
docker build --pull -t harmonyone/$(PKGNAME):latest -f scripts/docker/Dockerfile .
Loading

0 comments on commit a32a175

Please sign in to comment.