From df2b39f00676c9b544b4b4ba5f0962a91cd48843 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Tue, 10 Sep 2024 15:44:47 -0500 Subject: [PATCH 1/7] Adding new refactored packager, some clean up, shasums, etc --- .github/workflows/amoy_deb_profiles.yml | 153 +++++ .github/workflows/mainnet_deb_profiles.yml | 178 ++++++ .github/workflows/packager.yml | 531 ------------------ .github/workflows/packager_deb.yml | 131 +++++ .gitignore | 2 + packaging/deb/heimdallcli/DEBIAN/control | 12 - packaging/deb/heimdalld/DEBIAN/control | 15 +- packaging/deb/heimdalld/DEBIAN/postinst | 10 +- packaging/deb/heimdalld/DEBIAN/prerm | 2 +- .../config/priv_validator_state.json | 5 + packaging/templates/package_scripts/control | 12 - .../templates/package_scripts/control.arm64 | 12 - .../package_scripts/control.profile.amd64 | 12 - .../package_scripts/control.profile.arm64 | 12 - .../package_scripts/control.validator | 4 +- .../package_scripts/control.validator.arm64 | 14 - packaging/templates/package_scripts/postinst | 12 +- .../templates/package_scripts/postinst.arm64 | 12 - .../package_scripts/postinst.profile | 2 +- .../package_scripts/postinst.validator.arm64 | 5 - .../templates/package_scripts/postrm.binary | 5 - .../templates/package_scripts/postrm.profile | 8 + packaging/templates/package_scripts/preinst | 2 + packaging/templates/package_scripts/prerm | 2 +- 24 files changed, 498 insertions(+), 655 deletions(-) create mode 100644 .github/workflows/amoy_deb_profiles.yml create mode 100644 .github/workflows/mainnet_deb_profiles.yml delete mode 100644 .github/workflows/packager.yml create mode 100644 .github/workflows/packager_deb.yml create mode 100644 packaging/templates/config/priv_validator_state.json delete mode 100755 packaging/templates/package_scripts/control delete mode 100755 packaging/templates/package_scripts/control.arm64 delete mode 100755 packaging/templates/package_scripts/control.profile.amd64 delete mode 100755 packaging/templates/package_scripts/control.profile.arm64 delete mode 100755 packaging/templates/package_scripts/control.validator.arm64 delete mode 100755 packaging/templates/package_scripts/postinst.arm64 delete mode 100755 packaging/templates/package_scripts/postinst.validator.arm64 delete mode 100755 packaging/templates/package_scripts/postrm.binary create mode 100755 packaging/templates/package_scripts/postrm.profile diff --git a/.github/workflows/amoy_deb_profiles.yml b/.github/workflows/amoy_deb_profiles.yml new file mode 100644 index 000000000..384d0c74b --- /dev/null +++ b/.github/workflows/amoy_deb_profiles.yml @@ -0,0 +1,153 @@ +name: amoy_deb_profiles + +on: + push: + branches: + - 'main' + paths: + - '**' + tags: + - 'v*.*.*' + - 'v*.*.*-*' + +jobs: + build: + permissions: + id-token: write + contents: write + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Variables + - name: Adding TAG to ENV + run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV + - name: adding version + run: | + NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) + echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV + + + - name: Making directory structure for yaml + run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall + - name: making directory structure for the systemd + run: mkdir -p packaging/deb/heimdalld/lib/systemd/system + - name: delete old control file + run: rm -rf packaging/deb/heimdalld/DEBIAN/control + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall-profile" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: all" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall profile package" >> packaging/deb/heimdalld/DEBIAN/control + +#### Sentry Profiles #### + - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: amoy + +### Validator Profiles ### + - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: validator + NETWORK: amoy + - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: amoy + + # Shasum + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: sentry + NETWORK: amoy + + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: validator + NETWORK: amoy + + ############ Check and Upload ########################## + - name: Confirming package built + run: ls -ltr packaging/deb/ | grep heimdall + + - name: Release heimdall Packages + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.GIT_TAG }} + prerelease: true + files: | + packaging/deb/heimdall-amoy-**.deb + packaging/deb/heimdall-amoy-**.deb.checksum + + + + + + + + + + + diff --git a/.github/workflows/mainnet_deb_profiles.yml b/.github/workflows/mainnet_deb_profiles.yml new file mode 100644 index 000000000..767c13ba2 --- /dev/null +++ b/.github/workflows/mainnet_deb_profiles.yml @@ -0,0 +1,178 @@ +name: mainnet_deb_profiles + +on: + push: + branches: + - 'main' + paths: + - '**' + tags: + - 'v*.*.*' + - 'v*.*.*-*' + +jobs: + build: + permissions: + id-token: write + contents: write + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + # Variables + - name: Adding TAG to ENV + run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV + - name: adding version + run: | + NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) + echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV + + + - name: Making directory structure for yaml + run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall + - name: making directory structure for the systemd + run: mkdir -p packaging/deb/heimdalld/lib/systemd/system + - name: delete old control file + run: rm -rf packaging/deb/heimdalld/DEBIAN/control + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall-profile" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: all" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall profile package" >> packaging/deb/heimdalld/DEBIAN/control + +#### Sentry Profiles #### + - name: Setting up ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the prerm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/prerm packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/prerm + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Building ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + +### Validator Profiles ### + - name: Prepping heimdall ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying Postinstall script for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying the prerm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/prerm packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/prerm + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service + env: + ARCH: all + NODE: validator + NETWORK: mainnet + - name: Building heimdall ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: all + NODE: validator + NETWORK: mainnet + + # Shasum + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: validator + NETWORK: mainnet + + - name: shasum the heimdall debian profile package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + + + ############ Check and Upload ########################## + - name: Confirming package built + run: ls -ltr packaging/deb/ | grep heimdall + + - name: Release heimdall Packages + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.GIT_TAG }} + prerelease: true + files: | + packaging/deb/heimdall-mainnet-**.deb + packaging/deb/heimdall-mainnet-**.deb.checksum + + + + + + + + + + + diff --git a/.github/workflows/packager.yml b/.github/workflows/packager.yml deleted file mode 100644 index e26892a14..000000000 --- a/.github/workflows/packager.yml +++ /dev/null @@ -1,531 +0,0 @@ -name: packager - -on: - push: - tags: - - 'v*.*.*' - - 'v*.*.*-*' - -jobs: - build: - runs-on: ubuntu-20.04 - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@master - with: - go-version: 1.22.x - - name: Adding TAG to ENV - run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV - - - name: Making heimdalld / heimdallcli for ${{ env.ARCH }} - run: make build - env: - ARCH: amd64 - - - name: Making directory structure - run: mkdir -p packaging/deb/heimdalld/usr/bin - - - name: Copying over the postinst for use - run: cp -rp packaging/templates/package_scripts/postinst packaging/deb/heimdalld/DEBIAN/postinst - - - name: Copying heimdalld binary for amd64 - run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ - - name: Copying heimdallcli for amd64 - run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ - - - name: copying files over to create package for binary only heimdalld and heimdallci - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - - name: Building package for heimdalld and heimdallcli standalone - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - - - name: Removing heimdalld binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdalld - - name: Removing heimdallcli binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdallcli - - - name: making directory structure for systemd - run: mkdir -p packaging/deb/heimdalld/lib/systemd/system - - name: Making directory structure for toml - run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall - - - name: Adding a postrm for the profiles so not to remove heimdall - run: cp -rp packaging/templates/package_scripts/postrm packaging/deb/heimdalld/DEBIAN/postrm - - - name: Setting up heimdalld for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Copying over the postinst file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Copying profile control file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mumbai - - - name: Setting up heimdalld for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Copying over the postinst file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.amoy packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Copying profile control file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: amoy - - - name: Setting up heimdalld for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Copying over the postinst file for for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Copying over mainnet systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: sentry - NETWORK: mainnet - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mumbai - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.amoy packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: amoy - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Copying profile control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.amd64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: amd64 - NODE: validator - NETWORK: mainnet - - - name: Updating the apt-get - run: sudo apt-get update -y - - - name: Installing deps - run: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu - - - name: Build heimdalld / heimdallcli for ${{ env.ARCH }} - run: make build-arm - env: - ARCH: arm64 - - - name: Setting up heimdallcli for ${{ env.ARCH }} - run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ - env: - ARCH: arm64 - - name: Remove config toml directory - run: rm -rf packaging/deb/heimdalld/var/lib/heimdall - - name: Copying over heimdalld - run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ - - name: Setting up the heimdallcli control file for use with ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.heimdallcli.arm64 packaging/deb/heimdallcli/DEBIAN/control - env: - ARCH: arm64 - - name: Adding a postrm for the profiles so not to remove heimdall - run: cp -rp packaging/templates/package_scripts/postrm.binary packaging/deb/heimdalld/DEBIAN/postrm - - name: Setting up required heimdalld files for ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - - name: Copying control file for ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.arm64 packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - - name: Copying binary post inst - run: cp -rp packaging/templates/package_scripts/postinst.arm64 packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - - name: Building package for heimdalld and heimdallcli standalone for ${{ env.ARCH }} - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - - - name: Removing heimdall binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdalld - - name: Removing heimdallcli binary from builds for profile purposes - run: rm -rf packaging/deb/heimdalld/usr/bin/heimdallcli - - - name: Making directory structure for toml - run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall - - name: Adding a postrm for the profiles so not to remove heimdall - run: cp -rp packaging/templates/package_scripts/postrm packaging/deb/heimdalld/DEBIAN/postrm - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mumbai - - - name: Setting heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.amoy packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN//postinst - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: amoy - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Prepping control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Prepping postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-validator.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.validator.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: validator - NETWORK: mainnet - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying control for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mumbai - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying control for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-amoy-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: amoy - - - name: Setting up heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/deb/heimdalld packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Copying over the postinst file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Copying over mainnet systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/systemd/heimdalld-mainnet-sentry.service packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Copying arm64 control file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/control.profile.arm64 packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/control - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - name: Building heimdalld for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} profile - run: dpkg-deb --build --root-owner-group packaging/deb/heimdalld-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }} - env: - ARCH: arm64 - NODE: sentry - NETWORK: mainnet - - - name: Confirming package built - run: ls -ltr packaging/deb/ | grep heimdall - - name: Release heimdalld.deb - uses: softprops/action-gh-release@v1 - with: - tag_name: ${{ env.GIT_TAG }} - prerelease: true - files: | - packaging/deb/heimdalld**.deb - binary/heimdall* diff --git a/.github/workflows/packager_deb.yml b/.github/workflows/packager_deb.yml new file mode 100644 index 000000000..262ec559a --- /dev/null +++ b/.github/workflows/packager_deb.yml @@ -0,0 +1,131 @@ +name: packager_deb + +on: + push: + branches: + - 'main' + paths: + - '**' + tags: + - 'v*.*.*' + - 'v*.*.*-*' + +jobs: + build: + permissions: + id-token: write + contents: write + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Set up Go + uses: actions/setup-go@master + with: + go-version: 1.20.x + # Variables + - name: Adding TAG to ENV + run: echo "GIT_TAG=`echo $(git describe --tags --abbrev=0)`" >> $GITHUB_ENV + - name: adding version + run: | + NUMERIC_VERSION=$( echo ${{ env.GIT_TAG }} | sed 's/[^0-9.]//g' ) + echo "VERSION=$NUMERIC_VERSION" >> $GITHUB_ENV + + - name: Cleaning repo + run: make clean + - name: Building for amd64 + run: make build + + - name: Making directory structure + run: mkdir -p packaging/deb/heimdalld/usr/bin + - name: Copying necessary heimdalld files + run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ + - name: copying necessary heimdallcli + run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: amd64" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall binary package" >> packaging/deb/heimdalld/DEBIAN/control + + - name: Creating package for binary for heimdall ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: amd64 + + - name: Running package build + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: amd64 + + - name: Cleaning build directory for arm64 build + run: make clean + + - name: Updating the apt-get + run: sudo apt-get update -y + + - name: Adding requirements for cross compile + run: sudo apt-get install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu + + - name: delete amd64 control file + run: rm -rf packaging/deb/heimdalld/DEBIAN/control + + - name: Building heimdall for arm64 + run: make build-arm + + # Control file creation + - name: create control file + run: | + touch packaging/deb/heimdalld/DEBIAN/control + echo "Package: heimdall" >> packaging/deb/heimdalld/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/heimdalld/DEBIAN/control + echo "Section: base" >> packaging/deb/heimdalld/DEBIAN/control + echo "Priority: optional" >> packaging/deb/heimdalld/DEBIAN/control + echo "Architecture: arm64" >> packaging/deb/heimdalld/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/heimdalld/DEBIAN/control + echo "Description: heimdall binary package" >> packaging/deb/heimdalld/DEBIAN/control + + - name: Copying necessary heimdalldfiles + run: cp -rp build/heimdalld packaging/deb/heimdalld/usr/bin/ + - name: copying necessary heimdallcli + run: cp -rp build/heimdallcli packaging/deb/heimdalld/usr/bin/ + + + - name: Creating package for binary for heimdall ${{ env.ARCH }} + run: cp -rp packaging/deb/heimdalld packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: arm64 + + - name: Running package build + run: dpkg-deb --build --root-owner-group packaging/deb/heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }} + env: + ARCH: arm64 + + # Shasum + - name: shasum the heimdall debian package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: amd64 + + - name: shasum the heimdall debian package + run: cd packaging/deb/ && sha256sum heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > heimdall-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + env: + ARCH: arm64 + + - name: Release heimdall Packages + uses: softprops/action-gh-release@v2 + with: + tag_name: ${{ env.GIT_TAG }} + prerelease: true + files: | + packaging/deb/heimdall**.deb + packaging/deb/heimdall**.deb.checksum \ No newline at end of file diff --git a/.gitignore b/.gitignore index 14730da24..fa3b83cec 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,5 @@ data/ dist/ .dccache +.idea/ +.idea* diff --git a/packaging/deb/heimdallcli/DEBIAN/control b/packaging/deb/heimdallcli/DEBIAN/control index aade7cd70..e69de29bb 100644 --- a/packaging/deb/heimdallcli/DEBIAN/control +++ b/packaging/deb/heimdallcli/DEBIAN/control @@ -1,12 +0,0 @@ -Source: heimdallcli -Version: -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdallcli -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the Heimdall CLI package from Polygon Technology. \ No newline at end of file diff --git a/packaging/deb/heimdalld/DEBIAN/control b/packaging/deb/heimdalld/DEBIAN/control index 795e7502e..139597f9c 100644 --- a/packaging/deb/heimdalld/DEBIAN/control +++ b/packaging/deb/heimdalld/DEBIAN/control @@ -1,15 +1,2 @@ -Source: heimdalld -Section: develop -Priority: Testing -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.7 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld -Version: 1.0.7 -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the control file for the Polygon project known as heimdall. This project can have multiple iterations and more details can be found in the official Github Page: https://github.com/maticnetwork/heimdall + diff --git a/packaging/deb/heimdalld/DEBIAN/postinst b/packaging/deb/heimdalld/DEBIAN/postinst index 01504b4c9..c1115c902 100755 --- a/packaging/deb/heimdalld/DEBIAN/postinst +++ b/packaging/deb/heimdalld/DEBIAN/postinst @@ -2,11 +2,13 @@ # This is a postinstallation script so the service can be configured and started when requested # #sudo systemctl daemon-reload +export HEIMDALL_DIR=/var/lib/heimdall sudo adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent heimdall -if [ -d "/var/lib/heimdall" ] +if [ -d "$HEIMDALL_DIR" ] then - echo "Directory /var/lib/heimdall exists." + echo "Directory $HEIMDALL_DIR exists." + sudo chown -R heimdall $HEIMDALL_DIR else - mkdir -p /var/lib/heimdall - sudo chown -R heimdall /var/lib/heimdall + mkdir -p $HEIMDALL_DIR + sudo chown -R heimdall $HEIMDALL_DIR fi diff --git a/packaging/deb/heimdalld/DEBIAN/prerm b/packaging/deb/heimdalld/DEBIAN/prerm index 37d3ffd90..0946b7eb0 100755 --- a/packaging/deb/heimdalld/DEBIAN/prerm +++ b/packaging/deb/heimdalld/DEBIAN/prerm @@ -4,4 +4,4 @@ ################## # Stops existing for upgrade ################# -sudo systemctl stop heimdalld.service +#sudo systemctl stop heimdalld.service diff --git a/packaging/templates/config/priv_validator_state.json b/packaging/templates/config/priv_validator_state.json new file mode 100644 index 000000000..ca3ad2f74 --- /dev/null +++ b/packaging/templates/config/priv_validator_state.json @@ -0,0 +1,5 @@ +{ + "height": "0", + "round": "0", + "step": 0 +} \ No newline at end of file diff --git a/packaging/templates/package_scripts/control b/packaging/templates/package_scripts/control deleted file mode 100755 index 3b20a23dc..000000000 --- a/packaging/templates/package_scripts/control +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.arm64 b/packaging/templates/package_scripts/control.arm64 deleted file mode 100755 index ab1ebbd1b..000000000 --- a/packaging/templates/package_scripts/control.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld -Architecture: arm64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.profile.amd64 b/packaging/templates/package_scripts/control.profile.amd64 deleted file mode 100755 index 998919b94..000000000 --- a/packaging/templates/package_scripts/control.profile.amd64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld-profile -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld-profile -Architecture: amd64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.profile.arm64 b/packaging/templates/package_scripts/control.profile.arm64 deleted file mode 100755 index ccc03c727..000000000 --- a/packaging/templates/package_scripts/control.profile.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld-profile -Version: 1.0.7 -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdalld-profile -Architecture: arm64 -Multi-Arch: foreign -Depends: -Description: This is the heimdalld package from Polygon Technology. diff --git a/packaging/templates/package_scripts/control.validator b/packaging/templates/package_scripts/control.validator index f39277b13..89b4a8de5 100755 --- a/packaging/templates/package_scripts/control.validator +++ b/packaging/templates/package_scripts/control.validator @@ -3,11 +3,11 @@ Section: develop Priority: Testing Maintainer: Polygon Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.7 +Standards-Version: v1.0.3 Homepage: https://polygon.technology Rules-Requires-Root: no Package: heimdalld-profile -Version: 1.0.7 +Version: 1.0.3 Architecture: amd64 Multi-Arch: foreign Depends: rabbitmq-server diff --git a/packaging/templates/package_scripts/control.validator.arm64 b/packaging/templates/package_scripts/control.validator.arm64 deleted file mode 100755 index b4da0046d..000000000 --- a/packaging/templates/package_scripts/control.validator.arm64 +++ /dev/null @@ -1,14 +0,0 @@ -Source: heimdalld-profile -Section: develop -Priority: Testing -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.7 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld-profile -Version: 1.0.7 -Architecture: arm64 -Multi-Arch: foreign -Depends: rabbitmq-server -Description: This is the control file for the Polygon project known as heimdall. This project can have multiple iterations and more details can be found in the official Github Page: https://github.com/maticnetwork/heimdall diff --git a/packaging/templates/package_scripts/postinst b/packaging/templates/package_scripts/postinst index ae1de73a0..64425bf9a 100755 --- a/packaging/templates/package_scripts/postinst +++ b/packaging/templates/package_scripts/postinst @@ -1,11 +1,13 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # +export HEIMDALL_DIR=/var/lib/heimdall sudo adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent heimdall -if [ -d "/var/lib/heimdall" ] +if [ -d "$HEIMDALL_DIR" ] then - echo "Directory /var/lib/heimdall exists." + echo "Directory $HEIMDALL_DIR exists." + sudo chown -R heimdall $HEIMDALL_DIR else - mkdir -p /var/lib/heimdall - sudo chown -R heimdall /var/lib/heimdall -fi + mkdir -p $HEIMDALL_DIR + sudo chown -R heimdall $HEIMDALL_DIR +fi \ No newline at end of file diff --git a/packaging/templates/package_scripts/postinst.arm64 b/packaging/templates/package_scripts/postinst.arm64 deleted file mode 100755 index 638b0394c..000000000 --- a/packaging/templates/package_scripts/postinst.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# This is a postinstallation script so the service can be configured and started when requested -# -sudo adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent heimdall -if [ -d "/var/lib/heimdall" ] -then - echo "Directory /var/lib/heimdall exists." -else - mkdir -p /var/lib/heimdall - sudo chown -R heimdall /var/lib/heimdall -fi -sudo chown -R heimdall /var/lib/heimdall diff --git a/packaging/templates/package_scripts/postinst.profile b/packaging/templates/package_scripts/postinst.profile index 9a9082994..c428aa2e5 100755 --- a/packaging/templates/package_scripts/postinst.profile +++ b/packaging/templates/package_scripts/postinst.profile @@ -1,5 +1,5 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -sudo -u heimdall heimdalld init --chain=mumbai --home /var/lib/heimdall +sudo -u heimdall heimdalld init --chain=amoy --home /var/lib/heimdall sudo systemctl daemon-reload \ No newline at end of file diff --git a/packaging/templates/package_scripts/postinst.validator.arm64 b/packaging/templates/package_scripts/postinst.validator.arm64 deleted file mode 100755 index 1715504bb..000000000 --- a/packaging/templates/package_scripts/postinst.validator.arm64 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# This is a postinstallation script so the service can be configured and started when requested -# -sudo -u heimdall heimdalld init --chain=mumbai --home /var/lib/heimdall -sudo systemctl daemon-reload diff --git a/packaging/templates/package_scripts/postrm.binary b/packaging/templates/package_scripts/postrm.binary deleted file mode 100755 index 4bf49a2ff..000000000 --- a/packaging/templates/package_scripts/postrm.binary +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -# -################### -# Remove heimdall installation -################### \ No newline at end of file diff --git a/packaging/templates/package_scripts/postrm.profile b/packaging/templates/package_scripts/postrm.profile new file mode 100755 index 000000000..2dc7e21cc --- /dev/null +++ b/packaging/templates/package_scripts/postrm.profile @@ -0,0 +1,8 @@ +#!/bin/bash +# +################### +# Remove heimdall profile installation +################### +sudo rm /var/lib/heimdall/config/heimdall-config.toml +sudo rm /var/lib/heimdall/config/config.toml +sudo systemctl daemon-reload \ No newline at end of file diff --git a/packaging/templates/package_scripts/preinst b/packaging/templates/package_scripts/preinst index 0946b7eb0..f36163db8 100755 --- a/packaging/templates/package_scripts/preinst +++ b/packaging/templates/package_scripts/preinst @@ -3,5 +3,7 @@ # ################## # Stops existing for upgrade +export HEIMDALL_DIR=/var/lib/heimdall +sudo chown -R heimdall $HEIMDALL_DIR ################# #sudo systemctl stop heimdalld.service diff --git a/packaging/templates/package_scripts/prerm b/packaging/templates/package_scripts/prerm index 37d3ffd90..0946b7eb0 100755 --- a/packaging/templates/package_scripts/prerm +++ b/packaging/templates/package_scripts/prerm @@ -4,4 +4,4 @@ ################## # Stops existing for upgrade ################# -sudo systemctl stop heimdalld.service +#sudo systemctl stop heimdalld.service From d667acb9cd87f7b2f25acd098f862d802ca61c31 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Tue, 10 Sep 2024 15:49:59 -0500 Subject: [PATCH 2/7] Removing some spaces --- .github/workflows/amoy_deb_profiles.yml | 13 +------------ .github/workflows/mainnet_deb_profiles.yml | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/.github/workflows/amoy_deb_profiles.yml b/.github/workflows/amoy_deb_profiles.yml index 384d0c74b..7d650b596 100644 --- a/.github/workflows/amoy_deb_profiles.yml +++ b/.github/workflows/amoy_deb_profiles.yml @@ -139,15 +139,4 @@ jobs: prerelease: true files: | packaging/deb/heimdall-amoy-**.deb - packaging/deb/heimdall-amoy-**.deb.checksum - - - - - - - - - - - + packaging/deb/heimdall-amoy-**.deb.checksum \ No newline at end of file diff --git a/.github/workflows/mainnet_deb_profiles.yml b/.github/workflows/mainnet_deb_profiles.yml index 767c13ba2..abab90fd1 100644 --- a/.github/workflows/mainnet_deb_profiles.yml +++ b/.github/workflows/mainnet_deb_profiles.yml @@ -164,15 +164,4 @@ jobs: prerelease: true files: | packaging/deb/heimdall-mainnet-**.deb - packaging/deb/heimdall-mainnet-**.deb.checksum - - - - - - - - - - - + packaging/deb/heimdall-mainnet-**.deb.checksum \ No newline at end of file From c7a89200d163a04b14c52f60264c69c1c0f014e6 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Tue, 10 Sep 2024 15:51:47 -0500 Subject: [PATCH 3/7] Removing unnecessary old control files --- .../package_scripts/control.heimdallcli.arm64 | 12 ------------ .../templates/package_scripts/control.validator | 14 -------------- 2 files changed, 26 deletions(-) delete mode 100644 packaging/templates/package_scripts/control.heimdallcli.arm64 delete mode 100755 packaging/templates/package_scripts/control.validator diff --git a/packaging/templates/package_scripts/control.heimdallcli.arm64 b/packaging/templates/package_scripts/control.heimdallcli.arm64 deleted file mode 100644 index ccac50bce..000000000 --- a/packaging/templates/package_scripts/control.heimdallcli.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdallcli -Version: -Section: develop -Priority: standard -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Rules-Requires-Root: yes -Package: heimdallcli -Architecture: arm64 -Multi-Arch: foreign -Depends: -Description: This is the Heimdall CLI package from Polygon Technology. \ No newline at end of file diff --git a/packaging/templates/package_scripts/control.validator b/packaging/templates/package_scripts/control.validator deleted file mode 100755 index 89b4a8de5..000000000 --- a/packaging/templates/package_scripts/control.validator +++ /dev/null @@ -1,14 +0,0 @@ -Source: heimdalld-profile -Section: develop -Priority: Testing -Maintainer: Polygon -Build-Depends: debhelper-compat (= 13) -Standards-Version: v1.0.3 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld-profile -Version: 1.0.3 -Architecture: amd64 -Multi-Arch: foreign -Depends: rabbitmq-server -Description: This is the control file for the Polygon project known as heimdall. This project can have multiple iterations and more details can be found in the official Github Page: https://github.com/maticnetwork/heimdall From 298d62f2ac13073d2af3cd0ae4e14a69bbedbd38 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Tue, 10 Sep 2024 15:52:55 -0500 Subject: [PATCH 4/7] reverting prerm --- packaging/deb/heimdalld/DEBIAN/prerm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/deb/heimdalld/DEBIAN/prerm b/packaging/deb/heimdalld/DEBIAN/prerm index 0946b7eb0..37d3ffd90 100755 --- a/packaging/deb/heimdalld/DEBIAN/prerm +++ b/packaging/deb/heimdalld/DEBIAN/prerm @@ -4,4 +4,4 @@ ################## # Stops existing for upgrade ################# -#sudo systemctl stop heimdalld.service +sudo systemctl stop heimdalld.service From 8371be5f814638c43bdd1061ddb2f22b050015c8 Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Thu, 3 Oct 2024 13:34:02 -0500 Subject: [PATCH 5/7] Adding updated configs and packager update --- .github/workflows/amoy_deb_profiles.yml | 38 ++- .github/workflows/mainnet_deb_profiles.yml | 46 ++- packaging/templates/config/amoy/config.toml | 312 ++++++++++++++++++ .../config/amoy/heimdall-config.toml | 49 +++ .../templates/config/mainnet/config.toml | 312 ++++++++++++++++++ .../config/mainnet/heimdall-config.toml | 44 +++ .../package_scripts/{preinst => preinst.amoy} | 1 + .../templates/package_scripts/preinst.mainnet | 10 + 8 files changed, 800 insertions(+), 12 deletions(-) create mode 100644 packaging/templates/config/amoy/config.toml create mode 100644 packaging/templates/config/amoy/heimdall-config.toml create mode 100644 packaging/templates/config/mainnet/config.toml create mode 100644 packaging/templates/config/mainnet/heimdall-config.toml rename packaging/templates/package_scripts/{preinst => preinst.amoy} (73%) create mode 100755 packaging/templates/package_scripts/preinst.mainnet diff --git a/.github/workflows/amoy_deb_profiles.yml b/.github/workflows/amoy_deb_profiles.yml index 7d650b596..d45492ee9 100644 --- a/.github/workflows/amoy_deb_profiles.yml +++ b/.github/workflows/amoy_deb_profiles.yml @@ -31,7 +31,7 @@ jobs: - name: Making directory structure for yaml - run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall + run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall/config - name: making directory structure for the systemd run: mkdir -p packaging/deb/heimdalld/lib/systemd/system - name: delete old control file @@ -62,6 +62,24 @@ jobs: ARCH: all NODE: sentry NETWORK: amoy + - name: Copying preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst.${{ env.NETWORK }} packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/heimdall-config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/heimdall-config.toml + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/config.toml + env: + ARCH: all + NODE: sentry + NETWORK: amoy - name: Copying postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm env: @@ -100,6 +118,24 @@ jobs: ARCH: all NODE: validator NETWORK: amoy + - name: Copying preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst.${{ env.NETWORK }} packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/heimdall-config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/heimdall-config.toml + env: + ARCH: all + NODE: sentry + NETWORK: amoy + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/config.toml + env: + ARCH: all + NODE: sentry + NETWORK: amoy - name: Copying systemd file for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} run: cp -rp packaging/templates/systemd/heimdalld-amoy-validator.service packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/lib/systemd/system/heimdalld.service env: diff --git a/.github/workflows/mainnet_deb_profiles.yml b/.github/workflows/mainnet_deb_profiles.yml index abab90fd1..54044f428 100644 --- a/.github/workflows/mainnet_deb_profiles.yml +++ b/.github/workflows/mainnet_deb_profiles.yml @@ -31,7 +31,7 @@ jobs: - name: Making directory structure for yaml - run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall + run: mkdir -p packaging/deb/heimdalld/var/lib/heimdall/config - name: making directory structure for the systemd run: mkdir -p packaging/deb/heimdalld/lib/systemd/system - name: delete old control file @@ -56,14 +56,26 @@ jobs: ARCH: all NODE: sentry NETWORK: mainnet - - name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + - name: Copying the postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst env: ARCH: all NODE: sentry NETWORK: mainnet - - name: Copying the postinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst + - name: Copying preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst.${{ env.NETWORK }} packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/heimdall-config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/heimdall-config.toml + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/config.toml env: ARCH: all NODE: sentry @@ -100,12 +112,6 @@ jobs: ARCH: all NODE: validator NETWORK: mainnet - - name: Copying the preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} - run: cp -rp packaging/templates/package_scripts/preinst packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst - env: - ARCH: all - NODE: validator - NETWORK: mainnet - name: Copying Postinstall script for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} run: cp -rp packaging/templates/package_scripts/postinst.profile.mainnet packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postinst env: @@ -118,6 +124,24 @@ jobs: ARCH: all NODE: validator NETWORK: mainnet + - name: Copying preinst for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/package_scripts/preinst.${{ env.NETWORK }} packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/preinst + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/heimdall-config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/heimdall-config.toml + env: + ARCH: all + NODE: sentry + NETWORK: mainnet + - name: Copying config for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} + run: cp -rp packaging/templates/config/${{ env.NETWORK }}/config.toml packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/var/lib/heimdall/config/config.toml + env: + ARCH: all + NODE: sentry + NETWORK: mainnet - name: Copying the postrm for ${{ env.NODE }} on ${{ env.NETWORK }} on ${{ env.ARCH }} run: cp -rp packaging/templates/package_scripts/postrm.profile packaging/deb/heimdall-${{ env.NETWORK }}-${{ env.NODE }}-config_${{ env.GIT_TAG }}-${{ env.ARCH }}/DEBIAN/postrm env: diff --git a/packaging/templates/config/amoy/config.toml b/packaging/templates/config/amoy/config.toml new file mode 100644 index 000000000..b604b4f90 --- /dev/null +++ b/packaging/templates/config/amoy/config.toml @@ -0,0 +1,312 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### main base config options ##### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "ip-10-8-2-38" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "main:info,state:info,*:error" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# TCP or UNIX socket address for the profiling server to listen on +prof_laddr = "localhost:6060" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + +##### advanced configuration options ##### + +##### rpc server configuration options ##### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_key_file = "" + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "54.171.220.164:26656" + +# Comma separated list of seed nodes to connect to +seeds = "9b62e5df9711ff0124774295c3a0159a829a9ea8@52.214.229.208:26656,eb57fffe96d74312963ced94a94cbaf8e0d8ec2e@54.217.171.196:26656,b217aaadef7a5f409722e03c5c3b463b48fbb1f3@54.171.220.164:26656,080dcdffcc453367684b61d8f3ce032f357b0f73@13.251.184.185:26656,3fde1fba0bba390fa79bef2393104758b302bf5a@52.74.18.182:26656,7cd4b5fd12c1c7debb7dc9938013b4e9470a5add@52.76.37.145:26656,a4601f540c901112e3c718dd834de5537d8343e8@52.74.125.36:26656,bda8943b47d96ccf8f36dc5d306450926906571b@47.128.184.10:26656,21029acc7239d622019a4213ba9c58aa862b762d@63.32.214.97:26656,46ee7b8d33ade8aa41fd1b96f26a1f275721ee49@52.208.81.179:26656" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "9b62e5df9711ff0124774295c3a0159a829a9ea8@52.214.229.208:26656,eb57fffe96d74312963ced94a94cbaf8e0d8ec2e@54.217.171.196:26656,b217aaadef7a5f409722e03c5c3b463b48fbb1f3@54.171.220.164:26656,080dcdffcc453367684b61d8f3ce032f357b0f73@13.251.184.185:26656,3fde1fba0bba390fa79bef2393104758b302bf5a@52.74.18.182:26656,7cd4b5fd12c1c7debb7dc9938013b4e9470a5add@52.76.37.145:26656,a4601f540c901112e3c718dd834de5537d8343e8@52.74.125.36:26656,bda8943b47d96ccf8f36dc5d306450926906571b@47.128.184.10:26656,21029acc7239d622019a4213ba9c58aa862b762d@63.32.214.97:26656,46ee7b8d33ade8aa41fd1b96f26a1f275721ee49@52.208.81.179:26656" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 100 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 100 + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +##### mempool configuration options ##### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}. +max_tx_bytes = 1048576 + +##### fast sync configuration options ##### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +version = "v0" + +##### consensus configuration options ##### +[consensus] + +wal_file = "data/cs.wal/wal" + +timeout_propose = "3s" +timeout_propose_delta = "500ms" +timeout_prevote = "1s" +timeout_prevote_delta = "500ms" +timeout_precommit = "1s" +timeout_precommit_delta = "500ms" +timeout_commit = "5s" + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +##### transactions indexer configuration options ##### +[tx_index] + +# What indexer to use for transactions +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "kv" + +# Comma-separated list of tags to index (by default the only tag is "tx.hash") +# +# You can also index transactions by height by adding "tx.height" tag here. +# +# It's recommended to index only a subset of tags due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_tags = "" + +# When set to true, tells indexer to index all tags (predefined tags: +# "tx.hash", "tx.height" and all tags from DeliverTx responses). +# +# Note this may be not desirable (see the comment above). IndexTags has a +# precedence over IndexAllTags (i.e. when given both, IndexTags will be +# indexed). +index_all_tags = true + +##### instrumentation configuration options ##### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = true + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/packaging/templates/config/amoy/heimdall-config.toml b/packaging/templates/config/amoy/heimdall-config.toml new file mode 100644 index 000000000..711ac649b --- /dev/null +++ b/packaging/templates/config/amoy/heimdall-config.toml @@ -0,0 +1,49 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### RPC and REST configs ##### + +# RPC endpoint for ethereum chain +eth_rpc_url = "https://few-thrilling-fog.ethereum-sepolia.quiknode.pro/820ce4af3919ef793e5976a761e55d08137e11d3/" + +# RPC endpoint for bor chain +bor_rpc_url = "http://localhost:8545" + +# RPC endpoint for tendermint +tendermint_rpc_url = "http://0.0.0.0:26657" + +# Polygon Sub Graph URL for self-heal mechanism (optional) +sub_graph_url = "" + +#### Bridge configs #### + +# Heimdall REST server endpoint, which is used by bridge +heimdall_rest_server = "http://0.0.0.0:1317" + +# AMQP endpoint +amqp_url = "amqp://guest:guest@localhost:5672/" + +## Poll intervals +checkpoint_poll_interval = "5m0s" +syncer_poll_interval = "1m0s" +noack_poll_interval = "16m50s" +clerk_poll_interval = "10s" +span_poll_interval = "1m0s" +milestone_poll_interval = "30s" +enable_self_heal = "false" +sh_state_synced_interval = "15m0s" +sh_stake_update_interval = "3h0m0s" +sh_max_depth_duration = "1h0m0s" + + +#### gas limits #### +main_chain_gas_limit = "5000000" + +#### gas price #### +main_chain_max_gas_price = "400000000000" + +##### Timeout Config ##### +no_ack_wait_time = "30m0s" + +##### chain - newSelectionAlgoHeight depends on this ##### +chain = "amoy" diff --git a/packaging/templates/config/mainnet/config.toml b/packaging/templates/config/mainnet/config.toml new file mode 100644 index 000000000..733483c3c --- /dev/null +++ b/packaging/templates/config/mainnet/config.toml @@ -0,0 +1,312 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### main base config options ##### + +# TCP or UNIX socket address of the ABCI application, +# or the name of an ABCI application compiled in with the Tendermint binary +proxy_app = "tcp://127.0.0.1:26658" + +# A custom human readable name for this node +moniker = "ip-10-1-2-107" + +# If this node is many blocks behind the tip of the chain, FastSync +# allows them to catchup quickly by downloading blocks in parallel +# and verifying their commits +fast_sync = true + +# Database backend: goleveldb | cleveldb | boltdb +# * goleveldb (github.com/syndtr/goleveldb - most popular implementation) +# - pure go +# - stable +# * cleveldb (uses levigo wrapper) +# - fast +# - requires gcc +# - use cleveldb build tag (go build -tags cleveldb) +# * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt) +# - EXPERIMENTAL +# - may be faster is some use-cases (random reads - indexer) +# - use boltdb build tag (go build -tags boltdb) +db_backend = "goleveldb" + +# Database directory +db_dir = "data" + +# Output level for logging, including package level options +log_level = "main:info,state:info,*:error" + +# Output format: 'plain' (colored text) or 'json' +log_format = "plain" + +##### additional base config options ##### + +# Path to the JSON file containing the initial validator set and other meta data +genesis_file = "config/genesis.json" + +# Path to the JSON file containing the private key to use as a validator in the consensus protocol +priv_validator_key_file = "config/priv_validator_key.json" + +# Path to the JSON file containing the last sign state of a validator +priv_validator_state_file = "data/priv_validator_state.json" + +# TCP or UNIX socket address for Tendermint to listen on for +# connections from an external PrivValidator process +priv_validator_laddr = "" + +# Path to the JSON file containing the private key to use for node authentication in the p2p protocol +node_key_file = "config/node_key.json" + +# Mechanism to connect to the ABCI application: socket | grpc +abci = "socket" + +# TCP or UNIX socket address for the profiling server to listen on +prof_laddr = "localhost:6060" + +# If true, query the ABCI app on connecting to a new peer +# so the app can decide if we should keep the connection or not +filter_peers = false + +##### advanced configuration options ##### + +##### rpc server configuration options ##### +[rpc] + +# TCP or UNIX socket address for the RPC server to listen on +laddr = "tcp://127.0.0.1:26657" + +# A list of origins a cross-domain request can be executed from +# Default value '[]' disables cors support +# Use '["*"]' to allow any origin +cors_allowed_origins = [] + +# A list of methods the client is allowed to use with cross-domain requests +cors_allowed_methods = ["HEAD", "GET", "POST", ] + +# A list of non simple headers the client is allowed to use with cross-domain requests +cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time", ] + +# TCP or UNIX socket address for the gRPC server to listen on +# NOTE: This server only supports /broadcast_tx_commit +grpc_laddr = "" + +# Maximum number of simultaneous connections. +# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +grpc_max_open_connections = 900 + +# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool +unsafe = false + +# Maximum number of simultaneous connections (including WebSocket). +# Does not include gRPC connections. See grpc_max_open_connections +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files} +# 1024 - 40 - 10 - 50 = 924 = ~900 +max_open_connections = 900 + +# Maximum number of unique clientIDs that can /subscribe +# If you're using /broadcast_tx_commit, set to the estimated maximum number +# of broadcast_tx_commit calls per block. +max_subscription_clients = 100 + +# Maximum number of unique queries a given client can /subscribe to +# If you're using GRPC (or Local RPC client) and /broadcast_tx_commit, set to +# the estimated # maximum number of broadcast_tx_commit calls per block. +max_subscriptions_per_client = 5 + +# How long to wait for a tx to be committed during /broadcast_tx_commit. +# WARNING: Using a value larger than 10s will result in increasing the +# global HTTP write timeout, which applies to all connections and endpoints. +# See https://github.com/tendermint/tendermint/issues/3435 +timeout_broadcast_tx_commit = "10s" + +# Maximum size of request body, in bytes +max_body_bytes = 1000000 + +# Maximum size of request header, in bytes +max_header_bytes = 1048576 + +# The path to a file containing certificate that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# If the certificate is signed by a certificate authority, +# the certFile should be the concatenation of the server's certificate, any intermediates, +# and the CA's certificate. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_cert_file = "" + +# The path to a file containing matching private key that is used to create the HTTPS server. +# Migth be either absolute path or path related to tendermint's config directory. +# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run. +tls_key_file = "" + +##### peer to peer configuration options ##### +[p2p] + +# Address to listen for incoming connections +laddr = "tcp://0.0.0.0:26656" + +# Address to advertise to peers for them to dial +# If empty, will use the same port as the laddr, +# and will introspect on the listener or use UPnP +# to figure out the address. +external_address = "15.165.197.16:26656" + +# Comma separated list of seed nodes to connect to +seeds = "1500161dd491b67fb1ac81868952be49e2509c9f@52.78.36.216:26656,dd4a3f1750af5765266231b9d8ac764599921736@3.36.224.80:26656,8ea4f592ad6cc38d7532aff418d1fb97052463af@34.240.245.39:26656,e772e1fb8c3492a9570a377a5eafdb1dc53cd778@54.194.245.5:26656,6726b826df45ac8e9afb4bdb2469c7771bd797f1@52.209.21.164:26656" + +# Comma separated list of nodes to keep persistent connections to +persistent_peers = "1500161dd491b67fb1ac81868952be49e2509c9f@52.78.36.216:26656,dd4a3f1750af5765266231b9d8ac764599921736@3.36.224.80:26656,82f3085a83faa522c3cafa4e4dce1ef3a0c660f3@13.209.168.182:26656,f2b1ba3a684c4705aff7c01ec1c454a39794db5a@43.201.242.62:26656,bb98b9abd23a9d2e196b2c8a03cfb51a4bd49b47@43.202.78.165:26656,5606200cbdf662620625edea63b6a4275128fb34@3.38.254.221:26656,d76001510004c802fd2977488eb753ef261a245b@15.165.197.16:26656,e56dbf76c7b9508ecece447195382301e7c90ec7@52.78.154.236:26656,e772e1fb8c3492a9570a377a5eafdb1dc53cd778@54.194.245.5:26656,8ea4f592ad6cc38d7532aff418d1fb97052463af@34.240.245.39:26656,6726b826df45ac8e9afb4bdb2469c7771bd797f1@52.209.21.164:26656,ec59b724d669b9df205156e8fd457257116b1745@99.81.158.129:26656,08de3da03bd6774e4c5464dd29ddedddefbb1907@34.254.124.45:26656,78610e49cd8efb28c835c8478b30cf94650335b9@34.252.116.193:26656,e6816ab7fc88522be49940287206391bde87eeb9@54.76.109.39:26656,3215b1cf88ea913f477c0db0be00fb873d826d72@34.246.232.184:26656" + +# UPNP port forwarding +upnp = false + +# Path to address book +addr_book_file = "config/addrbook.json" + +# Set true for strict address routability rules +# Set false for private or local networks +addr_book_strict = true + +# Maximum number of inbound peers +max_num_inbound_peers = 100 + +# Maximum number of outbound peers to connect to, excluding persistent peers +max_num_outbound_peers = 100 + +# Time to wait before flushing messages out on the connection +flush_throttle_timeout = "100ms" + +# Maximum size of a message packet payload, in bytes +max_packet_msg_payload_size = 1024 + +# Rate at which packets can be sent, in bytes/second +send_rate = 5120000 + +# Rate at which packets can be received, in bytes/second +recv_rate = 5120000 + +# Set true to enable the peer-exchange reactor +pex = true + +# Seed mode, in which node constantly crawls the network and looks for +# peers. If another node asks it for addresses, it responds and disconnects. +# +# Does not work if the peer-exchange reactor is disabled. +seed_mode = false + +# Comma separated list of peer IDs to keep private (will not be gossiped to other peers) +private_peer_ids = "" + +# Toggle to disable guard against peers connecting from the same ip. +allow_duplicate_ip = false + +# Peer connection configuration. +handshake_timeout = "20s" +dial_timeout = "3s" + +##### mempool configuration options ##### +[mempool] + +recheck = true +broadcast = true +wal_dir = "" + +# Maximum number of transactions in the mempool +size = 5000 + +# Limit the total size of all txs in the mempool. +# This only accounts for raw transactions (e.g. given 1MB transactions and +# max_txs_bytes=5MB, mempool will only accept 5 transactions). +max_txs_bytes = 1073741824 + +# Size of the cache (used to filter transactions we saw earlier) in transactions +cache_size = 10000 + +# Maximum size of a single transaction. +# NOTE: the max size of a tx transmitted over the network is {max_tx_bytes} + {amino overhead}. +max_tx_bytes = 1048576 + +##### fast sync configuration options ##### +[fastsync] + +# Fast Sync version to use: +# 1) "v0" (default) - the legacy fast sync implementation +# 2) "v1" - refactor of v0 version for better testability +version = "v0" + +##### consensus configuration options ##### +[consensus] + +wal_file = "data/cs.wal/wal" + +timeout_propose = "3s" +timeout_propose_delta = "500ms" +timeout_prevote = "1s" +timeout_prevote_delta = "500ms" +timeout_precommit = "1s" +timeout_precommit_delta = "500ms" +timeout_commit = "5s" + +# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0) +skip_timeout_commit = false + +# EmptyBlocks mode and possible interval between empty blocks +create_empty_blocks = true +create_empty_blocks_interval = "0s" + +# Reactor sleep duration parameters +peer_gossip_sleep_duration = "100ms" +peer_query_maj23_sleep_duration = "2s" + +##### transactions indexer configuration options ##### +[tx_index] + +# What indexer to use for transactions +# +# Options: +# 1) "null" +# 2) "kv" (default) - the simplest possible indexer, backed by key-value storage (defaults to levelDB; see DBBackend). +indexer = "kv" + +# Comma-separated list of tags to index (by default the only tag is "tx.hash") +# +# You can also index transactions by height by adding "tx.height" tag here. +# +# It's recommended to index only a subset of tags due to possible memory +# bloat. This is, of course, depends on the indexer's DB and the volume of +# transactions. +index_tags = "" + +# When set to true, tells indexer to index all tags (predefined tags: +# "tx.hash", "tx.height" and all tags from DeliverTx responses). +# +# Note this may be not desirable (see the comment above). IndexTags has a +# precedence over IndexAllTags (i.e. when given both, IndexTags will be +# indexed). +index_all_tags = true + +##### instrumentation configuration options ##### +[instrumentation] + +# When true, Prometheus metrics are served under /metrics on +# PrometheusListenAddr. +# Check out the documentation for the list of available metrics. +prometheus = true + +# Address to listen for Prometheus collector(s) connections +prometheus_listen_addr = ":26660" + +# Maximum number of simultaneous connections. +# If you want to accept a larger number than the default, make sure +# you increase your OS limits. +# 0 - unlimited. +max_open_connections = 3 + +# Instrumentation namespace +namespace = "tendermint" diff --git a/packaging/templates/config/mainnet/heimdall-config.toml b/packaging/templates/config/mainnet/heimdall-config.toml new file mode 100644 index 000000000..6f65b97f9 --- /dev/null +++ b/packaging/templates/config/mainnet/heimdall-config.toml @@ -0,0 +1,44 @@ +# This is a TOML config file. +# For more information, see https://github.com/toml-lang/toml + +##### RPC and REST configs ##### + +# RPC endpoint for ethereum chain +eth_rpc_url = "http://localhost:9545" + +# RPC endpoint for bor chain +bor_rpc_url = "http://localhost:8545" + +# RPC endpoint for tendermint +tendermint_rpc_url = "http://0.0.0.0:26657" + +#### Bridge configs #### + +# Heimdall REST server endpoint, which is used by bridge +heimdall_rest_server = "http://0.0.0.0:1317" + +# AMQP endpoint +amqp_url = "amqp://guest:guest@localhost:5672/" + +## Poll intervals +checkpoint_poll_interval = "5m0s" +syncer_poll_interval = "1m0s" +noack_poll_interval = "16m50s" +clerk_poll_interval = "10s" +span_poll_interval = "1m0s" +enable_self_heal = "false" +sh_state_synced_interval = "15m0s" +sh_stake_update_interval = "3h0m0s" +sh_max_depth_duration = "1h0m0s" + +#### gas limits #### +main_chain_gas_limit = "5000000" + +#### gas price #### +main_chain_max_gas_price = "400000000000" + +##### Timeout Config ##### +no_ack_wait_time = "30m0s" + +##### chain - newSelectionAlgoHeight depends on this ##### +chain = "mainnet" diff --git a/packaging/templates/package_scripts/preinst b/packaging/templates/package_scripts/preinst.amoy similarity index 73% rename from packaging/templates/package_scripts/preinst rename to packaging/templates/package_scripts/preinst.amoy index f36163db8..e45167c65 100755 --- a/packaging/templates/package_scripts/preinst +++ b/packaging/templates/package_scripts/preinst.amoy @@ -4,6 +4,7 @@ ################## # Stops existing for upgrade export HEIMDALL_DIR=/var/lib/heimdall +sudo -u heimdall heimdalld init --chain=amoy --home /var/lib/heimdall sudo chown -R heimdall $HEIMDALL_DIR ################# #sudo systemctl stop heimdalld.service diff --git a/packaging/templates/package_scripts/preinst.mainnet b/packaging/templates/package_scripts/preinst.mainnet new file mode 100755 index 000000000..fd9144ed7 --- /dev/null +++ b/packaging/templates/package_scripts/preinst.mainnet @@ -0,0 +1,10 @@ +#!/bin/bash +# +# +################## +# Stops existing for upgrade +export HEIMDALL_DIR=/var/lib/heimdall +sudo -u heimdall heimdalld init --chain=mainnet --home /var/lib/heimdall +sudo chown -R heimdall $HEIMDALL_DIR +################# +#sudo systemctl stop heimdalld.service From d5558e75c8a8ed13f59405583915becfc9a5c23d Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Thu, 3 Oct 2024 13:41:20 -0500 Subject: [PATCH 6/7] Updating profiles postinsts to remove initialization --- packaging/templates/package_scripts/postinst.profile | 1 - packaging/templates/package_scripts/postinst.profile.amoy | 1 - packaging/templates/package_scripts/postinst.profile.mainnet | 1 - packaging/templates/package_scripts/postinst.validator | 1 - 4 files changed, 4 deletions(-) diff --git a/packaging/templates/package_scripts/postinst.profile b/packaging/templates/package_scripts/postinst.profile index c428aa2e5..b0643ced6 100755 --- a/packaging/templates/package_scripts/postinst.profile +++ b/packaging/templates/package_scripts/postinst.profile @@ -1,5 +1,4 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -sudo -u heimdall heimdalld init --chain=amoy --home /var/lib/heimdall sudo systemctl daemon-reload \ No newline at end of file diff --git a/packaging/templates/package_scripts/postinst.profile.amoy b/packaging/templates/package_scripts/postinst.profile.amoy index d4c29a88e..2515e30fe 100755 --- a/packaging/templates/package_scripts/postinst.profile.amoy +++ b/packaging/templates/package_scripts/postinst.profile.amoy @@ -1,5 +1,4 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -sudo -u heimdall heimdalld init --chain=amoy --home /var/lib/heimdall sudo systemctl daemon-reload diff --git a/packaging/templates/package_scripts/postinst.profile.mainnet b/packaging/templates/package_scripts/postinst.profile.mainnet index 2ea6e7abd..b0643ced6 100755 --- a/packaging/templates/package_scripts/postinst.profile.mainnet +++ b/packaging/templates/package_scripts/postinst.profile.mainnet @@ -1,5 +1,4 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -sudo -u heimdall heimdalld init --chain=mainnet --home /var/lib/heimdall sudo systemctl daemon-reload \ No newline at end of file diff --git a/packaging/templates/package_scripts/postinst.validator b/packaging/templates/package_scripts/postinst.validator index 1715504bb..2515e30fe 100755 --- a/packaging/templates/package_scripts/postinst.validator +++ b/packaging/templates/package_scripts/postinst.validator @@ -1,5 +1,4 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -sudo -u heimdall heimdalld init --chain=mumbai --home /var/lib/heimdall sudo systemctl daemon-reload From df3ac83029d03ab0fe6d3d4a794af9cd30755fef Mon Sep 17 00:00:00 2001 From: Daniel Jones Date: Mon, 7 Oct 2024 07:44:33 -0500 Subject: [PATCH 7/7] Switched to use heimdall master branch --- .github/workflows/amoy_deb_profiles.yml | 2 +- .github/workflows/mainnet_deb_profiles.yml | 2 +- .github/workflows/packager_deb.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/amoy_deb_profiles.yml b/.github/workflows/amoy_deb_profiles.yml index d45492ee9..da17ad285 100644 --- a/.github/workflows/amoy_deb_profiles.yml +++ b/.github/workflows/amoy_deb_profiles.yml @@ -3,7 +3,7 @@ name: amoy_deb_profiles on: push: branches: - - 'main' + - 'master' paths: - '**' tags: diff --git a/.github/workflows/mainnet_deb_profiles.yml b/.github/workflows/mainnet_deb_profiles.yml index 54044f428..836bb291d 100644 --- a/.github/workflows/mainnet_deb_profiles.yml +++ b/.github/workflows/mainnet_deb_profiles.yml @@ -3,7 +3,7 @@ name: mainnet_deb_profiles on: push: branches: - - 'main' + - 'master' paths: - '**' tags: diff --git a/.github/workflows/packager_deb.yml b/.github/workflows/packager_deb.yml index 262ec559a..60331c7f3 100644 --- a/.github/workflows/packager_deb.yml +++ b/.github/workflows/packager_deb.yml @@ -3,7 +3,7 @@ name: packager_deb on: push: branches: - - 'main' + - 'master' paths: - '**' tags: