Repository navigation
Add local anvil setup - #146
Merged
Merged
Conversation
…nto add-local-anvil-setup
…provisioning into add-local-anvil-setup
…local-anvil-setup
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds support for running a local Anvil Ethereum node for testing and development, alongside improvements to environment variable handling, resource cleanup, and deployment orchestration. The changes enable developers to test SKALE node deployments locally using Anvil instead of requiring a remote Ethereum endpoint.
Key changes:
- Added Anvil container orchestration with automatic private key extraction and distribution across all nodes
- Enhanced environment variable propagation (
node_type,fair_contracts,allowed_ts_diff,endpoint,anvil_private_key) to ensure consistent configuration state - Improved cleanup tasks to remove Anvil resources and obsolete variables after migration
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
set_fair_boot_node_type.yaml |
New playbook to set node type to fair_boot |
run_fair_all.yaml |
Orchestrates full Fair node deployment including Anvil setup |
run_anvil.yaml |
Playbook to run Anvil container on first node |
roles/setup_validator/tasks/main.yaml |
Added ALLOWED_TS_DIFF environment variable |
roles/set_fair_boot_node_type/tasks/main.yaml |
Sets and propagates fair_boot node type |
roles/run_anvil/tasks/main.yaml |
Manages Anvil container lifecycle and key extraction |
roles/link_addresses/tasks/link_addresses.yaml |
Added ALLOWED_TS_DIFF environment variable |
roles/fair_migrate/tasks/main.yaml |
Updates node type for migration and cleans up Anvil resources |
roles/deploy_fair/tasks/deploy_fair.yaml |
Waits for chain start and propagates fair_contracts |
roles/deploy_contracts/tasks/transfer_funds.yaml |
Handles fund transfers from Anvil account with stale check handling |
roles/deploy_contracts/tasks/manager.yaml |
Sets allowed_ts_diff and adds it to fix_zero_node script |
roles/deploy_contracts/tasks/main.yaml |
Conditionally imports transfer_funds for Anvil |
roles/deploy_contracts/tasks/ima.yaml |
Standardizes group_vars file handling |
roles/create_chain/tasks/main.yaml |
Added ALLOWED_TS_DIFF environment variable |
roles/cleanup_artifacts/tasks/main.yaml |
Expanded cleanup to include Anvil-related variables |
requirements.txt |
Updated skale.py version |
main.yaml |
Added run_anvil playbook import |
files/transfer_funds.py |
Enhanced to support Anvil with stale check disabling and address derivation |
files/set_rng.py |
Added skip_dry_run parameter |
files/fix_zero_node_fair.py |
Commented out wait_for_next_block call |
fair_migrate.yaml |
Sets node_type to fair during migration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
dmytrotkk
approved these changes
Oct 24, 2025
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.
This pull request introduces significant improvements to the Ansible automation for SKALE node deployments, focusing on supporting the Anvil local Ethereum node, enhancing environment variable handling, and improving resource cleanup and migration flows. The changes streamline contract deployment, node migration, fund transfers, and validator setup, while ensuring robust configuration propagation and cleanup across the playbooks.
Anvil support and orchestration:
Configuration propagation and environment management:
node_type,fair_contracts,allowed_ts_diff,endpoint,anvil_private_key) across all nodes and group variables, ensuring consistent state and easier debugging. [1] [2] [3] [4]Migration and deployment improvements:
node_typeappropriately for migration and cleaning up Anvil resources post-migration. [1] [2] [3]Miscellaneous enhancements:
set_rng.py). [1] [2]ALLOWED_TS_DIFFare consistently set and passed to all relevant scripts and tasks. [1] [2] [3] [4]These changes collectively make the deployment process more robust, testable, and maintainable, especially for local development and testing scenarios with Anvil.
References:
[1] [2] [3] [4] [5]