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: README.md
+26-8Lines changed: 26 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,18 @@
2
2
3
3
## Getting started
4
4
5
+
Ahead of public release, please add _any_ issues discovered with Attacknet to this Github tracker: https://github.com/crytic/attacknet/issues/59
6
+
Adding issues there will help guide the development of the tool and avoid time wasted on features that don't find good bugs.
7
+
5
8
### Installation/Building
6
9
7
-
1. Install Go 1.20 or newer
10
+
1. Install Go 1.21 or newer
8
11
2. In the project root, run `go build ./cmd/attacknet`
9
12
3. Copy the "attacknet" binary to your PATH or directly invoke it.
10
13
11
14
### Setting up the other bits
12
15
13
-
1. Set up a containerd k8s cluster. (1.26 or older) (todo: recommended resourcing. Also note that auto-scaling can
16
+
1. Set up a containerd k8s cluster. (1.27 or older) (todo: recommended resourcing. Also note that auto-scaling can
14
17
sometimes be too slow, and kurtosis will time out before the nodes for its workload can be provisioned.)
15
18
2. Authenticate to the cluster for kubectl
16
19
3. Install chaos-mesh
@@ -34,13 +37,14 @@ There are three workflows in attacknet:
34
37
## Manually creating/configuring test suites
35
38
36
39
Attacknet is configured using "test suites". These are yaml files found under `./test-suites` that define everything
37
-
Attacknet needs to genesis a network, test the network, and determine the health of the network.
40
+
Attacknet needs to genesis a network, test the network, and determine the health of the network. You may have to manually add/remove
41
+
targeting criteria from these configs depending on the network being tested.
38
42
39
43
Test suite configuration is broken into 3 sections:
40
44
- Attacknet configuration.
41
45
- Harness configuration. This is used to configure the Kurtosis package that will be used to genesis the network.
42
46
- Test configuration. This is used to determine which tests should be run against the devnet and how those tests
43
-
should be configured. As of right now, only the first test in the array is run before exiting.
47
+
should be configured.
44
48
45
49
Here is an annotated test suite configuration that explains what each bit is for:
46
50
```yaml
@@ -86,9 +90,11 @@ testConfig:
86
90
description: wait for faults to terminate
87
91
```
88
92
93
+
Over the long term, expect manual fault configuration to be deprecated in favor of the fault planner.
94
+
89
95
## Automatically creating test suites/network configs using the planner
90
96
91
-
Attacknet can automatically create test suites based off a pre-defined test plan. This can be used to create large, comprehensive test suites that test against a variety of different client combos.
97
+
Attacknet can automatically create test suites based off a pre-defined test plan. This can be used to create large, comprehensive test suites that test against a variety of different client combos. This feature is highly experimental at this time.
92
98
93
99
An example test plan can be found in the `planner-configs/` directory
94
100
Here's an annotated version:
@@ -114,6 +120,8 @@ fault_config:
114
120
fault_type: ClockSkew # which fault to use. A list of faults currently supported by the planner can be found in pkg/plan/suite/types.go in FaultTypeEnum
115
121
target_client: reth # which client to test. this can be an exec client or a consensus client. must show up in the client definitions above.
116
122
wait_before_first_test: 300s # how long to wait before running the first test. Set this to 25 minutes to test against a finalized network.
123
+
bootnode_el: geth
124
+
bootnode_cl: prysm
117
125
fault_config_dimensions: # the different fault configurations to use when creating tests. At least one config dimension is required.
118
126
- skew: -2m # these configs differ for each fault
119
127
duration: 1m
@@ -178,21 +186,31 @@ Once you've got your configuration set up, you can run Attacknet:
178
186
If your suite config is located at `./test-suites/suite.yaml`, you would run `attacknet start suite`. This will
179
187
probably be changed.
180
188
181
-
At this time, health checks will be run in perpetuity once the fault has concluded. Simply ctrl+c to terminate.
189
+
Depending on the state of the Kurtosis package and tons of other variables, a lot of the example test suites/networks might not work out of the box.
190
+
If you're just trying to test things out, use `attacknet start suite`. This refers to a demo test suite that was tested on Jan 30.
182
191
183
192
## Changelog
184
193
185
194
**Dec 15, 2023 version v0.1 (internal)**
186
195
- Initial internal release
187
196
188
-
**Jan 11, 2023 version v0.2 (internal)**
197
+
**Jan 11, 2024 version v0.2 (internal)**
189
198
- Updated to kurtosis v0.86.1
190
199
- Updated to Go 1.21
191
200
- Grafana port-forwarding has been temporarily disabled
192
201
- Introduces multi-step tests. This allows multiple faults and other actions to be composed into a single test.
193
202
- Introduces the suite planner. The suite planner allows the user to define a set of testing criteria/dimensions, which the planner turns into a suite containing multiple tests.
194
203
- Successful & failed test suites now emit test artifacts summarizing the results of the test.
195
-
-
204
+
205
+
**Jan 30, 2024 version v0.3 (internal)**
206
+
- Fixed the demo example suite
207
+
- Fixed issues with the test planner and pod-restart faults.
208
+
- Added bootnode configuration for the test planner.
209
+
- Attack sizes in the test planner now refer to size in the context of the entire network.
210
+
- A supermajority-sized attack will try to target 66%+ nodes in the entire network, not just 66% of the nodes that match the test target criteria.
211
+
- Peer scoring is now disabled for all planner-generated network configurations.
212
+
- Bootnodes are no longer targetable by planner-generated test suites.
0 commit comments