You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/cdk/concepts/transaction-lifecycle.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ Depending on the data availability design choices of the L2, if the L2 is a [rol
41
41
42
42
## Aggregated
43
43
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.
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.
75
75
76
76
It defines the following steps for the deployment process:
| 1 | Deploy a local layer 1 devnet chain |[ethereum.star](https://github.com/0xPolygon/kurtosis-cdk/blob/main/ethereum.star)| True |
81
81
| 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:
88
88
| 9 | Apply a load test to the chain |[load_test.star](https://github.com/0xPolygon/kurtosis-cdk/blob/main/workload.star)| False |
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.
96
98
97
99
You can modify each of these parameters to customize the chain to your specific needs.
98
100
@@ -151,49 +153,48 @@ Now that your chain is running, you can explore and interact with each component
151
153
152
154
Below are a few examples of how you can interact with the chain.
153
155
154
-
### Sending test transactions
156
+
### Read/write operations
155
157
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.
157
159
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:
159
161
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
+
```
163
165
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:
165
167
166
-
```bash
167
-
cast block-number
168
-
```
168
+
```bash
169
+
cast block-number
170
+
```
169
171
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:
The `0xE34...9970` and `0x12d...c625` public-private key pair used in the above commands is the default admin account configured in`params.yml`.
185
186
186
187
### Load testing the chain
187
188
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:
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.
197
198
198
199
Use `cast` to view the progression of batches from trusted, virtual, and verified states:
199
200
@@ -208,17 +209,35 @@ cast rpc zkevm_verifiedBatchNumber # Latest batch verified or "proven" on the L
208
209
To open the bridge interface and bridge tokens across the L1 and L2, run the following command:
209
210
210
211
```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)
212
213
```
213
214
215
+
!!! tip
216
+
If the `open`command doesn't work, you can find the URL's in the Kurtosis output.
217
+
214
218
### Viewing chain metrics
215
219
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 functionis 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:
217
233
218
234
```bash
219
235
open $(kurtosis port print cdk-v1 grafana-001 dashboards)
220
236
```
221
237
238
+
!!! tip
239
+
If the `open`command doesn't work, you can find the URL's in the Kurtosis output.
240
+
222
241
From the hamburger menu, navigate to `Dashboards` and selectthe`Panoptichain` dashboard to view all of the metrics.
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.
237
256
238
-
## Dive deeper into the CDK
257
+
## Further reading
239
258
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