Improve nodectl CI script to use both SNP/TONCore variants#94
Conversation
- run_singlehost_nodectl.py: aligned with feat/add_core_np_in_singlehost_script - run_singlehost_nodectl2.py: 7 validators, SNP + TONCore pools, split50 Branched from release/nodectl/v0.4.0. Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Adds an additional “singlehost” bootstrap script variant and refactors the existing singlehost nodectl bootstrap flow to better support TONCore pools and revised phase ordering for local network bring-up/testing.
Changes:
- Added
run_singlehost_nodectl2.pyextended scenario script (7 validators: 2 SNP + 5 TONCore, split50), including post-validation election observation. - Refactored
run_singlehost_nodectl.pyphase flow and introduced TONCore-related env configuration + deposit-validator handling for the last node’s TONCore pool.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/node/tests/test_run_net_py/run_singlehost_nodectl2.py |
New extended singlehost bootstrap script with TONCore/SNP topology and extra validation/observation phases. |
src/node/tests/test_run_net_py/run_singlehost_nodectl.py |
Updates base singlehost bootstrap phases and adds TONCore configuration/deposit-validator logic. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| toncore_min_validator_stake_ton = int( | ||
| os.environ.get("TONCORE_MIN_VALIDATOR_STAKE_TON", "100000") | ||
| ), | ||
| toncore_min_validator_stake_odd_ton = int( | ||
| os.environ.get("TONCORE_MIN_VALIDATOR_STAKE_ODD_TON", "100001") | ||
| ), | ||
| toncore_validator_deposit_ton = int(os.environ.get( | ||
| "TONCORE_VALIDATOR_DEPOSIT_TON", str(DEFAULT_TONCORE_DEPOSIT_TON) | ||
| )), |
There was a problem hiding this comment.
The docstring notes TONCORE_MIN_VALIDATOR_STAKE_* must differ and TONCORE_VALIDATOR_DEPOSIT_TON must be >= the max per-slot min stake, but the config parsing does not validate either constraint. Add an early check (during from_env() or before pool creation) to fail fast with a clear message when min stakes are equal or when deposit < max(min_stake_even, min_stake_odd), otherwise the script may later fail in deposit-validator with a less actionable error.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* test: combine two scripts for nodectl singlehost test * test: refactor nodectl script * chore: dont print sensitive data in ci script
Uh oh!
There was an error while loading. Please reload this page.