diff --git a/.github/workflows/amoy_deb_profiles.yml b/.github/workflows/amoy_deb_profiles.yml new file mode 100644 index 000000000..da17ad285 --- /dev/null +++ b/.github/workflows/amoy_deb_profiles.yml @@ -0,0 +1,178 @@ +name: amoy_deb_profiles + +on: + push: + branches: + - 'master' + 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/config + - 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 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: + 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 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: + 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 \ No newline at end of file diff --git a/.github/workflows/mainnet_deb_profiles.yml b/.github/workflows/mainnet_deb_profiles.yml new file mode 100644 index 000000000..836bb291d --- /dev/null +++ b/.github/workflows/mainnet_deb_profiles.yml @@ -0,0 +1,191 @@ +name: mainnet_deb_profiles + +on: + push: + branches: + - 'master' + 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/config + - 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 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 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 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 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 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: + 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 \ No newline at end of file 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..60331c7f3 --- /dev/null +++ b/.github/workflows/packager_deb.yml @@ -0,0 +1,131 @@ +name: packager_deb + +on: + push: + branches: + - 'master' + 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/bor/README.md b/bor/README.md index b709a71c7..cd8c49567 100644 --- a/bor/README.md +++ b/bor/README.md @@ -33,7 +33,7 @@ type Span struct { ChainID string `json:"bor_chain_id" yaml:"bor_chain_id"` } ``` -where , +where, * `ID` means the id of the span, calculated by monotonically incrementing the ID of the previous span. * `StartBlock` corresponds to the block in bor from which the given span would commence. diff --git a/bridge/README.md b/bridge/README.md index b27313bd3..08aa311a5 100644 --- a/bridge/README.md +++ b/bridge/README.md @@ -11,7 +11,7 @@ ## Overview -Bridge module is responsible for listening to multiple chains and processing the events emitted by them.It converts the emitted data into heimdall messages and send them to the heimdall chain. There are `listener` and `processor` components in the bridge module which are responsible for listening and processing the events respectively as per their module. For example `listener/rootchain.go` is responsible for listening to events coming from rootchain OR L1 i.e Ethereum chain in our case and `listener/maticchain.go` is responsible for listening to events coming from maticchain or L2 i.e Bor chain in our case. +Bridge module is responsible for listening to multiple chains and processing the events emitted by them. It converts the emitted data into heimdall messages and sends them to the heimdall chain. There are `listener` and `processor` components in the bridge module which are responsible for listening and processing the events respectively as per their module. For example `listener/rootchain.go` is responsible for listening to events coming from rootchain OR L1 i.e Ethereum chain in our case and `listener/maticchain.go` is responsible for listening to events coming from maticchain or L2 i.e Bor chain in our case. In order to process the events emitted by the chains, bridge module uses `processor` component, which is responsible for processing the events emitted by the chains. For example `processor/clerk.go` is responsible for processing the events related to clerk module, `processor/staking.go` is responsible for processing the events related to staking module and so on. @@ -25,13 +25,13 @@ There is no change to the circulating supply of your token when it crosses the b ## Listener -The bridge module has a `BaseListener` which is extended by `RootChainListener`, `MaticChainListener` and `HeimdallListener`. It has all the methods required to start polling, listening to incoming headers(blocks) and stopping the process if required. All the 3 listneres uses these properties with their individual implementations on how to handle the incoming header once received. +The bridge module has a `BaseListener` which is extended by `RootChainListener`, `MaticChainListener` and `HeimdallListener`. It has all the methods required to start polling, listening to incoming headers(blocks) and stopping the process if required. All the 3 listeners use these properties with their individual implementations on how to handle the incoming header once received. For example in `RootChainListener` the incoming header is used to determine the current height of root chain and calculate the `from` and `to` block numbers using which the events are fetched from the root chain. These events are then sent to `handleLog` where based on their event signature they are added to queue as tasks for further processing by their respective processors. ## Processor -There is a `BaseProcessor` which is extended by every processor in the processor package. It has all the methods required to start processing the events, registering for the tasks which are there in the queue and stopping the process if required. All the processors uses these properties with their individual implementations on how to handle the incoming events once received. +There is a `BaseProcessor` which is extended by every processor in the processor package. It has all the methods required to start processing the events, registering for the tasks which are there in the queue and stopping the process if required. All the processors use these properties with their individual implementations on how to handle the incoming events once received. Once the event is added to the queue by the `Listener`, the `Processor` takes over and processes the events which are added into the queue based on their event signature. Each processor has `RegisterTasks` method using which they register to process specific tasks added to the queue based on the module they serve. For example `StakingProcessor` registers for `Staking` related tasks, `ClerkProcessor` registers for `Clerk` related tasks and so on. You can look into each processor to check which tasks they are registered for. diff --git a/gov/README.md b/gov/README.md index 07fec5885..41617eaab 100644 --- a/gov/README.md +++ b/gov/README.md @@ -13,7 +13,7 @@ Heimdall governance works exactly the same as Cosmos-sdk's gov module. In this system, holders of the native staking token of the chain can vote on proposals on a 1 token = 1 vote basis. Here is a list of features the module currently supports: -- Proposal submission: Validators can submit proposals with a deposit. Once the minimum deposit is reached, proposal enters voting period. Valdiators that deposited on proposals can recover their deposits once the proposal is rejected or accepted. +- Proposal submission: Validators can submit proposals with a deposit. Once the minimum deposit is reached, proposal enters voting period. Validators that deposited on proposals can recover their deposits once the proposal is rejected or accepted. - Vote: Validators can vote on proposals that reached MinDeposit. There are deposit period and voting period as params in gov module. Minimum deposit has to be achieved before deposit period ends, otherwise proposal will be automatically rejected. 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 a43988af6..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.9 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld -Version: 1.0.9 -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/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/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 1952428a0..000000000 --- a/packaging/templates/package_scripts/control +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld -Version: 1.0.9 -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 79560cce4..000000000 --- a/packaging/templates/package_scripts/control.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld -Version: 1.0.9 -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.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.profile.amd64 b/packaging/templates/package_scripts/control.profile.amd64 deleted file mode 100755 index 4d888d422..000000000 --- a/packaging/templates/package_scripts/control.profile.amd64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld-profile -Version: 1.0.9 -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 017babe9f..000000000 --- a/packaging/templates/package_scripts/control.profile.arm64 +++ /dev/null @@ -1,12 +0,0 @@ -Source: heimdalld-profile -Version: 1.0.9 -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 deleted file mode 100755 index 5b9b7e1c9..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.9 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld-profile -Version: 1.0.9 -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 diff --git a/packaging/templates/package_scripts/control.validator.arm64 b/packaging/templates/package_scripts/control.validator.arm64 deleted file mode 100755 index 93074d2f0..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.9 -Homepage: https://polygon.technology -Rules-Requires-Root: no -Package: heimdalld-profile -Version: 1.0.9 -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..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=mumbai --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 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 deleted file mode 100755 index 0946b7eb0..000000000 --- a/packaging/templates/package_scripts/preinst +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# -# -################## -# Stops existing for upgrade -################# -#sudo systemctl stop heimdalld.service diff --git a/packaging/templates/package_scripts/preinst.amoy b/packaging/templates/package_scripts/preinst.amoy new file mode 100755 index 000000000..e45167c65 --- /dev/null +++ b/packaging/templates/package_scripts/preinst.amoy @@ -0,0 +1,10 @@ +#!/bin/bash +# +# +################## +# 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 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 diff --git a/scripts/updateVersion.sh b/scripts/updateVersion.sh deleted file mode 100755 index 8f63cd98a..000000000 --- a/scripts/updateVersion.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/bash -set -e - -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" - -echo "The version is of form - VersionMajor.VersionMinor.VersionPatch-VersionMeta" -echo "Let's take 0.3.4-beta as an example. Here:" -echo "* VersionMajor is - 0" -echo "* VersionMinor is - 3" -echo "* VersionPatch is - 4" -echo "* VersionMeta is - beta" -echo "" -echo "Now, enter the new version step-by-step below:" - -version="" - -# VersionMajor -read -p "* VersionMajor: " VersionMajor -if [ -z "$VersionMajor" ] -then - echo "VersionMajor cannot be NULL" - exit -1 -fi -version+=$VersionMajor - -# VersionMinor -read -p "* VersionMinor: " VersionMinor -if [ -z "$VersionMinor" ] -then - echo "VersionMinor cannot be NULL" - exit -1 -fi -version+="."$VersionMinor - -# VersionPatch -read -p "* VersionPatch: " VersionPatch -if [ -z "$VersionPatch" ] -then - echo "VersionPatch cannot be NULL" - exit -1 -fi -version+="."$VersionPatch - -# VersionMeta (optional) -read -p "* VersionMeta (optional, press enter if not needed): " VersionMeta -if [[ ! -z "$VersionMeta" ]] -then - version+="-"$VersionMeta -fi - -echo "" -echo "New version is: $version" - -# update version in all the 6 templates and 1 deb control file -replaceVersion="Version: "$version -replaceStandards="Standards-Version: v"$version -fileArray=( - "${DIR}/../packaging/deb/heimdalld/DEBIAN/control" - "${DIR}/../packaging/templates/package_scripts/control" - "${DIR}/../packaging/templates/package_scripts/control.arm64" - "${DIR}/../packaging/templates/package_scripts/control.profile.amd64" - "${DIR}/../packaging/templates/package_scripts/control.profile.arm64" - "${DIR}/../packaging/templates/package_scripts/control.validator" - "${DIR}/../packaging/templates/package_scripts/control.validator.arm64" -) -for file in ${fileArray[@]}; do - # get the line starting with `Version` in the control file and store it in the $tempVersion variable - tempVersion=$(grep "^Version.*" $file) - sed -i '' "s%$tempVersion%$replaceVersion%" $file -done - -fileArrayStandards=( - "${DIR}/../packaging/deb/heimdalld/DEBIAN/control" - "${DIR}/../packaging/templates/package_scripts/control.validator" - "${DIR}/../packaging/templates/package_scripts/control.validator.arm64" -) -for file in ${fileArrayStandards[@]}; do - # get the line starting with `Standards-Version` in the control file and store it in the $tempStandards variable - tempStandards=$(grep "^Standards-Version.*" $file) - sed -i '' "s%$tempStandards%$replaceStandards%" $file -done - -echo "" -echo "Updating Version Done" - -exit 0 diff --git a/staking/README.md b/staking/README.md index da4cece75..1379f407b 100644 --- a/staking/README.md +++ b/staking/README.md @@ -23,7 +23,7 @@ The `staking` module in Heimdall is responsible for a validator's stake related operations. It primarily aids in * A node joining the protocol as a validator. -* An node leaving the protocol as a validator. +* A node leaving the protocol as a validator. * Updating an existing validator's stake in the network. * Updating the signer address of an existing validator. @@ -75,7 +75,7 @@ where * `TxHash` is the hash of the staking transaction on L1. * `LogIndex` is the index of the `Staked` log in the staking transaction receipt. * `BlockNumber` is the L1 block number in which the staking transaction was included. -* `Nonce` is the the count representing all the staking related transactions performed from the new validator's account. This is meant to keep Heimdall and L1 in sync. +* `Nonce` is the count representing all the staking related transactions performed from the new validator's account. This is meant to keep Heimdall and L1 in sync. Upon broadcasting the message, it goes through `HandleMsgValidatorJoin` handler which checks the basic sanity of the transaction (verifying the validator isn't already existing, voting power, etc.). @@ -199,7 +199,7 @@ where * `TxHash` is the hash of the unstake transaction on L1. * `LogIndex` is the index of the `UnstakeInit` log in the unstake transaction receipt. * `BlockNumber` is the L1 block number in which the unstake transaction was included. -* `Nonce` is the the count representing all the staking related transactions performed from the validator's account. +* `Nonce` is the count representing all the staking related transactions performed from the validator's account. Upon broadcasting the message, it goes through `HandleMsgValidatorExit` handler which checks the basic sanity of the data in the transaction. @@ -282,7 +282,7 @@ where * `TxHash` is the hash of the stake update transaction on L1. * `LogIndex` is the index of the `StakeUpdate` log in the stake update transaction receipt. * `BlockNumber` is the L1 block number in which the stake update transaction was included. -* `Nonce` is the the count representing all the staking related transactions performed from the validator's account. +* `Nonce` is the count representing all the staking related transactions performed from the validator's account. Upon broadcasting the message, it goes through `HandleMsgStakeUpdate` handler which checks the basic sanity of the data in the transaction. @@ -325,7 +325,7 @@ curl -X POST "localhost:1317/staking/stake-update?proposer=&id ## How does a validator update its signer address -A validator can update its signer address in the network by invoking the the `updateSigner` function on the `StakeManager` contract on L1, which emits an `SignerChange` event: +A validator can update its signer address in the network by invoking the `updateSigner` function on the `StakeManager` contract on L1, which emits an `SignerChange` event: ``` /// @param validatorId unique integer to identify a validator. @@ -363,7 +363,7 @@ where * `TxHash` is the hash of the signer update transaction on L1. * `LogIndex` is the index of the `SignerChange` log in the signer update transaction receipt. * `BlockNumber` is the L1 block number in which the signer update transaction was included. -* `Nonce` is the the count representing all the staking related transactions performed from the validator's account. +* `Nonce` is the count representing all the staking related transactions performed from the validator's account. Upon broadcasting the message, it goes through `HandleMsgSignerUpdate` handler which checks the basic sanity of the data in the transaction. diff --git a/supply/types/account.go b/supply/types/account.go index 864144453..b5c5f657a 100644 --- a/supply/types/account.go +++ b/supply/types/account.go @@ -75,7 +75,7 @@ func (ma *ModuleAccount) AddPermissions(permissions ...string) { } // RemovePermission removes the permission from the list of granted permissions -// or returns an error if the permission is has not been granted. +// or returns an error if the permission has not been granted. func (ma *ModuleAccount) RemovePermission(permission string) error { for i, perm := range ma.Permissions { if perm == permission { @@ -98,7 +98,7 @@ func (ma ModuleAccount) HasPermission(permission string) bool { return false } -// GetName returns the the name of the holder's module +// GetName returns the name of the holder's module func (ma ModuleAccount) GetName() string { return ma.Name }