Skip to content

Commit 3a75322

Browse files
Niramisa WeissNiramisa Weiss
authored andcommitted
first iteration of edit
1 parent a0747cc commit 3a75322

File tree

11 files changed

+112
-394
lines changed

11 files changed

+112
-394
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
2+
| Component | Description |
3+
| ----------------------------------------------------------------------------- | -------------------------------------------------------------------- |
4+
| [CDK validium node](https://github.com/0xPolygon/cdk-validium-node) | Node implementation for the CDK networks in Validium mode |
5+
| [CDK validium contracts](https://github.com/0xPolygon/cdk-validium-contracts) | Smart contracts implementation for the CDK networks in Validium mode |
6+
| [CDK data availability layer](https://github.com/0xPolygon/cdk-data-availability) | Data availability nodes implementation for the CDK networks |
7+
| [Prover/Executor](https://github.com/0xPolygonHermez/zkevm-prover) | zkEVM engine and prover implementation |
8+
| [Bridge service](https://github.com/0xPolygonHermez/zkevm-bridge-service) | Bridge service implementation for CDK networks |
9+
| [Bridge UI](https://github.com/0xPolygonHermez/zkevm-bridge-ui) | UI for the CDK networks bridge |

docs/technology/cdk/deployment-differences.md

Lines changed: 0 additions & 99 deletions
This file was deleted.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
!!! info
2+
Polygon CDK is in public preview stage and subject to changes.
3+
4+
5+
!!! warning
6+
The CDK in validium mode is in active development, with ongoing feature enhancements and issue resolutions.
7+
8+
For the latest updates, follow our official GitHub repositories.
9+
10+
- [Node](https://github.com/0xPolygon/cdk-validium-node)
11+
- [Data Availability](https://github.com/0xPolygon/cdk-data-availability)
12+
- [Contracts](https://github.com/0xPolygon/cdk-validium-contracts)
13+
14+
15+
!!! important "Recommendation"
16+
Follow the [Quickstart](quickstart.md) for a hands-on introduction to CDK in validium mode.
17+
18+
Follow the steps below to deploy a CDK validium instance.
19+
20+
## 1. Deploy validium-specific contracts
21+
22+
First, deploy the relevant contracts.
23+
24+
Follow the steps in the [CDK validium contracts repository's README</ins>](https://github.com/0xPolygon/cdk-validium-contracts).
25+
26+
## 2. Run the CDK validium node
27+
28+
Next, set up and run the CDK validium node.
29+
30+
Follow the instructions in the [CDK validium node repository's README](https://github.com/0xPolygon/cdk-validium-node).
31+
32+
## 3. Run the data availability (DA) node
33+
34+
Finally, once the CDK validium node is operational, set up and run the data availability node.
35+
36+
Instructions for this can be found in the [<ins>CDK DA Node GitHub repository's README</ins>](https://github.com/0xPolygon/cdk-data-availability).
Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,50 @@
1-
---
2-
id: allowlists
3-
title: CDK Validium Allowlists
4-
sidebar_label: Allowlists
5-
description: "Learn about allowlists and access control in the Polygon CDK."
6-
keywords:
7-
- docs
8-
- polygon
9-
- layer 2
10-
- validium
11-
- allowlist
12-
- access
13-
- access control
14-
- acl
15-
---
16-
17-
The CDK Validium node offers policy management features, including allowlisting and Access Control Lists (ACLs). These features are particularly beneficial for Validium-based app-chains that require fine-grained control over transaction pools. It is the Sequencer node that enforces these policies, and any change operations should be applied directly through the Sequencer. This document provides an overview on these administrative capabilities and explains how to use them.
18-
19-
## Key Concepts
20-
21-
- **Policy**: A set of rules that govern what actions are allowed or denied in the transaction pool. Currently, there are two defined policies:
22-
- **SendTx**: Governs whether an address may send transactions to the pool.
23-
- **Deploy**: Governs whether an address may deploy a contract.
24-
- **ACL (Access Control List)**: A list of addresses that are exceptions to a given policy.
25-
- **Allowlisting**: The process of explicitly allowing addresses to perform certain actions.
26-
- **Denylisting**: The process of explicitly denying addresses from performing certain actions.
1+
## Validium node
2+
3+
A **policy** is a set of rules that govern what actions are allowed or denied in the transaction pool. Currently, there are two defined policies:
4+
5+
- **SendTx**: governs whether an address may send transactions to the pool.
6+
- **Deploy**: governs whether an address may deploy a contract.
7+
8+
The CDK validium node offers policy management features that include allowlisting[^1], denylisting[^2], and access control lists (ACLs)[^3]. These features are beneficial for validium-based app-chains that require fine-grained control over transaction pools.
279

2810
## Architecture
2911

3012
The architecture is divided into the following main components:
3113

32-
- **Policy Management Layer**: Defined in `policy.go`, this layer is responsible for the core logic of policy management.
33-
- **Data Layer**: Defined in `pgpoolstorage/policy.go`, this layer interacts with the data layer (PostgreSQL database) to store and retrieve policy and ACL data.
34-
- **Policy Definitions**: Defined in `pool/policy.go`, this layer contains the data structures and utility functions for policies and ACLs.
35-
- **Policy Interface**: Defined in `pool/interfaces.go`, this interface outlines the methods that any concrete type must implement to be considered a policy in the system.
14+
- **Policy management layer**: Defined in `policy.go`, this layer is responsible for the core logic of policy management.
15+
- **Data layer**: Defined in `pgpoolstorage/policy.go`, this layer interacts with the data layer (PostgreSQL database) to store and retrieve policy and ACL data.
16+
- **Policy definitions**: Defined in `pool/policy.go`, this layer contains the data structures and utility functions for policies and ACLs.
17+
- **Policy interface**: Defined in `pool/interfaces.go`, this interface outlines the methods that any concrete type must implement to be considered a policy in the system.
3618

37-
## Capabilities
19+
## Policy features
3820

39-
- **Fine-Grained Control**: Developers can specify policies at a granular level, allowing or denying specific actions for specific addresses.
40-
- **Dynamic Updates**: Policies and ACLs can be updated on-the-fly without requiring a node restart.
41-
- **Database-Backed**: All policy data is stored in a PostgreSQL database.
21+
- **Fine-grained control**: Developers can specify policies at a granular level, allowing or denying specific actions for specific addresses.
22+
- **Dynamic updates**: Policies and ACLs can be updated on-the-fly without requiring a node restart.
23+
- **Database-backed**: All policy data is stored in a PostgreSQL database.
4224
- **Extensible**: New policies can be easily added to the system.
4325

44-
## How to Use Policies
26+
## Instructions for using policies
4527

46-
| Command Name | Description | Flags & Parameters |
28+
| Command name | Description | Flags & parameters |
4729
|--------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
4830
| `policy add` | Add address(es) to a policy exclusion list | `--policy` (or `-p`): Policy name<br/>`--csv`: CSV file with addresses |
4931
| `policy remove` | Remove address(es) from a policy exclusion list | `--policy` (or `-p`): Policy name<br/>`--csv`: CSV file with addresses to remove |
5032
| `policy clear` | Clear all addresses from a policy's exclusion list | `--policy` (or `-p`): Policy name |
5133
| `policy describe` | Describe the default actions for the policies or a specific policy | `--policy` (or `-p`): Policy name (optional)<br/>`--no-header`: Omit header in output (optional) |
5234
| `policy update` | Update the default action for a policy | `--policy` (or `-p`): Policy name<br/>`--allow`: Set policy to 'allow'<br/>`--deny`: Set policy to 'deny' |
5335

54-
We will use the "deploy" policy as an example.
36+
!!! note
37+
For the examples, we are using a `deploy` policy.
5538

56-
### Adding Addresses to a Policy
39+
### Add addresses to a policy
5740

5841
To add one or more addresses to a specific policy, you can use the `policy add` command. If you have a CSV file containing the addresses, you can use the --csv` flag.
5942

6043
```bash
6144
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy add --policy deploy 0xAddress1
6245
```
6346

64-
### Removing Addresses from a Policy
47+
### Remove addresses from a policy
6548

6649
To remove addresses from a policy, you can use the `policy remove` command.
6750

@@ -73,15 +56,15 @@ docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy remove --p
7356
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy remove --policy deploy --csv addresses.csv
7457
```
7558

76-
### Clearing All Addresses from a Policy
59+
### Clear all addresses from a policy
7760

7861
To remove all addresses from a policy's ACL, you can use the `policy clear` command.
7962

8063
```bash
8164
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy clear --policy deploy
8265
```
8366

84-
### Describing Policies
67+
### Describing policies
8568

8669
To get information about a specific policy or all policies, you can use the `policy describe` command.
8770

@@ -92,3 +75,8 @@ docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy describe -
9275
# Describe all policies
9376
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy describe
9477
```
78+
79+
80+
[^1]: **Allowlisting**: The process of explicitly allowing addresses to perform certain actions.
81+
[^2]: **Denylisting**: The process of explicitly denying addresses from performing certain actions.
82+
[^3]: **ACL (access control list)**: A list of addresses that are exceptions to a given policy.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
New doc in progress.

docs/technology/cdk/program.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)