Skip to content

Commit d63aea2

Browse files
adding new file/structure
1 parent c4a5d58 commit d63aea2

File tree

5 files changed

+30
-26
lines changed

5 files changed

+30
-26
lines changed

docs/cdk/edge-suggestion.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
Suggestion: migrate the whole of the current WIKI docs into the repo.
1+
So, we could put the whole thing https://wiki.polygon.technology/docs/edge/ here. However, there may be a better option.
22

3-
[https://github.com/0xPolygon/polygon-edge](https://github.com/0xPolygon/polygon-edge)
3+
Suggestion: migrate the whole of the current WIKI docs into the repo:
44

5-
In a `docs` directory which spins up how it looks currently in the wiki as a docusaurus site, or we can create a simpler static site if required. We can also review and edit like we're doing here but it might not be priority.
5+
https://github.com/0xPolygon/polygon-edge
6+
7+
Into a `docs` directory which spins up how it looks currently in the wiki as a docusaurus site, or we can create a simpler static site if required. We can also review and edit like we're doing here but it might not be priority.
68

79
To discuss with Gabriel.
810

docs/cdk/how-to/manage-policies.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1+
## Policy overview
2+
3+
A **policy** is a set of rules that govern what actions are allowed or denied in the transaction pool.
4+
5+
- **Fine-grained control**: Developers can specify policies at a granular level, allowing or denying specific actions for specific addresses.
6+
- **Dynamic updates**: Policies and ACLs can be updated on-the-fly without requiring a node restart.
7+
- **Database-backed**: All policy data is stored in a PostgreSQL database.
8+
- **Extensible**: New policies can be easily added to the system.
9+
110
## Validium node
211

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:
12+
### Policies
13+
14+
Currently, there are two defined policies:
415

516
- **SendTx**: governs whether an address may send transactions to the pool.
617
- **Deploy**: governs whether an address may deploy a contract.
718

819
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.
920

10-
## Architecture
21+
### Code definitions
1122

12-
The architecture is divided into the following main components:
13-
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.
18-
19-
## Policy features
20-
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.
24-
- **Extensible**: New policies can be easily added to the system.
23+
- **Policy management**: [`cmd/policy.go`](https://github.com/0xPolygon/cdk-validium-node/blob/5399f8859af9ffb0eb693bf395e1f09b53b154de/cmd/policy.go) contains the core logic of policy management.
24+
- **Policy definitions**: [`pool/policy.go`](https://github.com/0xPolygon/cdk-validium-node/blob/5399f8859af9ffb0eb693bf395e1f09b53b154de/pool/policy.go) contains structs and utility functions for policies and ACLs.
25+
- **Data**: [`pgpoolstorage/policy.go`](https://github.com/0xPolygon/cdk-validium-node/blob/5399f8859af9ffb0eb693bf395e1f09b53b154de/pool/policy.go) interacts with the data layer (PostgreSQL database) to store and retrieve policy and ACL data.
26+
- **Policy interface**: [`pool/interfaces.go`](https://github.com/0xPolygon/cdk-validium-node/blob/5399f8859af9ffb0eb693bf395e1f09b53b154de/pool/interfaces.go#L42) contains a `policy` interface which defines the methods that policies must implement.
2527

26-
## Instructions for using policies
28+
### How to use a policy
2729

2830
| Command name | Description | Flags & parameters |
2931
|--------------|-------------------------------------------------------|--------------------------------------------------------------------------------------------------------|
@@ -36,15 +38,15 @@ The architecture is divided into the following main components:
3638
!!! note
3739
For the examples, we are using a `deploy` policy.
3840

39-
### Add addresses to a policy
41+
#### Add addresses
4042

4143
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.
4244

4345
```bash
4446
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy add --policy deploy 0xAddress1
4547
```
4648

47-
### Remove addresses from a policy
49+
#### Remove addresses
4850

4951
To remove addresses from a policy, you can use the `policy remove` command.
5052

@@ -56,15 +58,15 @@ docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy remove --p
5658
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy remove --policy deploy --csv addresses.csv
5759
```
5860

59-
### Clear all addresses from a policy
61+
#### Clear all addresses
6062

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

6365
```bash
6466
docker exec -it cdk-validium-aggregator /app/cdk-validium-node policy clear --policy deploy
6567
```
6668

67-
### Describing policies
69+
#### Get information about a policy
6870

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

File renamed without changes.

docs/cdk/validium-vs-zkevm.md renamed to docs/cdk/specification/validium-vs-zkevm.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Polygon CDK running in validium mode inherits the core functionalities of zkEVM rollup mode and adds a [data availability layer](dac.md).
44

55
!!! danger
6-
How can we say that validium inherits from zkEVM rollup when zkEVM rollup is unavailable?
6+
How can we say that validium inherits from zkEVM rollup when zkEVM rollup is unavailable? Do we mean non-CDK zkEVM rollup? We need to say so.
77

88
## Key differences
99

mkdocs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ nav:
5555
- Manage policies: cdk/how-to/manage-policies.md
5656
#- Architecture:
5757
- Specification:
58-
- Validium vs zkEVM: cdk/validium-vs-zkevm.md
59-
- Performance benchmarks: cdk/performance-benchmarks.md
58+
- Validium vs zkEVM: cdk/specification/validium-vs-zkevm.md
59+
- Performance benchmarks: cdk/specification/performance-benchmarks.md
6060
- Concepts:
6161
- Data availability: cdk/dac.md
6262
# - API:

0 commit comments

Comments
 (0)