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
Suggestion: migrate the whole of the current WIKI docs into the repo:
4
4
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.
Copy file name to clipboardExpand all lines: docs/cdk/how-to/manage-policies.md
+22-20Lines changed: 22 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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
+
1
10
## Validium node
2
11
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:
4
15
5
16
-**SendTx**: governs whether an address may send transactions to the pool.
6
17
-**Deploy**: governs whether an address may deploy a contract.
7
18
8
19
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.
9
20
10
-
##Architecture
21
+
### Code definitions
11
22
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.
25
27
26
-
##Instructions for using policies
28
+
### How to use a policy
27
29
28
30
| Command name | Description | Flags & parameters |
@@ -36,15 +38,15 @@ The architecture is divided into the following main components:
36
38
!!! note
37
39
For the examples, we are using a `deploy` policy.
38
40
39
-
### Add addresses to a policy
41
+
####Add addresses
40
42
41
43
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.
0 commit comments