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
62 changes: 38 additions & 24 deletions api/info.peers.sh
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
#!/bin/bash

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/env.sh"

# Snow (Numbers Testnet) subnet ID
SNOW_SUBNET_ID="81vK49Udih5qmEzU7opx3Zg9AnB33F2oqUTQKuaoWgCvFUWQe"
# Jade (Numbers Mainnet) subnet ID
JADE_SUBNET_ID="2gHgAgyDHQv7jzFg6MxU2yyKq5NZBpwFLFeP8xX2E3gyK1SzSQ"

TESTNET_URL="https://api.avax-test.network"
MAINNET_URL="https://api.avax.network"

# Fetch current validator node IDs for a subnet and return as a JSON array
get_node_ids_json() {
local url="$1"
local subnet_id="$2"
curl -s -X POST --data "{
\"jsonrpc\": \"2.0\",
\"method\": \"platform.getCurrentValidators\",
\"params\": {\"subnetID\": \"${subnet_id}\"},
\"id\": 1
}" -H 'content-type:application/json;' "${url}/ext/bc/P" \
| jq '[.result.validators[].nodeID]'
}

# Snow
echo "========== Snow nodes information =========="
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"info.peers",
"params": {
"nodeIDs": [
"NodeID-7TwAjiRpTbNcqUx6F9EoyXRBLAfeoQXRq",
"NodeID-JbeonHKqomERomXgCiXr9oC9vfynkBupj",
"NodeID-BffXkmzM8EwrBZgpqFp9pwgE9DbDgYKG2",
"NodeID-24WK7qiKXAumya1kKEktwj2ubBbRyq5UW",
"NodeID-A2Z8m7egVLhKf1Qj14uvXadhExM5zrB7p"
]
}
}' -H 'content-type:application/json;' https://api.avax-test.network/ext/info | jq .
SNOW_NODE_IDS=$(get_node_ids_json "${TESTNET_URL}" "${SNOW_SUBNET_ID}")
curl -X POST --data "{
\"jsonrpc\":\"2.0\",
\"id\" :1,
\"method\" :\"info.peers\",
\"params\": {\"nodeIDs\": ${SNOW_NODE_IDS}}
}" -H 'content-type:application/json;' "${TESTNET_URL}/ext/info" | jq .

# Jade
echo "========== Jade nodes information =========="
curl -X POST --data '{
"jsonrpc":"2.0",
"id" :1,
"method" :"info.peers",
"params": {
"nodeIDs": [
"NodeID-BXTBUqX8gitUDtVam4fhRWGD1SfeHGoBx"
]
}
}' -H 'content-type:application/json;' https://api.avax.network/ext/info | jq .
JADE_NODE_IDS=$(get_node_ids_json "${MAINNET_URL}" "${JADE_SUBNET_ID}")
curl -X POST --data "{
\"jsonrpc\":\"2.0\",
\"id\" :1,
\"method\" :\"info.peers\",
\"params\": {\"nodeIDs\": ${JADE_NODE_IDS}}
}" -H 'content-type:application/json;' "${MAINNET_URL}/ext/info" | jq .

26 changes: 21 additions & 5 deletions avalanchego/configs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ Reference configuration files for Numbers Network nodes running on Avalanche inf
configs/chains/
├── C/ # Avalanche C-Chain configuration
│ └── config.json # Pruning enabled for storage optimization
├── 2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/ # Numbers Testnet
├── 2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/ # Numbers Testnet (Snow)
│ ├── config.json # Archive node configuration
│ └── config-validator.json # Validator node configuration
└── 2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/ # Numbers Mainnet
├── config.json # Archive node configuration
└── config-validator.json # Validator node configuration
│ ├── config-validator.json # Validator node configuration
│ └── upgrade.json # Precompile upgrade schedule
├── 2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/ # Numbers Mainnet (Jade)
│ ├── config.json # Archive node configuration
│ ├── config-validator.json # Validator node configuration
│ └── upgrade.json # Precompile upgrade schedule
└── UPGRADE_HISTORY.md # Rationale and outcomes for all past upgrades
```

## Configuration Overview
Expand All @@ -36,6 +39,19 @@ The C-Chain configuration enables pruning to optimize storage usage:
- Maintains recent state for validation
- Reduced disk space requirements

### Precompile Configurations

Both Numbers Testnet (Snow) and Numbers Mainnet (Jade) use `upgrade.json` files to schedule precompile activations and deactivations.

**Current state (as of all upgrades applied):**

| Network | Precompile | Status |
|---|---|---|
| Numbers Testnet (Snow) | `contractDeployerAllowList` | **Disabled** — open contract deployment |
| Numbers Mainnet (Jade) | `contractDeployerAllowList` | **Disabled** — open contract deployment |

See [`UPGRADE_HISTORY.md`](chains/UPGRADE_HISTORY.md) for the full history of each upgrade, including rationale, execution date, and outcome.

## Usage

Copy the appropriate configuration files to your AvalancheGo installation:
Expand Down
68 changes: 68 additions & 0 deletions avalanchego/configs/chains/UPGRADE_HISTORY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Upgrade History

This document records the history of precompile upgrades applied to Numbers Network chains, including the rationale, execution date, and outcome for each entry. Refer to the corresponding `upgrade.json` files for the machine-readable configuration.

---

## Numbers Testnet — Snow

**Chain ID:** `2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ`
**Subnet ID:** `81vK49Udih5qmEzU7opx3Zg9AnB33F2oqUTQKuaoWgCvFUWQe`

### Network Upgrade Overrides

| Field | Value | Date (UTC) |
|---|---|---|
| `graniteTimestamp` | `1762510500` | 2025-11-07 10:15:00 |

**Rationale:** Overrides the Granite network upgrade activation time for the Numbers Testnet. Applied to align the testnet's Granite hard fork with the intended schedule independently of the default Avalanche network upgrade timeline.

**Outcome:** Granite upgrade activated successfully on the Numbers Testnet at the specified timestamp.

---

### Precompile Upgrades

#### 1. Enable `contractDeployerAllowList` (temporary)

| Field | Value | Date (UTC) |
|---|---|---|
| `blockTimestamp` | `1767786600` | 2026-01-07 11:50:00 |
| `adminAddresses` | `0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5` | — |

**Rationale:** Temporarily enabled the contract deployer allow list on the Numbers Testnet to test permissioned deployment controls. The admin address was granted the ability to manage deployment permissions during the test window.

**Outcome:** Allow list activated and verified. The precompile was intentionally disabled 20 minutes later (see entry below) after confirming the feature behaved as expected.

---

#### 2. Disable `contractDeployerAllowList`

| Field | Value | Date (UTC) |
|---|---|---|
| `blockTimestamp` | `1767787800` | 2026-01-07 12:10:00 |
| `disable` | `true` | — |

**Rationale:** Disabled the contract deployer allow list 20 minutes after activation. This concluded the temporary test of permissioned deployment controls, restoring open contract deployment on the Numbers Testnet.

**Outcome:** Allow list disabled successfully. The Numbers Testnet is currently operating with unrestricted contract deployment.

---

## Numbers Mainnet — Jade

**Chain ID:** `2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE`
**Subnet ID:** `2gHgAgyDHQv7jzFg6MxU2yyKq5NZBpwFLFeP8xX2E3gyK1SzSQ`

### Precompile Upgrades

#### 1. Disable `contractDeployerAllowList`

| Field | Value | Date (UTC) |
|---|---|---|
| `blockTimestamp` | `1767789000` | 2026-01-07 12:30:00 |
| `disable` | `true` | — |

**Rationale:** The Numbers Mainnet launched with the contract deployer allow list enabled (configured at genesis) to maintain controlled deployment during the initial launch period. Once the network was stable and the ecosystem was ready for open deployment, the allow list was disabled to allow any address to deploy contracts without permission.

**Outcome:** Allow list disabled successfully. The Numbers Mainnet is currently operating with unrestricted contract deployment.