mirror of
https://github.com/luxfi/evm.git
synced 2026-09-24 00:27:44 +00:00
chore: release v0.7.3-rc.0 (#1537)
Co-authored-by: Ceyhun Onur <[email protected]>
This commit is contained in:
committed by
GitHub
co-authored by
Ceyhun Onur
parent
7cce3fc550
commit
12984efb0b
@@ -1,10 +0,0 @@
|
||||
# - Will execute on entry to the containing directory only if authorized with `direnv allow`
|
||||
# - Requires a recent version of direnv (https://direnv.net/)
|
||||
# - For quieter direnv output, set `export DIRENV_LOG_FORMAT=`
|
||||
|
||||
# Determine AVALANCHE_VERSION
|
||||
source ./scripts/versions.sh
|
||||
|
||||
# - Starts an avalanchego dev shell
|
||||
# - Requires nix (https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#install-nix)
|
||||
use flake "github:ava-labs/avalanchego?ref=${AVALANCHE_VERSION}"
|
||||
+18
-17
@@ -38,11 +38,6 @@ jobs:
|
||||
run: |
|
||||
go mod tidy
|
||||
git diff --exit-code
|
||||
- name: Ensure consistent avalanchego version
|
||||
shell: bash
|
||||
run: |
|
||||
bash -x ./scripts/update_avalanchego_version.sh
|
||||
git diff --exit-code
|
||||
|
||||
unit_test:
|
||||
name: Golang Unit Tests (${{ matrix.os }})
|
||||
@@ -151,15 +146,18 @@ jobs:
|
||||
shell: bash
|
||||
run: ./scripts/build.sh
|
||||
- name: Run Warp E2E Tests
|
||||
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@50f1601bf39a106d066012b4ef470c1058f5005a
|
||||
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@v1.11.13
|
||||
with:
|
||||
run: ./scripts/run_ginkgo_warp.sh
|
||||
run_env: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego
|
||||
artifact_prefix: warp
|
||||
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
|
||||
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/run_ginkgo_warp.sh
|
||||
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
|
||||
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
|
||||
loki_username: ${{ secrets.LOKI_ID || '' }}
|
||||
loki_id: ${{ secrets.LOKI_ID || '' }}
|
||||
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
|
||||
- name: Upload tmpnet network dir for warp testing
|
||||
uses: ava-labs/avalanchego/.github/actions/upload-tmpnet-artifact@v1-actions
|
||||
if: always()
|
||||
with:
|
||||
name: warp-tmpnet-data
|
||||
e2e_load:
|
||||
name: e2e load tests
|
||||
runs-on: ubuntu-latest
|
||||
@@ -179,15 +177,18 @@ jobs:
|
||||
shell: bash
|
||||
run: ./scripts/build.sh
|
||||
- name: Run E2E Load Tests
|
||||
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@50f1601bf39a106d066012b4ef470c1058f5005a
|
||||
uses: ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd@v1.11.13
|
||||
with:
|
||||
run: ./scripts/run_ginkgo_load.sh
|
||||
run_env: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego
|
||||
artifact_prefix: load
|
||||
prometheus_username: ${{ secrets.PROMETHEUS_ID || '' }}
|
||||
run: AVALANCHEGO_BUILD_PATH=/tmp/e2e-test/avalanchego ./scripts/run_ginkgo_load.sh
|
||||
prometheus_id: ${{ secrets.PROMETHEUS_ID || '' }}
|
||||
prometheus_password: ${{ secrets.PROMETHEUS_PASSWORD || '' }}
|
||||
loki_username: ${{ secrets.LOKI_ID || '' }}
|
||||
loki_id: ${{ secrets.LOKI_ID || '' }}
|
||||
loki_password: ${{ secrets.LOKI_PASSWORD || '' }}
|
||||
- name: Upload tmpnet network dir for load testing
|
||||
uses: ava-labs/avalanchego/.github/actions/upload-tmpnet-artifact@v1-actions
|
||||
if: always()
|
||||
with:
|
||||
name: load-tmpnet-data
|
||||
test_build_image:
|
||||
name: Image build
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -58,5 +58,3 @@ diffs/
|
||||
|
||||
# clone used for antithesis image builds
|
||||
avalanchego/
|
||||
|
||||
.direnv
|
||||
|
||||
@@ -21,6 +21,7 @@ The Subnet EVM runs in a separate process from the main AvalancheGo process and
|
||||
[v0.7.0] [email protected] (Protocol Version: 38)
|
||||
[v0.7.1] [email protected] (Protocol Version: 39)
|
||||
[v0.7.2] [email protected]/1.13.0-fuji (Protocol Version: 39)
|
||||
[v0.7.3] [email protected]/1.13.0 (Protocol Version: 39)
|
||||
```
|
||||
|
||||
## API
|
||||
@@ -84,5 +85,5 @@ To run a local network, it is recommended to use the [avalanche-cli](https://git
|
||||
|
||||
There are two options when using the Avalanche-CLI:
|
||||
|
||||
1. Use an official Subnet-EVM release: https://docs.avax.network/subnets/build-first-subnet
|
||||
2. Build and deploy a locally built (and optionally modified) version of Subnet-EVM: https://docs.avax.network/subnets/create-custom-subnet
|
||||
1. Use an official Subnet-EVM release: <https://docs.avax.network/subnets/build-first-subnet>
|
||||
2. Build and deploy a locally built (and optionally modified) version of Subnet-EVM: <https://docs.avax.network/subnets/create-custom-subnet>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Ensure the go command is run from the root of the repository
|
||||
REPO_ROOT=$(cd "$( dirname "${BASH_SOURCE[0]}" )"; cd .. && pwd )
|
||||
cd "${REPO_ROOT}"
|
||||
|
||||
# Set AVALANCHE_VERSION
|
||||
. ./scripts/versions.sh
|
||||
|
||||
echo "Running tmpnetctl @ ${AVALANCHE_VERSION}"
|
||||
go run github.com/ava-labs/avalanchego/tests/fixture/tmpnet/tmpnetctl@"${AVALANCHE_VERSION}" "${@}"
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
"rpcChainVMProtocolVersion": {
|
||||
"v0.7.3": 39,
|
||||
"v0.7.2": 39,
|
||||
"v0.7.1": 39,
|
||||
"v0.7.0": 38
|
||||
|
||||
@@ -5,7 +5,7 @@ go 1.23.6
|
||||
require (
|
||||
github.com/VictoriaMetrics/fastcache v1.12.1
|
||||
github.com/antithesishq/antithesis-sdk-go v0.3.8
|
||||
github.com/ava-labs/avalanchego v1.12.3-0.20250321175346-50f1601bf39a
|
||||
github.com/ava-labs/avalanchego v1.13.0
|
||||
github.com/cespare/cp v0.1.0
|
||||
github.com/crate-crypto/go-ipa v0.0.0-20231025140028-3c0104f4b233
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
@@ -58,7 +58,7 @@ require (
|
||||
github.com/DataDog/zstd v1.5.2 // indirect
|
||||
github.com/NYTimes/gziphandler v1.1.1 // indirect
|
||||
github.com/StephenButtolph/canoto v0.15.0 // indirect
|
||||
github.com/ava-labs/coreth v0.15.0-rc.0.0.20250321001337-7fa47ba3fa18 // indirect
|
||||
github.com/ava-labs/coreth v0.15.0-rc.0 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
|
||||
@@ -62,10 +62,10 @@ github.com/antithesishq/antithesis-sdk-go v0.3.8/go.mod h1:IUpT2DPAKh6i/YhSbt6Gl
|
||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/ava-labs/avalanchego v1.12.3-0.20250321175346-50f1601bf39a h1:KSpG4lheMcV3oWrJJQyDyzx+JqSzjJPZEpi7UkSvE8I=
|
||||
github.com/ava-labs/avalanchego v1.12.3-0.20250321175346-50f1601bf39a/go.mod h1:fpV/GmbfIB3P53gkq6zFpyeQtyAsJIuZCCKnm7TJ4sQ=
|
||||
github.com/ava-labs/coreth v0.15.0-rc.0.0.20250321001337-7fa47ba3fa18 h1:OKWMFJZEalp9Kdw0tsKVU6Ky0inxqW/Wt0qCWQIxkZc=
|
||||
github.com/ava-labs/coreth v0.15.0-rc.0.0.20250321001337-7fa47ba3fa18/go.mod h1:2DHfOrbTkZiTyWG5xyZW/4zGV0+hnk92Fsbpfk6AJeg=
|
||||
github.com/ava-labs/avalanchego v1.13.0 h1:bUWMWLShC0ACa5bQgZdBEJf5lMn1lJIvFrolj3iqTZk=
|
||||
github.com/ava-labs/avalanchego v1.13.0/go.mod h1:fpV/GmbfIB3P53gkq6zFpyeQtyAsJIuZCCKnm7TJ4sQ=
|
||||
github.com/ava-labs/coreth v0.15.0-rc.0 h1:wabaNbSXcqhhO6Qg/9fnrgDNCuP3StwB5sls45dHbiI=
|
||||
github.com/ava-labs/coreth v0.15.0-rc.0/go.mod h1:gIGr+5WDNX1DrFvUMy53AtTpkxlM/8cNOD/PDIChKfM=
|
||||
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
|
||||
@@ -11,7 +11,7 @@ var (
|
||||
// GitCommit is set by the build script
|
||||
GitCommit string
|
||||
// Version is the version of Subnet EVM
|
||||
Version string = "v0.7.2"
|
||||
Version string = "v0.7.3"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Requires nix to be installed. The determinate systems installer is recommended:
|
||||
#
|
||||
# https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#install-nix
|
||||
#
|
||||
|
||||
# Load AVALANCHE_VERSION
|
||||
SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=/scripts/versions.sh
|
||||
source "$SCRIPT_DIR"/versions.sh
|
||||
|
||||
# Start a dev shell with the avalanchego flake
|
||||
FLAKE="github:ava-labs/avalanchego?ref=${AVALANCHE_VERSION}"
|
||||
echo "Starting nix shell for ${FLAKE}"
|
||||
nix develop "${FLAKE}" "${@}"
|
||||
Executable
+120
@@ -0,0 +1,120 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Starts a prometheus instance in agent-mode, forwarding to a central
|
||||
# instance. Intended to enable metrics collection from temporary networks running
|
||||
# locally and in CI.
|
||||
#
|
||||
# The prometheus instance will remain running in the background and will forward
|
||||
# metrics to the central instance for all tmpnet networks.
|
||||
#
|
||||
# To stop it:
|
||||
#
|
||||
# $ kill -9 `cat ~/.tmpnet/prometheus/run.pid` && rm ~/.tmpnet/prometheus/run.pid
|
||||
#
|
||||
|
||||
# e.g.,
|
||||
# PROMETHEUS_ID=<id> PROMETHEUS_PASSWORD=<password> ./scripts/run_prometheus.sh
|
||||
if ! [[ "$0" =~ scripts/run_prometheus.sh ]]; then
|
||||
echo "must be run from repository root"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
PROMETHEUS_WORKING_DIR="${HOME}/.tmpnet/prometheus"
|
||||
PIDFILE="${PROMETHEUS_WORKING_DIR}"/run.pid
|
||||
|
||||
# First check if an agent-mode prometheus is already running. A single instance can collect
|
||||
# metrics from all local temporary networks.
|
||||
if pgrep --pidfile="${PIDFILE}" -f 'prometheus.*enable-feature=agent' &> /dev/null; then
|
||||
echo "prometheus is already running locally with --enable-feature=agent"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PROMETHEUS_URL="${PROMETHEUS_URL:-https://prometheus-poc.avax-dev.network}"
|
||||
if [[ -z "${PROMETHEUS_URL}" ]]; then
|
||||
echo "Please provide a value for PROMETHEUS_URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROMETHEUS_ID="${PROMETHEUS_ID:-}"
|
||||
if [[ -z "${PROMETHEUS_ID}" ]]; then
|
||||
echo "Please provide a value for PROMETHEUS_ID"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
PROMETHEUS_PASSWORD="${PROMETHEUS_PASSWORD:-}"
|
||||
if [[ -z "${PROMETHEUS_PASSWORD}" ]]; then
|
||||
echo "Plase provide a value for PROMETHEUS_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# This was the LTS version when this script was written. Probably not
|
||||
# much reason to update it unless something breaks since the usage
|
||||
# here is only to collect metrics from temporary networks.
|
||||
VERSION="2.45.3"
|
||||
|
||||
# Ensure the prometheus command is locally available
|
||||
CMD=prometheus
|
||||
if ! command -v "${CMD}" &> /dev/null; then
|
||||
# Try to use a local version
|
||||
CMD="${PWD}/bin/prometheus"
|
||||
if ! command -v "${CMD}" &> /dev/null; then
|
||||
echo "prometheus not found, attempting to install..."
|
||||
|
||||
# Determine the arch
|
||||
if which sw_vers &> /dev/null; then
|
||||
echo "on macos, only amd64 binaries are available so rosetta is required on apple silicon machines."
|
||||
echo "to avoid using rosetta, install via homebrew: brew install prometheus"
|
||||
DIST=darwin
|
||||
else
|
||||
ARCH="$(uname -i)"
|
||||
if [[ "${ARCH}" != "x86_64" ]]; then
|
||||
echo "on linux, only amd64 binaries are available. manual installation of prometheus is required."
|
||||
exit 1
|
||||
else
|
||||
DIST="linux"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install the specified release
|
||||
PROMETHEUS_FILE="prometheus-${VERSION}.${DIST}-amd64"
|
||||
URL="https://github.com/prometheus/prometheus/releases/download/v${VERSION}/${PROMETHEUS_FILE}.tar.gz"
|
||||
curl -s -L "${URL}" | tar zxv -C /tmp > /dev/null
|
||||
mkdir -p "$(dirname "${CMD}")"
|
||||
cp /tmp/"${PROMETHEUS_FILE}/prometheus" "${CMD}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configure prometheus
|
||||
FILE_SD_PATH="${PROMETHEUS_WORKING_DIR}/file_sd_configs"
|
||||
mkdir -p "${FILE_SD_PATH}"
|
||||
|
||||
echo "writing configuration..."
|
||||
cat >"${PROMETHEUS_WORKING_DIR}"/prometheus.yaml <<EOL
|
||||
# my global config
|
||||
global:
|
||||
# Make sure this value takes into account the network-shutdown-delay in tests/fixture/e2e/env.go
|
||||
scrape_interval: 10s # Default is every 1 minute.
|
||||
evaluation_interval: 10s # The default is every 1 minute.
|
||||
scrape_timeout: 5s # The default is every 10s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: "avalanchego"
|
||||
metrics_path: "/ext/metrics"
|
||||
file_sd_configs:
|
||||
- files:
|
||||
- '${FILE_SD_PATH}/*.json'
|
||||
|
||||
remote_write:
|
||||
- url: "${PROMETHEUS_URL}/api/v1/write"
|
||||
basic_auth:
|
||||
username: "${PROMETHEUS_ID}"
|
||||
password: "${PROMETHEUS_PASSWORD}"
|
||||
EOL
|
||||
|
||||
echo "starting prometheus..."
|
||||
cd "${PROMETHEUS_WORKING_DIR}"
|
||||
nohup "${CMD}" --config.file=prometheus.yaml --web.listen-address=localhost:0 --enable-feature=agent > prometheus.log 2>&1 &
|
||||
echo $! > "${PIDFILE}"
|
||||
echo "running with pid $(cat "${PIDFILE}")"
|
||||
Executable
+115
@@ -0,0 +1,115 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
# Starts a promtail instance to collect logs from temporary networks
|
||||
# running locally and in CI.
|
||||
#
|
||||
# The promtail instance will remain running in the background and will forward
|
||||
# logs to the central instance for all tmpnet networks.
|
||||
#
|
||||
# To stop it:
|
||||
#
|
||||
# $ kill -9 `cat ~/.tmpnet/promtail/run.pid` && rm ~/.tmpnet/promtail/run.pid
|
||||
#
|
||||
|
||||
# e.g.,
|
||||
# LOKI_ID=<id> LOKI_PASSWORD=<password> ./scripts/run_promtail.sh
|
||||
if ! [[ "$0" =~ scripts/run_promtail.sh ]]; then
|
||||
echo "must be run from repository root"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
PROMTAIL_WORKING_DIR="${HOME}/.tmpnet/promtail"
|
||||
PIDFILE="${PROMTAIL_WORKING_DIR}"/run.pid
|
||||
|
||||
# First check if promtail is already running. A single instance can
|
||||
# collect logs from all local temporary networks.
|
||||
if pgrep --pidfile="${PIDFILE}" &> /dev/null; then
|
||||
echo "promtail is already running"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
LOKI_URL="${LOKI_URL:-https://loki-poc.avax-dev.network}"
|
||||
if [[ -z "${LOKI_URL}" ]]; then
|
||||
echo "Please provide a value for LOKI_URL"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOKI_ID="${LOKI_ID:-}"
|
||||
if [[ -z "${LOKI_ID}" ]]; then
|
||||
echo "Please provide a value for LOKI_ID"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
LOKI_PASSWORD="${LOKI_PASSWORD:-}"
|
||||
if [[ -z "${LOKI_PASSWORD}" ]]; then
|
||||
echo "Plase provide a value for LOKI_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Version as of this writing
|
||||
VERSION="v2.9.5"
|
||||
|
||||
# Ensure the promtail command is locally available
|
||||
CMD=promtail
|
||||
if ! command -v "${CMD}" &> /dev/null; then
|
||||
# Try to use a local version
|
||||
CMD="${PWD}/bin/promtail"
|
||||
if ! command -v "${CMD}" &> /dev/null; then
|
||||
echo "promtail not found, attempting to install..."
|
||||
# Determine the arch
|
||||
if which sw_vers &> /dev/null; then
|
||||
DIST="darwin-$(uname -m)"
|
||||
else
|
||||
ARCH="$(uname -i)"
|
||||
if [[ "${ARCH}" == "aarch64" ]]; then
|
||||
ARCH="arm64"
|
||||
elif [[ "${ARCH}" == "x86_64" ]]; then
|
||||
ARCH="amd64"
|
||||
fi
|
||||
DIST="linux-${ARCH}"
|
||||
fi
|
||||
|
||||
# Install the specified release
|
||||
PROMTAIL_FILE="promtail-${DIST}"
|
||||
ZIP_PATH="/tmp/${PROMTAIL_FILE}.zip"
|
||||
BIN_DIR="$(dirname "${CMD}")"
|
||||
URL="https://github.com/grafana/loki/releases/download/${VERSION}/promtail-${DIST}.zip"
|
||||
curl -L -o "${ZIP_PATH}" "${URL}"
|
||||
unzip "${ZIP_PATH}" -d "${BIN_DIR}"
|
||||
mv "${BIN_DIR}/${PROMTAIL_FILE}" "${CMD}"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Configure promtail
|
||||
FILE_SD_PATH="${PROMTAIL_WORKING_DIR}/file_sd_configs"
|
||||
mkdir -p "${FILE_SD_PATH}"
|
||||
|
||||
echo "writing configuration..."
|
||||
cat >"${PROMTAIL_WORKING_DIR}"/promtail.yaml <<EOL
|
||||
server:
|
||||
http_listen_port: 0
|
||||
grpc_listen_port: 0
|
||||
|
||||
positions:
|
||||
filename: "${PROMTAIL_WORKING_DIR}/positions.yaml"
|
||||
|
||||
client:
|
||||
url: "${LOKI_URL}/api/prom/push"
|
||||
basic_auth:
|
||||
username: "${LOKI_ID}"
|
||||
password: "${LOKI_PASSWORD}"
|
||||
|
||||
scrape_configs:
|
||||
- job_name: "avalanchego"
|
||||
file_sd_configs:
|
||||
- files:
|
||||
- '${FILE_SD_PATH}/*.json'
|
||||
EOL
|
||||
|
||||
echo "starting promtail..."
|
||||
cd "${PROMTAIL_WORKING_DIR}"
|
||||
nohup "${CMD}" -config.file=promtail.yaml > promtail.log 2>&1 &
|
||||
echo $! > "${PIDFILE}"
|
||||
echo "running with pid $(cat "${PIDFILE}")"
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if ! [[ "$0" =~ scripts/update_avalanchego_version.sh ]]; then
|
||||
echo "must be run from repository root, but got $0"
|
||||
exit 255
|
||||
fi
|
||||
|
||||
# If version is not provided, the existing version in go.mod is assumed
|
||||
VERSION="${1:-}"
|
||||
|
||||
if [[ -n "${VERSION}" ]]; then
|
||||
echo "Ensuring AvalancheGo version $VERSION in go.mod"
|
||||
go get "github.com/ava-labs/avalanchego@${VERSION}"
|
||||
go mod tidy
|
||||
fi
|
||||
|
||||
# Discover AVALANCHE_VERSION
|
||||
. scripts/versions.sh
|
||||
|
||||
# The full SHA is required for versioning custom actions.
|
||||
CURL_ARGS=(curl -s)
|
||||
if [[ -n "${GITHUB_TOKEN:-}" ]]; then
|
||||
# Using an auth token avoids being rate limited when run in CI
|
||||
CURL_ARGS+=(-H "Authorization: token ${GITHUB_TOKEN}")
|
||||
fi
|
||||
CURL_URL="https://api.github.com/repos/ava-labs/avalanchego/commits/${AVALANCHE_VERSION}"
|
||||
FULL_AVALANCHE_VERSION="$("${CURL_ARGS[@]}" "${CURL_URL}" | grep '"sha":' | head -n1 | cut -d'"' -f4)"
|
||||
|
||||
# Ensure the custom action version matches the avalanche version
|
||||
WORKFLOW_PATH=".github/workflows/tests.yml"
|
||||
CUSTOM_ACTION="ava-labs/avalanchego/.github/actions/run-monitored-tmpnet-cmd"
|
||||
echo "Ensuring AvalancheGo version ${FULL_AVALANCHE_VERSION} for ${CUSTOM_ACTION} custom action in ${WORKFLOW_PATH} "
|
||||
sed -i.bak "s|\(uses: ${CUSTOM_ACTION}\)@.*|\1@${FULL_AVALANCHE_VERSION}|g" "${WORKFLOW_PATH}" && rm -f "${WORKFLOW_PATH}.bak"
|
||||
@@ -35,20 +35,3 @@ viewed in grafana. The details of configuration and usage for
|
||||
subnet-evm mirror those of avalanchego and the same
|
||||
[documentation](https://github.com/ava-labs/avalanchego/blob/master/tests/fixture/tmpnet/README.md#Monitoring)
|
||||
applies.
|
||||
|
||||
## Optional Dev Shell
|
||||
|
||||
Some activities, such as collecting metrics and logs from the nodes targeted by an e2e
|
||||
test run, require binary dependencies. One way of making these dependencies available is
|
||||
to use a nix shell which will give access to the dependencies expected by the test
|
||||
tooling:
|
||||
|
||||
- Install [nix](https://nixos.org/). The [determinate systems
|
||||
installer](https://github.com/DeterminateSystems/nix-installer?tab=readme-ov-file#install-nix)
|
||||
is recommended.
|
||||
- Use ./scripts/dev_shell.sh to start a nix shell
|
||||
- Execute the dependency-requiring command (e.g. `ginkgo -v ./tests/warp -- --start-collectors`)
|
||||
|
||||
This repo also defines a `.envrc` file to configure [devenv](https://direnv.net/). With `devenv`
|
||||
and `nix` installed, a shell at the root of the repo will automatically start a nix dev
|
||||
shell.
|
||||
|
||||
Reference in New Issue
Block a user