crytic / attacknet

Tool and testing methodology for subjecting blockchain devnets to simulated network and side channel attacks
https://www.trailofbits.com/
GNU Affero General Public License v3.0
55 stars 8 forks source link

Could not launch an ethereum network when running `attacknet start suite` #91

Closed johnzhu0907 closed 6 months ago

johnzhu0907 commented 6 months ago

Description

I'm a newbie to this tool. When I tried to run attacknet start suite on a Linux machine, everything worked well except the vc-2-prysm-geth pod always stayed in pending status.

$ kubectl get pods -A -w
NAMESPACE                                          NAME                                               READY   STATUS    RESTARTS      AGE
chaos-mesh                                         chaos-controller-manager-6f7bff8b7-ct2s5           1/1     Running   0             25m
chaos-mesh                                         chaos-controller-manager-6f7bff8b7-gxd9w           1/1     Running   0             25m
chaos-mesh                                         chaos-controller-manager-6f7bff8b7-tthw7           1/1     Running   0             25m
chaos-mesh                                         chaos-daemon-rpzsm                                 2/2     Running   0             25m
chaos-mesh                                         chaos-dashboard-7db984646f-4bdcr                   1/1     Running   0             25m
chaos-mesh                                         chaos-dns-server-69b544d985-sgts7                  1/1     Running   0             25m
kt-ethereum                                        cl-1-lighthouse-geth                               1/1     Running   0             6m48s
kt-ethereum                                        cl-2-prysm-geth                                    1/1     Running   0             6m41s
kt-ethereum                                        el-1-geth-lighthouse                               1/1     Running   0             6m57s
kt-ethereum                                        el-2-geth-prysm                                    1/1     Running   0             6m52s
kt-ethereum                                        kurtosis-api                                       1/1     Running   0             10m
kt-ethereum                                        validator-key-generation-cl-validator-keystore     1/1     Running   0             10m
kt-ethereum                                        vc-1-lighthouse-geth                               1/1     Running   0             6m35s
kt-ethereum                                        vc-2-prysm-geth                                    0/1     Pending   0             6m31s
kube-system                                        coredns-5dd5756b68-ccjwh                           1/1     Running   0             30m
kube-system                                        etcd-minikube                                      1/1     Running   0             30m
kube-system                                        kube-apiserver-minikube                            1/1     Running   0             30m
kube-system                                        kube-controller-manager-minikube                   1/1     Running   0             30m
kube-system                                        kube-proxy-cs96j                                   1/1     Running   0             30m
kube-system                                        kube-scheduler-minikube                            1/1     Running   0             30m
kube-system                                        storage-provisioner                                1/1     Running   1 (29m ago)   30m
kurtosis-engine-fb89d8da7d084fc6907be0f9fa7e1701   kurtosis-engine-fb89d8da7d084fc6907be0f9fa7e1701   1/1     Running   0             21m
kt-ethereum                                        vc-2-prysm-geth                                    0/1     Terminating   0             15m
kt-ethereum                                        vc-2-prysm-geth                                    0/1     Terminating   0             15m

After 15 minutes, the command terminated and raised the following error.

INFO[0232] [Kurtosis] Using separate validator client for participant #2 
ERRO[1133] [Kurtosis] execution_error:{error_message:"An error occurred executing instruction (number 40) at github.com/kurtosis-tech/ethereum-package/src/vc/vc_launcher.star[190:41]:\nadd_service(name=\"vc-2-prysm-geth\", config=ServiceConfig(image=\"gcr.io/prysmaticlabs/prysm/validator:v5.0.1\", ports={\"metrics\": PortSpec(number=8080, transport_protocol=\"TCP\", application_protocol=\"http\")}, files={\"/keystores\": \"2-prysm-geth-32-63\", \"/network-configs\": \"el_cl_genesis_data\", \"/prysm-password\": \"prysm-password\"}, cmd=[\"--accept-terms-of-use=true\", \"--chain-config-file=/network-configs/network-configs/config.yaml\", \"--wallet-dir=/keystores/node-1-keystores/prysm\", \"--wallet-password-file=/prysm-password/prysm-password.txt\", \"--suggested-fee-recipient=0x8943545177806ED17B9F23F0a21ee5948eCaa776\", \"--disable-monitoring=false\", \"--monitoring-host=0.0.0.0\", \"--monitoring-port=8080\", \"--graffiti=2-geth-prysm\", \"--beacon-rpc-provider={{kurtosis:7be31b91f83a428386e1a49b9b61f987:ip_address.runtime_value}}:4000\", \"--beacon-rest-api-provider={{kurtosis:7be31b91f83a428386e1a49b9b61f987:ip_address.runtime_value}}:4000\"], env_vars={}, private_ip_address_placeholder=\"KURTOSIS_IP_ADDR_PLACEHOLDER\", max_cpu=1000, min_cpu=1000, max_memory=1028, min_memory=1028, labels={\"ethereum-package.client\": \"prysm\", \"ethereum-package.client-image\": \"gcr.io-prysmaticlabs-prysm-validator-v5.0.1\", \"ethereum-package.client-type\": \"validator\", \"ethereum-package.connected-client\": \"prysm\"}, tolerations=[], node_selectors={}))\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/startosis_executor.go:157 (sendErrorAndFail) ---\nCaused by: Unexpected error occurred starting service 'vc-2-prysm-geth'\n --- at /home/circleci/project/core/server/api_container/server/startosis_engine/kurtosis_instruction/add_service/add_service.go:201 (AddServiceCapabilities.Execute) ---\nCaused by: An error occurred creating pod 'vc-2-prysm-geth' using image 'gcr.io/prysmaticlabs/prysm/validator:v5.0.1'\n --- at /home/circleci/project/container-engine-lib/lib/backend_impls/kubernetes/kubernetes_kurtosis_backend/user_services_functions/start_user_services.go:428 (createStartServiceOperation.func1) ---\nCaused by: An error occurred waiting for pod 'vc-2-prysm-geth' to become available\n --- at /home/circleci/project/container-engine-lib/lib/backend_impls/kubernetes/kubernetes_manager/kubernetes_manager.go:1161 (KubernetesManager.CreatePod) ---\nCaused by: Pod 'vc-2-prysm-geth' did not become available after 15m0s; its latest state is 'Pending' and status message is: \nThe pod's container states are as follows:\n --- at /home/circleci/project/container-engine-lib/lib/backend_impls/kubernetes/kubernetes_manager/kubernetes_manager.go:1886 (KubernetesManager.waitForPodAvailability) ---"} 

Can someone take a look? What's the recommended machine configuration for this tool?

Environment

johnzhu0907 commented 6 months ago

After lowering the CPU configuration, I can spin up a local Ethereum network now.