Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/check-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check Version Consistency

on:
push:
paths:
- '.versions.env'
- 'README.md'
- 'chains/update-validator-*.sh'
pull_request:
paths:
- '.versions.env'
- 'README.md'
- 'chains/update-validator-*.sh'

jobs:
check-versions:
name: Verify README versions match .versions.env
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4

- name: Load canonical versions
run: |
# shellcheck source=.versions.env
. .versions.env
echo "AVALANCHEGO_VERSION=${AVALANCHEGO_VERSION}" >> "$GITHUB_ENV"
echo "SUBNET_EVM_VERSION=${SUBNET_EVM_VERSION}" >> "$GITHUB_ENV"

- name: Check README references canonical versions
run: |
FAIL=0

if ! grep -qF "avalanchego: v${AVALANCHEGO_VERSION}" README.md; then
echo "ERROR: README.md does not reference avalanchego v${AVALANCHEGO_VERSION} (from .versions.env)"
FAIL=1
fi

if ! grep -qF "subnet-evm: v${SUBNET_EVM_VERSION}" README.md; then
echo "ERROR: README.md does not reference subnet-evm v${SUBNET_EVM_VERSION} (from .versions.env)"
FAIL=1
fi

if [ "$FAIL" -eq 1 ]; then
echo ""
echo "Update README.md or .versions.env so the versions are consistent."
exit 1
fi

echo "OK: README.md versions match .versions.env"
2 changes: 2 additions & 0 deletions .versions.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
AVALANCHEGO_VERSION=1.14.1
SUBNET_EVM_VERSION=0.8.0
5 changes: 5 additions & 0 deletions chains/install-subnet-cli.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# DEPRECATED: subnet-cli (ava-labs/subnet-cli) has been replaced by the
# Avalanche CLI (ava-labs/avalanche-cli). This script is kept for historical
# reference only. Use the `avalanche` CLI instead.
# See the "Import Existing L1 in Avalanche CLI" section in the README.

VERSION=0.0.2 # Populate latest here

GOARCH=$(go env GOARCH)
Expand Down
8 changes: 5 additions & 3 deletions chains/update-validator-mainnet.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

AVALANCHEGO_PREVIOUS_VERSION="1.10.7"
AVALANCHEGO_VERSION="1.10.11"
SUBNET_EVM_VERSION="0.5.6"
# Set AVALANCHEGO_PREVIOUS_VERSION to the version currently installed on your node.
AVALANCHEGO_PREVIOUS_VERSION="1.10.11"
# Source canonical version constants (AVALANCHEGO_VERSION, SUBNET_EVM_VERSION)
# shellcheck source=../.versions.env
. "$(dirname "$0")/../.versions.env"
# Numbers Mainnet
VM_ID="qeX7kcVMMkVLB9ZJKTpvtSjpLbtYooNEdpFzFShwRTFu76qdx"
SUBNET_ID="2gHgAgyDHQv7jzFg6MxU2yyKq5NZBpwFLFeP8xX2E3gyK1SzSQ"
Expand Down
8 changes: 5 additions & 3 deletions chains/update-validator-testnet.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
#!/bin/bash

AVALANCHEGO_PREVIOUS_VERSION="1.10.7"
AVALANCHEGO_VERSION="1.10.11"
SUBNET_EVM_VERSION="0.5.6"
# Set AVALANCHEGO_PREVIOUS_VERSION to the version currently installed on your node.
AVALANCHEGO_PREVIOUS_VERSION="1.10.11"
# Source canonical version constants (AVALANCHEGO_VERSION, SUBNET_EVM_VERSION)
# shellcheck source=../.versions.env
. "$(dirname "$0")/../.versions.env"
# Numbers Testnet
VM_ID="kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdDYuaT"
SUBNET_ID="81vK49Udih5qmEzU7opx3Zg9AnB33F2oqUTQKuaoWgCvFUWQe"
Expand Down
2 changes: 2 additions & 0 deletions rpc/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
requests>=2.28.0
websockets>=10.0
7 changes: 6 additions & 1 deletion rpc/rpc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ def test_chain_id(rpc_url, chain_id):
payload = {
"jsonrpc": "2.0",
"method": "eth_chainId",
"id": chain_id,
"id": 1,
}

try:
response = requests.post(rpc_url, json=payload)
response_data = response.json()
print("RPC request successful, Response Data:", response_data)
returned_chain_id = int(response_data['result'], 16)
assert returned_chain_id == chain_id, (
f"Chain ID mismatch: expected {chain_id}, got {returned_chain_id}"
)
print(f"Chain ID verified: {returned_chain_id}")
except Exception as e:
print(f"RPC request failed, Error: {str(e)}")

Expand Down
13 changes: 13 additions & 0 deletions subnet-cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ⚠️ DEPRECATED — subnet-cli

> **This directory and all scripts within it are deprecated.**
>
> `subnet-cli` (`ava-labs/subnet-cli`, v0.0.2, 2022) has been superseded by the
> **Avalanche CLI** (`ava-labs/avalanche-cli`). The scripts here are kept for
> historical reference only and **should not be used for new operations**.

## Migration

Use the `avalanche` CLI instead.
See the **"Import Existing L1 in Avalanche CLI"** section in the top-level
[README](../README.md) for the current workflow.
5 changes: 5 additions & 0 deletions subnet-cli/install-subnet-cli.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# DEPRECATED: subnet-cli (ava-labs/subnet-cli) has been replaced by the
# Avalanche CLI (ava-labs/avalanche-cli). This script is kept for historical
# reference only. Use the `avalanche` CLI instead.
# See the "Import Existing L1 in Avalanche CLI" section in the README.

VERSION=0.0.2 # Populate latest here

GOARCH=$(go env GOARCH)
Expand Down