Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: replace stereum/* docker images in molecule tests & EDIT: CLI import is deactivated #306

Merged
merged 5 commits into from
May 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/test-molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ jobs:
{role: "update-stereum", test: "override", delay: 1},
{role: "ssv-key-generator", test: "default", delay: 1},
{role: "fastsync", test: "default", delay: 90},
{role: "validator-import-lighthouse", test: "default", delay: 10},
{role: "validator-import-nimbus", test: "default", delay: 15},
{role: "validator-import-prysm", test: "default", delay: 20},
{role: "validator-import-teku", test: "default", delay: 25},
]
fail-fast: false
concurrency: molecule-test-${{ matrix.tests.role }}-${{ matrix.tests.test }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
- vc
- --debug-level=debug
- --network=prater
- --beacon-nodes=http://stereum-7c0b52c4-98a3-11ec-85c7-0735587b56e3:5052
- --beacon-nodes=http://stereum-{{ beacon_service }}:5052
- --datadir=/opt/app/validator
- --init-slashing-protection
- --graffiti="stereum.net"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@
user: "2000"
volumes:
- "/opt/app/services/{{ beacon_service }}/beacon:/opt/app/beacon"
- "/opt/app/services/{{ beacon_service }}/validator/validators:/opt/app/validators"
- "/opt/app/services/{{ beacon_service }}/validator:/opt/app/validators"
- "/opt/app/services/{{ beacon_service }}/validator/secrets:/opt/app/secrets"
Original file line number Diff line number Diff line change
Expand Up @@ -58,20 +58,30 @@
state: started
configuration:
id: "{{ beacon_service }}"
image: stereum/lighthouse:v2.0.1-48
env:
DEBUG_LEVEL: debug
NETWORK: prater
ETH1_NODES: MyEth1Node
DATADIR: /opt/app/beacon
SLASHERDIR: /opt/app/slasher
SLASHER_DB_SIZE: "16"
image: sigp/lighthouse:v2.1.2
env: {}
ports:
- 0.0.0.0:9000:9000/tcp
- 0.0.0.0:9000:9000/udp
- 127.0.0.1:5052:5052/tcp
command: []
entrypoint: ["/opt/app/start/beacon.sh"]
command:
- lighthouse
- bn
- --debug-level=debug
- --network=prater
- --eth1-endpoints=http://10.10.0.3:8545
- --eth1-blocks-per-log-query=150
- --datadir=/opt/app/beacon
- --http
- --http-address=0.0.0.0
- --metrics
- --metrics-address=0.0.0.0
- --disable-upnp
- --validator-monitor-auto
- --slasher
- --slasher-dir=/opt/app/slasher
- --slasher-max-db-size=16
entrypoint: []
user: "2000"
volumes:
- "/opt/app/services/{{ beacon_service }}/beacon:/opt/app/beacon"
Expand All @@ -91,17 +101,22 @@
state: started
configuration:
id: "{{ validator_service }}"
image: stereum/lighthouse:v2.0.1-48
env:
DEBUG_LEVEL: info
NETWORK: prater
DATADIR: /opt/app/validator
LAUNCHPADDIR: /opt/app/launchpad
GRAFFITI: stereum.net
BEACON_NODES: "http://stereum-{{ beacon_service }}:5052"
ports: []
command: []
entrypoint: ["/opt/app/start/validator-stereum2.sh"]
image: sigp/lighthouse:v2.2.1
env: {}
ports:
- 127.0.0.1:5062:5062/tcp
command:
- lighthouse
- vc
- --debug-level=debug
- --network=prater
- --beacon-nodes=http://stereum-{{ beacon_service }}:5052
- --datadir=/opt/app/validator
- --init-slashing-protection
- --graffiti="stereum.net"
- --metrics
- --metrics-address=0.0.0.0
entrypoint: []
user: "2000"
volumes:
- "/opt/app/services/{{ validator_service }}/validator:/opt/app/validator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
msg: "{{ stereum_docker_ps }}"
- assert:
that:
- stereum_docker_ps.stdout.find("stereum/lighthouse") != -1
- stereum_docker_ps.stdout.find("sigp/lighthouse") != -1
# Check import expect script
- name: Check lighthouse_validator_import.sh
stat:
Expand Down
23 changes: 15 additions & 8 deletions controls/roles/validator-import-lighthouse/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@
}

spawn sh -c { sudo docker run --rm -it \
-e DEBUG_LEVEL=debug \
-e NETWORK=prater \
-e DATADIR="/opt/app/validator" \
-e DIRECTORY="/opt/app/launchpad" \
-v "/opt/app/services/{{ validator_service_name }}/validator":"/opt/app/validator" \
-v "/opt/app/services/{{ validator_service_name }}/launchpad":"/opt/app/launchpad" \
-v $HOME/.lighthouse:/root/.lighthouse \
-v "/opt/app/services/2e83d610-48b8-11ec-802a-330dee8e6b2e/validator":"/opt/app/validator" \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fixed path, it will break as soon as this actually get's used. However, I don't think we need those CLI imports anymore.

What do you think about deactivating all tests regarding CLI import? It looks like import via API works anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CLI import is deactivated

-v "/opt/app/services/2e83d610-48b8-11ec-802a-330dee8e6b2e/launchpad":"/opt/app/launchpad" \
--user "2000":"2000" \
--net "stereum" \
--entrypoint "/opt/app/start/import-launchpad-wallet.sh" \
validator_image
validator_image \
lighthouse \
--network "prater" \
--datadir "/opt/app/validator" \
account validator import \
--directory "/opt/app/launchpad"
}

expect {
Expand Down Expand Up @@ -70,3 +71,9 @@
chdir: /opt/app/import
changed_when: false
become: yes

- name: Start validator service
docker_container:
name: "stereum-{{ validator_service_name }}"
state: started
become: yes
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
state: started
configuration:
id: "{{ beacon_service }}"
image: stereum/nimbus:v1.5.5-54
image: statusim/nimbus-eth2:multiarch-v22.3.0
ports:
- 0.0.0.0:9000:9000/tcp
- 0.0.0.0:9000:9000/udp
- 127.0.0.1:9190:9190/tcp
env: {}
entrypoint: ["/opt/app/build/nimbus_beacon_node"]
entrypoint: ["/home/user/nimbus-eth2/build/nimbus_beacon_node"]
command:
- --network=prater
- --data-dir=/opt/app/beacon
- --validators-dir=/opt/app/validators
- --secrets-dir=/opt/app/secrets
- --web3-url=MyEth1Node
- --web3-url=ws://10.10.0.2:8545
- --tcp-port=9000
- --udp-port=9000
- --rpc
Expand All @@ -83,7 +83,7 @@
user: "2000"
volumes:
- "/opt/app/services/{{ beacon_service }}/beacon:/opt/app/beacon"
- "/opt/app/services/{{ beacon_service }}/validator/validators:/opt/app/validators"
- "/opt/app/services/{{ beacon_service }}/validator:/opt/app/validators"
- "/opt/app/services/{{ beacon_service }}/validator/secrets:/opt/app/secrets"
- "/opt/app/services/{{ beacon_service }}/launchpad:/opt/app/launchpad"
- /opt/app/import:/opt/app/import
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
msg: "{{ stereum_docker_ps }}"
- assert:
that:
- stereum_docker_ps.stdout.find("stereum/nimbus") != -1
- stereum_docker_ps.stdout.find("statusim/nimbus-eth2") != -1
# Check import expect script
- name: Check nimbus_validator_import.sh
stat:
Expand Down
13 changes: 7 additions & 6 deletions controls/roles/validator-import-nimbus/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@
exit
}

spawn sh -c {
sudo docker exec
-it stereum-{{ beacon_service_name }}
/opt/app/build/nimbus_beacon_node deposits import "/opt/app/launchpad"
--data-dir="/opt/app/validator"
--network="prater" }
spawn sh -c { sudo docker exec -it \
"stereum-{{ beacon_service_name }}" \
"/home/user/nimbus-eth2/build/nimbus_beacon_node" \
deposits import \
--data-dir="/opt/app/validators" \
"/opt/app/launchpad"
}

expect {
"Please enter the password for decrypting" {
Expand Down