-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
92 lines (75 loc) · 3.65 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
.PHONY: install-eigenlayer-cli
install-eigenlayer-cli:
@set -e
@echo "Installing Go"
@wget https://go.dev/dl/go1.21.0.linux-amd64.tar.gz
@sudo tar -xvf go1.21.0.linux-amd64.tar.gz -C /usr/local
@export GOROOT=/usr/local/go
@export GOPATH=$HOME/go
@export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
@go install github.com/Layr-Labs/eigenlayer-cli/cmd/eigenlayer@latest
@mv $HOME/go/bin/eigenlayer ./bin/
@echo -e "\nexport GOBIN=\$GOPATH/bin\nexport PATH=\$GOBIN:\$PATH" >> $HOME/.bashrc
.PHONY: generate-operator-keys
generate-operator-keys:
@echo "Generating ECDSA Key"
@bin/eigenlayer operator keys create --key-type ecdsa --insecure opacity
@echo "Generating BLS Key"
@bin/eigenlayer operator keys create --key-type bls --insecure opacity
.PHONY: create-operator-config
create-operator-config:
@echo "Creating Operator Config"
@bin/eigenlayer operator config create
.PHONY: register-eigen-operator
register-eigen-operator:
@echo "Registering Operator to EigenLayer"
@bin/eigenlayer operator register operator.yaml
register-opacity-node:
@bin/avs-cli --config config/mainnet/opacity.mainnet.config.yaml register-operator-with-avs
.PHONY: list-keys
list-keys:
@bin/eigenlayer operator keys list
.PHONY: generate-notary-keys
generate-notary-keys:
@mkdir -p fixture/notary
@echo "Generating Notary Keys"
@./generate_notary_keys.sh
.PHONY: mainnet-start-node
mainnet-start-node:
@docker pull opacitylabseulerlagrange/opacity-avs-node:latest
@test -n "$(OPERATOR_ECDSA_KEY_PASSWORD)" || (echo "WARNING: OPERATOR_ECDSA_KEY_PASSWORD is not set")
@test -n "$(OPERATOR_BLS_KEY_PASSWORD)" || (echo "WARNING: OPERATOR_BLS_KEY_PASSWORD is not set")
@test -n "$(OPERATOR_ECDSA_KEY_FILE)" || (echo "WARNING: OPERATOR_ECDSA_KEY_FILE env var is not set")
@test -n "$(OPERATOR_BLS_KEY_FILE)" || (echo "WARNING: OPERATOR_BLS_KEY_FILE env var is not set")
@docker run -d -it --name opacity-avs \
--device /dev/sgx_enclave \
--device /dev/sgx_provision \
--volume $(OPERATOR_ECDSA_KEY_FILE):/opacity-avs-node/config/opacity.ecdsa.key.json \
--volume $(OPERATOR_BLS_KEY_FILE):/opacity-avs-node/config/opacity.bls.key.json \
--volume ./config/mainnet/opacity.mainnet.config.yaml:/opacity-avs-node/config/opacity.config.yaml \
-e OPERATOR_ECDSA_KEY_PASSWORD=$(OPERATOR_ECDSA_KEY_PASSWORD) \
-e OPERATOR_BLS_KEY_PASSWORD=$(OPERATOR_BLS_KEY_PASSWORD) \
-p 7047:7047 opacitylabseulerlagrange/opacity-avs-node:latest
.PHONY: holesky-start-node
holesky-start-node:
@docker pull opacitylabseulerlagrange/opacity-avs-node:latest
@test -n "$(OPERATOR_ECDSA_KEY_PASSWORD)" || (echo "WARNING: OPERATOR_ECDSA_KEY_PASSWORD is not set")
@test -n "$(OPERATOR_BLS_KEY_PASSWORD)" || (echo "WARNING: OPERATOR_BLS_KEY_PASSWORD is not set")
@test -n "$(OPERATOR_ECDSA_KEY_FILE)" || (echo "WARNING: OPERATOR_ECDSA_KEY_FILE env var is not set")
@test -n "$(OPERATOR_BLS_KEY_FILE)" || (echo "WARNING: OPERATOR_BLS_KEY_FILE env var is not set")
@docker run -d -it --name opacity-avs \
--device /dev/sgx_enclave \
--device /dev/sgx_provision \
--volume $(OPERATOR_ECDSA_KEY_FILE):/opacity-avs-node/config/opacity.ecdsa.key.json \
--volume $(OPERATOR_BLS_KEY_FILE):/opacity-avs-node/config/opacity.bls.key.json \
--volume ./config/holesky/opacity.holesky.config.yaml:/opacity-avs-node/config/opacity.config.yaml \
-e OPERATOR_ECDSA_KEY_PASSWORD=$(OPERATOR_ECDSA_KEY_PASSWORD) \
-e OPERATOR_BLS_KEY_PASSWORD=$(OPERATOR_BLS_KEY_PASSWORD) \
-p 7047:7047 opacitylabseulerlagrange/opacity-avs-node:latest
.PHONY: show-node-logs
show-node-logs:
@docker logs --since=1h opacity-avs
.PHONY: dump-node-logs
dump-node-logs:
@docker logs opacity-avs > opacity-avs-node.log
@echo "Logs dumped to opacity-avs-node.log"