Standardize API env sourcing, fix genesis duplication, add pytest framework, and expand .gitignore#118
Draft
Standardize API env sourcing, fix genesis duplication, add pytest framework, and expand .gitignore#118
Conversation
…tion, and expand .gitignore Co-authored-by: numbers-official <181934381+numbers-official@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Standardize API env sourcing and add test framework
Standardize API env sourcing, fix genesis duplication, add pytest framework, and expand .gitignore
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nine scripts hardcoded
127.0.0.1:9650,info.peers.shembedded node IDs and public endpoints,genesis/duplicatedchains/testnet/, devnet genesis had an internalgasLimitmismatch, and the test files lacked any framework or assertions.API env sourcing
env.sh:URL="127.0.0.1:9650"→URL="${URL:-127.0.0.1:9650}"(environment-overridable)source env.shand use${URL}info.peers.sh: hardcoded node IDs and public Avalanche endpoints replaced withNODE_IDS="$1"/ENDPOINT="${2:-${URL}}"platform.getValidatorsAt.sh: height parameterized asHEIGHT="${2:-1}"Genesis cleanup
genesis/root directory (byte-for-byte identical tochains/testnet/)subnet-cli/subnet-cli-wizard.shreference:../genesis/→../chains/testnet/chains/devnet/genesis.jsonheadergasLimit:0x7a1200(8 M) →0x1312D00(20 M) to match its ownfeeConfig.gasLimitPython test framework
rpc/rpc_test.py: refactored to pytest; fixedtest_chain_idwhich was passingchain_idas the JSON-RPCidfield instead of validating the returned value:rpc/websocket_test.py: refactored topytest+pytest-asynciowith assertions on subscription responserpc/requirements.txt:pytest,pytest-asyncio,requests,websocketsMiscellaneous
.github/workflows/add-issue-to-backlog.yml:actions/add-to-project@v0.5.0→v1.0.2.gitignore: added OS artifacts, editor dirs,*.tar.gz, Python caches, and secret file patterns (*.pem,*.key,.env)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.