Skip to content

Commit e19ddaa

Browse files
committed
CDK - add cli tool
1 parent e09d6d4 commit e19ddaa

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
The Polygon Chain Development Kit, or simply CDK, is a tool box of components that a chain administrator can use to build a rollup or validium chain.
2+
3+
At a high level, CDK components are like building blocks a chain administrator can select to configure a ZK-powered chain according to their own design.
4+
5+
To abstract away the complexity of running or configuring CDK components, Polygon provides a Rust-based CLI tool which is an interface that chain administrators can use to interact with CDK components.
6+
7+
This CLI tool is an entry point for chain administrators to access the CDK system.
8+
9+
## Installation
10+
11+
To use the CLI tool the chain admin needs only download the precompiled CDK package ([the binaries](https://github.com/0xPolygon/cdk/releases/)).
12+
13+
There is no need to have Golang, checkout the CDK repo, or install anything else. It is also trustless.
14+
15+
## Running the CLI tool
16+
17+
!!! info
18+
19+
Requirements:
20+
21+
Get the binaries, packages and docker images published with each release, [here](https://github.com/0xPolygon/cdk/releases/).
22+
23+
## Commands
24+
25+
### CDK
26+
27+
Here the Admin needs to provide the CDK-node configuration file and a genesis file of the desired chain.
28+
29+
Usage: `cdk --config <CONFIG> --chain <CHAIN> <COMMAND>`
30+
31+
Commands:
32+
* `node` - Run the cdk-node with the provided configuration.
33+
* `erigon` - Run cdk-erigon node with the provided default configuration.
34+
* `help` Print this message or the help of the given subcommand(s).
35+
36+
Options:
37+
* `-c, --config <CONFIG>` - The path to the configuration file [env: `CDK_CONFIG_PATH=`]
38+
* `-g, --chain <CHAIN>` - The path to a chain specification file [env: `CDK_GENESIS_PATH=`]
39+
* `-h, --help` Print help
40+
41+
### CDK node
42+
43+
To run cdk-node use the `node` subcommand
44+
45+
Usage: `cdk --config <CONFIG> --chain <CHAIN> node [OPTIONS]`
46+
47+
Options:
48+
* `-c, --components <COMPONENTS>` Components to run [env: `CDK_COMPONENTS=`]
49+
* `-h, --help` Print help
50+
51+
### CDK erigon
52+
53+
Chain administrators can run a cdk-erigon RPC node that syncs to an existing chain with default parameters.
54+
55+
This subcommand is intended for quickly spin-up of an RPC node or to test existing chains with default configuration values. In order fine tune and to access all configuration values, check the [full cdk-erigon documentation](../../cdk/getting-started/cdk-erigon/index.md) reference to erigon configuration docs.
56+
57+
Usage: `cdk --config <CONFIG> --chain <CHAIN> erigon`
58+
59+
Options:
60+
* `-h, --help` Print help
61+
62+
The above command generates all the required configuration files for cdk-erigon on-the-fly and run the node.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ nav:
5757
- Version compatibility matrix: cdk/version-matrix.md
5858
- Get started:
5959
- Local deployment guide: cdk/getting-started/local-deployment.md
60+
- CLI tool: cdk/getting-started/cdk-cli-tool.md
6061
- Concepts:
6162
- Layer 2s: cdk/concepts/layer2s.md
6263
- L2 architecture overview: cdk/concepts/architecture.md

0 commit comments

Comments
 (0)