From 4ebb1060831522703fd0bfaa840c840b6471308c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 12:17:48 +0000 Subject: [PATCH 1/2] Initial plan From ef672e34a787b9fb7ab5e825f9d01a72f24cbb86 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 28 Feb 2026 12:26:17 +0000 Subject: [PATCH 2/2] Consolidate configs, improve docs, add developer tooling Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com> --- CONTRIBUTING.md | 90 +++++++++++++++++++ Makefile | 24 +++++ README.md | 12 ++- api/env.sh | 0 api/health.health.sh | 8 +- api/info.getNodeID.sh | 2 +- api/info.isBootstrapped.sh | 19 ++-- api/metrics.sh | 4 +- api/platform.getBlockchainStatus.sh | 5 +- api/platform.getBlockchains.sh | 2 +- api/platform.getCurrentValidators.sh | 3 +- api/platform.getPendingValidators.sh | 10 +-- api/platform.getSubnets.sh | 10 +-- api/platform.getValidatorsAt.sh | 6 +- api/platform.validatedBy.sh | 4 +- api/platform.validates.sh | 5 +- avalanchego/configs/README.md | 21 ++++- .../config-validator.json | 6 +- .../config.json | 26 +++--- .../config-validator.json | 6 +- .../config.json | 26 +++--- .../upgrade.json | 4 +- avalanchego/configs/chains/C/config.json | 6 +- chains/update-validator-mainnet.sh | 4 +- chains/update-validator-testnet.sh | 4 +- .../genesis-nativecoin-feemgr-feerecv.json | 50 ----------- genesis/genesis-nativecoin-feemgr.json | 49 ---------- genesis/genesis.json | 41 --------- requirements.txt | 2 + rpc/mainnet/etc/nginx/sites-available/default | 57 ++++++++++++ subnet-cli/subnet-cli-wizard.sh | 2 +- versions.env | 6 ++ 32 files changed, 289 insertions(+), 225 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 Makefile mode change 100644 => 100755 api/env.sh delete mode 100644 genesis/genesis-nativecoin-feemgr-feerecv.json delete mode 100644 genesis/genesis-nativecoin-feemgr.json delete mode 100644 genesis/genesis.json create mode 100644 requirements.txt create mode 100644 rpc/mainnet/etc/nginx/sites-available/default create mode 100644 versions.env diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..ddb01a8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,90 @@ +# Contributing to Numbers Network + +Thank you for your interest in contributing to Numbers Network! + +## Getting Started + +### Prerequisites + +- [avalanchego](https://github.com/ava-labs/avalanchego/releases) — see `versions.env` for the supported version +- [subnet-evm](https://github.com/ava-labs/subnet-evm/releases) — see `versions.env` for the supported version +- Python 3.8+ with `pip` (for RPC tests) +- `jq` (for JSON formatting) +- `nginx` (for RPC provider setup) + +### Setup + +1. Clone the repository: + + ```sh + git clone https://github.com/numbersprotocol/numbers-network.git + cd numbers-network + ``` + +2. Install Python dependencies: + + ```sh + pip install -r requirements.txt + ``` + +3. Source version variables when running update scripts: + + ```sh + source versions.env + ``` + +## Repository Structure + +``` +numbers-network/ +├── api/ # AvalancheGo API helper scripts +│ └── env.sh # Set URL for local node (default: 127.0.0.1:9650) +├── avalanchego/ +│ └── configs/ # Chain and upgrade configuration files +├── chains/ # Validator update scripts and genesis files +│ ├── mainnet/ # Mainnet genesis +│ └── testnet/ # Testnet genesis files (canonical location) +├── rpc/ # RPC test scripts and Nginx configs +│ ├── mainnet/ # Mainnet Nginx config +│ └── testnet/ # Testnet Nginx config +├── subnet-cli/ # subnet-cli helper scripts +├── versions.env # Canonical avalanchego and subnet-evm versions +└── requirements.txt # Python dependencies +``` + +## API Scripts + +The `api/` directory contains helper scripts for interacting with a local AvalancheGo node. + +- All scripts source `api/env.sh` which sets `URL="127.0.0.1:9650"` by default. +- To target a different node, set the `URL` environment variable before running a script: + + ```sh + URL="https://api.avax.network" ./api/platform.getCurrentValidators.sh + ``` + +## Running Tests + +```sh +python3 rpc/rpc_test.py +python3 rpc/websocket_test.py +``` + +## Making Changes + +1. Create a feature branch from `main`. +2. Make your changes, following the style of existing files. +3. For JSON files, normalize formatting with `jq .`: + + ```sh + jq . file.json > /tmp/normalized.json && mv /tmp/normalized.json file.json + ``` + +4. Update `versions.env` if software versions change. +5. Open a pull request with a clear description of the change. + +## Code Style + +- Shell scripts: use `#!/bin/bash` shebang; source `env.sh` for the node URL. +- JSON: 2-space indentation (normalized by `jq`). +- Python: follow PEP 8. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..8337a8d --- /dev/null +++ b/Makefile @@ -0,0 +1,24 @@ +.PHONY: help setup test test-rpc test-ws fmt check-versions + +help: ## Show this help message + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' + +setup: ## Install Python dependencies + pip install -r requirements.txt + +test: test-rpc ## Run all tests + +test-rpc: ## Test mainnet and testnet RPC connectivity + python3 rpc/rpc_test.py + +test-ws: ## Test mainnet and testnet WebSocket connectivity + python3 rpc/websocket_test.py + +fmt: ## Normalize JSON formatting in avalanchego config files + @find avalanchego/configs -name "*.json" | while read f; do \ + jq . "$$f" > /tmp/normalized.json && mv /tmp/normalized.json "$$f"; \ + echo "Formatted: $$f"; \ + done + +check-versions: ## Show configured software versions + @. ./versions.env && echo "avalanchego: v$$AVALANCHEGO_VERSION" && echo "subnet-evm: v$$SUBNET_EVM_VERSION" diff --git a/README.md b/README.md index c207e4b..567049a 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Numbers Network is dedicated to preserving digital media provenance and related - [Self-Hosted Faucet](#self-hosted-faucet) - [Wrapped NUM](#wrapped-num) - [Bridge](#bridge) -- [Archieve Node](#archieve-node) +- [Archive Node](#archive-node) ## Mainnet: Jade (玉) @@ -286,7 +286,7 @@ waiting for validator 8CGJYaRLChC79CCRnvd7sh5eB9E9L9dVF to start validating GBEw Launch validator. When running `avalanchego`, add -* `-—http-host=0.0.0.0`: Make MetaMask can access the RPC URL +* `--http-host=0.0.0.0`: Make MetaMask can access the RPC URL * `--http-allowed-hosts="*"`: Allow traffic from the RPC node (since v1.10.3) ```sh @@ -342,8 +342,6 @@ Before validation staking expires, any wallet can not stake to a validator again Validator version distributions: [mainnet](https://explorer-xp.avax.network/validators), [testnet](https://explorer-xp.avax-test.network/validators) -[Renew Numbers Validators](https://app.asana.com/0/1202305127727547/1202919355642524/f) (internal task) - ## Import Existing L1 in Avalanche CLI ```sh @@ -863,7 +861,7 @@ To bridge native NUM to ERC20/BEP20 NUM, you can use [XY Finance](https://app.xy To know more about NUM token, you can visit the [NUM token website](https://num.numbersprotocol.io/). -# Archieve Node +# Archive Node Archive Node provides full history of the blockchain and does not need to be a validator. @@ -919,10 +917,10 @@ Make a Full Node instance to be an Archive Node instance: #!/bin/sh # Subnet IDs - SUBNET_MAINNET="81vK49Udih5qmEzU7opx3Zg9AnB33F2oqUTQKuaoWgCvFUWQe" + SUBNET_TESTNET="81vK49Udih5qmEzU7opx3Zg9AnB33F2oqUTQKuaoWgCvFUWQe" ./avalanchego \ - --track-subnets=${SUBNET_MAINNET} \ + --track-subnets=${SUBNET_TESTNET} \ --http-host=0.0.0.0 \ --public-ip= \ --http-allowed-hosts="*" diff --git a/api/env.sh b/api/env.sh old mode 100644 new mode 100755 diff --git a/api/health.health.sh b/api/health.health.sh index f1c51d2..0b6544a 100755 --- a/api/health.health.sh +++ b/api/health.health.sh @@ -1,7 +1,9 @@ #!/bin/bash +source env.sh + curl -X POST --data '{ "jsonrpc":"2.0", - "id" :1, - "method" :"health.health" - }' -H 'content-type:application/json;' 127.0.0.1:9650/ext/health + "id" :1, + "method" :"health.health" +}' -H 'content-type:application/json;' ${URL}/ext/health diff --git a/api/info.getNodeID.sh b/api/info.getNodeID.sh index e3c6c95..0cae9ac 100755 --- a/api/info.getNodeID.sh +++ b/api/info.getNodeID.sh @@ -5,7 +5,7 @@ # Expected Output # {"jsonrpc":"2.0","result":{"nodeID":"NodeID-JRhJd4Qn4WTjP28RUFDQa2NC59deo7tT6"},"id":1} -URL="127.0.0.1:9650" +source env.sh curl -X POST --data '{ "jsonrpc":"2.0", diff --git a/api/info.isBootstrapped.sh b/api/info.isBootstrapped.sh index 2940dfd..76839aa 100755 --- a/api/info.isBootstrapped.sh +++ b/api/info.isBootstrapped.sh @@ -3,14 +3,15 @@ # Note: The bootstrapping process takes approximately 50–100 hours and requires 100 GB of space. # https://chainstack.com/avalanche-subnet-tutorial-series-running-a-local-avalanche-node-on-fuji-testnet/ -URL="127.0.0.1:9650" +source env.sh + CHAIN_ID="$1" -curl -X POST --data "{ - \"jsonrpc\": \"2.0\", - \"method\": \"info.isBootstrapped\", - \"params\":{ - \"chain\":\"${CHAIN_ID}\" - }, - \"id\": 1 -}" -H 'content-type:application/json;' ${URL}/ext/info +curl -X POST --data "{ + \"jsonrpc\": \"2.0\", + \"method\": \"info.isBootstrapped\", + \"params\":{ + \"chain\":\"${CHAIN_ID}\" + }, + \"id\": 1 +}" -H 'content-type:application/json;' ${URL}/ext/info diff --git a/api/metrics.sh b/api/metrics.sh index a527772..bbffa74 100755 --- a/api/metrics.sh +++ b/api/metrics.sh @@ -1,3 +1,5 @@ #!/bin/bash -curl -X POST 127.0.0.1:9650/ext/metrics +source env.sh + +curl -X POST ${URL}/ext/metrics diff --git a/api/platform.getBlockchainStatus.sh b/api/platform.getBlockchainStatus.sh index e6b1c25..ea0efef 100755 --- a/api/platform.getBlockchainStatus.sh +++ b/api/platform.getBlockchainStatus.sh @@ -7,7 +7,8 @@ # "vmID": "kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdDYuaT" # } -URL="127.0.0.1:9650" +source env.sh + BLOCKCHAIN_ID="$1" curl -X POST --data "{ @@ -17,4 +18,4 @@ curl -X POST --data "{ \"blockchainID\":\"${BLOCKCHAIN_ID}\" }, \"id\": 1 -}" -H 'content-type:application/json;' ${URL}/ext/P +}" -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/api/platform.getBlockchains.sh b/api/platform.getBlockchains.sh index 66ef57b..c7a633d 100755 --- a/api/platform.getBlockchains.sh +++ b/api/platform.getBlockchains.sh @@ -7,4 +7,4 @@ curl -X POST --data '{ "id" :1, "method" :"platform.getBlockchains", "params" :{} -}' -H 'content-type:application/json;' ${URL}/ext/P +}' -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/api/platform.getCurrentValidators.sh b/api/platform.getCurrentValidators.sh index 0e0f743..0ba1456 100755 --- a/api/platform.getCurrentValidators.sh +++ b/api/platform.getCurrentValidators.sh @@ -3,7 +3,8 @@ # Note: The bootstrapping process takes approximately 50–100 hours and requires 100 GB of space. # https://chainstack.com/avalanche-subnet-tutorial-series-running-a-local-avalanche-node-on-fuji-testnet/ -URL="127.0.0.1:9650" +source env.sh + SUBNET_ID="$1" curl -X POST --data "{ \"jsonrpc\": \"2.0\", diff --git a/api/platform.getPendingValidators.sh b/api/platform.getPendingValidators.sh index 8c9402d..e73a84c 100755 --- a/api/platform.getPendingValidators.sh +++ b/api/platform.getPendingValidators.sh @@ -3,13 +3,13 @@ # Note: The bootstrapping process takes approximately 50–100 hours and requires 100 GB of space. # https://chainstack.com/avalanche-subnet-tutorial-series-running-a-local-avalanche-node-on-fuji-testnet/ -URL="127.0.0.1:9650" +source env.sh echo "URL: ${URL}" curl -X POST --data '{ "jsonrpc": "2.0", - "method": "platform.getPendingValidators", - "params": {}, - "id": 1 - }' -H 'content-type:application/json;' ${URL}/ext/bc/P + "method": "platform.getPendingValidators", + "params": {}, + "id": 1 +}' -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/api/platform.getSubnets.sh b/api/platform.getSubnets.sh index 3fde414..aea2c22 100755 --- a/api/platform.getSubnets.sh +++ b/api/platform.getSubnets.sh @@ -3,13 +3,13 @@ # Note: The bootstrapping process takes approximately 50–100 hours and requires 100 GB of space. # https://chainstack.com/avalanche-subnet-tutorial-series-running-a-local-avalanche-node-on-fuji-testnet/ -URL="127.0.0.1:9650" +source env.sh echo "URL: ${URL}" curl -X POST --data '{ "jsonrpc": "2.0", - "method": "platform.getSubnets", - "params": {}, - "id": 1 - }' -H 'content-type:application/json;' ${URL}/ext/bc/P + "method": "platform.getSubnets", + "params": {}, + "id": 1 +}' -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/api/platform.getValidatorsAt.sh b/api/platform.getValidatorsAt.sh index 66ee968..38d187f 100755 --- a/api/platform.getValidatorsAt.sh +++ b/api/platform.getValidatorsAt.sh @@ -1,5 +1,7 @@ #!/bin/bash +source env.sh + SUBNET_ID="$1" curl -X POST --data "{ @@ -7,7 +9,7 @@ curl -X POST --data "{ \"method\": \"platform.getValidatorsAt\", \"params\": { \"height\":1, - \"subnetID\": \"${SUBNET_ID}\" + \"subnetID\": \"${SUBNET_ID}\" }, \"id\": 1 -}" -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P +}" -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/api/platform.validatedBy.sh b/api/platform.validatedBy.sh index 236114c..c19460c 100755 --- a/api/platform.validatedBy.sh +++ b/api/platform.validatedBy.sh @@ -1,5 +1,7 @@ #!/bin/bash +source env.sh + BLOCKCHAIN_ID="$1" curl -X POST --data "{ @@ -9,4 +11,4 @@ curl -X POST --data "{ \"blockchainID\": \"${BLOCKCHAIN_ID}\" }, \"id\": 1 -}" -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P +}" -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/api/platform.validates.sh b/api/platform.validates.sh index a41d4a7..f9659ac 100755 --- a/api/platform.validates.sh +++ b/api/platform.validates.sh @@ -1,5 +1,7 @@ #!/bin/bash +source env.sh + SUBNET_ID="$1" curl -X POST --data "{ @@ -9,5 +11,4 @@ curl -X POST --data "{ \"subnetID\":\"${SUBNET_ID}\" }, \"id\": 1 -}" -H 'content-type:application/json;' 127.0.0.1:9650/ext/bc/P - +}" -H 'content-type:application/json;' ${URL}/ext/bc/P diff --git a/avalanchego/configs/README.md b/avalanchego/configs/README.md index 411fe3e..ddb491c 100644 --- a/avalanchego/configs/README.md +++ b/avalanchego/configs/README.md @@ -8,12 +8,14 @@ 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-validator.json # Validator node configuration +│ └── upgrade.json # Network upgrade schedule +└── 2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/ # Numbers Mainnet (Jade) ├── config.json # Archive node configuration - └── config-validator.json # Validator node configuration + ├── config-validator.json # Validator node configuration + └── upgrade.json # Network upgrade schedule ``` ## Configuration Overview @@ -36,6 +38,17 @@ The C-Chain configuration enables pruning to optimize storage usage: - Maintains recent state for validation - Reduced disk space requirements +## Network Upgrades (`upgrade.json`) + +Unix timestamps used in `upgrade.json` files, with their human-readable equivalents: + +| Chain | Timestamp | Human-Readable (UTC) | Description | +|---------|------------|---------------------------|------------------------------------------| +| Testnet | 1762510500 | 2025-11-07 10:15:00 UTC | Granite network upgrade override | +| Testnet | 1767786600 | 2026-01-07 11:50:00 UTC | Enable ContractDeployerAllowList precompile | +| Testnet | 1767787800 | 2026-01-07 12:10:00 UTC | Disable ContractDeployerAllowList precompile | +| Mainnet | 1767789000 | 2026-01-07 12:30:00 UTC | Disable ContractDeployerAllowList precompile | + ## Usage Copy the appropriate configuration files to your AvalancheGo installation: diff --git a/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config-validator.json b/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config-validator.json index d6b0e21..f04ce57 100644 --- a/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config-validator.json +++ b/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config-validator.json @@ -1,5 +1,5 @@ { - "feeRecipient": "0xe49a1220eE09Fbf0D25CA9e3BB8D5fD356Fc67FF", - "pruning-enabled": true, - "allow-missing-tries": true + "feeRecipient": "0xe49a1220eE09Fbf0D25CA9e3BB8D5fD356Fc67FF", + "pruning-enabled": true, + "allow-missing-tries": true } diff --git a/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config.json b/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config.json index 029f07c..d6f881e 100644 --- a/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config.json +++ b/avalanchego/configs/chains/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/config.json @@ -1,15 +1,15 @@ { - "feeRecipient": "0xe49a1220eE09Fbf0D25CA9e3BB8D5fD356Fc67FF", - "pruning-enabled": false, - "eth-apis": [ - "eth", - "eth-filter", - "net", - "web3", - "internal-eth", - "internal-blockchain", - "internal-transaction", - "internal-tx-pool", - "debug-tracer" - ] + "feeRecipient": "0xe49a1220eE09Fbf0D25CA9e3BB8D5fD356Fc67FF", + "pruning-enabled": false, + "eth-apis": [ + "eth", + "eth-filter", + "net", + "web3", + "internal-eth", + "internal-blockchain", + "internal-transaction", + "internal-tx-pool", + "debug-tracer" + ] } diff --git a/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config-validator.json b/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config-validator.json index d690e10..47c9c4e 100644 --- a/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config-validator.json +++ b/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config-validator.json @@ -1,5 +1,5 @@ { - "feeRecipient": "0xE021c9B8DC3953f4f7f286C44a63f5fF001EF481", - "pruning-enabled": true, - "allow-missing-tries": true + "feeRecipient": "0xE021c9B8DC3953f4f7f286C44a63f5fF001EF481", + "pruning-enabled": true, + "allow-missing-tries": true } diff --git a/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config.json b/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config.json index 7fe8927..e6082c1 100644 --- a/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config.json +++ b/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/config.json @@ -1,15 +1,15 @@ { - "feeRecipient": "0xE021c9B8DC3953f4f7f286C44a63f5fF001EF481", - "pruning-enabled": false, - "eth-apis": [ - "eth", - "eth-filter", - "net", - "web3", - "internal-eth", - "internal-blockchain", - "internal-transaction", - "internal-tx-pool", - "debug-tracer" - ] + "feeRecipient": "0xE021c9B8DC3953f4f7f286C44a63f5fF001EF481", + "pruning-enabled": false, + "eth-apis": [ + "eth", + "eth-filter", + "net", + "web3", + "internal-eth", + "internal-blockchain", + "internal-transaction", + "internal-tx-pool", + "debug-tracer" + ] } diff --git a/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/upgrade.json b/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/upgrade.json index c994cbd..f14d5a0 100644 --- a/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/upgrade.json +++ b/avalanchego/configs/chains/2oo5UvYgFQikM7KBsMXFQE3RQv3xAFFc8JY2GEBNBF1tp4JaeZ/upgrade.json @@ -6,7 +6,9 @@ { "contractDeployerAllowListConfig": { "blockTimestamp": 1767786600, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] + "adminAddresses": [ + "0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5" + ] } }, { diff --git a/avalanchego/configs/chains/C/config.json b/avalanchego/configs/chains/C/config.json index fd6887d..e48dd29 100644 --- a/avalanchego/configs/chains/C/config.json +++ b/avalanchego/configs/chains/C/config.json @@ -1,5 +1,5 @@ { - "pruning-enabled": true, - "allow-missing-tries": true, - "skip-tx-indexing": true + "pruning-enabled": true, + "allow-missing-tries": true, + "skip-tx-indexing": true } diff --git a/chains/update-validator-mainnet.sh b/chains/update-validator-mainnet.sh index f740697..0e90710 100755 --- a/chains/update-validator-mainnet.sh +++ b/chains/update-validator-mainnet.sh @@ -1,8 +1,8 @@ #!/bin/bash +source "$(dirname "$0")/../versions.env" + AVALANCHEGO_PREVIOUS_VERSION="1.10.7" -AVALANCHEGO_VERSION="1.10.11" -SUBNET_EVM_VERSION="0.5.6" # Numbers Mainnet VM_ID="qeX7kcVMMkVLB9ZJKTpvtSjpLbtYooNEdpFzFShwRTFu76qdx" SUBNET_ID="2gHgAgyDHQv7jzFg6MxU2yyKq5NZBpwFLFeP8xX2E3gyK1SzSQ" diff --git a/chains/update-validator-testnet.sh b/chains/update-validator-testnet.sh index 6f2c22d..c70121b 100755 --- a/chains/update-validator-testnet.sh +++ b/chains/update-validator-testnet.sh @@ -1,8 +1,8 @@ #!/bin/bash +source "$(dirname "$0")/../versions.env" + AVALANCHEGO_PREVIOUS_VERSION="1.10.7" -AVALANCHEGO_VERSION="1.10.11" -SUBNET_EVM_VERSION="0.5.6" # Numbers Testnet VM_ID="kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdDYuaT" SUBNET_ID="81vK49Udih5qmEzU7opx3Zg9AnB33F2oqUTQKuaoWgCvFUWQe" diff --git a/genesis/genesis-nativecoin-feemgr-feerecv.json b/genesis/genesis-nativecoin-feemgr-feerecv.json deleted file mode 100644 index af6ed96..0000000 --- a/genesis/genesis-nativecoin-feemgr-feerecv.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "config": { - "chainId": 10508, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - }, - "allowFeeRecipients": true, - "contractNativeMinterConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - }, - "feeManagerConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - } - }, - "alloc": { - "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { - "balance": "0x52B7D2DCC80CD2E4000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0x1312D00", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/genesis/genesis-nativecoin-feemgr.json b/genesis/genesis-nativecoin-feemgr.json deleted file mode 100644 index 9e94914..0000000 --- a/genesis/genesis-nativecoin-feemgr.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "config": { - "chainId": 10508, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - }, - "contractNativeMinterConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - }, - "feeManagerConfig": { - "blockTimestamp": 0, - "adminAddresses": ["0x63B7076FC0A914Af543C2e5c201df6C29FCC18c5"] - } - }, - "alloc": { - "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { - "balance": "0x52B7D2DCC80CD2E4000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0x1312D00", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/genesis/genesis.json b/genesis/genesis.json deleted file mode 100644 index a060304..0000000 --- a/genesis/genesis.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "config": { - "chainId": 10508, - "homesteadBlock": 0, - "eip150Block": 0, - "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0", - "eip155Block": 0, - "eip158Block": 0, - "byzantiumBlock": 0, - "constantinopleBlock": 0, - "petersburgBlock": 0, - "istanbulBlock": 0, - "muirGlacierBlock": 0, - "subnetEVMTimestamp": 0, - "feeConfig": { - "gasLimit": 20000000, - "minBaseFee": 1000000000, - "targetGas": 100000000, - "baseFeeChangeDenominator": 48, - "minBlockGasCost": 0, - "maxBlockGasCost": 10000000, - "targetBlockRate": 2, - "blockGasCostStep": 500000 - } - }, - "alloc": { - "63B7076FC0A914Af543C2e5c201df6C29FCC18c5": { - "balance": "0x52B7D2DCC80CD2E4000000" - } - }, - "nonce": "0x0", - "timestamp": "0x0", - "extraData": "0x00", - "gasLimit": "0x1312D00", - "difficulty": "0x0", - "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "coinbase": "0x0000000000000000000000000000000000000000", - "number": "0x0", - "gasUsed": "0x0", - "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000" -} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..6e1ff5e --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +requests==2.32.3 +websockets==13.1 diff --git a/rpc/mainnet/etc/nginx/sites-available/default b/rpc/mainnet/etc/nginx/sites-available/default new file mode 100644 index 0000000..1fd9c32 --- /dev/null +++ b/rpc/mainnet/etc/nginx/sites-available/default @@ -0,0 +1,57 @@ +upstream validator { + server :9650; +} + +# Default server configuration +# +server { + listen 80 default_server; + listen [::]:80 default_server; + + root /var/www/html; + + index index.html index.htm index.nginx-debian.html; + + server_name _; + + location / { + try_files $uri $uri/ =404; + } +} + +server { + root /var/www/html; + + index index.html index.htm index.nginx-debian.html; + server_name mainnetrpc.num.network; # managed by Certbot + + location / { + proxy_pass http://validator/ext/bc/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/rpc; + } + + location /ws { + proxy_pass http://validator/ext/bc/2PDRxzc6jMbZSTLb3sufkVszgQc2jtDnYZGtDTAAfom1CTwPsE/ws; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + } + + listen [::]:443 ssl ipv6only=on; # managed by Certbot + listen 443 ssl; # managed by Certbot + ssl_certificate /etc/letsencrypt/live/mainnetrpc.num.network/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/mainnetrpc.num.network/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot +} + +server { + if ($host = mainnetrpc.num.network) { + return 301 https://$host$request_uri; + } # managed by Certbot + + listen 80; + listen [::]:80; + server_name mainnetrpc.num.network; + return 404; # managed by Certbot +} diff --git a/subnet-cli/subnet-cli-wizard.sh b/subnet-cli/subnet-cli-wizard.sh index bdf42e3..13d7558 100755 --- a/subnet-cli/subnet-cli-wizard.sh +++ b/subnet-cli/subnet-cli-wizard.sh @@ -5,7 +5,7 @@ subnet-cli wizard \ --node-ids NodeID-24WK7qiKXAumya1kKEktwj2ubBbRyq5UW,NodeID-A2Z8m7egVLhKf1Qj14uvXadhExM5zrB7p \ - --vm-genesis-path ../genesis/genesis-nativecoin-feemgr-feerecv.json \ + --vm-genesis-path ../chains/testnet/genesis-nativecoin-feemgr-feerecv.json \ --vm-id kmYb53NrmqcW7gfV2FGHBHWXNA6YhhWf7R7LoQeGj9mdDYuaT \ --chain-name captevm diff --git a/versions.env b/versions.env new file mode 100644 index 0000000..d956495 --- /dev/null +++ b/versions.env @@ -0,0 +1,6 @@ +# Numbers Network - Software Versions +# Single source of truth for avalanchego and subnet-evm versions. +# Referenced by chains/update-validator-mainnet.sh and chains/update-validator-testnet.sh. + +AVALANCHEGO_VERSION="1.14.1" +SUBNET_EVM_VERSION="0.8.0"