-
Notifications
You must be signed in to change notification settings - Fork 579
feat: scaffold deploy-scenario-network.yml #16553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
just-mitch
merged 1 commit into
next
from
08-24-mitch_tmnt-194-scaffold-deploy-scenario-networkyml
Aug 28, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| name: Deploy Scenario Network | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| cluster: | ||
| description: The cluster to deploy to, e.g. aztec-gke-private or kind | ||
| required: true | ||
| type: string | ||
| namespace: | ||
| description: The namespace to deploy to | ||
| required: true | ||
| type: string | ||
| ref: | ||
| description: The branch name to deploy from | ||
| required: true | ||
| type: string | ||
| default: "next" | ||
| aztec_docker_image: | ||
| description: The Docker image to use for the Aztec contracts | ||
| required: true | ||
| type: string | ||
| default: "aztecprotocol/aztec:8ebe8d7c45190b002c77e29358f2b307a23b5336" | ||
| devnet_mnemonic: | ||
| description: The mnemonic to use for the devnet | ||
| required: true | ||
| type: string | ||
| default: "test test test test test test test test test test test junk" | ||
| rollup_deployment_mnemonic: | ||
| description: The mnemonic to use for the rollup deployment | ||
| required: true | ||
| type: string | ||
| default: "test test test test test test test test test test test junk" | ||
| secrets: | ||
| GCP_SA_KEY: | ||
| description: The JSON key for the GCP service account | ||
| required: true | ||
| KUBECONFIG_B64: | ||
| description: The base64 encoded kubeconfig | ||
| required: true | ||
|
|
||
| workflow_dispatch: | ||
| inputs: | ||
| cluster: | ||
| description: The cluster to deploy to, e.g. aztec-gke-private or kind | ||
| required: true | ||
| type: string | ||
| default: "kind" | ||
| namespace: | ||
| description: The namespace to deploy to | ||
| required: true | ||
| type: string | ||
| default: "eth-devnet" | ||
| ref: | ||
| description: The branch name to deploy from. | ||
| required: true | ||
| type: string | ||
| default: "next" | ||
| aztec_docker_image: | ||
| description: The Docker image to use for the Aztec contracts | ||
| required: true | ||
| type: string | ||
| default: "aztecprotocol/aztec:8ebe8d7c45190b002c77e29358f2b307a23b5336" | ||
| devnet_mnemonic: | ||
| description: The mnemonic to use for the devnet | ||
| required: true | ||
| type: string | ||
| default: "test test test test test test test test test test test junk" | ||
| rollup_deployment_mnemonic: | ||
| description: The mnemonic to use for the rollup deployment | ||
| required: true | ||
| type: string | ||
| default: "test test test test test test test test test test test junk" | ||
|
|
||
| jobs: | ||
| # First job: Deploy the Eth Devnet | ||
| scenario_dispatch_deploy_eth_devnet: | ||
| uses: ./.github/workflows/deploy-eth-devnet.yml | ||
| with: | ||
| cluster: ${{ inputs.cluster }} | ||
| namespace: ${{ inputs.namespace }} | ||
| ref: ${{ inputs.ref }} | ||
| # Prefilled values for scenario network | ||
| chain_id: 1337 | ||
| block_time: 4 # Faster block time for scenario testing | ||
| gas_limit: "32000000" # Higher gas limit for complex scenarios | ||
| resource_profile: ${{ inputs.cluster == 'kind' && 'dev' || 'prod' }} | ||
| create_static_ips: ${{ inputs.cluster == 'kind' && 'false' || 'true' }} | ||
| run_terraform_destroy: "false" | ||
| mnemonic: ${{ inputs.devnet_mnemonic }} | ||
| secrets: | ||
| GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | ||
| KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64 }} | ||
|
|
||
| scenario_dispatch_deploy_rollup_contracts: | ||
| needs: scenario_dispatch_deploy_eth_devnet | ||
| uses: ./.github/workflows/deploy-rollup-contracts.yml | ||
| with: | ||
| cluster: ${{ inputs.cluster }} | ||
| namespace: ${{ inputs.namespace }} | ||
| ref: ${{ inputs.ref }} | ||
| l1_rpc_urls: ${{ needs.scenario_dispatch_deploy_eth_devnet.outputs.rpc_url }} | ||
| l1_chain_id: ${{ needs.scenario_dispatch_deploy_eth_devnet.outputs.chain_id }} | ||
| aztec_docker_image: ${{ inputs.aztec_docker_image }} | ||
| mnemonic: ${{ inputs.rollup_deployment_mnemonic }} | ||
| salt: "456" | ||
| # indices 1,2,3,4 on the junk mnemonic | ||
| validators: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8,0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC,0x90F79bf6EB2c4f870365E785982E1f101E93b906,0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65" | ||
| sponsored_fpc: true | ||
| real_verifier: true | ||
| # Aztec environment variables | ||
| aztec_slot_duration: 12 | ||
| aztec_epoch_duration: 32 | ||
| aztec_target_committee_size: 4 | ||
| aztec_proof_submission_epochs: 1 | ||
| aztec_activation_threshold: 100 | ||
| aztec_ejection_threshold: 50 | ||
| aztec_slashing_quorum: 6 | ||
| aztec_slashing_round_size: 10 | ||
| aztec_governance_proposer_quorum: 6 | ||
| aztec_governance_proposer_round_size: 10 | ||
| aztec_mana_target: 1000000 | ||
| aztec_proving_cost_per_mana: 100 | ||
| secrets: | ||
| GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | ||
| KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64 }} | ||
|
|
||
| deploy_scenario_network: | ||
| needs: scenario_dispatch_deploy_rollup_contracts | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| TF_STATE_BUCKET: aztec-terraform | ||
| REGION: us-west1-a | ||
| # Common Terraform variables as environment variables | ||
| TF_VAR_NAMESPACE: ${{ inputs.namespace || 'eth-devnet' }} | ||
|
|
||
| steps: | ||
| - name: Deploy scenario network | ||
| run: | | ||
| echo "Deployed scenario network!" |
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be moved to the secret section of the workflow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. If we only wanted it to be called via
workflow_call, I'd say yes. But if we move it to secrets, then effectively whenever someone wants to manually dispatch, they'll be using the mnemonic stored in the repo, which I don't think is what we want.