Skip to content

Commit

Permalink
Merge branch 'alpha' into koios-1.1.1rc
Browse files Browse the repository at this point in the history
  • Loading branch information
rdlrt committed May 4, 2024
2 parents f651d7e + 9c9e2b2 commit b3b572e
Show file tree
Hide file tree
Showing 13 changed files with 57 additions and 39 deletions.
57 changes: 32 additions & 25 deletions .github/workflows/premerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
distro: [rockylinux, ubuntu]
env:
REGISTRY: ghcr.io
BRANCH: ${{ github.event.inputs.branch || '' }}
BRANCH: ${{ github.event.inputs.branch || github.head_ref }}
if: github.event.pull_request.draft == false
steps:
- name: Maximize build space
Expand All @@ -45,63 +45,70 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
- name: Define BRANCH, COMMIT and G_ACCOUNT in environment
- name: Define BRANCH, COMMIT_SHA and G_ACCOUNT in environment
run: |
echo "G_ACCOUNT=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
if [[ -z "${{ env.BRANCH }}" ]]; then
echo "BRANCH=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
echo "COMMIT=$(git rev-parse --short "$GITHUB_SHA")" >> $GITHUB_ENV
echo "IS_FORK=${{ github.event.pull_request.head.repo.fork }}" >> $GITHUB_ENV
echo "FORK_OWNER=${{ github.event.pull_request.head.repo.owner.login }}" >> $GITHUB_ENV
echo "G_ACCOUNT=${{ github.repository_owner }}" >> $GITHUB_ENV
echo "COMMIT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
- name: Setup G_ACCOUNT based on fork status
run: |
if [ "$IS_FORK" = "true" ]; then
echo "This means the PR is from a fork"
echo "BUILD_G_ACCOUNT=${{ github.event.pull_request.head.repo.owner.login }}" >> $GITHUB_ENV
else
echo "COMMIT=$(git rev-parse --short ${{ env.BRANCH }})" >> $GITHUB_ENV
echo "This means the PR is from the same repository"
echo "BUILD_G_ACCOUNT=${{ github.repository_owner }}" >> $GITHUB_ENV
fi
- name: Testing guild-deploy.sh (IO fork of libsodium)
run: |
docker build . \
--file files/tests/pre-merge/${{ matrix.distro }}-guild-deploy.sh-l.containerfile \
--compress \
--build-arg BRANCH=${{ env.BRANCH }} \
--build-arg COMMIT=${{ env.COMMIT }} \
--build-arg G_ACCOUNT=${{ env.G_ACCOUNT }} \
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}
--build-arg BRANCH=$BRANCH \
--build-arg COMMIT=$COMMIT_SHA \
--build-arg G_ACCOUNT=${{ env.BUILD_G_ACCOUNT }} \
--tag $REGISTRY/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_$COMMIT_SHA
- name: Get Image ID
run: |
PREMERGE_IMAGE_ID1=$(docker inspect ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }} --format='{{.Id}}')
PREMERGE_IMAGE_ID1=$(docker inspect ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT_SHA }} --format='{{.Id}}')
echo "PREMERGE_IMAGE_ID1=${PREMERGE_IMAGE_ID1}" >> $GITHUB_ENV
- name: Push pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}
- name: Push pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT_SHA }}
run: |
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }}
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT_SHA }}
- name: Testing cabal-build-all.sh (IO fork of libsodium)
run: |
echo "Working from PR Branch ${{ env.G_ACCOUNT }}/guild-operators/${{ env.BRANCH }} on Commit ${{ env.COMMIT }}"
echo "Working from PR Branch ${{ env.G_ACCOUNT }}/guild-operators/${{ env.BRANCH }} on COMMIT_SHA ${{ env.COMMIT_SHA }}"
docker build . \
--file files/tests/pre-merge/${{ matrix.distro }}-cabal-l.containerfile \
--compress \
--build-arg BRANCH=${{ env.BRANCH }} \
--build-arg COMMIT=${{ env.COMMIT }} \
--build-arg G_ACCOUNT=${{ env.G_ACCOUNT }} \
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}
--build-arg COMMIT=${{ env.COMMIT_SHA }} \
--build-arg G_ACCOUNT=${{ env.BUILD_G_ACCOUNT }} \
--tag ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT_SHA }}
- name: Get Versions and Image ID
run: |
VERSION_DETAILS=($(docker run --rm ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }} cardano-node --version | awk '/^cardano-node/'))
PREMERGE_IMAGE_ID2=$(docker inspect ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }} --format='{{.Id}}')
VERSION_DETAILS=($(docker run --rm ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT_SHA }} cardano-node --version | awk '/^cardano-node/'))
PREMERGE_IMAGE_ID2=$(docker inspect ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT_SHA }} --format='{{.Id}}')
echo "CARDANO_NODE_VERSION=${VERSION_DETAILS[1]}" >> $GITHUB_ENV
echo "GHC_VERSION=${VERSION_DETAILS[5]}" >> $GITHUB_ENV
echo "PREMERGE_IMAGE_ID2=${PREMERGE_IMAGE_ID2}" >> $GITHUB_ENV
- name: Push pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}
- name: Push pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT_SHA }}
run: |
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }}
docker push ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT_SHA }}
- name: Add summary details
if: always()
run: |
echo "## Pre-Merge Summary Details" >> $GITHUB_STEP_SUMMARY
echo "| Name | Value |" >> $GITHUB_STEP_SUMMARY
echo "| ---- | ----- |" >> $GITHUB_STEP_SUMMARY
echo "| Guild Deploy Image | ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT }} |" >> $GITHUB_STEP_SUMMARY
echo "| Guild Deploy Image | ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:guild-deploy-l_${{ env.COMMIT_SHA }} |" >> $GITHUB_STEP_SUMMARY
echo "| Guild Deploy Image ID | ${{ env.PREMERGE_IMAGE_ID1 }} |" >> $GITHUB_STEP_SUMMARY
echo "| Cabal Build Image | ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT }} |" >> $GITHUB_STEP_SUMMARY
echo "| Cabal Build Image | ${{ env.REGISTRY }}/${{ env.G_ACCOUNT }}/pre-merge-${{ matrix.distro }}:cabal-l_${{ env.COMMIT_SHA }} |" >> $GITHUB_STEP_SUMMARY
echo "| Cabal Build Image ID | ${{ env.PREMERGE_IMAGE_ID2 }} |" >> $GITHUB_STEP_SUMMARY
echo "| G_ACCOUNT | ${{ env.G_ACCOUNT }} |" >> $GITHUB_STEP_SUMMARY
echo "| BRANCH | ${{ env.BRANCH }} |" >> $GITHUB_STEP_SUMMARY
echo "| COMMIT | ${{ env.COMMIT }} |" >> $GITHUB_STEP_SUMMARY
echo "| COMMIT_SHA | ${{ env.COMMIT_SHA }} |" >> $GITHUB_STEP_SUMMARY
echo "| CARDANO_NODE_VERSION | ${{ env.CARDANO_NODE_VERSION }} |" >> $GITHUB_STEP_SUMMARY
echo "| GHC_VERSION | ${{ env.GHC_VERSION }} |" >> $GITHUB_STEP_SUMMARY
1 change: 1 addition & 0 deletions docs/Build/grest-changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This release primarily focuses on backend performance fixes and work with dbsync
- Output - `/asset_summary` - Add `addresses` field [#263](https://github.com/cardano-community/koios-artifacts/pull/263)
- Output - `/asset_addresses` , `/asset_nft_address` and `/policy_asset_addresses` - Add `stake_address` field [#262](https://github.com/cardano-community/koios-artifacts/pull/262)
- Output - Fix `/script_utxos` as it was incorrectly returning object instead of array for asset_list [#269](https://github.com/cardano-community/koios-artifacts/pull/269)
- Output - `/tx_info` - Add `plutus_contract` -> `spends_input` to `plutus_contracts` to point the input transaction being consumed by the script [#269](https://github.com/cardano-community/koios-artifacts/pull/269)

### Deprecations:
- None
Expand Down
1 change: 1 addition & 0 deletions files/configs/guild/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"NodeConfigFile": "/opt/cardano/cnode/files/config.json",
"PrometheusPort": 8080,
"RequiresNetworkMagic": "RequiresMagic",
"EnableFutureGenesis": false,
"defaultBackends": [
"KatipBK"
],
Expand Down
1 change: 1 addition & 0 deletions files/configs/mainnet/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"NodeConfigFile": "/opt/cardano/cnode/files/config.json",
"PrometheusPort": 8080,
"RequiresNetworkMagic": "RequiresNoMagic",
"EnableFutureGenesis": false,
"defaultBackends": [
"KatipBK"
],
Expand Down
7 changes: 5 additions & 2 deletions files/configs/mainnet/topology.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
{
"address": "backbone.mainnet.emurgornd.com",
"port": 3001
},
{
"address": "backbone.mainnet.cardanofoundation.org",
"port": 3001
}
],
"localRoots": [
Expand All @@ -30,8 +34,7 @@
{"address": "relay1-pub.ahlnet.nu", "port": 2111, "pool": "AHL", "location": "EU/SE/Malmo" },
{"address": "relay2-pub.ahlnet.nu", "port": 2111, "pool": "AHL", "location": "EU/SE/Malmo" },
{"address": "relay1.clio.one", "port": 6010, "pool": "CLIO", "location": "EU/IT/Milan" },
{"address": "relay2.clio.one", "port": 6010, "pool": "CLIO", "location": "EU/IT/Bozlano" },
{"address": "relay3.clio.one", "port": 6010, "pool": "CLIO", "location": "EU/IT/Bozlano" }
{"address": "relay2.clio.one", "port": 6010, "pool": "CLIO", "location": "EU/IT/Bozlano" }
],
"advertise": false,
"trustable": false,
Expand Down
1 change: 1 addition & 0 deletions files/configs/preprod/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"NodeConfigFile": "/opt/cardano/cnode/files/config.json",
"PrometheusPort": 8080,
"RequiresNetworkMagic": "RequiresMagic",
"EnableFutureGenesis": false,
"defaultBackends": [
"KatipBK"
],
Expand Down
1 change: 1 addition & 0 deletions files/configs/preview/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"NodeConfigFile": "/opt/cardano/cnode/files/config.json",
"PrometheusPort": 8080,
"RequiresNetworkMagic": "RequiresMagic",
"EnableFutureGenesis": false,
"defaultBackends": [
"KatipBK"
],
Expand Down
1 change: 1 addition & 0 deletions files/configs/sanchonet/db-sync-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"NodeConfigFile": "/opt/cardano/cnode/files/config.json",
"PrometheusPort": 8080,
"RequiresNetworkMagic": "RequiresMagic",
"EnableFutureGenesis": false,
"defaultBackends": [
"KatipBK"
],
Expand Down
10 changes: 5 additions & 5 deletions files/docker/node/dockerfile_bin
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ STOPSIGNAL SIGINT

LABEL desc="Cardano Node by Guild's Operators"
ARG DEBIAN_FRONTEND=noninteractive
ARG G_ACCOUNT
ARG GUILD_DEPLOY_BRANCH
ARG G_ACCOUNT=cardano-community
ARG GUILD_DEPLOY_BRANCH=master

USER root
WORKDIR /
Expand Down Expand Up @@ -39,15 +39,15 @@ RUN adduser --disabled-password --gecos '' guild \
&& adduser guild sudo \
&& mkdir -pv /home/guild/.local/ /home/guild/.scripts/


RUN set -x && apt update \
&& apt-get update \
&& mkdir -p /root/.local/bin \
&& wget https://raw.githubusercontent.com/${G_ACCOUNT}/guild-operators/${GUILD_DEPLOY_BRANCH}/scripts/cnode-helper-scripts/guild-deploy.sh \
&& export SUDO='N' \
&& export UPDATE_CHECK='N' \
&& export SKIP_DBSYNC_DOWNLOAD='Y' \
&& chmod +x ./guild-deploy.sh && ./guild-deploy.sh -b ${GUILD_DEPLOY_BRANCH} -s p \
&& export G_ACCOUNT=${G_ACCOUNT} \
&& chmod +x ./guild-deploy.sh && ./guild-deploy.sh -b ${GUILD_DEPLOY_BRANCH} -s p \
&& ls /opt/ \
&& mkdir -p $CNODE_HOME/priv/files \
&& apt-get -y remove libpq-dev build-essential pkg-config libffi-dev libgmp-dev libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev make g++ \
Expand All @@ -56,10 +56,10 @@ RUN set -x && apt update \
&& apt-get -y autoremove \
&& rm -rf /var/lib/apt/lists/*


RUN set -x && export SUDO='N' \
&& export UPDATE_CHECK='N' \
&& export SKIP_DBSYNC_DOWNLOAD='Y' \
&& export G_ACCOUNT=${G_ACCOUNT} \
&& ./guild-deploy.sh -b ${GUILD_DEPLOY_BRANCH} -s dcmowx \
&& cd /usr/bin \
&& wget http://www.vdberg.org/~richard/tcpping \
Expand Down
6 changes: 3 additions & 3 deletions files/node-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"secp256k1": "v0.3.2",
"sodium": "dbb48cce5429cb6585c9034f002568964f1ce567"
},
"8.9.0":
"8.9.2":
{
"blst": "v0.3.11",
"blst": "3dd0f804b1819e5d03fb22ca2e6fac105932043a",
"secp256k1": "v0.3.2",
"sodium": "dbb48cce5429cb6585c9034f002568964f1ce567"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ENV \

WORKDIR /

RUN dnf -y --allowerasing install findutils &&\
RUN dnf -y --allowerasing install findutils jq &&\
dnf clean all &&\
mkdir -pv /root/.local/bin /root/.ghcup/bin &&\
curl -s -f -k -o guild-deploy.sh "https://raw.githubusercontent.com/${G_ACCOUNT}/guild-operators/${BRANCH}/scripts/cnode-helper-scripts/guild-deploy.sh" &&\
Expand Down
3 changes: 2 additions & 1 deletion scripts/cnode-helper-scripts/env
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,8 @@ fi
node_version="$(${CNODEBIN} version | head -1 | cut -d' ' -f2)"
cli_version="$(${CCLI} version | head -1 | cut -d' ' -f2)"
if ! versionCheck "8.9.0" "${node_version}" || ! versionCheck "8.20.3.0" "${cli_version}"; then
if ! versionCheck "8.9.2" "${node_version}" || ! versionCheck "8.20.3.0" "${cli_version}"; then
echo -e "\nKoios scripts have now been upgraded to support cardano-node 8.9.x ('${node_version}' found) / cardano-cli 8.20.x.x ('${cli_version}' found).\nPlease update cardano-node binaries (ensure to read release notes and update various configs using guild-deploy (use appropriate options to download/install/overwrite parts you need) or use tagged branches for older node version (eg: ./<script>.sh -b node-8.1.2 to switch scripts to an older branch).\n\n"
return 1
fi
Expand Down
5 changes: 3 additions & 2 deletions scripts/cnode-helper-scripts/guild-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,12 +379,13 @@ download_cnodebins() {
curl -m 200 -sfL https://github.com/intersectmbo/cardano-addresses/releases/download/3.12.0/cardano-addresses-3.12.0-linux64.tar.gz -o caddress.tar.gz || err_exit " Could not download cardano-wallet's latest release archive from GitHub!"
tar zxf caddress.tar.gz --strip-components 1 bin/cardano-address &>/dev/null
rm -f caddress.tar.gz
[[ -f cardano-address ]] || err_exit " cardano-address archive downloaded but binary (bin/cardano-address) not found after extracting package!"
[[ -f cardano-address ]] || err_exit " cardano-address archive downloaded but binary (cardano-address) not found after extracting package!"
if [[ "${SKIP_DBSYNC_DOWNLOAD}" == "N" ]]; then
echo -e "\n Downloading Cardano DB Sync archive created from GitHub.."

# TODO: Replace CI Build artifact against 13.2.0.2 tag with release from github artefacts once available
#curl -m 200 -sfL https://github.com/IntersectMBO/cardano-db-sync/releases/download/13.2.0.2/cardano-db-sync-13.2.0.1-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.2 from GitHub!"
curl -m 200 -sfL https://ci.iog.io/build/3735786/download/1/cardano-db-sync-13.2.0.2-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.2 from GitHub!"
curl -m 200 -sfL https://ci.iog.io/build/3736263/download/1/cardano-db-sync-13.2.0.2-linux.tar.gz -o cnodedbsync.tar.gz || err_exit " Could not download cardano-db-sync release 13.2.0.2 from GitHub!"
tar zxf cnodedbsync.tar.gz --strip-components 1 ./cardano-db-sync &>/dev/null
[[ -f cardano-db-sync ]] || err_exit " cardano-db-sync archive downloaded but binary (cardano-db-sync) not found after extracting package!"
rm -f cnodedbsync.tar.gz
Expand Down

0 comments on commit b3b572e

Please sign in to comment.