Skip to content

Commit 2817f8e

Browse files
update the quick start guide with corrections
1 parent 302fcfa commit 2817f8e

File tree

2 files changed

+55
-34
lines changed

2 files changed

+55
-34
lines changed

docs/cdk/concepts/transaction-lifecycle.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Depending on the data availability design choices of the L2, if the L2 is a [rol
4141

4242
## Aggregated
4343

44-
The final step of the transaction lifecycle is to generate a ZK-proof that proves the batch of transactions is valid. Batches of transactions are read by the [aggregator](./architecture.md#aggregator) which utilizes a [prover](./architecture.md#prover) to generate a ZK-proof that is posted back to Ethereum.
44+
The final step of the transaction lifecycle is to generate a ZK-proof that proves the batch of transactions is valid. Batches of transactions are read by the [aggregator](./architecture.md#aggregator-and-prover) which utilizes a [prover](./architecture.md#aggregator-and-prover) to generate a ZK-proof that is posted back to Ethereum.
4545

4646
![Aggregator posting ZK-proof](../../img/cdk/aggregate-batches.png)
4747

docs/cdk/getting-started/local-deployment.md

Lines changed: 54 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ You might as well need the following tools to interact with the environment...
6767

6868
### Understanding the deployment steps
6969

70-
There are two key configurations files which help you understand what happens during a deployment.
70+
There are two configuration files which help you understand what happens during a deployment.
7171

72-
#### [`main.star`](https://github.com/0xPolygon/kurtosis-cdk/blob/main/main.star)
72+
#### 1. [`main.star`](https://github.com/0xPolygon/kurtosis-cdk/blob/main/main.star)
7373

74-
The `main.star` file defines the step-by-step instructions of the deployment process. It is the main "hub" of the chain setup process; orchestrating the setup of all the components in sequential order by pulling in necessary logic from other files.
74+
The `main.star` file contains the step-by-step instructions for the deployment process. It orchestrates the setup of all the components in sequential order and pulls in any necessary logic from other files.
7575

7676
It defines the following steps for the deployment process:
7777

78-
| Step Number | Deployment Step | Relevant Starlark Code | Enabled by Default |
78+
| Step number | Deployment step | Relevant Starlark code | Enabled by default |
7979
| ----------- | ------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------- | ------------------ |
8080
| 1 | Deploy a local layer 1 devnet chain | [ethereum.star](https://github.com/0xPolygon/kurtosis-cdk/blob/main/ethereum.star) | True |
8181
| 2 | Deploy the zkEVM smart contracts on the L1 | [deploy_zkevm_contracts.star](https://github.com/0xPolygon/kurtosis-cdk/blob/main/deploy_zkevm_contracts.star) | True |
@@ -88,11 +88,13 @@ It defines the following steps for the deployment process:
8888
| 9 | Apply a load test to the chain | [load_test.star](https://github.com/0xPolygon/kurtosis-cdk/blob/main/workload.star) | False |
8989
| 10 | Deploy [Blutgang](https://github.com/rainshowerLabs/blutgang) for load balancing & caching | [cdk_blutgang.star](https://github.com/0xPolygon/kurtosis-cdk/blob/main/cdk_blutgang.star) | False |
9090

91-
You can customize (or skip) the logic for each of these steps by modifying the logic in the respective files.
91+
You can customize (or skip) any of these steps by modifying the logic in the respective files.
9292

93-
#### [`params.yml`](https://github.com/0xPolygon/kurtosis-cdk/blob/main/params.yml)
93+
#### 2. [`params.yml`](https://github.com/0xPolygon/kurtosis-cdk/blob/main/params.yml)
9494

95-
The `params.yml` file defines the parameters of the chain and the deployment process. It includes configurations for simple parameters such as the chain ID and more complex configurations such as the gas token smart contract address.
95+
The `params.yml` file defines the parameters of the chain and the deployment process.
96+
97+
It includes configurations for simple parameters such as the chain ID and more complex configurations such as the gas token smart contract address.
9698

9799
You can modify each of these parameters to customize the chain to your specific needs.
98100

@@ -151,49 +153,48 @@ Now that your chain is running, you can explore and interact with each component
151153

152154
Below are a few examples of how you can interact with the chain.
153155

154-
### Sending test transactions
156+
### Read/write operations
155157

156-
Let’s perform some basic read and write operations on the L2 using Foundry.
158+
Let's do some read and write operations and test transactions on the L2 with Foundry.
157159

158-
Export the RPC URL of your L2 to an environment variable called `ETH_RPC_URL` with the following command:
160+
1. Export the RPC URL of your L2 to an environment variable called `ETH_RPC_URL` with the following command:
159161

160-
```bash
161-
export ETH_RPC_URL="$(kurtosis port print cdk-v1 zkevm-node-rpc-001 http-rpc)"
162-
```
162+
```bash
163+
export ETH_RPC_URL="$(kurtosis port print cdk-v1 cdk-erigon-node-001 http-rpc)"
164+
```
163165

164-
Then, use `cast` to view information about the chain, such as the latest block number:
166+
2. Use `cast` to view information about the chain, such as the latest block number:
165167

166-
```bash
167-
cast block-number
168-
```
168+
```bash
169+
cast block-number
170+
```
169171

170-
View the balance of an address, such as the pre-funded admin account:
172+
3. View the balance of an address, such as the pre-funded admin account:
171173

172-
```bash
173-
cast balance --ether 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
174-
```
174+
```bash
175+
cast balance --ether 0xE34aaF64b29273B7D567FCFc40544c014EEe9970
176+
```
175177

176-
Send simple transactions to the chain, such as a transfer of some ETH:
178+
4. Send simple transactions to the chain, such as a transfer of some ETH:
177179

178-
```bash
179-
cast send --legacy --value 0.01ether 0x0000000000000000000000000000000000000000 --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625"
180-
```
180+
```bash
181+
cast send --legacy --value 0.01ether 0x0000000000000000000000000000000000000000 --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625"
182+
```
181183

182184
!!! info
183-
184185
The `0xE34...9970` and `0x12d...c625` public-private key pair used in the above commands is the default admin account configured in `params.yml`.
185186

186187
### Load testing the chain
187188

188-
Use the [polycli loadtest](https://github.com/maticnetwork/polygon-cli/blob/main/doc/polycli_loadtest.md) command to send multiple transactions at once to the chain to test its performance:
189+
Use the [`polycli loadtest`](https://github.com/maticnetwork/polygon-cli/blob/main/doc/polycli_loadtest.md) command to send multiple transactions at once to the chain to test its performance:
189190

190191
```bash
191192
polycli loadtest --rpc-url "$ETH_RPC_URL" --legacy --verbosity 700 --requests 500 --rate-limit 5 --mode t --private-key "0x12d7de8621a77640c9241b2595ba78ce443d05e94090365ab3bb5e19df82c625"
192193
```
193194

194195
### Viewing transaction finality
195196

196-
A common way to check the status of the system is to ensure that batches are being sent and verified on the L1 chain.
197+
A common way to check the status of the system is by ensuring that batches are sent and verified on the L1 chain.
197198

198199
Use `cast` to view the progression of batches from trusted, virtual, and verified states:
199200

@@ -208,17 +209,35 @@ cast rpc zkevm_verifiedBatchNumber # Latest batch verified or "proven" on the L
208209
To open the bridge interface and bridge tokens across the L1 and L2, run the following command:
209210

210211
```bash
211-
open $(kurtosis port print cdk-v1 zkevm-bridge-proxy-001 bridge-interface)
212+
open $(kurtosis port print cdk-v1 zkevm-bridge-proxy-001 web-ui)
212213
```
213214

215+
!!! tip
216+
If the `open` command doesn't work, you can find the URL's in the Kurtosis output.
217+
214218
### Viewing chain metrics
215219

216-
To view information such as how many transactions are being processed, the amount of gas being used, the time since a batch was last verified, how many addresses have bridged, and much more, a Grafana dashboard is included in the deployed observability stack which can be opened by running the following command:
220+
!!! warning
221+
- Observability defaults to false.
222+
- Turn on observability in the deployment by setting the `deploy_observability` parameter to `true` in `params.yml`.
223+
- Redeploy Kurtosis.
224+
225+
Once the observability function is activated, you can see information such as:
226+
227+
- How many transactions are being processed.
228+
- The amount of gas being used.
229+
- The time since a batch was last verified.
230+
- How many addresses have bridged.
231+
232+
Open the Grafana dashboard by running the following command:
217233

218234
```bash
219235
open $(kurtosis port print cdk-v1 grafana-001 dashboards)
220236
```
221237

238+
!!! tip
239+
If the `open` command doesn't work, you can find the URL's in the Kurtosis output.
240+
222241
From the hamburger menu, navigate to `Dashboards` and select the `Panoptichain` dashboard to view all of the metrics.
223242

224243
![Panoptichain Dashboard](../../img/cdk/grafana.png)
@@ -233,8 +252,10 @@ kurtosis clean --all
233252

234253
## Going to production
235254

236-
While it is possible to run a CDK chain on your own, we strongly recommend getting in touch with the [Polygon Labs team directly](https://share-eu1.hsforms.com/1aI6l7_bFTn-vWl0NIFVzDQc8xid), or one of our [Implementation Providers](https://ecosystem.polygon.technology/spn/cdk/) for production deployments.
255+
While it is possible to run a CDK chain on your own, we strongly recommend getting in touch with the [Polygon team directly](https://share-eu1.hsforms.com/1aI6l7_bFTn-vWl0NIFVzDQc8xid), or one of our [implementation providers](https://ecosystem.polygon.technology/spn/cdk/) for production deployments.
237256

238-
## Dive deeper into the CDK
257+
## Further reading
239258

240-
For more detailed information on the CDK’s architecture, components, and how to customize your chain, refer to the [CDK architecture documentation](https://docs.polygon.technology/cdk/architecture/cdk-zkevm/).
259+
- For more information on CDK architecture, components, and how to customize your chain, refer to the [CDK architecture documentation](https://docs.polygon.technology/cdk/architecture/cdk-zkevm/).
260+
- For detailed how to's, including how to create a native token, check out our [how to guides](../how-to/use-native-token.md).
261+
- For detailed conceptual information on zero-knowledge stacks, check out our [concepts documentation](../concepts/layer2s.md).

0 commit comments

Comments
 (0)