diff --git a/controls/roles/update-changes/molecule/223/prepare.yml b/controls/roles/update-changes/molecule/223/prepare.yml index ecbd9c402..98132cbaf 100644 --- a/controls/roles/update-changes/molecule/223/prepare.yml +++ b/controls/roles/update-changes/molecule/223/prepare.yml @@ -102,6 +102,68 @@ mevboost: [] otherServices: [] become: yes + + - name: Create SSVNetworkService config + copy: + dest: "/etc/stereum/services/cb941f15-6eef-4e4d-fc81-4d524b627373.yaml" + owner: "root" + group: "root" + mode: 0644 + content: | + service: SSVNetworkService + id: cb941f15-6eef-4e4d-fc81-4d524b627373 + configVersion: 1 + command: make BUILD_PATH=/go/bin/ssvnode start-node && docker logs ssv_node + entrypoint: [] + env: + CONFIG_PATH: /data/config.yaml + image: bloxstaking/ssv-node:v1.3.8 + ports: + - 0.0.0.0:12000:12000/udp + - 0.0.0.0:13000:13000/tcp + volumes: + - /opt/stereum/ssv_network-cb941f15-6eef-4e4d-fc81-4d524b627373/data:/data + - /opt/stereum/ssv_network-cb941f15-6eef-4e4d-fc81-4d524b627373/secrets:/secrets + user: "2000" + autoupdate: true + network: holesky + dependencies: + executionClients: [] + consensusClients: [] + mevboost: [] + otherServices: [] + become: yes + + - name: Create SSVNetworkService config + copy: + dest: "/etc/stereum/services/611cf17d-adf7-433e-bc4e-2e38c0f502c3.yaml" + owner: "root" + group: "root" + mode: 0644 + content: | + service: SSVNetworkService + id: 611cf17d-adf7-433e-bc4e-2e38c0f502c3 + configVersion: 1 + command: make BUILD_PATH=/go/bin/ssvnode start-node && docker logs ssv_node + entrypoint: [] + env: + CONFIG_PATH: /data/config.yaml + image: ssvlabs/ssv-node:v1.3.8 + ports: + - 0.0.0.0:12000:12000/udp + - 0.0.0.0:13000:13000/tcp + volumes: + - /opt/stereum/ssv_network-611cf17d-adf7-433e-bc4e-2e38c0f502c3/data:/data + - /opt/stereum/ssv_network-611cf17d-adf7-433e-bc4e-2e38c0f502c3/secrets:/secrets + user: "2000" + autoupdate: true + network: holesky + dependencies: + executionClients: [] + consensusClients: [] + mevboost: [] + otherServices: [] + become: yes - name: Create ErigonService config copy: @@ -255,7 +317,7 @@ mevboost: [] otherServices: [] become: yes - + - name: Create FlashbotsMevBoostService config copy: dest: "/etc/stereum/services/5c9c2120-03dc-ffa3-30a8-7faf61f09a3d.yaml" diff --git a/controls/roles/update-changes/molecule/223/verify.yml b/controls/roles/update-changes/molecule/223/verify.yml index b93b016bb..5882e6769 100644 --- a/controls/roles/update-changes/molecule/223/verify.yml +++ b/controls/roles/update-changes/molecule/223/verify.yml @@ -33,6 +33,18 @@ src: "/etc/stereum/services/580c2c43-ad2a-405d-ab78-eb3678383f59.yaml" register: Erigon_service_configuration2_raw + # SSVNetworkService + - name: Read SSVNetworkService file + slurp: + src: "/etc/stereum/services/cb941f15-6eef-4e4d-fc81-4d524b627373.yaml" + register: SSVNetwork_service_configuration_raw + + # SSVNetworkService2 + - name: Read SSVNetworkService file + slurp: + src: "/etc/stereum/services/611cf17d-adf7-433e-bc4e-2e38c0f502c3.yaml" + register: SSVNetwork_service_configuration2_raw + # FlashbotsMevBoostService - name: Read FlashbotsMevBoostService file slurp: @@ -49,6 +61,8 @@ set_fact: Ejector_service_configuration: "{{ Ejector_service_configuration_raw['content'] | b64decode | from_yaml }}" Ejector_service_configuration2: "{{ Ejector_service_configuration2_raw['content'] | b64decode | from_yaml }}" + SSVNetwork_service_configuration: "{{ SSVNetwork_service_configuration_raw['content'] | b64decode | from_yaml }}" + SSVNetwork_service_configuration2: "{{ SSVNetwork_service_configuration2_raw['content'] | b64decode | from_yaml }}" Ejector_service_configuration3: "{{ Ejector_service_configuration3_raw['content'] | b64decode | from_yaml }}" Erigon_service_configuration: "{{ Erigon_service_configuration_raw['content'] | b64decode | from_yaml }}" Erigon_service_configuration2: "{{ Erigon_service_configuration2_raw['content'] | b64decode | from_yaml }}" @@ -81,6 +95,15 @@ msg: "{{ Erigon_service_configuration2_raw['content'] | b64decode }}" - debug: + msg: "{{ SSVNetwork_service_configuration }}" + - debug: + msg: "{{ SSVNetwork_service_configuration_raw['content'] | b64decode }}" + + - debug: + msg: "{{ SSVNetwork_service_configuration2 }}" + - debug: + msg: "{{ SSVNetwork_service_configuration2_raw['content'] | b64decode }}" + msg: "{{ Mev_service_configuration }}" - debug: msg: "{{ Mev_service_configuration_raw['content'] | b64decode }}" @@ -96,10 +119,12 @@ - Ejector_service_configuration.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xEC4BfbAF681eb505B94E4a7849877DC6c600Ca3A') | length == 0 - Ejector_service_configuration2.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xe57B3792aDCc5da47EF4fF588883F0ee0c9835C9') | length == 1 - Ejector_service_configuration2.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xEC4BfbAF681eb505B94E4a7849877DC6c600Ca3A') | length == 0 + - SSVNetwork_service_configuration.image | split(':') | first == 'ssvlabs/ssv-node' + - SSVNetwork_service_configuration2.image == 'ssvlabs/ssv-node:v1.3.8' - Ejector_service_configuration3.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0xfe43A8B0b481Ae9fB1862d31826532047d2d538c') | length == 1 - Ejector_service_configuration3.env.ORACLE_ADDRESSES_ALLOWLIST | from_yaml | select('match', '0x3799bDA7B884D33F79CEC926af21160dc47fbe05') | length == 0 - Erigon_service_configuration.image | split(':') | first == 'erigontech/erigon' - Erigon_service_configuration2.image == 'erigontech/erigon:v2.60.8' - Mev_service_configuration.entrypoint | select('match', 'eden') | length == 0 - Mev_service_configuration2.entrypoint | select('match', 'eden') | length == 0 -# EOF +# EOF \ No newline at end of file diff --git a/controls/roles/update-changes/tasks/2.2.3/ssv_changes.yaml b/controls/roles/update-changes/tasks/2.2.3/ssv_changes.yaml new file mode 100644 index 000000000..0bf3da80f --- /dev/null +++ b/controls/roles/update-changes/tasks/2.2.3/ssv_changes.yaml @@ -0,0 +1,48 @@ +--- +- name: Read service file + slurp: + src: "{{ config_file.path }}" + register: service_configuration_raw + +- name: Parse service's configuration + set_fact: + service_configuration: "{{ service_configuration_raw['content'] | b64decode | from_yaml }}" + +- name: Update SSV image + when: service_configuration.service == "SSVNetworkService" and "bloxstaking" in service_configuration.image + block: + - name: Download update metadata + uri: + url: https://stereum.net/downloads/updates.json + method: GET + return_content: true + status_code: 200 + body_format: json + register: update_data_download + + - name: Set update data + set_fact: + update_data: "{{ update_data_test | default(update_data_download) }}" + + - name: Get latest version for this service + set_fact: + new_service_docker_image_tag: "{{ update_data.json[service_configuration.network][service_configuration.service] | default(update_data.json['mainnet'][service_configuration.service]) | last }}" + + - name: set new config + ansible.utils.update_fact: + updates: + - path: service_configuration.image + value: "ssvlabs/ssv-node:{{ new_service_docker_image_tag }}" + register: updated + + - name: update config + set_fact: + new_service_configuration: "{{ updated.service_configuration }}" + + - name: Write Config + copy: + dest: "{{ config_file.path }}" + content: "{{ new_service_configuration | to_nice_yaml(indent=2) }}" + owner: "root" + group: "root" + mode: 0644 diff --git a/controls/roles/update-changes/tasks/2.2.3/updates-223.yaml b/controls/roles/update-changes/tasks/2.2.3/updates-223.yaml index bca9b7724..8926e74e1 100644 --- a/controls/roles/update-changes/tasks/2.2.3/updates-223.yaml +++ b/controls/roles/update-changes/tasks/2.2.3/updates-223.yaml @@ -10,6 +10,12 @@ loop_control: loop_var: config_file +- name: Include SSV Changes + include_tasks: ssv_changes.yaml + loop: "{{ service_config_files.files }}" + loop_control: + loop_var: config_file + - name: Include Erigon Changes include_tasks: erigon_changes.yaml loop: "{{ service_config_files.files }}" diff --git a/launcher/src/backend/ethereum-services/SSVNetworkService.js b/launcher/src/backend/ethereum-services/SSVNetworkService.js index 5945caf77..df0ff5f7f 100755 --- a/launcher/src/backend/ethereum-services/SSVNetworkService.js +++ b/launcher/src/backend/ethereum-services/SSVNetworkService.js @@ -51,7 +51,7 @@ MetricsAPIPort: 15000`; service.setId(); const workingDir = service.buildWorkingDir(dir); - const image = "bloxstaking/ssv-node"; + const image = "ssvlabs/ssv-node"; const volumes = [new ServiceVolume(workingDir + "/data", "/data"), new ServiceVolume(workingDir + "/secrets", "/secrets")]; diff --git a/launcher/src/backend/tests/unit/SSVNetworkService.test.js b/launcher/src/backend/tests/unit/SSVNetworkService.test.js index 5328ef368..13b9bb802 100755 --- a/launcher/src/backend/tests/unit/SSVNetworkService.test.js +++ b/launcher/src/backend/tests/unit/SSVNetworkService.test.js @@ -56,7 +56,7 @@ test("buildConfiguration", () => { expect(ssvService.ports).toHaveLength(2); expect(ssvService.id).toHaveLength(36); expect(ssvService.user).toMatch(/2000/); - expect(ssvService.image).toMatch(/bloxstaking\/ssv-node/); + expect(ssvService.image).toMatch(/ssvlabs\/ssv-node/); expect(ssvService.configVersion).toBe(1); }); diff --git a/launcher/src/components/UI/services-modal/SsvModal.vue b/launcher/src/components/UI/services-modal/SsvModal.vue index 1f11efe81..9544deaf8 100755 --- a/launcher/src/components/UI/services-modal/SsvModal.vue +++ b/launcher/src/components/UI/services-modal/SsvModal.vue @@ -384,7 +384,7 @@ export default { this.ssvTotalConfig = await ControlService.getSSVTotalConfig(this.ssvService.config.serviceID); // TODO: check image min version - // const imageTag = 'bloxstaking/ssv-node:v1.0.1-hotfix'; + // const imageTag = 'ssvlabs/ssv-node:v1.0.1-hotfix'; // const minimumVersion = '1.1.0'; const imageTag = this.ssvTotalConfig.ssvServiceConfig.image; const minimumVersion = "v1.3.0";