Skip to content
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

feat: use cdk repo for erigon sequencer #193

Merged
merged 26 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/actions/monitor-cdk-verified-batches/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ inputs:
description: The script timeout in seconds
required: false
default: '600' # 10 minutes
rpc_service:
description: The RPC service to use
required: false
default: 'cdk-erigon-node-001'

runs:
using: "composite"
steps:
- name: Check that batches are being verified
working-directory: .github/actions/monitor-cdk-verified-batches
shell: bash
run: ./batch_verification_monitor.sh ${{ inputs.verified_batches_target }} ${{ inputs.timeout }}
run: ./batch_verification_monitor.sh ${{ inputs.verified_batches_target }} ${{ inputs.timeout }} ${{ inputs.rpc_service }}
9 changes: 8 additions & 1 deletion .github/actions/setup-kurtosis-cdk/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,18 @@ inputs:
kurtosis-version:
description: The version of kurtosis
required: false
default: '0.90.1' # https://github.com/kurtosis-tech/kurtosis/releases
default: '1.0.0' # https://github.com/kurtosis-tech/kurtosis/releases

runs:
using: "composite"
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}

- name: Install kurtosis
shell: bash
run: |
Expand Down
20 changes: 19 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,25 @@ jobs:
uses: ./.github/actions/setup-kurtosis-cdk

- name: Deploy Kurtosis CDK package
run: kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
run: |
vcastellm marked this conversation as resolved.
Show resolved Hide resolved
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . '{apply_workload: true}'

- name: Monitor verified batches
uses: ./.github/actions/monitor-cdk-verified-batches

deploy-zkevm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Kurtosis CDK tools
uses: ./.github/actions/setup-kurtosis-cdk

- name: Deploy Kurtosis CDK package
run: |
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always . '{deploy_zkevm_permissionless_node: true, args: {sequencer_type: "zkevm"}, apply_workload: true}'

- name: Monitor verified batches
uses: ./.github/actions/monitor-cdk-verified-batches
with:
rpc_service: zkevm-node-rpc-001
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@ kurtosis clean --all
kurtosis run --enclave cdk-v1 --args-file params.yml --image-download always .
```

The command above deploys a CDK stack using [zkevm-node](https://github.com/0xPolygonHermez/zkevm-node) as the sequencer. Alternatively, to launch a CDK stack using [cdk-erigon](https://github.com/0xPolygonHermez/cdk-erigon) as a sequencer, you can run the following command.

```bash
kurtosis run --enclave cdk-v1 --args-file cdk-erigon-sequencer-params.yml --image-download always .
```
The command above deploys a CDK stack using [cdk-erigon](https://github.com/0xPolygonHermez/cdk-erigon) as a sequencer.

Let's do a simple L2 RPC test call.

Expand All @@ -40,11 +36,7 @@ kurtosis enclave inspect cdk-v1
That output, while quite useful, might also be a little overwhelming. If you want to simply see the port mapping within the `cdk-v1` enclave for the `zkevm-node-rpc` service and the `trusted-rpc` port, you can use the following command. For this test, let's store the RPC URL in an environment variable:

```bash
# if zkevm-node is the sequencer
export ETH_RPC_URL="$(kurtosis port print cdk-v1 zkevm-node-rpc-001 http-rpc)"

# if cdk-erigon is the sequencer
export ETH_RPC_URL="$(kurtosis port print cdk-v1 cdk-erigon-sequencer-001 rpc)"
export ETH_RPC_URL="$(kurtosis port print cdk-v1 cdk-erigon-node-001 rpc)"
```

That is the same environment variable that `cast` uses, so you should now be able to run this command. Note that the steps below will assume you have the [Foundry toolchain](https://book.getfoundry.sh/getting-started/installation) installed.
Expand Down
184 changes: 0 additions & 184 deletions cdk-erigon-sequencer-params.yml

This file was deleted.

Loading
Loading