|
| 1 | +name: Deploy Scenario Network |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + cluster: |
| 7 | + description: The cluster to deploy to, e.g. aztec-gke-private or kind |
| 8 | + required: true |
| 9 | + type: string |
| 10 | + namespace: |
| 11 | + description: The namespace to deploy to |
| 12 | + required: true |
| 13 | + type: string |
| 14 | + ref: |
| 15 | + description: The branch name to deploy from |
| 16 | + required: true |
| 17 | + type: string |
| 18 | + default: "next" |
| 19 | + aztec_docker_image: |
| 20 | + description: The Docker image to use for the Aztec contracts |
| 21 | + required: true |
| 22 | + type: string |
| 23 | + default: "aztecprotocol/aztec:8ebe8d7c45190b002c77e29358f2b307a23b5336" |
| 24 | + devnet_mnemonic: |
| 25 | + description: The mnemonic to use for the devnet |
| 26 | + required: true |
| 27 | + type: string |
| 28 | + default: "test test test test test test test test test test test junk" |
| 29 | + rollup_deployment_mnemonic: |
| 30 | + description: The mnemonic to use for the rollup deployment |
| 31 | + required: true |
| 32 | + type: string |
| 33 | + default: "test test test test test test test test test test test junk" |
| 34 | + secrets: |
| 35 | + GCP_SA_KEY: |
| 36 | + description: The JSON key for the GCP service account |
| 37 | + required: true |
| 38 | + KUBECONFIG_B64: |
| 39 | + description: The base64 encoded kubeconfig |
| 40 | + required: true |
| 41 | + |
| 42 | + workflow_dispatch: |
| 43 | + inputs: |
| 44 | + cluster: |
| 45 | + description: The cluster to deploy to, e.g. aztec-gke-private or kind |
| 46 | + required: true |
| 47 | + type: string |
| 48 | + default: "kind" |
| 49 | + namespace: |
| 50 | + description: The namespace to deploy to |
| 51 | + required: true |
| 52 | + type: string |
| 53 | + default: "eth-devnet" |
| 54 | + ref: |
| 55 | + description: The branch name to deploy from. |
| 56 | + required: true |
| 57 | + type: string |
| 58 | + default: "next" |
| 59 | + aztec_docker_image: |
| 60 | + description: The Docker image to use for the Aztec contracts |
| 61 | + required: true |
| 62 | + type: string |
| 63 | + default: "aztecprotocol/aztec:8ebe8d7c45190b002c77e29358f2b307a23b5336" |
| 64 | + devnet_mnemonic: |
| 65 | + description: The mnemonic to use for the devnet |
| 66 | + required: true |
| 67 | + type: string |
| 68 | + default: "test test test test test test test test test test test junk" |
| 69 | + rollup_deployment_mnemonic: |
| 70 | + description: The mnemonic to use for the rollup deployment |
| 71 | + required: true |
| 72 | + type: string |
| 73 | + default: "test test test test test test test test test test test junk" |
| 74 | + |
| 75 | +jobs: |
| 76 | + # First job: Deploy the Eth Devnet |
| 77 | + scenario_dispatch_deploy_eth_devnet: |
| 78 | + uses: ./.github/workflows/deploy-eth-devnet.yml |
| 79 | + with: |
| 80 | + cluster: ${{ inputs.cluster }} |
| 81 | + namespace: ${{ inputs.namespace }} |
| 82 | + ref: ${{ inputs.ref }} |
| 83 | + # Prefilled values for scenario network |
| 84 | + chain_id: 1337 |
| 85 | + block_time: 4 # Faster block time for scenario testing |
| 86 | + gas_limit: "32000000" # Higher gas limit for complex scenarios |
| 87 | + resource_profile: ${{ inputs.cluster == 'kind' && 'dev' || 'prod' }} |
| 88 | + create_static_ips: ${{ inputs.cluster == 'kind' && 'false' || 'true' }} |
| 89 | + run_terraform_destroy: "false" |
| 90 | + mnemonic: ${{ inputs.devnet_mnemonic }} |
| 91 | + secrets: |
| 92 | + GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} |
| 93 | + KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64 }} |
| 94 | + |
| 95 | + scenario_dispatch_deploy_rollup_contracts: |
| 96 | + needs: scenario_dispatch_deploy_eth_devnet |
| 97 | + uses: ./.github/workflows/deploy-rollup-contracts.yml |
| 98 | + with: |
| 99 | + cluster: ${{ inputs.cluster }} |
| 100 | + namespace: ${{ inputs.namespace }} |
| 101 | + ref: ${{ inputs.ref }} |
| 102 | + l1_rpc_urls: ${{ needs.scenario_dispatch_deploy_eth_devnet.outputs.rpc_url }} |
| 103 | + l1_chain_id: ${{ needs.scenario_dispatch_deploy_eth_devnet.outputs.chain_id }} |
| 104 | + aztec_docker_image: ${{ inputs.aztec_docker_image }} |
| 105 | + mnemonic: ${{ inputs.rollup_deployment_mnemonic }} |
| 106 | + salt: "456" |
| 107 | + # indices 1,2,3,4 on the junk mnemonic |
| 108 | + validators: "0x70997970C51812dc3A010C7d01b50e0d17dc79C8,0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC,0x90F79bf6EB2c4f870365E785982E1f101E93b906,0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65" |
| 109 | + sponsored_fpc: true |
| 110 | + real_verifier: true |
| 111 | + # Aztec environment variables |
| 112 | + aztec_slot_duration: 12 |
| 113 | + aztec_epoch_duration: 32 |
| 114 | + aztec_target_committee_size: 4 |
| 115 | + aztec_proof_submission_epochs: 1 |
| 116 | + aztec_activation_threshold: 100 |
| 117 | + aztec_ejection_threshold: 50 |
| 118 | + aztec_slashing_quorum: 6 |
| 119 | + aztec_slashing_round_size: 10 |
| 120 | + aztec_governance_proposer_quorum: 6 |
| 121 | + aztec_governance_proposer_round_size: 10 |
| 122 | + aztec_mana_target: 1000000 |
| 123 | + aztec_proving_cost_per_mana: 100 |
| 124 | + secrets: |
| 125 | + GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} |
| 126 | + KUBECONFIG_B64: ${{ secrets.KUBECONFIG_B64 }} |
| 127 | + |
| 128 | + deploy_scenario_network: |
| 129 | + needs: scenario_dispatch_deploy_rollup_contracts |
| 130 | + runs-on: ubuntu-latest |
| 131 | + env: |
| 132 | + TF_STATE_BUCKET: aztec-terraform |
| 133 | + REGION: us-west1-a |
| 134 | + # Common Terraform variables as environment variables |
| 135 | + TF_VAR_NAMESPACE: ${{ inputs.namespace || 'eth-devnet' }} |
| 136 | + |
| 137 | + steps: |
| 138 | + - name: Deploy scenario network |
| 139 | + run: | |
| 140 | + echo "Deployed scenario network!" |
0 commit comments