Skip to content

Commit 1c914a3

Browse files
authored
Merge pull request #29 from crytic/health-checks
Health checks
2 parents c38dd7e + 16de099 commit 1c914a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1358
-194
lines changed

.golangci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,9 @@ linters:
1010
- staticcheck
1111
- ineffassign
1212
- gosec
13+
14+
issues:
15+
exclude-rules:
16+
- path: pkg/kubernetes/port_forward.go
17+
text: Binds to all network interfaces
18+

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ attacknetConfig:
4848
harnessConfig:
4949
networkPackage: github.com/crytic/ethereum-package # The Kurtosis package to deploy to instrument the devnet.
5050
networkConfig: default.yaml # The configuration to use for the Kurtosis package. These live in ./network-configs and are referenced by their filename.
51-
51+
networkType: ethereum # no touchy
5252

5353
# The list of tests to be run. As of right now, the first test is run and the tool terminates. In the future, we will genesis single-use devnets for each test, run the test, and terminate once all the tests are completed and all the enclaves are cleaned up.
5454
tests:
@@ -78,6 +78,8 @@ Once you've got your configuration set up, you can run Attacknet:
7878
If your suite config is located at `./test-suites/suite.yaml`, you would run `attacknet start suite`. This will
7979
probably be changed.
8080

81+
At this time, health checks will be run in perpetuity once the fault has concluded. Simply ctrl+c to terminate.
82+
8183
## Developing (wip)
8284

8385
1. Install pre-commit

cmd/attacknet/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package main
22

33
import (
44
"attacknet/cmd/pkg"
5+
"attacknet/cmd/pkg/project"
56
"context"
67
"github.com/alecthomas/kong"
78
"log"
@@ -30,19 +31,19 @@ func main() {
3031
if err != nil {
3132
log.Fatal(err)
3233
}
33-
err = pkg.InitializeProject(dir, CLI.Init.Force)
34+
err = project.InitializeProject(dir, CLI.Init.Force)
3435
if err != nil {
3536
log.Fatal(err)
3637
}
3738
case "init <path>":
38-
err := pkg.InitializeProject(CLI.Init.Path, CLI.Init.Force)
39+
err := project.InitializeProject(CLI.Init.Path, CLI.Init.Force)
3940
if err != nil {
4041
log.Fatal(err)
4142
}
4243
case "start <suite name>":
4344
ctx, cancelCtxFunc := context.WithCancel(context.Background())
4445
defer cancelCtxFunc()
45-
cfg, err := pkg.LoadSuiteConfigFromName(CLI.Start.Suite)
46+
cfg, err := project.LoadSuiteConfigFromName(CLI.Start.Suite)
4647
if err != nil {
4748
log.Fatal(err)
4849
}

go.mod

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,45 +5,61 @@ go 1.20
55
require (
66
github.com/alecthomas/kong v0.8.0
77
github.com/chaos-mesh/chaos-mesh/api v0.0.0-20230927082628-87b6322f9b46
8+
github.com/ethereum/go-ethereum v1.13.5
89
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc
910
github.com/kurtosis-tech/kurtosis/api/golang v0.85.9
1011
github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409
1112
github.com/sirupsen/logrus v1.9.0
1213
gopkg.in/yaml.v3 v3.0.1
14+
k8s.io/api v0.28.2
1315
k8s.io/apimachinery v0.28.2
1416
k8s.io/client-go v0.28.2
1517
sigs.k8s.io/controller-runtime v0.16.2
1618
)
1719

1820
require (
1921
github.com/Masterminds/semver/v3 v3.1.1 // indirect
22+
github.com/Microsoft/go-winio v0.6.1 // indirect
23+
github.com/StackExchange/wmi v1.2.1 // indirect
2024
github.com/adrg/xdg v0.4.0 // indirect
2125
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
2226
github.com/andybalholm/brotli v1.0.4 // indirect
2327
github.com/beorn7/perks v1.0.1 // indirect
28+
github.com/bits-and-blooms/bitset v1.7.0 // indirect
29+
github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect
2430
github.com/cespare/xxhash/v2 v2.2.0 // indirect
31+
github.com/consensys/bavard v0.1.13 // indirect
32+
github.com/consensys/gnark-crypto v0.12.1 // indirect
33+
github.com/crate-crypto/go-kzg-4844 v0.7.0 // indirect
2534
github.com/davecgh/go-spew v1.1.1 // indirect
35+
github.com/deckarep/golang-set/v2 v2.1.0 // indirect
36+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
2637
github.com/docker/go-units v0.5.0 // indirect
2738
github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5 // indirect
2839
github.com/emicklei/go-restful/v3 v3.10.1 // indirect
40+
github.com/ethereum/c-kzg-4844 v0.4.0 // indirect
2941
github.com/evanphx/json-patch/v5 v5.6.0 // indirect
3042
github.com/fsnotify/fsnotify v1.6.0 // indirect
3143
github.com/ghodss/yaml v1.0.0 // indirect
3244
github.com/go-logr/logr v1.2.4 // indirect
3345
github.com/go-logr/zapr v1.2.4 // indirect
46+
github.com/go-ole/go-ole v1.2.5 // indirect
3447
github.com/go-openapi/jsonpointer v0.19.6 // indirect
3548
github.com/go-openapi/jsonreference v0.20.2 // indirect
3649
github.com/go-openapi/swag v0.22.3 // indirect
50+
github.com/go-stack/stack v1.8.1 // indirect
3751
github.com/go-yaml/yaml v2.1.0+incompatible // indirect
3852
github.com/gogo/protobuf v1.3.2 // indirect
3953
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
4054
github.com/golang/protobuf v1.5.3 // indirect
41-
github.com/golang/snappy v0.0.4 // indirect
55+
github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect
4256
github.com/google/gnostic-models v0.6.8 // indirect
4357
github.com/google/go-cmp v0.5.9 // indirect
4458
github.com/google/gofuzz v1.2.0 // indirect
4559
github.com/google/uuid v1.3.1 // indirect
60+
github.com/gorilla/websocket v1.4.2 // indirect
4661
github.com/gosimple/slug v1.1.1 // indirect
62+
github.com/holiman/uint256 v1.2.3 // indirect
4763
github.com/imdario/mergo v0.3.13 // indirect
4864
github.com/josharian/intern v1.0.0 // indirect
4965
github.com/json-iterator/go v1.1.12 // indirect
@@ -55,6 +71,7 @@ require (
5571
github.com/mailru/easyjson v0.7.7 // indirect
5672
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
5773
github.com/mholt/archiver/v3 v3.5.1 // indirect
74+
github.com/mmcloughlin/addchain v0.4.0 // indirect
5875
github.com/moby/spdystream v0.2.0 // indirect
5976
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
6077
github.com/modern-go/reflect2 v1.0.2 // indirect
@@ -69,20 +86,28 @@ require (
6986
github.com/prometheus/procfs v0.10.1 // indirect
7087
github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be // indirect
7188
github.com/robfig/cron/v3 v3.0.1 // indirect
89+
github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect
7290
github.com/spf13/pflag v1.0.5 // indirect
7391
github.com/stretchr/objx v0.5.0 // indirect
7492
github.com/stretchr/testify v1.8.4 // indirect
93+
github.com/supranational/blst v0.3.11 // indirect
94+
github.com/tklauser/go-sysconf v0.3.12 // indirect
95+
github.com/tklauser/numcpus v0.6.1 // indirect
7596
github.com/ulikunitz/xz v0.5.10 // indirect
7697
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
7798
go.uber.org/multierr v1.11.0 // indirect
7899
go.uber.org/zap v1.25.0 // indirect
79-
golang.org/x/exp v0.0.0-20230515195305-f3d0a9c9a5cc // indirect
100+
golang.org/x/crypto v0.14.0 // indirect
101+
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
102+
golang.org/x/mod v0.12.0 // indirect
80103
golang.org/x/net v0.17.0 // indirect
81104
golang.org/x/oauth2 v0.8.0 // indirect
105+
golang.org/x/sync v0.3.0 // indirect
82106
golang.org/x/sys v0.13.0 // indirect
83107
golang.org/x/term v0.13.0 // indirect
84108
golang.org/x/text v0.13.0 // indirect
85109
golang.org/x/time v0.3.0 // indirect
110+
golang.org/x/tools v0.13.0 // indirect
86111
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
87112
google.golang.org/appengine v1.6.7 // indirect
88113
google.golang.org/genproto v0.0.0-20230706204954-ccb25ca9f130 // indirect
@@ -92,12 +117,12 @@ require (
92117
google.golang.org/protobuf v1.31.0 // indirect
93118
gopkg.in/inf.v0 v0.9.1 // indirect
94119
gopkg.in/yaml.v2 v2.4.0 // indirect
95-
k8s.io/api v0.28.2 // indirect
96120
k8s.io/apiextensions-apiserver v0.28.1 // indirect
97121
k8s.io/component-base v0.28.2 // indirect
98122
k8s.io/klog/v2 v2.100.1 // indirect
99123
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
100124
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
125+
rsc.io/tmplfunc v0.0.3 // indirect
101126
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
102127
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
103128
sigs.k8s.io/yaml v1.3.0 // indirect

0 commit comments

Comments
 (0)