Skip to content

Commit

Permalink
docs: update out of date docs (#106)
Browse files Browse the repository at this point in the history
* chore: do not deploy permissionless node and eth load balancer by default

* docs: update pless setup

* docs: update `yq` cmd to deploy pless node

* ci: update yq cmd in deploy job

* docs: update breakdown deployment

* docs: update forkid 7 to 9 migration

* chore: nit

* Update .github/workflows/deploy.yml

Co-authored-by: Dra Murphy <[email protected]>

* Update .github/workflows/deploy.yml

Co-authored-by: Dra Murphy <[email protected]>

* Update .github/workflows/deploy.yml

Co-authored-by: Dra Murphy <[email protected]>

* Update docs/how-to/migrate/forkid-7-to-9.md

Co-authored-by: Dra Murphy <[email protected]>

* Update docs/quickstart/breakdown-deployment.md

Co-authored-by: Dra Murphy <[email protected]>

---------

Co-authored-by: Dra Murphy <[email protected]>
  • Loading branch information
leovct and kmurphypolygon authored May 6, 2024
1 parent 2acaea9 commit aa7d031
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 53 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,61 +91,52 @@ jobs:
uses: foundry-rs/foundry-toolchain@v1

# Deploy components.
- name: Disable All Deployment Steps
run: |
yq -Y --in-place '.deploy_l1 = false' params.yml
yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml
yq -Y --in-place '.deploy_databases = false' params.yml
yq -Y --in-place '.deploy_cdk_central_environment = false' params.yml
yq -Y --in-place '.deploy_cdk_bridge_infra = false' params.yml
yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml
yq -Y --in-place '.deploy_observability = false' params.yml
yq -Y --in-place '.deploy_blutgang = false' params.yml
yq -Y --in-place '.apply_workload = false' params.yml
- name: Disable all deployment steps
run: yq -Y --in-place 'with_entries(if .value | type == "boolean" then .value = false else . end)' params.yml

- name: Deploy L1
run: |
yq -Y --in-place '.deploy_l1 = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_l1 = false' params.yml # reset
- name: Deploy ZkEVM Contracts on L1
- name: Deploy zkEVM contracts on L1
run: |
yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml # reset
- name: Deploy ZkEVM Node and CDK Peripheral Databases
- name: Deploy zkEVM node and cdk peripheral databases
run: |
yq -Y --in-place '.deploy_databases = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_databases = false' params.yml # reset
- name: Deploy CDK Central Environment
- name: Deploy CDK central environment
run: |
yq -Y --in-place '.deploy_cdk_central_environment = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_cdk_central_environment = false' params.yml # reset
- name: Deploy CDK Bridge Infrastructure
- name: Deploy CDK bridge infrastructure
run: |
yq -Y --in-place '.deploy_cdk_bridge_infra = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_cdk_bridge_infra = false' params.yml # reset
- name: Deploy ZkEVM Permissionless Node
- name: Deploy zkEVM permissionless node
run: |
yq -Y --in-place '.deploy_zkevm_permissionless_node = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml # reset
- name: Deploy Observability Stack
- name: Deploy observability stack
run: |
yq -Y --in-place '.deploy_observability = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_observability = false' params.yml # reset
- name: Deploy Loadbalancer (blutgang)
- name: Deploy ETH load balancer
run: |
yq -Y --in-place '.deploy_blutgang = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
Expand Down
9 changes: 2 additions & 7 deletions docs/how-to/migrate/forkid-7-to-9.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,17 +242,12 @@ At this stage, the smart contracts are upgraded. However, we still need to start
- This procedure is very sensitive.
- Ensure the synchronizer starts first.
We're going to revert the parameters back to the versions of the node that worked with fork 9, and specify that _ONLY_ stage 3 should run.
We're going to revert the parameters back to the versions of the node that worked with fork 9, and only redeploy the CDK central/trusted environment.

1. Update the `params.yml` file as follows:

```sh
yq -Y --in-place '.deploy_l1 = false' params.yml
yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml
yq -Y --in-place '.deploy_databases = false' params.yml
yq -Y --in-place '.deploy_cdk_bridge_infra = false' params.yml
yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml
yq -Y --in-place '.deploy_observability = false' params.yml
yq -Y --in-place 'with_entries(if .key == "deploy_cdk_central_environment" then .value = true elif .value | type == "boolean" then .value = false else . end)' params.yml
```

2. Remove the `HaltOnBatchNumber` setting that we added earlier.
Expand Down
57 changes: 37 additions & 20 deletions docs/quickstart/breakdown-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,73 +24,90 @@ Currently, the deployment process includes the following stages:

## Specifying stages

The example scripts below show you how to deploy the stack to enable various stage permutations.
The example scripts below show you how to deploy the stack to enable various stage permutations.

!!! tip
To run the scripts, you need to have [yq](https://pypi.org/project/yq/) installed.

### Disable all deployment steps

```sh
yq -Yi '.deploy_l1 = false' params.yml
yq -Yi '.deploy_zkevm_contracts_on_l1 = false' params.yml
yq -Yi '.deploy_databases = false' params.yml
yq -Yi '.deploy_cdk_central_environment = false' params.yml
yq -Yi '.deploy_cdk_bridge_infra = false' params.yml
yq -Yi '.deploy_zkevm_permissionless_node = false' params.yml
yq -Y --in-place 'with_entries(if .value | type == "boolean" then .value = false else . end)' params.yml
```

### Deploy L1

```sh
yq -Yi '.deploy_l1 = true' params.yml
yq -Y --in-place '.deploy_l1 = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Yi '.deploy_l1 = false' params.yml # reset
yq -Y --in-place '.deploy_l1 = false' params.yml # reset
# Perform additional tasks...
```

### Deploy zkEVM contracts on L1

```sh
yq -Yi '.deploy_zkevm_contracts_on_l1 = true' params.yml
yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
yq -Yi '.deploy_zkevm_contracts_on_l1 = false' params.yml # reset
yq -Y --in-place '.deploy_zkevm_contracts_on_l1 = false' params.yml # reset
# Perform additional tasks...
```

### Deploy zkEVM node and CDK peripheral databases

```sh
yq -Yi '.deploy_databases = true' params.yml
yq -Y --in-place '.deploy_databases = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Yi '.deploy_databases = false' params.yml # reset
yq -Y --in-place '.deploy_databases = false' params.yml # reset
# Perform additional tasks...
```

### Deploy CDK central environment

```sh
yq -Yi '.deploy_cdk_central_environment = true' params.yml
yq -Y --in-place '.deploy_cdk_central_environment = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Yi '.deploy_cdk_central_environment = false' params.yml # reset
yq -Y --in-place '.deploy_cdk_central_environment = false' params.yml # reset
# Perform additional tasks...
```

### Deploy CDK bridge infrastructure

```sh
yq -Yi '.deploy_cdk_bridge_infra = true' params.yml
yq -Y --in-place '.deploy_zkevm_permissionless_node = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Yi '.deploy_cdk_bridge_infra = false' params.yml # reset
yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml # reset
# Perform additional tasks...
```

### Deploy zkEVM permissionless node

```sh
yq -Yi '.deploy_zkevm_permissionless_node = true' params.yml
yq -Y --in-place '.deploy_zkevm_permissionless_node = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Yi '.deploy_zkevm_permissionless_node = false' params.yml # reset
yq -Y --in-place '.deploy_zkevm_permissionless_node = false' params.yml # reset
```

<br/>
### Deploy observability stack

```sh
yq -Y --in-place '.deploy_observability = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_observability = false' params.yml # reset
```

### Deploy ETH load balancer

```sh
yq -Y --in-place '.deploy_blutgang = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.deploy_blutgang = false' params.yml # reset
```

### Apply workload

```sh
yq -Y --in-place '.apply_workload = true' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml .
yq -Y --in-place '.apply_workload = false' params.yml # reset
```
10 changes: 6 additions & 4 deletions docs/quickstart/set-up-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
comments: true
---

In addition to the core stack, you can also attach and synchronize a permissionless node.
In addition to the core stack, you can also attach and synchronize a permissionless node.

## Prerequisites

Expand All @@ -21,14 +21,15 @@ cp /tmp/genesis.json templates/permissionless-node/genesis.json
Run the following command:

```sh
kurtosis run --enclave cdk-v1 --args-file params.yml --main-file zkevm_permissionless_node.star .
yq -Y --in-place 'with_entries(if .key == "deploy_zkevm_permissionless_node" then .value = true elif .value | type == "boolean" then .value = false else . end)' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
```

## Sync an external permissionless node

You can also use the package you have just set up to sync data from a production network.

1. Some of the parameters in the Kurtosis genesis file need to be replaced, or better still you could replace the whole genesis file with one representing the external network.
1. Some of the parameters in the Kurtosis genesis file need to be replaced, or better still you could replace the whole genesis file with one representing the external network.

The parameters that need to change in the file are as follows:

Expand Down Expand Up @@ -60,7 +61,8 @@ You can also use the package you have just set up to sync data from a production
4. Now you can start synchronizing with the following command:

```sh
kurtosis run --enclave cdk-v1 --args-file params.yml --main-file zkevm_permissionless_node.star .
yq -Y --in-place 'with_entries(if .key == "deploy_zkevm_permissionless_node" then .value = true elif .value | type == "boolean" then .value = false else . end)' params.yml
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
```

<br/>
4 changes: 2 additions & 2 deletions main.star
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ def run(
deploy_databases=True,
deploy_cdk_bridge_infra=True,
deploy_cdk_central_environment=True,
deploy_zkevm_permissionless_node=True,
deploy_zkevm_permissionless_node=False,
deploy_observability=True,
deploy_blutgang=True,
deploy_blutgang=False,
apply_workload=False,
args={
"deployment_suffix": "-001",
Expand Down
4 changes: 2 additions & 2 deletions params.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ deploy_cdk_central_environment: true
deploy_cdk_bridge_infra: true

# Deploy permissionless node.
deploy_zkevm_permissionless_node: true
deploy_zkevm_permissionless_node: false

# Deploy observability stack.
deploy_observability: true

# Deploy eth load balancer.
deploy_blutgang: true
deploy_blutgang: false

# Apply workload to the different components of the CDK stack.
apply_workload: false
Expand Down

0 comments on commit aa7d031

Please sign in to comment.