Skip to content

Commit

Permalink
Merge pull request #97 from crytic/feat/go-update
Browse files Browse the repository at this point in the history
1.0.1 update
  • Loading branch information
bsamuels453 authored Jul 11, 2024
2 parents 1136983 + ab081ba commit a5c564b
Show file tree
Hide file tree
Showing 31 changed files with 44 additions and 38 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ When making pull requests, **please target the `develop` branch, not main.**

## Changelog

**July 11, 2024 version v1.0.1**
- Updated to Go 1.22.5
- Updated Kurtosis SDK to 1.0
- Modified examples to point at temporary Kurtosis package

**March 18, 2024 version v1.0.0**

First public release!
Expand Down
4 changes: 4 additions & 0 deletions docs/DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ Fundamentally, Attacknet is an orchestration tool for performing Chaos Testing.

To understand its capabilities and how to use it, we've documented a set of "testing workflows", ranging from simple to more complicated, along with accompanying docs on how to use the workflow and what kind of testing it should be used for.

**NOTE**: at this time, the canonical Kurtosis package for deploying Ethereum devnets is located here: https://github.com/ethpandaops/ethereum-package. However, there's been some compatibility issues that are preventing the latest version of the package from working with Attacknet on Kubernetes.

Until it gets fixed, we recommend using the following Kurtosis package, however this package may not work for the latest testnet configurations: `github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f`

### Workflow #1, Inject fault into an existing pod, then quit

For this workflow, we want Attacknet to inject a fault into a pre-existing pod in a pre-existing namespace, then quit.
Expand Down
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
module attacknet/cmd

go 1.21

toolchain go1.21.3
go 1.22.5

require (
github.com/alecthomas/kong v0.8.1
github.com/attestantio/go-eth2-client v0.19.10
github.com/chaos-mesh/chaos-mesh/api v0.0.0-20240104130649-f55576898805
github.com/ethereum/go-ethereum v1.13.8
github.com/grafana-tools/sdk v0.0.0-20220919052116-6562121319fc
github.com/kurtosis-tech/kurtosis/api/golang v0.89.3
github.com/kurtosis-tech/kurtosis/api/golang v1.0.0
github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409
github.com/rs/zerolog v1.29.1
github.com/sirupsen/logrus v1.9.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kurtosis-tech/kurtosis-portal/api/golang v0.0.0-20231031173452-349f1ec9a443 h1:jqFVT4FcZU+wG+y5FV+Xz9+IwNqSyredbcFKHfK2Kh8=
github.com/kurtosis-tech/kurtosis-portal/api/golang v0.0.0-20231031173452-349f1ec9a443/go.mod h1:bWSMQK3WHVTGHX9CjxPAb/LtzcmfOxID2wdzakSWQxo=
github.com/kurtosis-tech/kurtosis/api/golang v0.89.3 h1:yJj+po/Al1zs8EjSKoSA9yLo0S+6kP3wd4W4F8WfoNU=
github.com/kurtosis-tech/kurtosis/api/golang v0.89.3/go.mod h1:9T22P7Vv3j5g6sbm78DxHQ4s9C4Cj3s9JjFQ7DFyYpM=
github.com/kurtosis-tech/kurtosis/api/golang v1.0.0 h1:1yDQk/xmNkUzsSKIU+catjp00w4bMv9SQerWeTam6ls=
github.com/kurtosis-tech/kurtosis/api/golang v1.0.0/go.mod h1:9T22P7Vv3j5g6sbm78DxHQ4s9C4Cj3s9JjFQ7DFyYpM=
github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20240109102239-4ba41ce90af0 h1:/anRCavLbkzCdRMRovtZAx6Dg6di5CgqLciWiQUdNLY=
github.com/kurtosis-tech/kurtosis/contexts-config-store v0.0.0-20240109102239-4ba41ce90af0/go.mod h1:bm+jMBhirwvfuXG99TDZFuvmSwDfeziVJPobRvHgafc=
github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang v0.0.0-20240109102239-4ba41ce90af0 h1:Er0K/PnwBWI+PgKf5KWRjaHccveJwIW4wrM1ebvWMg8=
Expand Down
1 change: 0 additions & 1 deletion network-configs/default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ network_params:
num_validator_keys_per_node: 32
additional_services:
- prometheus_grafana
- dora
persistent: false
4 changes: 2 additions & 2 deletions planner-configs/clock-skew-nethermind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ consensus:
- name: lodestar
image: chainsafe/lodestar:v1.17.0
has_sidecar: true
# https://github.com/kurtosis-tech/ethereum-package/issues/417
# https://github.com/ethpandaops/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f/issues/417
# - name: nimbus
# image: statusim/nimbus-eth2:multiarch-v24.2.2
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-nethermind
topology:
bootnode_el: nethermind
Expand Down
4 changes: 2 additions & 2 deletions planner-configs/clock-skew-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ consensus:
- name: lodestar
image: chainsafe/lodestar:v1.17.0
has_sidecar: true
# https://github.com/kurtosis-tech/ethereum-package/issues/417
# https://github.com/ethpandaops/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f/issues/417
# - name: nimbus
# image: statusim/nimbus-eth2:multiarch-v24.2.2
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-ethereum
topology:
bootnode_el: nethermind
Expand Down
2 changes: 1 addition & 1 deletion planner-configs/clock-skew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ consensus:
has_sidecar: false
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-ethereum
topology:
bootnode_el: geth
Expand Down
4 changes: 2 additions & 2 deletions planner-configs/io-latency-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ consensus:
- name: lodestar
image: chainsafe/lodestar:v1.17.0
has_sidecar: true
# https://github.com/kurtosis-tech/ethereum-package/issues/417
# https://github.com/ethpandaops/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f/issues/417
# - name: nimbus
# image: statusim/nimbus-eth2:multiarch-v24.2.2
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-ethereum
topology:
bootnode_el: nethermind
Expand Down
4 changes: 2 additions & 2 deletions planner-configs/network-latency-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ consensus:
- name: lodestar
image: chainsafe/lodestar:v1.17.0
has_sidecar: true
# https://github.com/kurtosis-tech/ethereum-package/issues/417
# https://github.com/ethpandaops/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f/issues/417
- name: nimbus
image: statusim/nimbus-eth2:multiarch-v24.2.2
has_sidecar: false
Expand All @@ -33,7 +33,7 @@ topology:
targets_as_percent_of_network: 0.40
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-restart-reth
fault_config:
fault_type: NetworkLatency
Expand Down
2 changes: 1 addition & 1 deletion planner-configs/network-packet-drop-geth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ topology:
targets_as_percent_of_network: 0.67
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-packet-drop
fault_config:
fault_type: PacketLoss
Expand Down
4 changes: 2 additions & 2 deletions planner-configs/restart-resillience-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ consensus:
- name: lodestar
image: chainsafe/lodestar:v1.17.0
has_sidecar: true
# https://github.com/kurtosis-tech/ethereum-package/issues/417
# https://github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f/issues/417
- name: nimbus
image: statusim/nimbus-eth2:multiarch-v24.2.2
has_sidecar: false
Expand All @@ -33,7 +33,7 @@ topology:
targets_as_percent_of_network: 0.67
network_params:
num_validator_keys_per_node: 32
kurtosis_package: "github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f"
kurtosis_package: "github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f"
kubernetes_namespace: kt-restart-reth
fault_config:
fault_type: RestartContainers
Expand Down
2 changes: 1 addition & 1 deletion test-suites/clock-skew.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
existingDevnetNamespace: kt-clock-skew-reth

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/cpu-stress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
existingDevnetNamespace: kt-cpu-stress-reth

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/io-fault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/io-latency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/io-mistake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/kernel-fault.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/memory-stress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/network-bandwidth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/network-latency.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: default.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/network-split.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/packet-corruption.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: default.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/packet-drop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/plan/clock-skew-nethermind.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
existingDevnetNamespace: kt-ethereum
harnessConfig:
networkType: ethereum
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: plan/clock-skew-nethermind.yaml
testConfig:
tests:
Expand Down
2 changes: 1 addition & 1 deletion test-suites/plan/network-latency-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
existingDevnetNamespace: kt-restart-reth
harnessConfig:
networkType: ethereum
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: plan/network-latency-reth.yaml
testConfig:
tests:
Expand Down
2 changes: 1 addition & 1 deletion test-suites/plan/packet-drop-geth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
existingDevnetNamespace: kt-packet-drop
harnessConfig:
networkType: ethereum
networkPackage: github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: plan/packet-drop-geth.yaml
testConfig:
tests:
Expand Down
2 changes: 1 addition & 1 deletion test-suites/plan/restart-resillience-reth.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
existingDevnetNamespace: kt-restart-reth
harnessConfig:
networkType: ethereum
networkPackage: github.com/kurtosis-tech/ethereum-package@060fd8fb3ed8e12be895a43912787313c1ad4a5f
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: plan/restart-resillience-reth.yaml
testConfig:
tests:
Expand Down
2 changes: 1 addition & 1 deletion test-suites/pod-kill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: devnet-12.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/pod-restart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: default.yaml
networkType: ethereum

Expand Down
2 changes: 1 addition & 1 deletion test-suites/suite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ attacknetConfig:
allowPostFaultInspection: true

harnessConfig:
networkPackage: github.com/kurtosis-tech/ethereum-package
networkPackage: github.com/crytic/ethereum-package@0ed559c2661989b44cd2a44eca013acd64786f7f
networkConfig: default.yaml
networkType: ethereum
testConfig:
Expand Down

0 comments on commit a5c564b

Please sign in to comment.